Goal
Ensure that the three-tier agent instruction hierarchy introduced in PR #29 is documented in the toolkit's own architecture documentation (arc42), making the mental model and design rationale explicit, discoverable, and verifiable by both AI agents and human reviewers.
Rationale
The toolkit's core mission is to provide:
- Agent-agnostic skills that can guide any AI tool (GitHub Copilot, local agents, code generators)
- Well-structured architecture documentation that serves as the single source of truth for project workflows
- Structured SDL (Secure Development Lifecycle) practices through explicit, machine-readable architecture
PR #29 introduces a significant architectural decision: a three-tier instruction hierarchy (global → project → skill → toolkit). This design is documented in individual skill files and templates, but it should also be present in the toolkit's own arc42 architecture documentation so that:
- The architecture is self-describing: New users and consuming projects can read the toolkit's own arc42 docs to understand how instruction hierarchies work
- Agents can verify alignment: Agents reading the arc42 docs can validate that project-specific instructions follow the documented pattern
- SDL workflows are explicit: The documentation makes clear how instructions relate to secure development practices and traceability
- Future enhancements are grounded in architecture: Follow-up improvements (like diagrams, examples, and update mechanisms) reference the architectural model
First Step: Audit Existing Architecture Documentation
Before adding or restructuring architecture docs, check whether:
If documentation exists, assess whether it clearly conveys the agent instruction hierarchy and its design rationale.
Implementation
If gaps are found, enhance the arc42 architecture documentation to include:
-
In Arc42 Chapter 4 (Solution Strategy) or Chapter 8 (Concepts):
- A section explaining "Agent Instruction Hierarchy" or "Agent Configuration Model"
- The three tiers: global (user's local installation) → project-specific → toolkit defaults
- Design rationale: why this hierarchy exists and how it enables both agent agnosticism and project customization
- Link to the three template files and their roles
-
In Arc42 Chapter 2 (Constraints) or Chapter 5 (Building Block View):
- A structural view or decision tree showing how agents discover and apply instructions
- Which instruction level applies in which contexts (standalone project vs. toolkit consumer vs. developer using a local agent)
- How instruction precedence prevents conflicts and duplication
-
In a dedicated skill or section:
- Explicit relationship between "agent instructions" and "SDL workflows"
- How instruction hierarchy enforces security and traceability practices
- Examples of how consuming projects define their own instruction layer without forking the toolkit
-
Visual aids (diagrams, flowcharts, or tables):
- Directory structure showing where each instruction tier lives
- Decision tree showing instruction precedence
- Reference to PlantUML or ASCII diagrams (consistent with toolkit style)
-
Traceability and relations:
Definition of Done
Goal
Ensure that the three-tier agent instruction hierarchy introduced in PR #29 is documented in the toolkit's own architecture documentation (arc42), making the mental model and design rationale explicit, discoverable, and verifiable by both AI agents and human reviewers.
Rationale
The toolkit's core mission is to provide:
PR #29 introduces a significant architectural decision: a three-tier instruction hierarchy (global → project → skill → toolkit). This design is documented in individual skill files and templates, but it should also be present in the toolkit's own
arc42architecture documentation so that:First Step: Audit Existing Architecture Documentation
Before adding or restructuring architecture docs, check whether:
src/docs/arc42/already contains sections explaining agent instruction models or instruction precedenceAGENTS.md(if it exists) is included or referenced in the arc42 documentationsrc/docs/If documentation exists, assess whether it clearly conveys the agent instruction hierarchy and its design rationale.
Implementation
If gaps are found, enhance the arc42 architecture documentation to include:
In Arc42 Chapter 4 (Solution Strategy) or Chapter 8 (Concepts):
In Arc42 Chapter 2 (Constraints) or Chapter 5 (Building Block View):
In a dedicated skill or section:
Visual aids (diagrams, flowcharts, or tables):
Traceability and relations:
Definition of Done