diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-11-13 17:04:55 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-11-13 17:04:55 +0100 |
| commit | 01805b0a7b78e4eed2c30f5c34e0044a0b240634 (patch) | |
| tree | 51c4b83b67157542e99e9992e14d1df8cf1de806 /.agents/skills/review-subsystem | |
| parent | 5d434c0103942ab66d3554d590d48fd0ad445858 (diff) | |
| download | kernel-01805b0a7b78e4eed2c30f5c34e0044a0b240634.tar.xz kernel-01805b0a7b78e4eed2c30f5c34e0044a0b240634.zip | |
agents: implement basic rules and skills
Diffstat (limited to '.agents/skills/review-subsystem')
| -rw-r--r-- | .agents/skills/review-subsystem/SKILL.md | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/.agents/skills/review-subsystem/SKILL.md b/.agents/skills/review-subsystem/SKILL.md new file mode 100644 index 00000000..1367c575 --- /dev/null +++ b/.agents/skills/review-subsystem/SKILL.md @@ -0,0 +1,71 @@ +--- +name: review-subsystem +description: Architecture and code review of an existing TeachOS subsystem (for example VFS, memory allocators, the device model, kstd, ACPI) with no diff involved. Use for design audits, preparing a refactoring or extension, or getting oriented in an area. For pending diffs, branches or MRs, use review-changes. +--- + +# Review an existing subsystem + +Mentor mode applies (AGENTS.md ยง1): analysis, trade-offs and direction, never implementations. +Report in the conversation, not in the repository. + +## 1. Scope + +If the subsystem is ambiguous, ask. +List its files: `git ls-files <dirs>`, split into interface headers, implementation, tests and docs. +State the boundary. +If it is large [threshold: ~40 files], review a vertical slice and say what you left out. + +## 2. Reading order + +1. Interface headers, then the relevant `docs/briefs/` and `docs/`. +2. Implementation. +3. Tests. +4. History: `git log --oneline -- <paths>`. + Recent churn shows unstable or unclear areas. + +## 3. Build a model before critiquing + +Write a short "what this is" that the maintainer can confirm or correct: responsibilities, key types and who owns them, lifecycle, dependencies in and out (map includes with `git grep -n '#include'`), execution contexts (boot, thread, interrupt), and the invariants the code relies on. + +## 4. Analyses (each may yield findings) + +- Architecture: + cohesion, coupling, layering violations, whether the abstractions fit, use of the `kapi` seam, consistency with recorded decisions. + List places where docs and code disagree. +- Correctness risks: + error paths, cleanup, lifetimes, state machines, integer edge cases, unimplemented branches. +- Concurrency and interrupts: + inventory the shared state, what protects it, lock ordering, what can run in interrupt context. +- Freestanding discipline: + kstd use, hidden allocation, stack use. +- Tests: + what is covered against the risks above, and what is untestable and why (usually coupling to hardware). +- Teachability: + could this be explained in a lecture? + Separate essential complexity from accidental complexity. + Is it a good teaching example, or an advanced topic that needs prerequisites? +- Precedent: + how Linux, the BSDs, xnu or Windows handle the same problem, with a confidence label, and what is worth borrowing or avoiding. + Provide references when possible. + +## 5. Design questions + +Where a real choice exists, lay out the options with trade-offs, then take a position and say what would change it. +Don't present one answer as obvious. + +## 6. Report + +1. Overview: the model from step 3. +2. Strengths: specific and factual, not praise. +3. Findings: + most severe first. + Each has `path:line`, what and why, severity (High / Medium / Low), and confidence (verified or inferred). +4. Design trade-offs. +5. Docs versus code divergences. +6. Follow-ups, each sized roughly (afternoon / week / thesis-sized). +7. Not covered: what you didn't read, and any question that depends on planning documents outside this repository. + +Rules: every finding cites a location. +Don't claim a property of the code you did not read. +If a conclusion depends on a decision that isn't recorded in the repository, say so and ask. +Don't rewrite anything.
\ No newline at end of file |
