Files
second-brain/04-learning/guides/brain/documentation-and-investigation-skills-walkthrough.md
T
kiskaadee 6db3cc9b54
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 7s
agent(router): adopt dual-audience package architecture
- Refactor documentation-router into an encapsulated capability package
- Author human-facing README following 7-part capability contract (Human API)
- Preserve agent operational specification in SKILL.md with quoted Mermaid edge labels
- Package modular authoring reference specifications under references/
- Document the Skill Package Architecture pattern in 05-agents/README.md
- Update intra-vault cross-references across journal, guide, and ADR
2026-09-30 12:27:17 -05:00

4.6 KiB
Raw Blame History

type, project, tags
type project tags
guide brain
brain
skills
investigation
documentation-router
walkthrough

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/engineering-investigation/SKILL.md
  • Vault Specification: 05-agents/skills/engineering-investigation.md
  • Role: Purely empirical troubleshooting following the scientific method (Observation \to Verification) and the 6-part interactive checkpoint protocol.
  • Boundary: Stops cleanly upon verified recovery; hands off to documentation-router if non-obvious learning or architectural questions emerged.

B. Documentation Router Skill

  • Runtime Location: ~/.gemini/config/skills/documentation-router/SKILL.md
  • Vault Specification: 05-agents/skills/documentation-router/README.md
  • 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/:

  1. discussion-authoring.md: Exploratory narrative, preserves uncertainty and rejected alternatives, zero "decision voice".
  2. 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.
  3. plan-authoring.md: Authoritative implementation specification, ordered execution (P0–P5), pure constraints without re-arguing rationale, verification gates, runbooks, and DoD.
  4. 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 Investigation from Global Rule: Architectural & Project Documentation.

3. Verification

  • Skills discovered in ~/.gemini/config/skills/:
    • engineering-investigation
    • documentation-router (with 4 authoring reference documents)
  • python scripts/validate-brain.py && python scripts/test_validator.py: ✅ All checks passed.