Imported from WoJiSama/skill-based-architecture (
templates/shells/AGENTS.md). Install upstream withnpx skills add WoJiSama/skill-based-architecture --skill shells. Copyright stays with the author.
AGENTS.md
{{SUMMARY}}
Formal docs live under skills/. Read skills/*/SKILL.md — default to primary: true skill; only switch when task clearly matches another skill's description.
Conflicts between loaded project instructions → formal docs in skills/{{NAME}}/ win. This does not override harness-native skill name precedence.
Always Read (every task, before workflow selection)
- None by default; workflows load knowledge at evidence and phase boundaries.
Request-clarity judgment: vague wording is a signal, not an automatic blocker. Use bounded read-only project evidence to derive scope; ask only for an unresolved normative preference, authority boundary, or materially different outcome. Do not mutate before the outcome is verifiable.
See skills/{{NAME}}/protocol-blocks/ambiguous-request-gate.md.
Route metadata lives in skills/{{NAME}}/routing.yaml; the bootstrap below tells agents how to match it.
Quick Routing (survives context truncation)
Task routes live in skills/{{NAME}}/routing.yaml.
For every new task:
- Read
skills/{{NAME}}/routing.yaml. - Match exactly one task route by
labels,trigger_examples, and task intent; if none matches, useother. - Follow only that route's
workflow; the task route does not preload knowledge. - Let the workflow inspect the smallest evidence that can decide the next action.
- Only when an explicit business-rule request, a source Plan already declares the applicable business-domain owner, or evidence proves an unresolved decision is business-bearing, read optional
skills/{{NAME}}/domain-routing.yaml. Read a governing source Plan directly through its workflow; its existence alone does not activate a domain. Keywords identify candidates only. Append one domain owner's reads by default; never replace the task workflow. - Load mutation, testing, managed-execution, and closure contracts only when their phase begins.
Auto-Triggers
- New task in same session → always re-match the route from canonical
routing.yaml. After a route change, read the new workflow; after compaction, recover only the current workflow and decision-relevant evidence. Only one clear read-only or fixed-contract maintenance action/check with no new desired behavior executes directly. A request that adds or changes user-visible behavior, a business flow/state, or an external contract followsskills/{{NAME}}/workflows/task-execution.md, first reaches requirement-ready; if desired meaning is incomplete, it returns current understanding, real risk/conflict, and the minimum normative question without an implementation Plan. It then establishes a Task Anchor, proves the current owner and Current -> Target until implementation-ready, and only afterward derives a concise harness-native Plan before mutation. Present only useful alignment, do not repeat visible steps in chat, and run the compact Anchor Checkpoint before each main step. This is Session recitation, not planning-file persistence. Can't tell if context compacted? Re-read the current workflow. - Before any requested commit/push/MR/deploy/publish delivery, or before declaring any non-trivial task complete → enter Task Closure Protocol (see
skills/{{NAME}}/workflows/task-closure.md);Ready for Deliveryis not completion - When user asks to "record/save/remember" something → project-level knowledge goes to
skills/{{NAME}}/docs; personal preferences go to agent memory
Red Flags — STOP
- "Just this once I'll skip the AAR" → stop. See
skills/{{NAME}}/workflows/task-closure.md§ Rationalizations to Reject.