agent(router): adopt dual-audience package architecture
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 7s
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 7s
- 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
This commit is contained in:
1 parent
454e3fc888
commit
6db3cc9b54
12 files changed
+767
-75
No files matched your search
@@ -72,7 +72,7 @@ We deploy `skill-builder` (`~/.gemini/config/skills/skill-builder/SKILL.md` and
|
|||||||
* **Mandatory Review Gate**: `skill-builder` halts at a formal **Skill Design Specification** and requires explicit human approval before any files are authored.
|
* **Mandatory Review Gate**: `skill-builder` halts at a formal **Skill Design Specification** and requires explicit human approval before any files are authored.
|
||||||
|
|
||||||
### 4. Epistemic Integration of Knowledge Articles
|
### 4. Epistemic Integration of Knowledge Articles
|
||||||
We formalize **Knowledge Articles** (`04-learning/knowledge/`, `type: knowledge`) within [`documentation-router`](../../05-agents/skills/documentation-router.md):
|
We formalize **Knowledge Articles** (`04-learning/knowledge/`, `type: knowledge`) within [`documentation-router`](../../05-agents/skills/documentation-router/README.md):
|
||||||
* Governed by `references/knowledge-authoring.md` (in `documentation-router`).
|
* Governed by `references/knowledge-authoring.md` (in `documentation-router`).
|
||||||
* Captures generalized, reusable understanding and methodologies written in a side-by-side learner voice.
|
* Captures generalized, reusable understanding and methodologies written in a side-by-side learner voice.
|
||||||
* Preserves canonical ownership: general lessons live in Knowledge; project explorations live in Discussions; point-in-time commitments live in ADRs; implementation steps live in Plans; incident RCAs live in Debug Records.
|
* Preserves canonical ownership: general lessons live in Knowledge; project explorations live in Discussions; point-in-time commitments live in ADRs; implementation steps live in Plans; incident RCAs live in Debug Records.
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ tags:
|
|||||||
|
|
||||||
### Agent Skill Engineering & Skill-Builder Meta-Skill Creation
|
### Agent Skill Engineering & Skill-Builder Meta-Skill Creation
|
||||||
- Conducted an in-depth empirical investigation of Matt Pocock's skills repository (`mattpocock/skills`), studying skill anatomy, invocation modes, operational state machines, negative boundaries, progressive disclosure, and context load economics.
|
- Conducted an in-depth empirical investigation of Matt Pocock's skills repository (`mattpocock/skills`), studying skill anatomy, invocation modes, operational state machines, negative boundaries, progressive disclosure, and context load economics.
|
||||||
- Formalized **Knowledge Articles** as an explicit epistemic document type in [`documentation-router`](../../05-agents/skills/documentation-router.md), authoring the specification `references/knowledge-authoring.md` based on a side-by-side learner voice and rhetorical restraint.
|
- Formalized **Knowledge Articles** as an explicit epistemic document type in [`documentation-router`](../../05-agents/skills/documentation-router/README.md), authoring the specification `references/knowledge-authoring.md` based on a side-by-side learner voice and rhetorical restraint.
|
||||||
- Authored the durable knowledge article [How to Build Effective Agent Skills](../../04-learning/knowledge/methods/building-effective-agent-skills.md), explaining why essay prompts fail, introducing the assembly jig / airlock mental model, and codifying the single observable proof heuristic.
|
- Authored the durable knowledge article [How to Build Effective Agent Skills](../../04-learning/knowledge/methods/building-effective-agent-skills.md), explaining why essay prompts fail, introducing the assembly jig / airlock mental model, and codifying the single observable proof heuristic.
|
||||||
- Derived the Skill-Engineering Methodology based on 4 structural sizing archetypes (Reference, Transformation, Procedural Workflow, Interactive Elicitation) and a 4-tier epistemic architecture (Engineering Invariants, Platform Constraints, Contextual Heuristics, Authoring Quality).
|
- Derived the Skill-Engineering Methodology based on 4 structural sizing archetypes (Reference, Transformation, Procedural Workflow, Interactive Elicitation) and a 4-tier epistemic architecture (Engineering Invariants, Platform Constraints, Contextual Heuristics, Authoring Quality).
|
||||||
- Designed and implemented the [`skill-builder`](../../05-agents/skills/skill-builder.md) meta-skill (deployed to `~/.gemini/config/skills/skill-builder/` and `/build-skill`) as an interactive coach with a mandatory Design Review Gate.
|
- Designed and implemented the [`skill-builder`](../../05-agents/skills/skill-builder.md) meta-skill (deployed to `~/.gemini/config/skills/skill-builder/` and `/build-skill`) as an interactive coach with a mandatory Design Review Gate.
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Operational walkthrough for the implementation of the decoupled, reusable global
|
|||||||
|
|
||||||
### B. Documentation Router Skill
|
### B. Documentation Router Skill
|
||||||
- **Runtime Location**: `~/.gemini/config/skills/documentation-router/SKILL.md`
|
- **Runtime Location**: `~/.gemini/config/skills/documentation-router/SKILL.md`
|
||||||
- **Vault Specification**: [`05-agents/skills/documentation-router.md`](../../../05-agents/skills/documentation-router.md)
|
- **Vault Specification**: [`05-agents/skills/documentation-router/README.md`](../../../05-agents/skills/documentation-router/README.md)
|
||||||
- **Role**: Second-order knowledge filter and gatekeeper (anti-markdown factory).
|
- **Role**: Second-order knowledge filter and gatekeeper (anti-markdown factory).
|
||||||
- **Core Rules**:
|
- **Core Rules**:
|
||||||
- **Gatekeeping**: Routine/trivial tasks produce **NO ARTIFACT**.
|
- **Gatekeeping**: Routine/trivial tasks produce **NO ARTIFACT**.
|
||||||
|
|||||||
+16
-1
@@ -13,6 +13,21 @@ Rather than treating agent rulebooks (`AGENTS.md`) as transient, untracked local
|
|||||||
3. **Canonical Specification**: Preserves the complete, verbatim behavioral prompt deployed in the target environment.
|
3. **Canonical Specification**: Preserves the complete, verbatim behavioral prompt deployed in the target environment.
|
||||||
4. **Cross-References**: Connects the agent profile to project overviews, incident journals, and architecture guides.
|
4. **Cross-References**: Connects the agent profile to project overviews, incident journals, and architecture guides.
|
||||||
|
|
||||||
|
### Skill Package Architecture (Dual-Audience Separation)
|
||||||
|
|
||||||
|
Skills in `05-agents/skills/` are organized as encapsulated capability packages rather than flat, monolithic prompts:
|
||||||
|
|
||||||
|
```text
|
||||||
|
05-agents/skills/<skill-name>/
|
||||||
|
├── README.md # Human API (Identity, Value, Invocation, Behavior, Outputs, Boundaries)
|
||||||
|
├── SKILL.md # Agent Specification (Runtime engine, invariants, decision procedures)
|
||||||
|
└── references/ # Deep-dive modules loaded on demand (progressive disclosure)
|
||||||
|
```
|
||||||
|
|
||||||
|
- **`README.md` (Human API)**: The canonical Brain graph citizen (`type: agent`, `kind: skill`). Focuses strictly on the **capability contract**: what the skill is, why it matters, when to invoke it, expected outputs, negative boundaries, and package manifest.
|
||||||
|
- **`SKILL.md` (Operational Engine)**: The runtime prompt consumed by Antigravity (`~/.gemini/config/skills/`). Focuses strictly on **agent execution**: state machines, decision procedures, anti-skipping invariants, and behavioral anchors.
|
||||||
|
- **`references/` (Modular Contracts)**: Modular specifications loaded by the agent on demand, preventing attention dilution.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Catalog of Agent Specifications
|
## Catalog of Agent Specifications
|
||||||
@@ -31,7 +46,7 @@ Rather than treating agent rulebooks (`AGENTS.md`) as transient, untracked local
|
|||||||
| Skill | Target Workspace | Primary Capability | Status |
|
| Skill | Target Workspace | Primary Capability | Status |
|
||||||
| :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- |
|
||||||
| [Engineering Investigation](skills/engineering-investigation.md) | Global (`~/.gemini/config/skills/`) | Scientific investigation lifecycle, 6-part interactive checkpoints, and runtime verification | `active` |
|
| [Engineering Investigation](skills/engineering-investigation.md) | Global (`~/.gemini/config/skills/`) | Scientific investigation lifecycle, 6-part interactive checkpoints, and runtime verification | `active` |
|
||||||
| [Documentation Router](skills/documentation-router.md) | Global (`~/.gemini/config/skills/`) | Second-order knowledge evaluation, epistemic classification, anti-overlap invariants, and authoring modules | `active` |
|
| [Documentation Router](skills/documentation-router/README.md) | Global (`~/.gemini/config/skills/`) | Second-order knowledge evaluation, epistemic classification, anti-overlap invariants, and authoring modules | `active` |
|
||||||
| [Engineering Tutor](skills/engineering-tutor.md) | Global (`~/.gemini/config/skills/`) | Practice mode, Socratic graduated assistance, learner-as-primary-agent, and transfer verification | `active` |
|
| [Engineering Tutor](skills/engineering-tutor.md) | Global (`~/.gemini/config/skills/`) | Practice mode, Socratic graduated assistance, learner-as-primary-agent, and transfer verification | `active` |
|
||||||
| [Git Commit & History Hygiene](skills/git-commit.md) | Global (`~/.gemini/config/skills/`) | GitKeeper history construction, atomic commit slicing, 3-level CC messages, and readiness gates | `active` |
|
| [Git Commit & History Hygiene](skills/git-commit.md) | Global (`~/.gemini/config/skills/`) | GitKeeper history construction, atomic commit slicing, 3-level CC messages, and readiness gates | `active` |
|
||||||
| [Skill Builder](skills/skill-builder.md) | Global (`~/.gemini/config/skills/`) | Interactive skill design, proportional sizing, boundary review, and empirical refinement | `active` |
|
| [Skill Builder](skills/skill-builder.md) | Global (`~/.gemini/config/skills/`) | Interactive skill design, proportional sizing, boundary review, and empirical refinement | `active` |
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
---
|
|
||||||
type: agent
|
|
||||||
status: active
|
|
||||||
name: documentation-router
|
|
||||||
kind: skill
|
|
||||||
project: brain
|
|
||||||
tags:
|
|
||||||
- documentation
|
|
||||||
- router
|
|
||||||
- epistemic-taxonomy
|
|
||||||
- knowledge-governance
|
|
||||||
---
|
|
||||||
|
|
||||||
# Documentation Router Skill
|
|
||||||
|
|
||||||
Canonical store of the global agent skill for session context evaluation, epistemic classification, anti-overlap enforcement, and modular documentation authoring.
|
|
||||||
|
|
||||||
* **Runtime Customization Path**: `~/.gemini/config/skills/documentation-router/SKILL.md`
|
|
||||||
* **Applicable Workspaces**: Global (workstation-wide across all repositories and directories).
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 1. The Cardinal Invariant
|
|
||||||
|
|
||||||
> **Documentation type is determined by the nature of the knowledge being preserved, not by the activity that produced it.**
|
|
||||||
|
|
||||||
* A debugging session discovering an underlying architectural misconception produces a **Discussion** or an **ADR**, not merely a Debug Record.
|
|
||||||
* An architectural debate that reaches a firm point-in-time consensus produces an **ADR**; if it remains exploratory, it remains a **Discussion**.
|
|
||||||
* An implementation task that uncovers an unaddressed architectural question must pause and route to an **ADR** before proceeding with the **Plan**.
|
|
||||||
* A routine bug fix or maintenance chore produces **NO ARTIFACT**.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 2. Epistemic Classification & Routing
|
|
||||||
|
|
||||||
| Knowledge Produced | Epistemic Role | Target Container | Governing Module |
|
|
||||||
| :--- | :--- | :--- | :--- |
|
|
||||||
| Explorations, inquiries, trade-offs, pain points, alternatives evaluated, and historical evolution. | **WHY** | `02-discussions/` (`type: discussion`) | `references/discussion-authoring.md` |
|
|
||||||
| Point-in-time architectural commitments, decision drivers, forces, and accepted trade-offs. | **WHAT was decided** | `03-records/decisions/` (`type: decision`) | `references/adr-authoring.md` |
|
|
||||||
| Authoritative implementation specifications, constraints, phased execution (P0–P5), runbooks, and DoD. | **HOW to build it** | `01-plans/` (`type: plan`) | `references/plan-authoring.md` |
|
|
||||||
| Historical investigation of unexpected system behaviors, regressions, bugs, or anomalies. | **Empirical RCA** | `03-records/debug/` (`type: debug`) | `references/debug-record-authoring.md` |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 3. Relationships & Authority Boundaries
|
|
||||||
|
|
||||||
```text
|
|
||||||
Discussion ──informs──> ADR ──constrains──> Plan
|
|
||||||
^ ^ |
|
|
||||||
└──────────────────────┴─────────────────┘
|
|
||||||
cross-references
|
|
||||||
```
|
|
||||||
|
|
||||||
> **Rule on Relationships vs. Pipelines**:
|
|
||||||
> Discussions may inform ADRs; ADRs may constrain Plans. These relationships describe **optional information flow and authority boundaries, not a mandatory documentation lifecycle**.
|
|
||||||
>
|
|
||||||
> * A Discussion may exist and remain open or resolved without generating an ADR or Plan.
|
|
||||||
> * An ADR may be authored directly for a clear architectural commitment without requiring a preceding Discussion artifact.
|
|
||||||
> * A Plan may be authored for a known engineering project without requiring a preceding Discussion or ADR.
|
|
||||||
> * A Debug Record stands alone as historical memory of an investigation.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 4. Anti-Overlap Invariants & Fact Ownership
|
|
||||||
|
|
||||||
1. **Rule of Epistemic Purpose**: The same fact may appear in multiple documents **only when it serves a different epistemic purpose**.
|
|
||||||
2. **Canonical Ownership of Facts**:
|
|
||||||
- The **Discussion** owns the exploratory narrative, rejected alternatives, and justification.
|
|
||||||
- The **ADR** owns the decision outcome, forces, and accepted trade-offs.
|
|
||||||
- The **Plan** owns the technical specification, constraints, and phased execution runbooks.
|
|
||||||
- The **Debug Record** owns the empirical observation, diagnostic tests, and root-cause mechanism.
|
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
---
|
||||||
|
type: agent
|
||||||
|
status: active
|
||||||
|
name: documentation-router
|
||||||
|
kind: skill
|
||||||
|
project: brain
|
||||||
|
tags:
|
||||||
|
- documentation
|
||||||
|
- router
|
||||||
|
- epistemic-taxonomy
|
||||||
|
- knowledge-governance
|
||||||
|
---
|
||||||
|
|
||||||
|
# Documentation Router
|
||||||
|
|
||||||
|
> **Documentation Router helps you decide whether an engineering session produced something worth preserving and, if it did, which kind of Brain artifact should preserve it.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Identity
|
||||||
|
**Documentation Router** is a second-order knowledge classifier for the Brain knowledge graph. It evaluates the outcomes of an engineering or learning activity to determine if durable knowledge was generated and routes that knowledge to its canonical epistemic container.
|
||||||
|
|
||||||
|
## 2. User Value
|
||||||
|
Engineering sessions often produce different kinds of knowledge: an exploratory trade-off, a point-in-time architectural commitment, a concrete implementation roadmap, an incident root-cause analysis, or a reusable mental model.
|
||||||
|
|
||||||
|
Treating all session output as generic notes leads to knowledge bloat, fragmented documentation, and conflicting authorities. Documentation Router ensures:
|
||||||
|
- Routine work leaves **no documentation footprint**.
|
||||||
|
- Every preserved fact has **one authoritative owner**.
|
||||||
|
- Exploration, commitments, implementation plans, and investigations never pollute each other.
|
||||||
|
|
||||||
|
## 3. Invocation
|
||||||
|
### When to use it:
|
||||||
|
Invoke Documentation Router at the close of an engineering session, investigation, or design discussion when you need to answer: *"Did we produce anything durable that would be lost if not recorded?"*
|
||||||
|
|
||||||
|
### When NOT to use it:
|
||||||
|
- **Routine implementation & chores**: Bug fixes, minor refactors, or standard task execution where commit messages and PR diffs are fully self-explanatory.
|
||||||
|
- **Authoring execution**: Documentation Router routes and bounds documents; it does not replace the actual drafting of code or narrative text.
|
||||||
|
|
||||||
|
## 4. Behavior
|
||||||
|
When invoked, Documentation Router evaluates session context through a progressive evaluation:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Engineering Session Complete
|
||||||
|
↓
|
||||||
|
1. Gatekeeper: Did something worth preserving happen?
|
||||||
|
├── No → Stop (No artifact created)
|
||||||
|
└── Yes → 2. Epistemic Classification
|
||||||
|
↓
|
||||||
|
What kind of knowledge was produced?
|
||||||
|
├── Exploration / Trade-offs → Discussion
|
||||||
|
├── Architectural Decision → ADR
|
||||||
|
├── Implementation Roadmap → Plan
|
||||||
|
├── Empirical RCA → Debug Record
|
||||||
|
└── Reusable Mental Model → Knowledge Article
|
||||||
|
↓
|
||||||
|
3. Multi-Artifact Decomposition
|
||||||
|
└── Split multi-dimensional knowledge to prevent overlap
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5. Outputs
|
||||||
|
Documentation Router produces one or more of the following routing recommendations:
|
||||||
|
|
||||||
|
| Output Artifact | Epistemic Role | What It Captures |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| **No Artifact** | *Ephemeral* | Session produced routine or self-explanatory work. |
|
||||||
|
| **Discussion** (`02-discussions/`) | *WHY* | Explorations, alternatives, trade-offs, and open questions. |
|
||||||
|
| **ADR** (`03-records/decisions/`) | *WHAT was decided* | Point-in-time architectural commitments and accepted trade-offs. |
|
||||||
|
| **Plan** (`01-plans/`) | *HOW to build it* | Concrete specifications, phases (P0–P5), and Definition of Done. |
|
||||||
|
| **Debug Record** (`03-records/debug/`) | *Empirical RCA* | Diagnostic hypotheses, reproduction logs, and root causes. |
|
||||||
|
| **Knowledge Article** (`04-learning/knowledge/`) | *UNDERSTANDING* | Generalized mental models, concepts, and transferable methodologies. |
|
||||||
|
|
||||||
|
## 6. Boundaries
|
||||||
|
- **Does not force a documentation pipeline**: A Discussion does not require an ADR; an ADR does not require a Plan. Each artifact stands on its own authority.
|
||||||
|
- **Does not duplicate facts across boundaries**: It enforces that the same fact cannot be owned by multiple documents unless serving fundamentally different epistemic purposes.
|
||||||
|
- **Does not author without reference contracts**: It selects the artifact type and immediately hands off to that document's specific authoring contract.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Package Structure
|
||||||
|
- [`SKILL.md`](SKILL.md) — Operational instructions, decision gates, and behavioral invariants executed by the AI agent runtime.
|
||||||
|
- **Reference Authoring Specifications**:
|
||||||
|
- [`discussion-authoring.md`](references/discussion-authoring.md) — Exploration format, narrative voice, and lifecycle.
|
||||||
|
- [`adr-authoring.md`](references/adr-authoring.md) — MADR 4.0 format, decision drivers, and trade-offs.
|
||||||
|
- [`plan-authoring.md`](references/plan-authoring.md) — Phased execution roadmaps, invariants, and DoD.
|
||||||
|
- [`debug-record-authoring.md`](references/debug-record-authoring.md) — Empirical RCA logging and post-mortem structure.
|
||||||
|
- [`knowledge-authoring.md`](references/knowledge-authoring.md) — Durable engineering concepts and methodologies.
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
---
|
||||||
|
name: documentation-router
|
||||||
|
description: >-
|
||||||
|
Use this skill to evaluate session context, determine whether durable knowledge preservation
|
||||||
|
is warranted, classify knowledge into distinct epistemic containers (Discussion, ADR, Plan, Debug Record),
|
||||||
|
enforce anti-overlap invariants, and coordinate documentation authoring.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Documentation Router & Epistemic Governance
|
||||||
|
|
||||||
|
This skill acts as a second-order knowledge classifier and router. It inspects session context (investigations, architectural debates, design sessions, tutoring/practice milestones, implementation tasks) to determine whether durable documentation is justified, which epistemic artifact(s) should be produced, and how to prevent overlap or conflicting authority.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. The Cardinal Invariant
|
||||||
|
|
||||||
|
> **Documentation type is determined by the nature of the knowledge being preserved, not by the activity that produced it.**
|
||||||
|
|
||||||
|
* A debugging session discovering an underlying architectural misconception produces a **Discussion** or an **ADR**, not merely a Debug Record.
|
||||||
|
* An architectural debate that reaches a firm point-in-time consensus produces an **ADR**; if it remains exploratory or consensus is not reached, it remains a **Discussion**.
|
||||||
|
* An implementation task that uncovers an unaddressed architectural question must pause and route to an **ADR** before proceeding with the **Plan**.
|
||||||
|
* A routine bug fix or maintenance chore produces **NO ARTIFACT**, regardless of how many files were edited.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. The Decision Procedure
|
||||||
|
|
||||||
|
When evaluating whether and how to document findings from a session:
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
Start["Session Context / Activity Completed"] --> Gate{"1. Did something worth<br/>preserving happen?"}
|
||||||
|
Gate -->|"No: Routine / Trivial / Self-explanatory"| NoDoc["NO ARTIFACT<br/>(Standard commit/PR message)"]
|
||||||
|
Gate -->|"Yes: Non-obvious / Architectural / Reusable"| Classify{"2. What kind of knowledge<br/>was produced?"}
|
||||||
|
|
||||||
|
Classify -->|"Exploration / Trade-offs / Why"| Disc["Discussion<br/>(references/discussion-authoring.md)"]
|
||||||
|
Classify -->|"Architectural Commitment / What decided"| ADR["ADR<br/>(references/adr-authoring.md)"]
|
||||||
|
Classify -->|"Implementation Sequence / How to build"| Plan["Plan<br/>(references/plan-authoring.md)"]
|
||||||
|
Classify -->|"Empirical Investigation / RCA"| Debug["Debug Record<br/>(references/debug-record-authoring.md)"]
|
||||||
|
|
||||||
|
Disc --> Multi{"3. Are multiple distinct<br/>knowledge objects justified?"}
|
||||||
|
ADR --> Multi
|
||||||
|
Plan --> Multi
|
||||||
|
Debug --> Multi
|
||||||
|
|
||||||
|
Multi -->|Single Object| Emit["Author Single Artifact"]
|
||||||
|
Multi -->|Multiple Objects| Decompose["Decompose into Distinct Artifacts<br/>(Apply anti-overlap invariants)"]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 1: Gatekeeping (Anti-Markdown Factory)
|
||||||
|
Before drafting any document, ask:
|
||||||
|
* *Did this session yield non-obvious reasoning, surprising failure modes, or architectural insights?*
|
||||||
|
* *Will an engineer or operator benefit from reading this months later?*
|
||||||
|
* *If the answer is NO*: **Do not create an artifact.** Record the changes in standard Git commits or code comments.
|
||||||
|
|
||||||
|
### Step 2: Epistemic Classification
|
||||||
|
Map the core knowledge product to its natural epistemic container:
|
||||||
|
|
||||||
|
| Knowledge Produced | Epistemic Role | Target Container | Governing Module |
|
||||||
|
| :--- | :--- | :--- | :--- |
|
||||||
|
| Explorations, inquiries, trade-offs, pain points, alternatives evaluated, and historical evolution. | **WHY** | `02-discussions/` (`type: discussion`) | [`references/discussion-authoring.md`](./references/discussion-authoring.md) |
|
||||||
|
| Point-in-time architectural commitments, decision drivers, forces, and accepted trade-offs. | **WHAT was decided** | `03-records/decisions/` (`type: decision`) | [`references/adr-authoring.md`](./references/adr-authoring.md) |
|
||||||
|
| Authoritative implementation specifications, constraints, phased execution (P0–P5), runbooks, and DoD. | **HOW to build it** | `01-plans/` (`type: plan`) | [`references/plan-authoring.md`](./references/plan-authoring.md) |
|
||||||
|
| Historical investigation of unexpected system behaviors, regressions, bugs, or anomalies. | **Empirical RCA** | `03-records/debug/` (`type: debug`) | [`references/debug-record-authoring.md`](./references/debug-record-authoring.md) |
|
||||||
|
| Durable mental models, general engineering methodologies, conceptual deep dives, and transferable patterns. | **UNDERSTANDING** | `04-learning/knowledge/` (`type: knowledge`) | [`references/knowledge-authoring.md`](./references/knowledge-authoring.md) |
|
||||||
|
|
||||||
|
### Step 3: Multi-Artifact Decomposition
|
||||||
|
A rich session may legitimately produce multiple distinct knowledge objects. When justified, decompose them cleanly rather than creating a sprawling hybrid document:
|
||||||
|
* Example: An investigation that diagnoses a broken pipeline and exposes an architectural limitation can produce a **Debug Record** (recording the RCA) and a **Discussion** (evaluating architectural alternatives).
|
||||||
|
* Example: An architectural initiative can produce a **Discussion** (recording why the change was needed and what was explored), an **ADR** (locking the chosen model), and a **Plan** (specifying the phased rollout).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Document Relationships & Authority
|
||||||
|
|
||||||
|
```text
|
||||||
|
Discussion ──informs──> ADR ──constrains──> Plan
|
||||||
|
^ ^ |
|
||||||
|
└──────────────────────┴─────────────────┘
|
||||||
|
cross-references
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Rule on Relationships vs. Pipelines**:
|
||||||
|
> Discussions may inform ADRs; ADRs may constrain Plans. These relationships describe **optional information flow and authority boundaries, not a mandatory documentation lifecycle**.
|
||||||
|
>
|
||||||
|
> * A Discussion may exist and remain open or resolved without generating an ADR or Plan.
|
||||||
|
> * An ADR may be authored directly for a clear architectural commitment without requiring a preceding Discussion artifact.
|
||||||
|
> * A Plan may be authored for a known engineering project without requiring a preceding Discussion or ADR.
|
||||||
|
> * A Debug Record stands alone as historical memory of an investigation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Anti-Overlap Invariants & Fact Ownership
|
||||||
|
|
||||||
|
To maintain clarity and prevent contradictory documentation across the vault:
|
||||||
|
|
||||||
|
1. **Rule of Epistemic Purpose**:
|
||||||
|
The same fact may appear in multiple documents **only when it serves a different epistemic purpose**:
|
||||||
|
* *Discussion*: `"The old model coupled software and deployment, which created friction during doc2site development."` (Historical motivation)
|
||||||
|
* *ADR*: `"We adopt separate Software and Deployment layers."` (Formal commitment)
|
||||||
|
* *Plan*: `"Source repositories contain code; Sites/<app> contains app.yaml and Compose."` (Implementation specification)
|
||||||
|
* *Unhealthy duplication*: Copying the same five-paragraph rationale or the same bash execution runbook into all three documents.
|
||||||
|
|
||||||
|
2. **Canonical Ownership of Facts**:
|
||||||
|
* The **Discussion** owns the exploratory narrative, rejected alternatives, and justification.
|
||||||
|
* The **ADR** owns the decision outcome, forces, and accepted trade-offs.
|
||||||
|
* The **Plan** owns the implementation sequence, contracts, runbooks, verification gates, and Definition of Done.
|
||||||
|
* The **Debug Record** owns the empirical hypothesis testing log, diagnostic commands, and root-cause proof.
|
||||||
|
* The **Knowledge Article** owns generalized mental models, failure traps, conceptual mechanics, and transferable engineering methodologies.
|
||||||
|
|
||||||
|
3. **Tone and Voice Boundaries**:
|
||||||
|
* **Discussion**: Retrospective, narrative, exploratory. Never uses "decision voice" (`"The Decision: ..."`) or imperative commands. Preserves uncertainty and rejected options.
|
||||||
|
* **ADR**: Normative, compact (MADR 4.0). Establishes architectural requirements, not implementation procedures or internal schema field names.
|
||||||
|
* **Plan**: Technical implementation specification. Uses crisp constraints and invariants without re-arguing rationale. Does not silently introduce new architectural decisions.
|
||||||
|
* **Debug Record**: Empirical, factual, evidence-based. Strictly separates observation from inference.
|
||||||
|
|
||||||
|
4. **Preservation of History vs. Current Authority**:
|
||||||
|
* **ADRs and Plans** represent current architectural commitments and active execution blueprints. When superseded, they remain in the repository marked `superseded`, preserving their historical identity.
|
||||||
|
* **Discussions and Debug Records** are permanent historical records. They are never updated to retroactively match subsequent implementation changes.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Authoring Reference Modules
|
||||||
|
|
||||||
|
When a specific document type is selected, follow the corresponding authoring specification in `references/`:
|
||||||
|
* [**Discussion Authoring Specification**](./references/discussion-authoring.md)
|
||||||
|
* [**ADR (MADR 4.0) Authoring Specification**](./references/adr-authoring.md)
|
||||||
|
* [**Plan Authoring Specification**](./references/plan-authoring.md)
|
||||||
|
* [**Debug Record Authoring Specification**](./references/debug-record-authoring.md)
|
||||||
|
* [**Knowledge Article Authoring Specification**](./references/knowledge-authoring.md)
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
# ADR (MADR 4.0) Authoring Specification
|
||||||
|
|
||||||
|
## Epistemic Role & Core Purpose
|
||||||
|
|
||||||
|
An **Architectural Decision Record (ADR)** captures a point-in-time architectural or design commitment that constrains future engineering work. It answers:
|
||||||
|
> *"What did we decide, and why?"*
|
||||||
|
|
||||||
|
The ADR is a compact, durable historical contract. It establishes architectural boundaries, selected models, and accepted trade-offs. It is not an implementation runbook, an operational manual, or a record of diagnostic procedures.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Epistemic Invariants & Boundaries
|
||||||
|
|
||||||
|
1. **MADR 4.0 Structural Sequence**:
|
||||||
|
Adheres to the standard sequence:
|
||||||
|
$$\text{Context \& Problem Statement} \longrightarrow \text{Decision Drivers} \longrightarrow \text{Considered Options} \longrightarrow \text{Decision Outcome} \longrightarrow \text{Pros \& Cons} \longrightarrow \text{Consequences} \longrightarrow \text{More Information}$$
|
||||||
|
2. **Architectural Commitments, Not Implementation Procedure**:
|
||||||
|
* *In the ADR*: "We adopt separate Software and Deployment layers; deployment configuration, upstream source provenance, and container artifact identity must be independently observable."
|
||||||
|
* *In the Plan*: The exact 7 platform primitives table, internal JSON schema field names (`deployment_config_revision`, etc.), execution timeouts, and bash runbooks.
|
||||||
|
3. **Immutability vs. Artifact Identity**:
|
||||||
|
Distinguish mutable identifiers (like image tags) from cryptographic ones. OCI images produced by CI act as provenance objects; the immutable identity of the deployed artifact is its content-addressed OCI digest, with source commit provenance carried via metadata labels.
|
||||||
|
4. **Neutral Systems Language**:
|
||||||
|
Justify outcomes through clear trade-offs against the decision drivers, rather than subjective or promotional assertions (e.g. *"addresses the identified coupling while retaining a bounded operational control path"* rather than *"strictly preserves minimal complexity"*).
|
||||||
|
5. **Durable Historical Record**:
|
||||||
|
Do not rewrite an accepted ADR merely because subsequent implementation evolves. If a fundamental architectural commitment changes, record a new ADR that explicitly supersedes the earlier record.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Standard MADR 4.0 Document Structure
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
type: decision
|
||||||
|
status: proposed | accepted | superseded
|
||||||
|
project: <project-name>
|
||||||
|
date: YYYY-MM-DD
|
||||||
|
tags: [list, of, tags]
|
||||||
|
---
|
||||||
|
|
||||||
|
# <Short Architectural Decision Title>
|
||||||
|
|
||||||
|
## Context and Problem Statement
|
||||||
|
Concise framing of the problem, background forces, and the central architectural question.
|
||||||
|
|
||||||
|
## Decision Drivers
|
||||||
|
* Key operational, architectural, or organizational forces driving the choice.
|
||||||
|
* Criteria against which options are evaluated.
|
||||||
|
|
||||||
|
## Considered Options
|
||||||
|
* **Option 1: <Name>** — Brief description.
|
||||||
|
* **Option 2: <Name>** — Brief description.
|
||||||
|
* **Option 3: <Name>** — Brief description.
|
||||||
|
|
||||||
|
## Decision Outcome
|
||||||
|
Chosen option: **Option X: <Name>**, because <neutral trade-off rationale grounded in decision drivers>.
|
||||||
|
|
||||||
|
### Summary of Architectural Commitments
|
||||||
|
1. **Primary Structural Boundary**: Clean separation of concerns across tiers/components.
|
||||||
|
2. **Provenance & Identity**: Architectural requirement for observable identities (delegating exact schema fields to implementation plans).
|
||||||
|
3. **Reconciliation & Control Path**: Direction and constraints of the control flow.
|
||||||
|
4. **State Isolation**: Filesystem or database boundary rules.
|
||||||
|
|
||||||
|
## Pros and Cons of the Options
|
||||||
|
|
||||||
|
### Option 1: <Name>
|
||||||
|
* Good, because <argument>.
|
||||||
|
* Bad, because <argument>.
|
||||||
|
|
||||||
|
### Option 2: <Name>
|
||||||
|
* Good, because <argument>.
|
||||||
|
* Bad, because <argument>.
|
||||||
|
|
||||||
|
### Option 3: <Name> (Adopted)
|
||||||
|
* Good, because <argument>.
|
||||||
|
* Bad, because <accepted trade-off>.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
### Positive Consequences
|
||||||
|
* Key benefits and unlocked capabilities resulting from the decision.
|
||||||
|
|
||||||
|
### Negative Consequences & Accepted Trade-offs
|
||||||
|
* Operational overhead, constraints, or limitations accepted as part of the choice.
|
||||||
|
|
||||||
|
## More Information
|
||||||
|
* **Informing Discussion & Rationale**: Link to companion Discussion (if one exists).
|
||||||
|
* **Governed Implementation Roadmap**: Link to companion Plan (if one exists).
|
||||||
|
* **Project Hub**: Link to the relevant system or project landing page.
|
||||||
|
```
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
# Debug Record Authoring Specification
|
||||||
|
|
||||||
|
## Epistemic Role & Core Purpose
|
||||||
|
|
||||||
|
A **Debug Record** is a durable **historical investigation / RCA record**. It documents the empirical diagnosis and root-cause determination of bugs, regressions, system anomalies, failed migrations, configuration errors, or unexpected runtime behaviors. It answers:
|
||||||
|
> *"What empirically broke, how did the investigation diagnose it, and what was the root cause?"*
|
||||||
|
|
||||||
|
A debug record preserves institutional memory: how an obscure failure was uncovered, which hypotheses were eliminated, what the causal mechanism was, and what operational heuristics prevent recurrence.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Epistemic Invariants & Boundaries
|
||||||
|
|
||||||
|
1. **Empirical & Evidence-Based**:
|
||||||
|
Ground all statements in verifiable observations. Include raw error messages, exit codes, or log snippets.
|
||||||
|
2. **Strictly Separate Observation from Inference**:
|
||||||
|
Clearly demarcate what the system reported (raw fact) from what the investigator inferred or hypothesized.
|
||||||
|
3. **Document Diagnostic Rationale**:
|
||||||
|
Explain why diagnostic inspection commands were run and what each command was intended to confirm or refute.
|
||||||
|
4. **No Hindsight Bias**:
|
||||||
|
Present the actual reasoning progression. Do not manufacture a tidy, linear narrative that erases reasonable working hypotheses eliminated during the investigation.
|
||||||
|
5. **Declarative Remediation & Parity**:
|
||||||
|
Document the minimal, isolated, and reversible fix applied, along with validation commands proving recovery.
|
||||||
|
6. **Zero Secret Leakage**:
|
||||||
|
Never include real passwords, API tokens, HMAC keys, or session secrets. Use redacted placeholders.
|
||||||
|
7. **Scope**:
|
||||||
|
Not restricted to production outages. Applies to any non-obvious engineering anomaly across development, CI, testing, and operations where the diagnostic reasoning carries durable learning value.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Standard Document Structure
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
type: debug
|
||||||
|
date: YYYY-MM-DD
|
||||||
|
project: <project-name>
|
||||||
|
tags: [operations, troubleshooting, debugging, <subsystems>]
|
||||||
|
---
|
||||||
|
|
||||||
|
# <Descriptive Incident / RCA Title>
|
||||||
|
|
||||||
|
## 1. System Context & Fundamentals
|
||||||
|
* Relevant components, data flow, architecture layer, and operational expectations.
|
||||||
|
|
||||||
|
## 2. Problem & Observations
|
||||||
|
* Observed symptoms vs. expected behavior.
|
||||||
|
* Raw error logs, stack traces, and failure manifestation (facts separated from interpretation).
|
||||||
|
|
||||||
|
## 3. Diagnostic Inquiries & Hypotheses
|
||||||
|
* Guiding questions formulated to narrow down the failure domain.
|
||||||
|
* Initial working hypotheses and plausibility mechanisms.
|
||||||
|
|
||||||
|
## 4. Investigation & Hypothesis Testing Log
|
||||||
|
* Reasoning progression: Working Hypothesis $\to$ Diagnostic Command $\to$ Evidence (Expected vs. Actual) $\to$ Outcome (Confirmed or Eliminated).
|
||||||
|
|
||||||
|
## 5. Root Cause Analysis
|
||||||
|
* Synthesis of proven evidence and explanation of the underlying causal mechanism.
|
||||||
|
|
||||||
|
## 6. Declarative Remediation & Local Validation
|
||||||
|
* Minimal, declarative fix applied.
|
||||||
|
* Test execution, validation checks, and output proving resolution.
|
||||||
|
|
||||||
|
## 7. Deployment & Recovery Runbook
|
||||||
|
* Production rollout steps, rollback instructions, and runtime health verification.
|
||||||
|
|
||||||
|
## 8. Discussion & Transferable Learnings
|
||||||
|
* Architectural takeaways or false assumptions dispelled.
|
||||||
|
* Transferable diagnostic heuristics and preventative measures.
|
||||||
|
|
||||||
|
## 9. References
|
||||||
|
* Links to affected manifests, commits, pull requests, or protocol specifications.
|
||||||
|
```
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Discussion Authoring Specification
|
||||||
|
|
||||||
|
## Epistemic Role & Core Purpose
|
||||||
|
|
||||||
|
A **Discussion** explores architectural inquiries, problem statements, trade-offs, and design alternatives. It answers:
|
||||||
|
> *"What are we trying to understand, and what did we learn while exploring it?"*
|
||||||
|
|
||||||
|
A discussion preserves the intellectual journey: why a legacy model broke down, what options were considered, what failed during investigation, and how the reasoning evolved. It is an exploration, not an execution manual or an authoritative decree.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Epistemic Invariants & Voice Rules
|
||||||
|
|
||||||
|
1. **Exploratory Narrative Tone**:
|
||||||
|
Write in a thoughtful, investigative, retrospective voice. Focus on forces, constraints, and dilemmas.
|
||||||
|
2. **Zero "Decision Voice"**:
|
||||||
|
Discussions inform decisions; they do not issue them.
|
||||||
|
* **Prohibited**: `"The Decision: Reject local cloning on the host."`
|
||||||
|
* **Correct**: `"Resulting Direction: The exploration ultimately converged on rejecting local cloning on the appliance host in favor of commit equality verification via git ls-remote."`
|
||||||
|
3. **Preserve Uncertainty & Rejected Alternatives**:
|
||||||
|
Do not erase dead ends or false starts. Document why an option (e.g. calculating commit distance or using message brokers) was considered, what failure mode or friction it introduced, and why it was set aside.
|
||||||
|
4. **Tempered Language (Avoid Absolutes)**:
|
||||||
|
Avoid rhetorical hyperbole.
|
||||||
|
* **Prohibited**: `"The software could not be cleanly open-sourced"` or `"100% pure code"`.
|
||||||
|
* **Correct**: `"Hosting infrastructure co-located with code made clean open-sourcing or external sharing difficult without stripping private configuration."`
|
||||||
|
5. **No Implementation Procedure Duplication**:
|
||||||
|
Do not include multi-step phased execution checklists, bash deployment runbooks, or detailed schema models.
|
||||||
|
6. **Convergence, Not Mandate**:
|
||||||
|
End with how the exploration converged, linking forward to the resulting ADR or Plan without re-listing their formal resolution contracts.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Standard Document Structure
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
type: discussion
|
||||||
|
status: open | resolved
|
||||||
|
project: <project-name>
|
||||||
|
date: YYYY-MM-DD
|
||||||
|
tags: [list, of, tags]
|
||||||
|
---
|
||||||
|
|
||||||
|
# Architectural Discussion: <Descriptive Title>
|
||||||
|
|
||||||
|
## 1. Problem Statement & Historical Context
|
||||||
|
* Initial setup and why the original model looked attractive.
|
||||||
|
* Concrete operational failures, friction points, or unexpected behaviors observed.
|
||||||
|
|
||||||
|
## 2. Context & Analysis: Core Dilemmas
|
||||||
|
* Underlying systems design dilemma (e.g. KISS vs. separation of concerns).
|
||||||
|
* Conceptual clarity: clearly distinguish tiers, intermediate artifacts, and storage/runtime boundaries.
|
||||||
|
|
||||||
|
## 3. Evaluated Dilemmas & Rejected Alternatives
|
||||||
|
* Detailed exploration of alternatives considered:
|
||||||
|
- Option A: Problem it attempted to solve, why it fell short, and resulting trade-off rationale.
|
||||||
|
- Option B: Problem it attempted to solve, why it fell short, and resulting trade-off rationale.
|
||||||
|
|
||||||
|
## 4. What Became Possible After the Architectural Separation
|
||||||
|
* Structured comparison: Historical constraints of the old model vs. engineering motivations unlocked by the new model.
|
||||||
|
|
||||||
|
## 5. Convergence & Successors
|
||||||
|
* Summary of how the exploration converged.
|
||||||
|
* Links forward to the governing Architectural Decision Record (ADR) and implementation Plan.
|
||||||
|
```
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
# Knowledge Article Authoring Specification
|
||||||
|
|
||||||
|
## Epistemic Role & Core Purpose
|
||||||
|
|
||||||
|
A **Knowledge Article** preserves and communicates **generalized, reusable understanding, mental models, and engineering methodologies** extracted from real-world practice. It answers:
|
||||||
|
> *"How does this concept, technology, or method actually work, and how can a learner think about and apply it?"*
|
||||||
|
|
||||||
|
The Knowledge Article is a **learner-to-learner** sharing instrument. Its purpose is to build durable intuition in the reader. It is written for peers working across arbitrary projects, rather than serving as a historical log of one specific session, an authoritative project plan, or a point-in-time architectural decree.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. When to Create a Knowledge Article
|
||||||
|
|
||||||
|
Create a Knowledge Article when an engineering effort, investigation, practice drill, or architectural synthesis yields **transferable understanding** that meets all three criteria:
|
||||||
|
|
||||||
|
1. **Reusability Across Contexts**: The mental model, design pattern, or operational technique applies beyond the immediate repository or subsystem where it was discovered.
|
||||||
|
2. **Non-Trivial Mental Model**: The subject involves non-obvious trade-offs, subtle failure modes, or conceptual hurdles that standard API docs or cursory tutorials gloss over.
|
||||||
|
3. **Pedagogical Durability**: The explanation will remain valuable to an engineer months or years later, independent of transient project tasks.
|
||||||
|
|
||||||
|
### Target Placement within Brain (`04-learning/knowledge/`)
|
||||||
|
* **`concepts/`** — Disciplinary and theoretical ideas: data structures, algorithmic paradigms, concurrency models, distributed systems principles (`type: knowledge`).
|
||||||
|
* **`methods/`** — Reusable engineering practices, workflows, and disciplines: testing strategies, investigative techniques, architectural paradigms, documentation methods (`type: knowledge`).
|
||||||
|
* **`technologies/`** — Deep dives into tools, runtimes, and languages: environment managers, container engines, frameworks, standard library mechanics (`type: knowledge`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. When NOT to Create a Knowledge Article
|
||||||
|
|
||||||
|
To prevent vault bloat and respect epistemic boundaries, do **NOT** create a Knowledge Article for:
|
||||||
|
|
||||||
|
* **Session Transcripts & Raw Notes**: Temporary meeting logs, scratch notes, or raw command histories (keep in `00-inbox/` or discard).
|
||||||
|
* **Project Implementation Blueprints**: Roadmaps, milestone breakdowns, or task tickets for building a specific feature (use **Plan** $\to$ `01-plans/`).
|
||||||
|
* **Point-in-Time Architectural Commitments**: Decisions selecting a specific stack, framework, or model for a specific repository (use **ADR** $\to$ `03-records/decisions/`).
|
||||||
|
* **Historical Failure Postmortems**: Empirical diagnosis and logs of a specific broken system or production outage (use **Debug Record** $\to$ `03-records/debug/`).
|
||||||
|
* **Project Discussions & Trade-offs**: Debates exploring competing directions for a specific system (use **Discussion** $\to$ `02-discussions/`).
|
||||||
|
* **Runbooks & Operational SOPs**: Step-by-step procedures for administering a specific deployed service (use **Guide** $\to$ `04-learning/guides/`).
|
||||||
|
* **Shallow API Summaries**: Regurgitating command flags or library cheatsheets that are better found by typing `--help` or reading upstream documentation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Canonical Fact Ownership & Anti-Overlap Invariants
|
||||||
|
|
||||||
|
Knowledge Articles coexist cleanly with other epistemic documents by enforcing strict fact ownership:
|
||||||
|
|
||||||
|
| Document Type | Epistemic Question | What It Owns | What the Knowledge Article Must NOT Own |
|
||||||
|
| :--- | :--- | :--- | :--- |
|
||||||
|
| **Discussion** | *Why explore this?* | Exploratory inquiries, dilemmas, rejected paths for a project. | Project-specific historical debate or team consensus narrative. |
|
||||||
|
| **ADR** | *What was decided?* | Formal point-in-time commitments, decision drivers, local forces. | Formal architectural decrees binding a specific repository. |
|
||||||
|
| **Plan** | *How to build it?* | Phased implementation tasks, task graphs, runbooks, DoD. | Step-by-step execution checklists for deploying project code. |
|
||||||
|
| **Debug Record** | *What failed & why?* | Empirical triage logs, diagnostic commands, root-cause proof. | Raw incident logs or chronological bug troubleshooting steps. |
|
||||||
|
| **Knowledge Article** | *How does it work?* | General mental models, failure traps, conceptual mechanics, heuristics. | Specific project state, deployment dates, or transient bugs. |
|
||||||
|
|
||||||
|
### Rule of Epistemic Purpose
|
||||||
|
The same engineering lesson may inform multiple artifacts, but each must serve its native purpose:
|
||||||
|
* An investigation post-mortem records the raw failure in a **Debug Record** (`03-records/debug/`).
|
||||||
|
* If the root cause exposed a generalizable diagnostic technique or systems principle, that principle is abstracted into a **Knowledge Article** (`04-learning/knowledge/methods/`), omitting the incident's transient logs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Voice, Tone, and Reader Model: Side-by-Side Learning
|
||||||
|
|
||||||
|
### The Relational Model: Learner $\to$ Another Learner
|
||||||
|
The author is not an all-knowing expert instructing a novice from above, nor an authority lecturing an audience.
|
||||||
|
|
||||||
|
```text
|
||||||
|
┌─────────────────────┐
|
||||||
|
│ Author │
|
||||||
|
│ "I learned this" │
|
||||||
|
└──────────┬──────────┘
|
||||||
|
│
|
||||||
|
│ shares
|
||||||
|
▼
|
||||||
|
┌─────────────────────┐
|
||||||
|
│ Reader │
|
||||||
|
│ "I can learn this" │
|
||||||
|
└─────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
### Side-by-Side Learning Voice
|
||||||
|
Write as a developer who has learned something and is explaining what they learned to another developer who may be learning it too. First-person experience is useful when it exposes a change in understanding, a misconception, or a discovery. Do not adopt an artificial expert persona or imply authority that is unnecessary to the explanation.
|
||||||
|
|
||||||
|
Authority comes entirely from the **quality, clarity, and evidence of the explanation**, never from an adopted posture of expertise.
|
||||||
|
|
||||||
|
* **Exposing Mental Model Transitions**:
|
||||||
|
* `"I initially thought the problem was X. It turned out that X was only a symptom."`
|
||||||
|
* `"What clarified this for me was separating the state machine from the prompt text."`
|
||||||
|
* `"The mistake I kept making was assuming the model would read ahead without an explicit gate."`
|
||||||
|
* **Avoiding Authoritative Posing**:
|
||||||
|
* Avoid: `"The rookie mistake developers make is X."`
|
||||||
|
* Avoid: `"In my years of experience, best practice dictates..."`
|
||||||
|
|
||||||
|
### Rhetorical Restraint
|
||||||
|
Make ideas interesting through the quality of the explanation, not through enthusiasm about the explanation. Avoid exaggerated praise, manufactured surprise, dramatic transitions, motivational language, and phrases whose primary purpose is to make ordinary technical observations sound exciting. If something is surprising, useful, elegant, or important, explain why.
|
||||||
|
|
||||||
|
* **Avoid Manufactured Excitement**:
|
||||||
|
* Do not write: `"This is an amazing discovery."`
|
||||||
|
* Do not write: `"This changes everything."`
|
||||||
|
* Do not write: `"Here's where things get really interesting..."`
|
||||||
|
* Do not write: `"The beautiful thing about this pattern is..."`
|
||||||
|
* Do not write: `"The surprising part is..."`
|
||||||
|
* Do not write: `"This is a game changer."`
|
||||||
|
* Do not write: `"Once you see this, you can't unsee it."`
|
||||||
|
* **The Deletion Test for Rhetoric**:
|
||||||
|
> **If removing a sentence does not remove information, reasoning, context, or useful perspective, the sentence is merely rhetorical decoration. Delete it.**
|
||||||
|
* **Genuine Surprise vs. Hype**:
|
||||||
|
* If an observation was genuinely counter-intuitive, explain what was expected and what the evidence showed instead:
|
||||||
|
* Prefer: `"What surprised me here was that adding more instructions increased the failure rate, because..."`
|
||||||
|
* Avoid: `"This technique yields surprisingly powerful results."`
|
||||||
|
|
||||||
|
### Explanatory Guidance (Not Manufactured Positivity)
|
||||||
|
Do not confuse constructive guidance with cheerful or motivational writing.
|
||||||
|
* Prefer explaining the model, mechanism, and reasoning that lead to a useful approach.
|
||||||
|
* When an approach fails, explain the failure mode plainly and precisely, using it to motivate the better mental model.
|
||||||
|
* Do not manufacture optimism, encouragement, or inspirational pep talks.
|
||||||
|
|
||||||
|
### Prosaic Precision
|
||||||
|
* No em-dashes. Rewrite sentences with commas, colons, parentheses, or separate sentences.
|
||||||
|
* Keep sentences direct and uncluttered.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Learning-Oriented Structure
|
||||||
|
|
||||||
|
Our most effective knowledge articles follow a 7-part progression that mirrors how an engineer actually comes to understand a complex idea:
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
Hook["1. The Practical Problem or Question<br/>(A concrete situation where confusion or friction happens)"] --> Trap["2. The Intuitive First Attempt & Why It Breaks<br/>(The obvious solution and the failure mode it hits)"]
|
||||||
|
Trap --> Concept["3. The Core Mental Model<br/>(The way of thinking that resolves the breakdown)"]
|
||||||
|
Concept --> Mech["4. Mechanism & Progressive Depth<br/>(How it works in practice; code, state transitions, diagrams)"]
|
||||||
|
Mech --> Picture["5. The Mental Picture<br/>(A tangible analogy anchoring the concept)"]
|
||||||
|
Picture --> Tradeoffs["6. The Trade-Offs & Costs<br/>(What this approach costs; when NOT to reach for it)"]
|
||||||
|
Tradeoffs --> Principle["7. One Principle to Remember<br/>(A crisp, practical heuristic question)"]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 1. The Practical Problem or Question
|
||||||
|
Start with a concrete engineering situation where confusion or friction occurs. Avoid sweeping philosophical introductions. Ground the discussion in real work.
|
||||||
|
|
||||||
|
### 2. The Intuitive First Attempt & Why It Breaks
|
||||||
|
Show what most of us try first when approaching this problem, and why that first attempt breaks down. Point out the specific mechanism causing the failure (e.g. *"We are not spending time managing tasks; we are spending time reorganizing memory"* or *"We are not steering the agent; we are overwhelming its context window"*).
|
||||||
|
|
||||||
|
### 3. The Core Mental Model
|
||||||
|
Introduce the concept or abstraction that resolves the tension. Explain what mental shift is required to see the problem clearly.
|
||||||
|
|
||||||
|
### 4. Mechanism & Progressive Depth
|
||||||
|
Show how the concept operates in practice.
|
||||||
|
* **Code & Configuration**: Minimal, working examples demonstrating the mechanic.
|
||||||
|
* **Diagrams**: Mermaid flowcharts or state machines showing boundaries and transitions.
|
||||||
|
* **Side-by-Side Contrasts**:
|
||||||
|
```markdown
|
||||||
|
- Ineffective approach: [Concrete example of what doesn't work]
|
||||||
|
- Effective approach: [Concrete example of what does work]
|
||||||
|
- Why: [The underlying reason for the difference]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. The Mental Picture
|
||||||
|
Provide a clear, tangible analogy that helps the idea stick (e.g. *the scavenger hunt* for linked lists, *the ship's logbook* for ADRs, *the state machine vs. conversation* for skills).
|
||||||
|
|
||||||
|
### 6. The Trade-Offs & Costs
|
||||||
|
Every engineering choice involves a trade-off. An honest article explains what is sacrificed:
|
||||||
|
* Does this add indirection or initial setup friction?
|
||||||
|
* Does it require more files or maintenance overhead?
|
||||||
|
* When is this pattern overkill, and when should someone stick to a simpler approach?
|
||||||
|
|
||||||
|
### 7. One Principle to Remember
|
||||||
|
Conclude with a single reflective heuristic question the reader can ask themselves in their own work to decide whether to apply this lesson.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Frontmatter & Metadata Standards
|
||||||
|
|
||||||
|
Knowledge articles adhere to the Brain `DirectoryContract` for `04-learning/knowledge/`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
type: knowledge
|
||||||
|
status: draft | stable
|
||||||
|
topics:
|
||||||
|
- <primary-domain>
|
||||||
|
- <sub-topic>
|
||||||
|
tags:
|
||||||
|
- <search-tag-1>
|
||||||
|
- <search-tag-2>
|
||||||
|
related:
|
||||||
|
- ../methods/<related-method>.md
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
* `type`: Strictly `knowledge`.
|
||||||
|
* `status`: `draft` while in development; `stable` once verified and self-contained.
|
||||||
|
* `topics`: High-level taxonomy branches (e.g. `architecture`, `agent-engineering`, `dsa`, `testing`).
|
||||||
|
* `tags`: Granular discovery keywords.
|
||||||
|
* `related`: Relative links to companion methods, concepts, or guides.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Quality & Self-Audit Checklist
|
||||||
|
|
||||||
|
Before marking a Knowledge Article `status: stable`, audit it against these criteria:
|
||||||
|
|
||||||
|
- [ ] **Side-by-Side Learning Voice**: Does the article read like a learner who worked through a difficult concept carefully and is explaining what they learned to another learner, without adopting unnecessary authority or expertise?
|
||||||
|
- [ ] **Rhetorical Restraint**: Does every expressive sentence contribute explanation, reasoning, context, or useful perspective? Have all manufactured enthusiasm, dramatic hooks, and ornamental hype been deleted?
|
||||||
|
- [ ] **Deletion Test Passed**: Can any sentence be removed without losing information, context, or understanding? If yes, prune it.
|
||||||
|
- [ ] **Explanatory Guidance**: Does the article explain useful models and mechanisms directly, without turning into either a motivational pep talk or a long list of negative bans?
|
||||||
|
- [ ] **Clear Failure Motivation**: Does the article clearly show why the obvious/intuitive first approach failed before introducing the solution?
|
||||||
|
- [ ] **Concrete Mechanism**: Are code snippets, diagrams, or state transitions minimal, accurate, and load-bearing?
|
||||||
|
- [ ] **Explicit Costs**: Are the disadvantages, overhead, and boundary limits of the technique honestly laid out?
|
||||||
|
- [ ] **One Memorable Heuristic**: Does the article conclude with a single, practical heuristic question?
|
||||||
|
- [ ] **No Em-Dashes**: Are all sentences written cleanly with commas, colons, or parentheses?
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
# Plan Authoring Specification
|
||||||
|
|
||||||
|
## Epistemic Role & Core Purpose
|
||||||
|
|
||||||
|
A **Plan** is the **authoritative implementation specification** and phased execution blueprint for delivering an accepted decision or known engineering goal. It answers:
|
||||||
|
> *"What exactly are we going to change, in what order, under which constraints, and how will we prove it worked?"*
|
||||||
|
|
||||||
|
A plan owns the concrete technical specifications, contracts, resource matrices, execution sequencing, operational runbooks, verification gates, and Definition of Done. It is an engineering execution document, not an architectural debate.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Epistemic Invariants & Boundaries
|
||||||
|
|
||||||
|
1. **No Disguised ADRs**:
|
||||||
|
A plan must never silently introduce new architectural commitments. It operationalizes accepted ADRs.
|
||||||
|
* If implementation reveals that an architectural assumption is broken or that a new commitment is required, **stop execution** and route the decision to an ADR before resuming the plan.
|
||||||
|
2. **Pure Constraints, No Re-argument**:
|
||||||
|
State technical requirements as binding implementation constraints rather than re-litigating why alternatives were rejected.
|
||||||
|
* **Prohibited**: `"Early designs considered full Git clones, but after long evaluation we realized..."`
|
||||||
|
* **Correct**: `"Remote provenance inspection MUST evaluate commit equality using git ls-remote bounded by a 10-second timeout."`
|
||||||
|
3. **Actionable & Non-Destructive Runbooks**:
|
||||||
|
Provide exact execution commands, verified pre-flight snapshots, state parity proofs, and rollback instructions for all state-bearing operations.
|
||||||
|
4. **Phased Execution & Verification Gates**:
|
||||||
|
Group work into ordered milestones (e.g. P0 through P5). Each phase must specify concrete deliverables and verifiable exit criteria before the next phase begins.
|
||||||
|
5. **Bidirectional Cross-References**:
|
||||||
|
Explicitly link to the governing ADR and companion Discussion in the document header.
|
||||||
|
6. **Preservation of Lineage**:
|
||||||
|
When a new plan supersedes an earlier iteration (e.g. v4 supersedes v3), retain the older plans in a dedicated subsystem or lineage directory marked `superseded`. Never rewrite historical plans into synthetic current states.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Standard Document Structure
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
type: plan
|
||||||
|
status: draft | active | completed | abandoned
|
||||||
|
project: <project-name>
|
||||||
|
tags: [list, of, tags]
|
||||||
|
---
|
||||||
|
|
||||||
|
# <Project Title> Roadmap & Execution Plan
|
||||||
|
|
||||||
|
> **Architectural Decision Record**: [Link to governing ADR](../path/to/adr.md)
|
||||||
|
>
|
||||||
|
> **Architectural Discussion & Rationale**: [Link to companion Discussion](../path/to/discussion.md)
|
||||||
|
>
|
||||||
|
> **Target System**: <Target host, appliance, or environment>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Executive Summary
|
||||||
|
Concise statement of what this plan implements and its primary operational outcomes.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Technical Specifications & Contracts
|
||||||
|
* System architecture topology (Mermaid diagram).
|
||||||
|
* Component taxonomy, resource ownership, and controller authority matrices.
|
||||||
|
* Formal schema contracts (manifest specifications, domain models, security invariants).
|
||||||
|
* Explicit constraint rules (transport protocols, timeout bounds, state filesystem paths).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Working Rules & Coordination Constraints
|
||||||
|
* Production safety invariants (e.g. one production transition at a time, zero data loss).
|
||||||
|
* Multi-track branch coordination rules (stable integration seams).
|
||||||
|
* Minimal control path constraints (reconciliation simplicity).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Phased Implementation Roadmap
|
||||||
|
Overview table listing phases, target scopes, and verification gates:
|
||||||
|
|
||||||
|
| Phase | Status | Deliverables | Verification Gates |
|
||||||
|
| :--- | :--- | :--- | :--- |
|
||||||
|
| **P0: Baseline** | Active | ... | ... |
|
||||||
|
| **P1: Migration** | Pending | ... | ... |
|
||||||
|
|
||||||
|
### Phase 0: <Phase Name>
|
||||||
|
* **Deliverable 0.1**: Concrete action and files modified.
|
||||||
|
* **Deliverable 0.2**: Concrete action and files modified.
|
||||||
|
|
||||||
|
### Phase 1: <Phase Name>
|
||||||
|
* **Architectural Invariants**: Non-negotiable requirements for this phase.
|
||||||
|
* **Execution Runbook**: Exact bash commands, backup steps, state freeze, and cutover.
|
||||||
|
* **Rollback Procedure**: Reversion steps if verification gates fail.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Definition of Done
|
||||||
|
Explicit checklist required before the plan can transition to `status: completed`:
|
||||||
|
- [ ] Structural boundaries verified.
|
||||||
|
- [ ] Zero data loss verified with state parity proofs.
|
||||||
|
- [ ] Automated tests, linters, and type checkers passing.
|
||||||
|
- [ ] Runtime health and recovery validated in production.
|
||||||
|
```
|
||||||
Reference in new issue
Block a user