Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 8s
- Delete duplicated skill folders under 05-agents/skills/ - Update 05-agents/skills/README.md to point to https://github.com/kiskaadee/skills - Update operational skill links in AGENTS.md and guides - Verified by validate-brain.py (0 errors)
4.5 KiB
4.5 KiB
type, project, tags
| type | project | tags | |||||
|---|---|---|---|---|---|---|---|
| guide | brain |
|
Walkthrough: Global Documentation Router & Investigation Skills
Operational walkthrough for the implementation of the decoupled, reusable global skill system separating procedural engineering investigation from second-order architectural documentation treatment.
1. System Architecture
Engineering Session
│
┌─────────────┴─────────────┐
│ │
▼ ▼
Investigation Skill Documentation Router
"How do I reason?" "What should be preserved?"
(Procedural / Empirical) (Second-Order Knowledge Filter)
│ │
▼ ▼
Verified System State Is an artifact justified?
│
┌───────────┼───────────┬───────────┐
▼ ▼ ▼ ▼
Discussion ADR Plan Debug Record
(WHY) (WHAT) (HOW) (RCA)
The Cardinal Invariant
Documentation type is determined by the nature of the knowledge being preserved, not by the activity that produced it.
2. Implemented Artifacts & Locations
A. Procedural Investigation Skill
- Runtime Location:
~/.gemini/config/skills/diagnose/SKILL.md - Repository Specification:
skills/diagnose - Role: Purely empirical troubleshooting following the scientific method (Observation
\toVerification) and the 6-part interactive checkpoint protocol. - Boundary: Stops cleanly upon verified recovery; hands off to
documentif non-obvious learning or architectural questions emerged.
B. Documentation Skill
- Runtime Location:
~/.gemini/config/skills/document/SKILL.md - Repository Specification:
skills/document - Role: Second-order knowledge filter and gatekeeper (anti-markdown factory).
- Core Rules:
- Gatekeeping: Routine/trivial tasks produce NO ARTIFACT.
- Classification: Maps knowledge to Discussion (WHY), ADR (WHAT decided), Plan (HOW to build), or Debug Record (Empirical RCA).
- Multi-Artifact Coordination: Decomposes multi-faceted sessions into discrete artifacts.
- Optional Relationships vs. Pipelines: Discussions may inform ADRs; ADRs may constrain Plans. These describe optional information flow and authority boundaries, not a mandatory documentation pipeline. Each artifact may exist independently whenever justified.
- Anti-Overlap: The same fact may appear in multiple documents only when it serves a different epistemic purpose.
C. Modular Authoring Reference Specifications
Packaged under ~/.gemini/config/skills/documentation-router/references/:
discussion-authoring.md: Exploratory narrative, preserves uncertainty and rejected alternatives, zero "decision voice".adr-authoring.md: Strict MADR 4.0 standard, compact architectural commitments, content-addressed OCI digest immutability vs. mutable tags, delegating field-level schema representation to the Plan.plan-authoring.md: Authoritative implementation specification, ordered execution (P0–P5), pure constraints without re-arguing rationale, verification gates, runbooks, and DoD.debug-record-authoring.md: Historical investigation / RCA record covering bugs, regressions, system anomalies, failed migrations, configuration errors, and unexpected behaviors.
D. Global Rules Decoupling
- Location:
~/.gemini/config/AGENTS.md - Separated
Global Rule: Engineering InvestigationfromGlobal Rule: Architectural & Project Documentation.
3. Verification
- Skills discovered in
~/.gemini/config/skills/:engineering-investigationdocumentation-router(with 4 authoring reference documents)
python scripts/validate-brain.py && python scripts/test_validator.py:✅ All checks passed.