mishkan-harness 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +205 -0
- package/bin/mishkan.js +221 -0
- package/docs/design/MISHKAN_agent_aliases.md +140 -0
- package/docs/design/MISHKAN_decisions.md +172 -0
- package/docs/design/MISHKAN_harness_design.md +820 -0
- package/docs/design/MISHKAN_ontology.md +87 -0
- package/docs/design/MISHKAN_token_optimisation.md +181 -0
- package/docs/engineer/README.md +37 -0
- package/docs/engineer/profile.example.md +79 -0
- package/docs/usage/01-installation.md +178 -0
- package/docs/usage/02-project-init.md +151 -0
- package/docs/usage/03-orchestration.md +218 -0
- package/docs/usage/04-memory-layer.md +201 -0
- package/docs/usage/05-selective-ingest.md +177 -0
- package/docs/usage/06-llm-providers.md +195 -0
- package/docs/usage/07-troubleshooting.md +316 -0
- package/docs/usage/08-glossary.md +154 -0
- package/docs/usage/09-workflows.md +123 -0
- package/docs/usage/README.md +77 -0
- package/package.json +43 -0
- package/payload/install/settings.hooks.json +47 -0
- package/payload/mishkan/AGENT_SPEC.md +154 -0
- package/payload/mishkan/agents/ahikam.md +58 -0
- package/payload/mishkan/agents/aholiab.md +68 -0
- package/payload/mishkan/agents/asaph.md +73 -0
- package/payload/mishkan/agents/baruch.md +88 -0
- package/payload/mishkan/agents/benaiah.md +76 -0
- package/payload/mishkan/agents/bezalel.md +83 -0
- package/payload/mishkan/agents/caleb.md +74 -0
- package/payload/mishkan/agents/deborah.md +63 -0
- package/payload/mishkan/agents/elasah.md +58 -0
- package/payload/mishkan/agents/eliashib.md +68 -0
- package/payload/mishkan/agents/ezra.md +69 -0
- package/payload/mishkan/agents/hanun.md +64 -0
- package/payload/mishkan/agents/hiram.md +68 -0
- package/payload/mishkan/agents/hizkiah.md +76 -0
- package/payload/mishkan/agents/huldah.md +59 -0
- package/payload/mishkan/agents/huram.md +66 -0
- package/payload/mishkan/agents/hushai.md +59 -0
- package/payload/mishkan/agents/igal.md +58 -0
- package/payload/mishkan/agents/ira.md +86 -0
- package/payload/mishkan/agents/jahaziel.md +71 -0
- package/payload/mishkan/agents/jakin.md +66 -0
- package/payload/mishkan/agents/jehonathan.md +62 -0
- package/payload/mishkan/agents/jehoshaphat.md +68 -0
- package/payload/mishkan/agents/joab.md +71 -0
- package/payload/mishkan/agents/joah.md +62 -0
- package/payload/mishkan/agents/maaseiah.md +61 -0
- package/payload/mishkan/agents/meremoth.md +65 -0
- package/payload/mishkan/agents/meshullam.md +67 -0
- package/payload/mishkan/agents/nathan.md +70 -0
- package/payload/mishkan/agents/nehemiah.md +93 -0
- package/payload/mishkan/agents/obed.md +60 -0
- package/payload/mishkan/agents/oholiab.md +67 -0
- package/payload/mishkan/agents/palal.md +63 -0
- package/payload/mishkan/agents/phinehas.md +73 -0
- package/payload/mishkan/agents/rehum.md +60 -0
- package/payload/mishkan/agents/salma.md +69 -0
- package/payload/mishkan/agents/seraiah.md +73 -0
- package/payload/mishkan/agents/shallum.md +66 -0
- package/payload/mishkan/agents/shaphan.md +64 -0
- package/payload/mishkan/agents/shemaiah.md +67 -0
- package/payload/mishkan/agents/shevna.md +58 -0
- package/payload/mishkan/agents/uriah.md +70 -0
- package/payload/mishkan/agents/zaccur.md +58 -0
- package/payload/mishkan/agents/zadok.md +67 -0
- package/payload/mishkan/agents/zerubbabel.md +69 -0
- package/payload/mishkan/cognee/.env.curated.example +61 -0
- package/payload/mishkan/cognee/.env.example +165 -0
- package/payload/mishkan/cognee/Dockerfile +50 -0
- package/payload/mishkan/cognee/README.md +129 -0
- package/payload/mishkan/cognee/docker-compose.curated-ui.yml +61 -0
- package/payload/mishkan/cognee/docker-compose.curated.yml +85 -0
- package/payload/mishkan/cognee/docker-compose.hardening.yml +16 -0
- package/payload/mishkan/cognee/docker-compose.selfhosted.yml +114 -0
- package/payload/mishkan/cognee/docker-compose.ui.yml +70 -0
- package/payload/mishkan/cognee/docker-compose.yml +71 -0
- package/payload/mishkan/cognee/ingest-curated.py +92 -0
- package/payload/mishkan/commands/dep-audit.md +24 -0
- package/payload/mishkan/commands/mishkan-init.md +25 -0
- package/payload/mishkan/commands/mishkan-resume.md +21 -0
- package/payload/mishkan/commands/promote.md +19 -0
- package/payload/mishkan/commands/sefer-pull.md +19 -0
- package/payload/mishkan/commands/sprint-close.md +21 -0
- package/payload/mishkan/config/curated-library.yaml +113 -0
- package/payload/mishkan/config/improvement-queries.md +29 -0
- package/payload/mishkan/config/model-routing.yaml +87 -0
- package/payload/mishkan/config/projects.yaml +38 -0
- package/payload/mishkan/evals/baruch/README.md +93 -0
- package/payload/mishkan/evals/baruch/fixtures/invalid/bad-outcome-enum.json +15 -0
- package/payload/mishkan/evals/baruch/fixtures/invalid/bad-sprint-pattern.json +15 -0
- package/payload/mishkan/evals/baruch/fixtures/invalid/bad-trigger-enum.json +15 -0
- package/payload/mishkan/evals/baruch/fixtures/invalid/malformed-json.json +7 -0
- package/payload/mishkan/evals/baruch/fixtures/invalid/missing-required-field.json +14 -0
- package/payload/mishkan/evals/baruch/fixtures/valid/blocked-vendor.json +15 -0
- package/payload/mishkan/evals/baruch/fixtures/valid/curated-shortcircuit.json +15 -0
- package/payload/mishkan/evals/baruch/fixtures/valid/partial-no-write.json +14 -0
- package/payload/mishkan/evals/baruch/fixtures/valid/resolved-cross-harness.json +15 -0
- package/payload/mishkan/evals/baruch/golden_case/expected.yaml +35 -0
- package/payload/mishkan/evals/baruch/golden_case/input.yaml +47 -0
- package/payload/mishkan/evals/baruch/golden_case/produced.json +15 -0
- package/payload/mishkan/evals/baruch/run.sh +129 -0
- package/payload/mishkan/hooks/model-route.py +96 -0
- package/payload/mishkan/hooks/post-tool-observe.sh +45 -0
- package/payload/mishkan/hooks/pre-tool-security.sh +150 -0
- package/payload/mishkan/hooks/session-start.sh +20 -0
- package/payload/mishkan/hooks/stop-reporter.sh +29 -0
- package/payload/mishkan/ontology.md +87 -0
- package/payload/mishkan/rules/backend/yasad.md +23 -0
- package/payload/mishkan/rules/common/dependencies.md +53 -0
- package/payload/mishkan/rules/common/quality.md +16 -0
- package/payload/mishkan/rules/common/security.md +20 -0
- package/payload/mishkan/rules/documentation/sefer.md +19 -0
- package/payload/mishkan/rules/frontend/panim.md +21 -0
- package/payload/mishkan/rules/infrastructure/migdal.md +22 -0
- package/payload/mishkan/scripts/dependency-audit.sh +171 -0
- package/payload/mishkan/scripts/ensure-curated-box.sh +66 -0
- package/payload/mishkan/scripts/mishkan-ingest.sh +92 -0
- package/payload/mishkan/scripts/observability-aggregate.sh +57 -0
- package/payload/mishkan/scripts/seed-curated-library.sh +62 -0
- package/payload/mishkan/scripts/sync-profile.sh +65 -0
- package/payload/mishkan/scripts/validate-research-log.sh +108 -0
- package/payload/mishkan/skills/asaph-a11y-seo-craft/SKILL.md +289 -0
- package/payload/mishkan/skills/baruch-research-reporting-craft/SKILL.md +460 -0
- package/payload/mishkan/skills/benaiah-devsecops-craft/SKILL.md +329 -0
- package/payload/mishkan/skills/bezalel-cto-craft/SKILL.md +391 -0
- package/payload/mishkan/skills/caleb-web-research-craft/SKILL.md +306 -0
- package/payload/mishkan/skills/cognee-promote/SKILL.md +40 -0
- package/payload/mishkan/skills/cognee-quickstart/SKILL.md +66 -0
- package/payload/mishkan/skills/context-compress/SKILL.md +36 -0
- package/payload/mishkan/skills/deborah-ux-craft/SKILL.md +295 -0
- package/payload/mishkan/skills/dependency-audit/SKILL.md +59 -0
- package/payload/mishkan/skills/dependency-vetting/SKILL.md +59 -0
- package/payload/mishkan/skills/documentation-craft/SKILL.md +468 -0
- package/payload/mishkan/skills/ezra-research-formulation-craft/SKILL.md +319 -0
- package/payload/mishkan/skills/hanun-observability-craft/SKILL.md +312 -0
- package/payload/mishkan/skills/hiram-ui-craft/SKILL.md +334 -0
- package/payload/mishkan/skills/hizkiah-implementation-craft/SKILL.md +701 -0
- package/payload/mishkan/skills/hushai-security-advisor-craft/SKILL.md +282 -0
- package/payload/mishkan/skills/ira-code-security-craft/SKILL.md +553 -0
- package/payload/mishkan/skills/jakin-intent-clarification-craft/SKILL.md +299 -0
- package/payload/mishkan/skills/jehonathan-publication-craft/SKILL.md +262 -0
- package/payload/mishkan/skills/joab-app-security-craft/SKILL.md +266 -0
- package/payload/mishkan/skills/meremoth-devops-craft/SKILL.md +298 -0
- package/payload/mishkan/skills/meshullam-infra-design-craft/SKILL.md +302 -0
- package/payload/mishkan/skills/mishkan-ingest/SKILL.md +65 -0
- package/payload/mishkan/skills/mishkan-init/SKILL.md +65 -0
- package/payload/mishkan/skills/nathan-architecture-craft/SKILL.md +547 -0
- package/payload/mishkan/skills/nehemiah-pm-craft/SKILL.md +484 -0
- package/payload/mishkan/skills/obed-asset-pipeline-craft/SKILL.md +286 -0
- package/payload/mishkan/skills/oholiab-design-system-craft/SKILL.md +334 -0
- package/payload/mishkan/skills/palal-systems-craft/SKILL.md +281 -0
- package/payload/mishkan/skills/qa-evaluation-craft/SKILL.md +406 -0
- package/payload/mishkan/skills/rehum-sre-advisor-craft/SKILL.md +228 -0
- package/payload/mishkan/skills/reporter-discipline-craft/SKILL.md +351 -0
- package/payload/mishkan/skills/research-pipeline/SKILL.md +55 -0
- package/payload/mishkan/skills/salma-frontend-implementation-craft/SKILL.md +369 -0
- package/payload/mishkan/skills/sefer-pull/SKILL.md +37 -0
- package/payload/mishkan/skills/shallum-database-craft/SKILL.md +347 -0
- package/payload/mishkan/skills/shaphan-summarisation-craft/SKILL.md +271 -0
- package/payload/mishkan/skills/shemaiah-evaluation-craft/SKILL.md +342 -0
- package/payload/mishkan/skills/sprint-report/SKILL.md +28 -0
- package/payload/mishkan/skills/team-lead-craft/SKILL.md +457 -0
- package/payload/mishkan/skills/zadok-contract-craft/SKILL.md +520 -0
- package/payload/mishkan/templates/case-node.schema.json +22 -0
- package/payload/mishkan/templates/mcp.json +22 -0
- package/payload/mishkan/templates/observability-log.schema.json +24 -0
- package/payload/mishkan/templates/project-CLAUDE.md +47 -0
- package/payload/mishkan/templates/research-log.schema.json +40 -0
- package/payload/mishkan/templates/settings.json +12 -0
- package/payload/mishkan/templates/settings.local.json +6 -0
- package/payload/mishkan/templates/sprint-state.schema.json +47 -0
- package/payload/mishkan/templates/team-report.schema.json +50 -0
- package/payload/mishkan/templates/user-CLAUDE.md +62 -0
- package/payload/mishkan/workflows/README.md +88 -0
- package/payload/mishkan/workflows/mishkan-architecture-panel.js +156 -0
- package/payload/mishkan/workflows/mishkan-codebase-audit.js +188 -0
- package/payload/mishkan/workflows/mishkan-deep-research.js +251 -0
- package/payload/mishkan/workflows/mishkan-init.js +156 -0
- package/payload/mishkan/workflows/mishkan-migration-wave.js +180 -0
- package/payload/mishkan/workflows/mishkan-release-readiness.js +163 -0
- package/payload/mishkan/workflows/mishkan-sprint-close.js +112 -0
- package/payload/user/CLAUDE.md +62 -0
- package/payload/user/rules/engineer-standards.md +66 -0
- package/payload/user/rules/y4nn-standards.md +167 -0
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documentation-craft
|
|
3
|
+
description: How the three Sefer scope-layer specialists (seraiah, joah, shevna) reason about documentation — the Diátaxis quadrant rule, the pull-based discipline, source-grounded writing, the layered-scope split (org / project / team), and the writes-to-docs-only boundary. Same shape; three scope-levels with distinctive concerns. Invoke when documentation at a specific scope is in scope.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documentation — Craft
|
|
7
|
+
|
|
8
|
+
> Not a checklist. How the three scope-layer documentation specialists in
|
|
9
|
+
> Sefer reason when a doc is being written — what they include, what they
|
|
10
|
+
> refuse to fabricate, and the rule that a doc that is not pulled from a
|
|
11
|
+
> source is not yet a doc.
|
|
12
|
+
|
|
13
|
+
Invoked by:
|
|
14
|
+
|
|
15
|
+
- **Seraiah** — organisation-layer (cross-project standards).
|
|
16
|
+
- **Joah** — project-layer (ADRs, runbooks, changelogs, API docs).
|
|
17
|
+
- **Shevna** — team-layer (per-team outputs).
|
|
18
|
+
|
|
19
|
+
Jehonathan (publication specialist) uses a related but distinct skill
|
|
20
|
+
focused on the publication step itself — this skill is about the
|
|
21
|
+
*authoring* at the three scope layers.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 1. The rule above all other rules
|
|
26
|
+
|
|
27
|
+
**Sefer writes from sources. Sefer does not invent.**
|
|
28
|
+
|
|
29
|
+
Three corollaries that define every doc decision:
|
|
30
|
+
|
|
31
|
+
- **No fabricated facts.** A claim without a source is not yet a doc
|
|
32
|
+
sentence. The standards rule named:
|
|
33
|
+
`y4nn-standards.md` §6.
|
|
34
|
+
- **No code.** Sefer writes to `docs/` only. Even when a code example
|
|
35
|
+
is helpful, it is *quoted from the codebase*, not authored by Sefer.
|
|
36
|
+
- **No undated docs.** Every artefact carries a date and a source
|
|
37
|
+
reference (ADR id, research-log id, commit hash). An undated doc
|
|
38
|
+
cannot be reviewed for staleness.
|
|
39
|
+
|
|
40
|
+
Sefer's value is **legibility under truth-pressure** — the team has
|
|
41
|
+
shipped 15 decisions this sprint; Sefer's answer is to surface them in
|
|
42
|
+
the shape future readers can act on, without smoothing the rough edges
|
|
43
|
+
into a nicer story than what happened.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 2. Diátaxis — the quadrant rule
|
|
48
|
+
|
|
49
|
+
Every Sefer artefact declares its Diátaxis quadrant. Four quadrants,
|
|
50
|
+
four reader needs:
|
|
51
|
+
|
|
52
|
+
| Quadrant | Reader need | Sefer asks |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| **Tutorial** | learning by doing | "Is the reader new and wanting to acquire skill?" |
|
|
55
|
+
| **How-to** | accomplishing a known task | "Is the reader experienced and wanting a recipe?" |
|
|
56
|
+
| **Reference** | looking up exact information | "Is the reader confirming a fact?" |
|
|
57
|
+
| **Explanation** | understanding the design | "Is the reader trying to understand why?" |
|
|
58
|
+
|
|
59
|
+
Three rules:
|
|
60
|
+
|
|
61
|
+
- **One quadrant per artefact.** A tutorial that drifts into reference
|
|
62
|
+
has lost its reader. Split.
|
|
63
|
+
- **The quadrant is declared in the artefact's header.** Not implicit.
|
|
64
|
+
Readers triage by quadrant before reading.
|
|
65
|
+
- **The wrong quadrant is a finding.** A "tutorial" that is actually a
|
|
66
|
+
reference reads as overwhelming on day one; that is a failure mode,
|
|
67
|
+
not a style choice.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 3. The pull-based discipline
|
|
72
|
+
|
|
73
|
+
Sefer is **pull-based**. Two pull modes:
|
|
74
|
+
|
|
75
|
+
### 3.1 Sequential pull — every milestone
|
|
76
|
+
|
|
77
|
+
At each sprint milestone, Sefer reads:
|
|
78
|
+
|
|
79
|
+
- Team Reporter outputs (six `team-report.json` per close).
|
|
80
|
+
- Research logs (from Baruch) for the sprint.
|
|
81
|
+
- Cognee nodes written during the sprint.
|
|
82
|
+
- Decisions surfaced in the sprint-close aggregation.
|
|
83
|
+
|
|
84
|
+
Sequential pull produces the steady drumbeat of documentation —
|
|
85
|
+
changelogs, ADR catchup, runbook updates.
|
|
86
|
+
|
|
87
|
+
### 3.2 Triggered pull — high-blast events
|
|
88
|
+
|
|
89
|
+
Certain events trigger a pull immediately, not at the next milestone:
|
|
90
|
+
|
|
91
|
+
- A **major architecture decision** lands.
|
|
92
|
+
- A **critical security finding** closes.
|
|
93
|
+
- A **schema change** ships.
|
|
94
|
+
- A **new contract version** is released.
|
|
95
|
+
|
|
96
|
+
Triggered pulls produce the *time-sensitive* documentation — ADRs that
|
|
97
|
+
need to be ready before the next decision references them, runbooks
|
|
98
|
+
that the on-call needs before the next incident.
|
|
99
|
+
|
|
100
|
+
Three rules:
|
|
101
|
+
|
|
102
|
+
- **Sefer does not push.** Teams emit; Sefer reads at the pull cadence.
|
|
103
|
+
A specialist who wants documentation help raises the request through
|
|
104
|
+
Nehemiah, who routes to Jehoshaphat, who routes to the right scope
|
|
105
|
+
specialist.
|
|
106
|
+
- **A pull produces a published artefact.** A pull is not "noting"
|
|
107
|
+
something; it is producing the doc.
|
|
108
|
+
- **The source is named.** Every doc cites the artefact it was pulled
|
|
109
|
+
from. Untraceable docs cannot be updated when the source changes.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 4. The three scope layers — what each specialist actually owns
|
|
114
|
+
|
|
115
|
+
The discipline is shared; the scope is distinct.
|
|
116
|
+
|
|
117
|
+
### 4.1 Seraiah — organisation layer (cross-project)
|
|
118
|
+
|
|
119
|
+
Concerns:
|
|
120
|
+
|
|
121
|
+
- **Engineering identity** — `docs/engineer/` content derived from the
|
|
122
|
+
canonical `docs/engineer/profile.md`.
|
|
123
|
+
- **Cross-project conventions** — commit format, ADR format,
|
|
124
|
+
changelog convention, branch policy, the `y4nn-standards.md` digest.
|
|
125
|
+
- **Portfolio-level documentation** — dependency posture across
|
|
126
|
+
projects (from `dependency-audit`), the curated-library catalogue.
|
|
127
|
+
|
|
128
|
+
What Seraiah owns that the others do not:
|
|
129
|
+
|
|
130
|
+
- **Profile propagation.** When `docs/engineer/profile.md` changes,
|
|
131
|
+
Seraiah runs the sync script, then re-derives the digests in the
|
|
132
|
+
user-level `~/.claude/CLAUDE.md` non-negotiables block and any
|
|
133
|
+
engineering-identity references. Mechanical recopy is the script;
|
|
134
|
+
re-derivation when the profile materially changes is Seraiah.
|
|
135
|
+
- **Curated library upkeep.** When research promotes a learning to
|
|
136
|
+
cross-harness, Seraiah documents the entry in the curated library
|
|
137
|
+
index so future projects find it.
|
|
138
|
+
|
|
139
|
+
### 4.2 Joah — project layer (the specific project)
|
|
140
|
+
|
|
141
|
+
Concerns:
|
|
142
|
+
|
|
143
|
+
- **ADRs** (MADR template) — produced from decisions made by Nathan,
|
|
144
|
+
Bezalel, the Team Leads.
|
|
145
|
+
- **Runbooks** — copy-paste-safe, one command per failure mode, for
|
|
146
|
+
the project's specific operational surface.
|
|
147
|
+
- **Changelogs** — Keep a Changelog + Conventional Commits.
|
|
148
|
+
- **API docs** — derived from the OpenAPI spec, not hand-written.
|
|
149
|
+
|
|
150
|
+
What Joah owns that the others do not:
|
|
151
|
+
|
|
152
|
+
- **The decision history of one project.** Cross-project conventions
|
|
153
|
+
are Seraiah; per-team specifics are Shevna; the *project's own
|
|
154
|
+
decisions* are Joah.
|
|
155
|
+
- **Incident retrospectives** (postmortems) for the project.
|
|
156
|
+
- **Project README and Quickstart** — the on-ramp doc.
|
|
157
|
+
|
|
158
|
+
### 4.3 Shevna — team layer (per-team outputs)
|
|
159
|
+
|
|
160
|
+
Concerns:
|
|
161
|
+
|
|
162
|
+
- **Component library docs** (Panim).
|
|
163
|
+
- **Security posture per project** (Mishmar).
|
|
164
|
+
- **Infra topology** (Migdal).
|
|
165
|
+
- **API surface** — the consumer-facing reference (Yasad).
|
|
166
|
+
- **Design system docs** (Chosheb).
|
|
167
|
+
|
|
168
|
+
What Shevna owns that the others do not:
|
|
169
|
+
|
|
170
|
+
- **The team's own ergonomics.** Per-team docs that the team relies
|
|
171
|
+
on day-to-day live here. Cross-team or cross-project material is
|
|
172
|
+
not Shevna's; the scope is *what this team produces and reads*.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 5. The MADR shape (Joah's primary instrument)
|
|
177
|
+
|
|
178
|
+
Every ADR Joah writes follows MADR (Markdown Architecture Decision
|
|
179
|
+
Records). The shape:
|
|
180
|
+
|
|
181
|
+
```markdown
|
|
182
|
+
# ADR-NNNN — <decision title in present tense>
|
|
183
|
+
|
|
184
|
+
- **Status:** proposed | accepted | superseded by ADR-MMMM
|
|
185
|
+
- **Date:** YYYY-MM-DD
|
|
186
|
+
- **Deciders:** <names / aliases>
|
|
187
|
+
|
|
188
|
+
## Context and Problem Statement
|
|
189
|
+
<1–3 sentences. What forced this decision now.>
|
|
190
|
+
|
|
191
|
+
## Decision Drivers
|
|
192
|
+
- <quality attribute or constraint>
|
|
193
|
+
- <…>
|
|
194
|
+
|
|
195
|
+
## Considered Options
|
|
196
|
+
1. <Option A>
|
|
197
|
+
2. <Option B>
|
|
198
|
+
3. <Option C>
|
|
199
|
+
|
|
200
|
+
## Decision Outcome
|
|
201
|
+
Chosen: **<Option X>**, because <one sentence — the force it resolves>.
|
|
202
|
+
|
|
203
|
+
### Consequences
|
|
204
|
+
- Positive: …
|
|
205
|
+
- Negative: …
|
|
206
|
+
- Neutral: …
|
|
207
|
+
|
|
208
|
+
## Pros and Cons of the Options
|
|
209
|
+
### <Option A>
|
|
210
|
+
- Good: …
|
|
211
|
+
- Bad: …
|
|
212
|
+
|
|
213
|
+
### <Option B>
|
|
214
|
+
…
|
|
215
|
+
|
|
216
|
+
## Out of Scope
|
|
217
|
+
- <three explicitly-not-solved things>
|
|
218
|
+
|
|
219
|
+
## Links
|
|
220
|
+
- Source decision: <Nathan / Bezalel doc id>
|
|
221
|
+
- Related ADRs: <ADR-NNN>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Three rules on Joah's ADR practice:
|
|
225
|
+
|
|
226
|
+
- **The deciders are real names.** "The team" is not a decider. ADRs
|
|
227
|
+
with anonymous deciders cannot be discussed later.
|
|
228
|
+
- **The "Considered Options" all have at least one Bad.** A list of
|
|
229
|
+
options with no negatives is a list, not a deliberation.
|
|
230
|
+
- **The "Decision Outcome" names the force.** "We chose X because it
|
|
231
|
+
is better" is not a decision record. "We chose X because it
|
|
232
|
+
resolves <force tension> in favour of <side>" is.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 6. The runbook shape (Joah, sometimes Shevna)
|
|
237
|
+
|
|
238
|
+
Runbooks are operational documentation. The shape is non-negotiable:
|
|
239
|
+
|
|
240
|
+
```markdown
|
|
241
|
+
# Runbook — <failure mode>
|
|
242
|
+
|
|
243
|
+
- **Trigger:** <what observation invokes this runbook>
|
|
244
|
+
- **Severity:** <how urgent>
|
|
245
|
+
- **First responder:** <on-call / specialist>
|
|
246
|
+
- **Estimated mitigation time:** <minutes>
|
|
247
|
+
|
|
248
|
+
## Diagnose
|
|
249
|
+
1. <one command per step; copy-paste-safe>
|
|
250
|
+
2. <one command per step>
|
|
251
|
+
|
|
252
|
+
## Mitigate
|
|
253
|
+
1. <one command per step>
|
|
254
|
+
2. <one command per step>
|
|
255
|
+
|
|
256
|
+
## Verify
|
|
257
|
+
1. <how you know the mitigation worked>
|
|
258
|
+
|
|
259
|
+
## Resolve
|
|
260
|
+
- <the durable fix, if different from the mitigation>
|
|
261
|
+
- <link to the ADR that explains the root cause, if any>
|
|
262
|
+
|
|
263
|
+
## Reference
|
|
264
|
+
- Related runbook: <link>
|
|
265
|
+
- Related research log: <id>
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Three rules:
|
|
269
|
+
|
|
270
|
+
- **One command per step.** Two commands joined with `&&` is one step
|
|
271
|
+
with hidden failure modes. Split.
|
|
272
|
+
- **No conditional language in commands.** "Run something like
|
|
273
|
+
`kubectl …`" is not a runbook step. "Run `kubectl <exact>`" is.
|
|
274
|
+
- **Mitigate is separate from Resolve.** The on-call mitigates; the
|
|
275
|
+
durable fix may happen later, via a different team. Both belong in
|
|
276
|
+
the runbook so the on-call knows the difference.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## 7. The changelog shape (Joah, with Meremoth's automation)
|
|
281
|
+
|
|
282
|
+
Keep a Changelog + Conventional Commits is the standard. Joah's role:
|
|
283
|
+
|
|
284
|
+
- The changelog is **generated** from Conventional Commits, then
|
|
285
|
+
curated. Generated lines are starting points, not final.
|
|
286
|
+
- Every release has a date.
|
|
287
|
+
- The format is:
|
|
288
|
+
|
|
289
|
+
```markdown
|
|
290
|
+
## [1.4.0] — 2026-06-02
|
|
291
|
+
|
|
292
|
+
### Added
|
|
293
|
+
- New endpoint `POST /invoices/void` (#412)
|
|
294
|
+
|
|
295
|
+
### Changed
|
|
296
|
+
- Tightened input validation on `customer.email` length to 254 chars
|
|
297
|
+
(was unbounded) (#418)
|
|
298
|
+
|
|
299
|
+
### Fixed
|
|
300
|
+
- Idempotency replay returned 200 instead of original status (#421)
|
|
301
|
+
|
|
302
|
+
### Security
|
|
303
|
+
- Patched the SQL injection on `find_by_email` flagged by Ira (#420)
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Three rules:
|
|
307
|
+
|
|
308
|
+
- **Group by category.** Added / Changed / Deprecated / Removed /
|
|
309
|
+
Fixed / Security. Always.
|
|
310
|
+
- **Reference the PR or commit.** A changelog entry without a
|
|
311
|
+
reference is not auditable.
|
|
312
|
+
- **No marketing tone.** "Improved performance" without a number is
|
|
313
|
+
noise. Cite the change ("p95 LCP from 3.1s to 1.8s") or do not
|
|
314
|
+
include it.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## 8. Worked example — Joah writing an ADR for an idempotency choice
|
|
319
|
+
|
|
320
|
+
Yasad's S2 work included choosing a Postgres-advisory-lock idempotency
|
|
321
|
+
shape over Redis Redlock. Nathan made the decision; Joah documents.
|
|
322
|
+
|
|
323
|
+
```markdown
|
|
324
|
+
# ADR-0012 — Use Postgres advisory locks for idempotency-key serialisation
|
|
325
|
+
|
|
326
|
+
- **Status:** accepted
|
|
327
|
+
- **Date:** 2026-06-02
|
|
328
|
+
- **Deciders:** Nathan (Yasad architecture), Bezalel (CTO),
|
|
329
|
+
Phinehas (Mishmar review)
|
|
330
|
+
|
|
331
|
+
## Context and Problem Statement
|
|
332
|
+
The invoices endpoint offers idempotency over `Idempotency-Key`
|
|
333
|
+
(CONTRACT §3). Concurrent re-issues must serialise; the lock choice
|
|
334
|
+
was open between Postgres advisory locks and Redis-with-Redlock.
|
|
335
|
+
|
|
336
|
+
## Decision Drivers
|
|
337
|
+
- One fewer infrastructure dependency (no separate Redis cluster
|
|
338
|
+
for the invoice path).
|
|
339
|
+
- Atomicity with the response-store write (already in Postgres).
|
|
340
|
+
- Operational simplicity (one less surface for Migdal to monitor).
|
|
341
|
+
|
|
342
|
+
## Considered Options
|
|
343
|
+
1. Postgres advisory locks
|
|
344
|
+
2. Redis-with-Redlock
|
|
345
|
+
3. In-process mutex with sticky routing
|
|
346
|
+
|
|
347
|
+
## Decision Outcome
|
|
348
|
+
Chosen: **Postgres advisory locks**, because the lock and the
|
|
349
|
+
response-store write are atomic in a single transaction, removing
|
|
350
|
+
the cross-system consistency story that Redlock requires.
|
|
351
|
+
|
|
352
|
+
### Consequences
|
|
353
|
+
- Positive: one fewer infrastructure dependency; lock + store
|
|
354
|
+
atomic in one transaction.
|
|
355
|
+
- Negative: lock acquisition couples to Postgres connection-pool
|
|
356
|
+
capacity; under saturation, lock waits queue at the pool.
|
|
357
|
+
- Neutral: monitoring requires Postgres-side instrumentation
|
|
358
|
+
(already wired).
|
|
359
|
+
|
|
360
|
+
## Pros and Cons of the Options
|
|
361
|
+
### Postgres advisory locks
|
|
362
|
+
- Good: atomic with the store write.
|
|
363
|
+
- Good: no new infra.
|
|
364
|
+
- Bad: couples to pool capacity.
|
|
365
|
+
|
|
366
|
+
### Redis-with-Redlock
|
|
367
|
+
- Good: independent of Postgres saturation.
|
|
368
|
+
- Bad: requires a separate Redis cluster for the invoice path.
|
|
369
|
+
- Bad: cross-system consistency story (lock in Redis, store in
|
|
370
|
+
Postgres) requires careful failure handling.
|
|
371
|
+
|
|
372
|
+
### In-process mutex with sticky routing
|
|
373
|
+
- Bad: load-balancer must route by `Idempotency-Key`, which is not
|
|
374
|
+
a stable property of a session.
|
|
375
|
+
- Bad: every new app instance multiplies the mutex; not safe.
|
|
376
|
+
|
|
377
|
+
## Out of Scope
|
|
378
|
+
- The lock TTL within Postgres (handled by the response-store TTL).
|
|
379
|
+
- The choice of `Idempotency-Key` format (client-supplied UUID per
|
|
380
|
+
CONTRACT §3.2).
|
|
381
|
+
- The decision to offer idempotency at all (decided in CONTRACT,
|
|
382
|
+
not here).
|
|
383
|
+
|
|
384
|
+
## Links
|
|
385
|
+
- Source decision: T-12 thread; research-log-S2-001.json.
|
|
386
|
+
- Related ADRs: ADR-0008 (idempotency clause in CONTRACT).
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
What Joah did:
|
|
390
|
+
|
|
391
|
+
- Quoted Nathan's reasoning verbatim where decisions were captured.
|
|
392
|
+
- Cited the source (T-12 thread, research log).
|
|
393
|
+
- Wrote Out of Scope (three things, mandatory).
|
|
394
|
+
- Did NOT introduce a new opinion.
|
|
395
|
+
|
|
396
|
+
What Joah did NOT:
|
|
397
|
+
|
|
398
|
+
- Re-litigate the choice ("but Redis would have …").
|
|
399
|
+
- Predict future regret.
|
|
400
|
+
- Fabricate a comparison with a Postgres clustering approach the
|
|
401
|
+
team did not consider.
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## 9. The recurring traps all three Sefer scope specialists reject
|
|
406
|
+
|
|
407
|
+
1. **"I'll smooth the rough edges into a nicer story."** No. The doc
|
|
408
|
+
is the truthful record; smoothness is at the cost of accuracy.
|
|
409
|
+
|
|
410
|
+
2. **"I'll write the doc before the source exists."** No.
|
|
411
|
+
Source-grounded means the source comes first. Pre-emptive
|
|
412
|
+
documentation invents.
|
|
413
|
+
|
|
414
|
+
3. **"This decision wasn't quite captured; I'll fill in what I
|
|
415
|
+
think they meant."** No. Surface the gap to the originating
|
|
416
|
+
specialist (via Jehoshaphat / Nehemiah). Filled-in interpretations
|
|
417
|
+
become contractual later.
|
|
418
|
+
|
|
419
|
+
4. **"The runbook is mostly the same as the last one; I'll copy and
|
|
420
|
+
tweak."** No. Runbook patterns are themselves a finding for the
|
|
421
|
+
curated library (`cognee-promote`). Copy-and-tweak runbooks rot
|
|
422
|
+
together.
|
|
423
|
+
|
|
424
|
+
5. **"This is a tutorial that also covers reference material."** §2.
|
|
425
|
+
Pick a quadrant.
|
|
426
|
+
|
|
427
|
+
6. **"It's been three sprints; I'll just date this `recent`."** §1.
|
|
428
|
+
No undated docs.
|
|
429
|
+
|
|
430
|
+
7. **"Let me also add this code snippet inline."** No. Sefer writes
|
|
431
|
+
to `docs/`. Code lives in the codebase; docs *quote* code with
|
|
432
|
+
the path and (where possible) the commit hash.
|
|
433
|
+
|
|
434
|
+
8. **"The team's reporter didn't surface this, but I noticed it;
|
|
435
|
+
I'll add it."** No. Sefer pulls from sources. If the source did
|
|
436
|
+
not surface it, surface the gap to the reporter, not into the
|
|
437
|
+
doc.
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## 10. Style — the documentation voice
|
|
442
|
+
|
|
443
|
+
- **Plain, dated, sourced.** Every claim cites; every artefact has
|
|
444
|
+
a date.
|
|
445
|
+
- **One quadrant.** Diátaxis declared in the header.
|
|
446
|
+
- **No marketing.** Numbers where numbers apply; absence acknowledged
|
|
447
|
+
where it applies.
|
|
448
|
+
- **Reader-centric.** The reader's question is the lede. "What is
|
|
449
|
+
this for" and "how do I use it" precede the design discussion.
|
|
450
|
+
- **Faithful to the rough shape of the work.** Smoothing is for
|
|
451
|
+
later editions, not for the first record. Truth-then-prettier-prose,
|
|
452
|
+
in that order.
|
|
453
|
+
|
|
454
|
+
The pattern is biblical scribes — Seraiah, Joah, Shevna — each
|
|
455
|
+
documented at a different layer of the same kingdom. The discipline
|
|
456
|
+
is the same; the audience differs.
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
*Cross-references: `~/.claude/rules/y4nn-standards.md`
|
|
461
|
+
(no-fabrication §6, naming §11, English §12),
|
|
462
|
+
`payload/mishkan/skills/team-lead-craft/SKILL.md` (Jehoshaphat's
|
|
463
|
+
Lead-layer, who decides what pulls), `payload/mishkan/skills/reporter-
|
|
464
|
+
discipline-craft/SKILL.md` (the silent emit-side that Sefer pulls
|
|
465
|
+
from), `payload/mishkan/skills/cognee-promote/SKILL.md` (the promotion
|
|
466
|
+
step that feeds curated-library updates Seraiah documents),
|
|
467
|
+
`payload/mishkan/skills/baruch-research-reporting-craft/SKILL.md`
|
|
468
|
+
(the research-log shape Sefer reads at pull time).*
|