@nurix/etna 0.19.65 → 0.19.67
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/bin/etna.js +10 -1
- package/data/harness-index.json +1 -5
- package/data/harnesses/code/CLAUDE.md +3 -1
- package/data/harnesses/code/agents/maintenance.md +4 -1
- package/data/harnesses/code/harness.json +7 -2
- package/data/harnesses/code/hooks/check-completion-integrity.mjs +8 -0
- package/data/harnesses/code/hooks/compliance.mjs +139 -27
- package/data/harnesses/code/hooks/lib/frozen.mjs +3 -0
- package/data/harnesses/code/hooks/lib/ledger.mjs +31 -0
- package/data/harnesses/code/hooks/lib/ownership.mjs +3 -1
- package/data/harnesses/code/hooks/lib/session-log.mjs +75 -0
- package/data/harnesses/code/rules/changelog.md +2 -0
- package/data/harnesses/code/skills/documentation/SKILL.md +1 -0
- package/data/harnesses/code/skills/documentation/references/frontmatter.md +1 -1
- package/data/harnesses/code/skills/documentation/scripts/doc-lint.mjs +2 -2
- package/data/harnesses/code/skills/documentation/templates/Readme.md +1 -0
- package/data/harnesses/code/skills/documentation/templates/behavioral-checklist.md +2 -0
- package/data/harnesses/code/skills/documentation/templates/changelog-entry.md +2 -2
- package/data/harnesses/code/skills/documentation/templates/feature.md +1 -0
- package/data/harnesses/code/skills/documentation/templates/implementation-map.md +42 -0
- package/data/harnesses/code/skills/testing/SKILL.md +5 -5
- package/data/harnesses/delivery/agents/maintenance.md +4 -1
- package/data/harnesses/delivery/harness.json +2 -2
- package/data/harnesses/delivery/rules/changelog.md +2 -0
- package/data/harnesses/delivery/skills/documentation/SKILL.md +1 -0
- package/data/harnesses/delivery/skills/documentation/references/frontmatter.md +1 -1
- package/data/harnesses/delivery/skills/documentation/scripts/doc-lint.mjs +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/Readme.md +1 -0
- package/data/harnesses/delivery/skills/documentation/templates/behavioral-checklist.md +2 -0
- package/data/harnesses/delivery/skills/documentation/templates/changelog-entry.md +2 -2
- package/data/harnesses/delivery/skills/documentation/templates/feature.md +1 -0
- package/data/harnesses/delivery/skills/documentation/templates/implementation-map.md +42 -0
- package/data/harnesses/etna/agents/maintenance.md +4 -1
- package/data/harnesses/etna/harness.json +2 -2
- package/data/harnesses/etna/rules/changelog.md +2 -0
- package/data/harnesses/etna/skills/documentation/SKILL.md +1 -0
- package/data/harnesses/etna/skills/documentation/references/frontmatter.md +1 -1
- package/data/harnesses/etna/skills/documentation/scripts/doc-lint.mjs +2 -2
- package/data/harnesses/etna/skills/documentation/templates/Readme.md +1 -0
- package/data/harnesses/etna/skills/documentation/templates/behavioral-checklist.md +2 -0
- package/data/harnesses/etna/skills/documentation/templates/changelog-entry.md +2 -2
- package/data/harnesses/etna/skills/documentation/templates/feature.md +1 -0
- package/data/harnesses/etna/skills/documentation/templates/implementation-map.md +42 -0
- package/lib/install/materialize.mjs +51 -57
- package/package.json +2 -2
- package/data/harnesses/apollo/.mcp.json +0 -8
- package/data/harnesses/apollo/.prettierignore +0 -29
- package/data/harnesses/apollo/.prettierrc.json +0 -3
- package/data/harnesses/apollo/.vscode/settings.json +0 -19
- package/data/harnesses/apollo/CLAUDE.md +0 -162
- package/data/harnesses/apollo/agents/bookkeeper.md +0 -28
- package/data/harnesses/apollo/agents/brainstorm.md +0 -144
- package/data/harnesses/apollo/agents/change-review.md +0 -251
- package/data/harnesses/apollo/agents/lld-mode.md +0 -58
- package/data/harnesses/apollo/agents/maintenance.md +0 -233
- package/data/harnesses/apollo/agents/performance-review.md +0 -223
- package/data/harnesses/apollo/agents/retro.md +0 -46
- package/data/harnesses/apollo/codex/agents/bookkeeper.toml +0 -26
- package/data/harnesses/apollo/codex/agents/brainstorm.toml +0 -142
- package/data/harnesses/apollo/codex/agents/change-review.toml +0 -249
- package/data/harnesses/apollo/codex/agents/lld-mode.toml +0 -52
- package/data/harnesses/apollo/codex/agents/maintenance.toml +0 -228
- package/data/harnesses/apollo/codex/agents/performance-review.toml +0 -222
- package/data/harnesses/apollo/codex/agents/retro.toml +0 -45
- package/data/harnesses/apollo/harness.json +0 -19
- package/data/harnesses/apollo/hooks/approved-packages.md +0 -44
- package/data/harnesses/apollo/hooks/awareness.mjs +0 -405
- package/data/harnesses/apollo/hooks/check-bookkeeping-clean.mjs +0 -19
- package/data/harnesses/apollo/hooks/check-changelog-presence.mjs +0 -57
- package/data/harnesses/apollo/hooks/check-completion-integrity.mjs +0 -71
- package/data/harnesses/apollo/hooks/check-ownership.mjs +0 -22
- package/data/harnesses/apollo/hooks/compliance.mjs +0 -457
- package/data/harnesses/apollo/hooks/hooks.json +0 -23
- package/data/harnesses/apollo/hooks/lib/frozen.mjs +0 -58
- package/data/harnesses/apollo/hooks/lib/ownership.mjs +0 -242
- package/data/harnesses/apollo/hooks/lib/state.mjs +0 -170
- package/data/harnesses/apollo/rules/changelog.md +0 -25
- package/data/harnesses/apollo/rules/database.md +0 -34
- package/data/harnesses/apollo/rules/frontend.md +0 -30
- package/data/harnesses/apollo/rules/general.md +0 -40
- package/data/harnesses/apollo/rules/nomenclature.md +0 -30
- package/data/harnesses/apollo/rules/pnpm.md +0 -57
- package/data/harnesses/apollo/rules/testing.md +0 -64
- package/data/harnesses/apollo/skills/boundary/SKILL.md +0 -75
- package/data/harnesses/apollo/skills/boundary/references/index.md +0 -16
- package/data/harnesses/apollo/skills/boundary/references/mechanisms.md +0 -99
- package/data/harnesses/apollo/skills/boundary/references/packs/async-messaging.md +0 -81
- package/data/harnesses/apollo/skills/boundary/references/packs/auth.md +0 -93
- package/data/harnesses/apollo/skills/boundary/references/packs/build-config-runtime.md +0 -93
- package/data/harnesses/apollo/skills/boundary/references/packs/cloudflare.md +0 -93
- package/data/harnesses/apollo/skills/boundary/references/packs/frontend.md +0 -93
- package/data/harnesses/apollo/skills/boundary/references/packs/generic-tail.md +0 -55
- package/data/harnesses/apollo/skills/boundary/references/packs/persistence.md +0 -93
- package/data/harnesses/apollo/skills/boundary/references/packs/wire-api.md +0 -87
- package/data/harnesses/apollo/skills/brainstorm/README.md +0 -56
- package/data/harnesses/apollo/skills/brainstorm/SKILL.md +0 -173
- package/data/harnesses/apollo/skills/brainstorm/references/doctrine.md +0 -98
- package/data/harnesses/apollo/skills/brainstorm/references/harvest.md +0 -86
- package/data/harnesses/apollo/skills/brainstorm/references/session-schema.md +0 -186
- package/data/harnesses/apollo/skills/brainstorm/scripts/detector.mjs +0 -460
- package/data/harnesses/apollo/skills/design/SKILL.md +0 -121
- package/data/harnesses/apollo/skills/design/components/charts.md +0 -76
- package/data/harnesses/apollo/skills/design/components/collections.md +0 -132
- package/data/harnesses/apollo/skills/design/components/feedback.md +0 -47
- package/data/harnesses/apollo/skills/design/components/hooks.md +0 -35
- package/data/harnesses/apollo/skills/design/components/index.md +0 -143
- package/data/harnesses/apollo/skills/design/components/inputs.md +0 -327
- package/data/harnesses/apollo/skills/design/components/layout.md +0 -52
- package/data/harnesses/apollo/skills/design/components/media.md +0 -66
- package/data/harnesses/apollo/skills/design/components/motion.md +0 -82
- package/data/harnesses/apollo/skills/design/components/navigation.md +0 -29
- package/data/harnesses/apollo/skills/design/components/overlays.md +0 -72
- package/data/harnesses/apollo/skills/design/components/setup.md +0 -40
- package/data/harnesses/apollo/skills/design/components/typography.md +0 -46
- package/data/harnesses/apollo/skills/design/components/utils.md +0 -37
- package/data/harnesses/apollo/skills/design/data/blueprints/browse.md +0 -38
- package/data/harnesses/apollo/skills/design/data/blueprints/creation-flow.md +0 -38
- package/data/harnesses/apollo/skills/design/data/blueprints/dashboard.md +0 -38
- package/data/harnesses/apollo/skills/design/data/blueprints/grid.md +0 -38
- package/data/harnesses/apollo/skills/design/data/blueprints/queue.md +0 -38
- package/data/harnesses/apollo/skills/design/data/blueprints/record-detail.md +0 -38
- package/data/harnesses/apollo/skills/design/data/blueprints/settings.md +0 -38
- package/data/harnesses/apollo/skills/design/data/charts/census.csv +0 -58
- package/data/harnesses/apollo/skills/design/data/checklists/browse.md +0 -21
- package/data/harnesses/apollo/skills/design/data/checklists/creation-flow.md +0 -20
- package/data/harnesses/apollo/skills/design/data/checklists/dashboard.md +0 -21
- package/data/harnesses/apollo/skills/design/data/checklists/grid.md +0 -21
- package/data/harnesses/apollo/skills/design/data/checklists/queue.md +0 -21
- package/data/harnesses/apollo/skills/design/data/checklists/record-detail.md +0 -21
- package/data/harnesses/apollo/skills/design/data/checklists/settings.md +0 -21
- package/data/harnesses/apollo/skills/design/data/chrome/board-column.md +0 -68
- package/data/harnesses/apollo/skills/design/data/chrome/data-table.md +0 -63
- package/data/harnesses/apollo/skills/design/data/chrome/side-panel.md +0 -60
- package/data/harnesses/apollo/skills/design/data/chrome/sidebar.md +0 -78
- package/data/harnesses/apollo/skills/design/data/chrome/stat-cards.md +0 -62
- package/data/harnesses/apollo/skills/design/data/chrome/topbar.md +0 -65
- package/data/harnesses/apollo/skills/design/data/elevation/ant-design-directional-shadow.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/apple-liquid-glass-material.md +0 -18
- package/data/harnesses/apollo/skills/design/data/elevation/atlassian-surface-shadow-pairing.md +0 -20
- package/data/harnesses/apollo/skills/design/data/elevation/fluent-2-key-ambient-ramp.md +0 -20
- package/data/harnesses/apollo/skills/design/data/elevation/github-primer-sparing-shadow.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/ibm-carbon-layer-and-border.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/linear-dark-surface-ladder.md +0 -17
- package/data/harnesses/apollo/skills/design/data/elevation/material-2-key-ambient-dp-ramp.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/material-3-tonal-elevation.md +0 -21
- package/data/harnesses/apollo/skills/design/data/elevation/neobrutalist-hard-offset.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/neumorphic-soft-dual-shadow.md +0 -18
- package/data/harnesses/apollo/skills/design/data/elevation/notion-warm-minimal-hairline.md +0 -17
- package/data/harnesses/apollo/skills/design/data/elevation/polaris-elevation-inset-bevel.md +0 -21
- package/data/harnesses/apollo/skills/design/data/elevation/radix-themes-alpha-ring-scale.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/shadcn-neutral-derived-radius.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/stripe-brand-tinted-dual-shadow.md +0 -18
- package/data/harnesses/apollo/skills/design/data/elevation/tailwind-default-utility-scale.md +0 -19
- package/data/harnesses/apollo/skills/design/data/elevation/vercel-geist-shadow-as-border.md +0 -20
- package/data/harnesses/apollo/skills/design/data/iconography.md +0 -199
- package/data/harnesses/apollo/skills/design/data/motion/accordion-expand.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/destructive-hold-confirm.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/drag-dismiss-momentum.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/empty-state-arrive.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/hover-lift.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/modal-center-arrive.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/number-ticker-roll.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/onboarding-bounce.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/panel-slide.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/press-feedback.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/progress-linear-loop.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/route-crossfade.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/rubber-band-overscroll.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/skeleton-shimmer.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/stagger-arrive.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/toast-enter-stack.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/tooltip-chain-instant.md +0 -18
- package/data/harnesses/apollo/skills/design/data/motion/trigger-anchored-reveal.md +0 -18
- package/data/harnesses/apollo/skills/design/data/tells.csv +0 -34
- package/data/harnesses/apollo/skills/design/data/voices/bright-collaborator.md +0 -29
- package/data/harnesses/apollo/skills/design/data/voices/direct-operator.md +0 -29
- package/data/harnesses/apollo/skills/design/data/voices/earnest-helper.md +0 -29
- package/data/harnesses/apollo/skills/design/data/voices/editorial-composed.md +0 -29
- package/data/harnesses/apollo/skills/design/data/voices/quiet-concierge.md +0 -29
- package/data/harnesses/apollo/skills/design/data/voices/warm-guide.md +0 -29
- package/data/harnesses/apollo/skills/design/references/compose.md +0 -23
- package/data/harnesses/apollo/skills/design/references/content.md +0 -28
- package/data/harnesses/apollo/skills/design/references/emission.md +0 -21
- package/data/harnesses/apollo/skills/design/references/existing-apps.md +0 -27
- package/data/harnesses/apollo/skills/design/references/foundations.md +0 -57
- package/data/harnesses/apollo/skills/design/references/intake.md +0 -40
- package/data/harnesses/apollo/skills/design/references/object-pass.md +0 -24
- package/data/harnesses/apollo/skills/design/references/ship-gate.md +0 -29
- package/data/harnesses/apollo/skills/design/references/ux-patterns/Readme.md +0 -195
- package/data/harnesses/apollo/skills/design/references/ux-patterns/ai-layer.md +0 -49
- package/data/harnesses/apollo/skills/design/references/ux-patterns/attributes-lifecycle.md +0 -43
- package/data/harnesses/apollo/skills/design/references/ux-patterns/container-choice.md +0 -44
- package/data/harnesses/apollo/skills/design/references/ux-patterns/creation-paths.md +0 -46
- package/data/harnesses/apollo/skills/design/references/ux-patterns/dashboards.md +0 -42
- package/data/harnesses/apollo/skills/design/references/ux-patterns/modes.md +0 -42
- package/data/harnesses/apollo/skills/design/references/ux-patterns/object-model.md +0 -46
- package/data/harnesses/apollo/skills/design/references/ux-patterns/page-archetype.md +0 -48
- package/data/harnesses/apollo/skills/design/references/ux-patterns/promotion-demotion.md +0 -37
- package/data/harnesses/apollo/skills/design/references/ux-patterns/settings.md +0 -42
- package/data/harnesses/apollo/skills/design/references/ux-patterns/standard-pages.md +0 -46
- package/data/harnesses/apollo/skills/design/references/ux-patterns/state-matrix.md +0 -41
- package/data/harnesses/apollo/skills/design/references/ux-patterns/table-mechanics.md +0 -48
- package/data/harnesses/apollo/skills/design/references/ux-patterns/verbs.md +0 -45
- package/data/harnesses/apollo/skills/design/references/ux-patterns/viewer-context.md +0 -40
- package/data/harnesses/apollo/skills/design/scripts/README-validator.md +0 -27
- package/data/harnesses/apollo/skills/design/scripts/select-chart.mjs +0 -622
- package/data/harnesses/apollo/skills/design/scripts/validate-design-md.mjs +0 -1198
- package/data/harnesses/apollo/skills/documentation/SKILL.md +0 -134
- package/data/harnesses/apollo/skills/documentation/references/examples.md +0 -279
- package/data/harnesses/apollo/skills/documentation/references/frontmatter.md +0 -44
- package/data/harnesses/apollo/skills/documentation/references/instruction-style.md +0 -50
- package/data/harnesses/apollo/skills/documentation/references/style-guide.md +0 -384
- package/data/harnesses/apollo/skills/documentation/references/untemplated.md +0 -38
- package/data/harnesses/apollo/skills/documentation/scripts/doc-lint.mjs +0 -140
- package/data/harnesses/apollo/skills/documentation/templates/Readme.md +0 -34
- package/data/harnesses/apollo/skills/documentation/templates/api-reference.md +0 -20
- package/data/harnesses/apollo/skills/documentation/templates/architecture-decision.md +0 -121
- package/data/harnesses/apollo/skills/documentation/templates/backlog.md +0 -33
- package/data/harnesses/apollo/skills/documentation/templates/behavioral-checklist.md +0 -79
- package/data/harnesses/apollo/skills/documentation/templates/bookkeeping.md +0 -18
- package/data/harnesses/apollo/skills/documentation/templates/changelog-entry.md +0 -57
- package/data/harnesses/apollo/skills/documentation/templates/changelog-index.md +0 -41
- package/data/harnesses/apollo/skills/documentation/templates/docs-readme.md +0 -72
- package/data/harnesses/apollo/skills/documentation/templates/domain-model.md +0 -30
- package/data/harnesses/apollo/skills/documentation/templates/environment-registry.md +0 -15
- package/data/harnesses/apollo/skills/documentation/templates/feature.md +0 -149
- package/data/harnesses/apollo/skills/documentation/templates/glossary.md +0 -11
- package/data/harnesses/apollo/skills/documentation/templates/journal.md +0 -13
- package/data/harnesses/apollo/skills/documentation/templates/memory-main.md +0 -25
- package/data/harnesses/apollo/skills/documentation/templates/migration-runbook.md +0 -34
- package/data/harnesses/apollo/skills/documentation/templates/non-goals.md +0 -11
- package/data/harnesses/apollo/skills/documentation/templates/operations-procedure.md +0 -36
- package/data/harnesses/apollo/skills/documentation/templates/plan.md +0 -88
- package/data/harnesses/apollo/skills/documentation/templates/protected-files.md +0 -37
- package/data/harnesses/apollo/skills/documentation/templates/root-readme.md +0 -104
- package/data/harnesses/apollo/skills/documentation/templates/security-overview.md +0 -27
- package/data/harnesses/apollo/skills/documentation/templates/structure.md +0 -65
- package/data/harnesses/apollo/skills/documentation/templates/system-overview.md +0 -32
- package/data/harnesses/apollo/skills/documentation/templates/testing-strategy.md +0 -29
- package/data/harnesses/apollo/skills/schema-design/SKILL.md +0 -141
- package/data/harnesses/apollo/skills/test/SKILL.md +0 -104
- package/data/harnesses/apollo/skills/testing/SKILL.md +0 -166
- package/data/harnesses/apollo/skills/workflow-mapper/SKILL.md +0 -451
- package/data/harnesses/apollo/skills/workflow-mapper/references/patterns.md +0 -214
- /package/data/harnesses/{apollo → code}/docs/README.md +0 -0
- /package/data/harnesses/{apollo → code}/docs/history/CHANGELOG.md +0 -0
- /package/data/harnesses/{apollo → code}/docs/history/backlog.md +0 -0
- /package/data/harnesses/{apollo → code}/docs/memory/main.md +0 -0
- /package/data/harnesses/{apollo → code}/docs/structure.md +0 -0
- /package/data/harnesses/{apollo → code}/rules/cloudflare.md +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Scaffold: docs/memory/main.md
|
|
2
|
-
|
|
3
|
-
Baseline scaffold — created if missing (the `maintenance` agent's baseline calls this). Target file: `docs/memory/main.md`.
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
---
|
|
7
|
-
type: project-memory
|
|
8
|
-
owner: main-agent
|
|
9
|
-
description: Project-wide patterns and conventions confirmed in this codebase. Project facts only — user-centric facts go in ~/.claude/.
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Main Agent — Project Memory
|
|
13
|
-
|
|
14
|
-
Append entries below, oldest at bottom. Format:
|
|
15
|
-
|
|
16
|
-
## YYYY-MM-DD — {topic}
|
|
17
|
-
|
|
18
|
-
{1-3 line fact, with file paths or references where relevant}
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## {today} — Baseline
|
|
23
|
-
|
|
24
|
-
Memory file initialized during documentation baseline (structure v{harness-version} — read from `.claude/harness.json` / `docs/structure.md` frontmatter; never hardcode a literal version).
|
|
25
|
-
```
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Migration Runbook (docs/history/migrations/YYYY-MM-DD-{slug}.md)
|
|
2
|
-
|
|
3
|
-
Record. Use for: a **one-shot** migration, upgrade, or data operation — authored before execution, executed once, then outcome-stamped and frozen. Supporting scripts live beside it in a same-named folder when needed (`YYYY-MM-DD-{slug}/`).
|
|
4
|
-
|
|
5
|
-
Required: **Goal**, **Steps**, **Verification**, and — after execution — the **Outcome** stamp. Optional: Preconditions, Rollback.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
# Migration: {Title}
|
|
9
|
-
|
|
10
|
-
**Goal:** What this migration accomplishes and why it runs now, one or two lines.
|
|
11
|
-
**Executes against:** {environment / database / system}
|
|
12
|
-
|
|
13
|
-
## Preconditions
|
|
14
|
-
|
|
15
|
-
- Backups taken, feature flags set, access confirmed — exact checks
|
|
16
|
-
|
|
17
|
-
## Steps
|
|
18
|
-
|
|
19
|
-
1. One action per step, exact command in a code block
|
|
20
|
-
2. Note expected output where it disambiguates success from failure
|
|
21
|
-
|
|
22
|
-
## Verification
|
|
23
|
-
|
|
24
|
-
- The observable end state that confirms success — exact check commands
|
|
25
|
-
|
|
26
|
-
## Rollback
|
|
27
|
-
|
|
28
|
-
- How to undo, and the point of no return
|
|
29
|
-
|
|
30
|
-
## Outcome
|
|
31
|
-
|
|
32
|
-
<!-- Stamped once, immediately after execution; the file freezes with it. -->
|
|
33
|
-
**Executed:** YYYY-MM-DD — {result: clean | issues encountered + how resolved | aborted + why}
|
|
34
|
-
```
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Non-Goals (docs/architecture/non-goals.md)
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: what the system deliberately does **not** do. A non-goal is a decision, not an omission — each entry carries the why and what would reopen it. Readers (and agents) use this to stop re-proposing settled exclusions.
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
# Non-Goals
|
|
7
|
-
|
|
8
|
-
Things this system deliberately does not do. Each is a decision — don't re-propose one without new information of the kind its "revisit if" names.
|
|
9
|
-
|
|
10
|
-
- **{Non-goal}** — {why it's excluded}. Revisit if: {the trigger that would reopen it}.
|
|
11
|
-
```
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Operations Procedure (docs/operations/{procedure}.md)
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: any **recurring** procedure — setup, development, deployment, maintenance. A procedure is consulted mid-task, not read: exact commands, copy-paste runnable, no narrative. Updated in place whenever the workflow changes.
|
|
4
|
-
|
|
5
|
-
A **one-shot** procedure (a migration, an upgrade, an incident response executed once) is not an operations doc — it is a **Migration Runbook** (record, below). The test: will someone run this again next month? Yes → operations. No → runbook.
|
|
6
|
-
|
|
7
|
-
Required: **Goal**, **Steps**, **Verification**. Optional: Preconditions, Troubleshooting, Rollback — include only when they carry real content.
|
|
8
|
-
|
|
9
|
-
If a procedure is a deterministic command list run frequently, script it and have the doc point at the script — a doc should carry judgment (when, why, what to check), not replace automation.
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
# {Procedure Name}
|
|
13
|
-
|
|
14
|
-
**Goal:** What this procedure accomplishes, one line.
|
|
15
|
-
|
|
16
|
-
## Preconditions
|
|
17
|
-
|
|
18
|
-
- Access, tools, or state required before starting — exact versions, env vars, credentials location
|
|
19
|
-
|
|
20
|
-
## Steps
|
|
21
|
-
|
|
22
|
-
1. One action per step, exact command in a code block
|
|
23
|
-
2. Note expected output where it disambiguates success from failure
|
|
24
|
-
|
|
25
|
-
## Verification
|
|
26
|
-
|
|
27
|
-
- The observable end state that confirms it worked — exact check commands, not "it should work now"
|
|
28
|
-
|
|
29
|
-
## Troubleshooting
|
|
30
|
-
|
|
31
|
-
- Symptom → cause → fix (append entries as failures are root-caused)
|
|
32
|
-
|
|
33
|
-
## Rollback
|
|
34
|
-
|
|
35
|
-
- How to undo, and when undo stops being possible
|
|
36
|
-
```
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# Plan (docs/history/plans/YYYY-MM-DD-feature-name.md)
|
|
2
|
-
|
|
3
|
-
Record. Use for: every implementation plan. Plans are created here directly with `Status: Draft`; after approval the plan gates (`boundary`, then `testing` plan-gate mode) run against the still-`Draft` file, the status flips to `Status: In Progress` at the first implementation step, and the file freezes at `Status: Complete` or `Status: Abandoned`. Once frozen, never edit — write a new dated plan if scope changes. The plan records the journey; the truth it implemented lives on in the feature doc and any AD it touched.
|
|
4
|
-
|
|
5
|
-
The `boundary` skill parses the **Proposed Changes** sections to check boundary impact before execution, and the `testing` skill (plan-gate mode) writes a **Test Obligations** section into the plan at the same gate. Keep that structure stable — section headings and bullet shape are load-bearing for the parsers, and the Test Obligations table is the ledger the verification gate discharges before the plan may reach `Status: Complete`.
|
|
6
|
-
|
|
7
|
-
**Doc Obligations is the one ledger the plan's author writes.** Deriving tests from behavior is judgment, which is why `testing` owns that section and it is marked never-hand-author; resolving Proposed Changes' file paths to the feature docs that own them is a **lookup** against the ownership index already injected at session start. Different work, different rule — fill it yourself, while the touch list is fresh.
|
|
8
|
-
|
|
9
|
-
The **`Gates:`** line is machine-read: the compliance hook greps exactly the forms below, and implementation edits are blocked while a segment reads `pending`. Each gate skill rewrites only its own segment when it runs — `boundary` to `Boundary: passed YYYY-MM-DD` or `Boundary: blocked YYYY-MM-DD`; `testing` (plan-gate mode) to `Test-plan: written YYYY-MM-DD (N rows)` — the segment label stays `Test-plan`, greppable. The author writes `Docs: mapped YYYY-MM-DD (N docs)` when the Doc Obligations table is filled. Never hand-edit the line to skip a gate.
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
# {Feature Name}
|
|
13
|
-
|
|
14
|
-
**Status:** Draft | In Progress | Complete | Abandoned
|
|
15
|
-
**Gates:** Boundary: pending · Test-plan: pending · Docs: pending
|
|
16
|
-
**Spec:** [docs/features/{feature}.md](../../features/{feature}.md) <!-- one line per feature doc this plan implements against; a plan spanning three features names three -->
|
|
17
|
-
**Started:** YYYY-MM-DD
|
|
18
|
-
**Completed:** YYYY-MM-DD <!-- fill when status flips to Complete -->
|
|
19
|
-
|
|
20
|
-
## Background
|
|
21
|
-
|
|
22
|
-
Why this work is happening *now*. Link to the spec for *what* we're building; this section is the motivation and the trigger. One paragraph.
|
|
23
|
-
|
|
24
|
-
## Proposed Changes
|
|
25
|
-
|
|
26
|
-
### New Files
|
|
27
|
-
|
|
28
|
-
- `src/path/new-file.js` — purpose
|
|
29
|
-
|
|
30
|
-
### Modified Files
|
|
31
|
-
|
|
32
|
-
- `src/path/existing.js` — what changes and why
|
|
33
|
-
|
|
34
|
-
### New Entities / State
|
|
35
|
-
|
|
36
|
-
- `entities.foo` — new Redux slice / DB table / persisted shape
|
|
37
|
-
- Persisted state addition: `state.bar.baz` (default `null` for existing users on rehydrate)
|
|
38
|
-
|
|
39
|
-
### API Changes
|
|
40
|
-
|
|
41
|
-
- `POST /api/foo` — new route, request `{...}`, response `{status, data}`
|
|
42
|
-
- `PUT /api/bar` — request shape changes; see Migration
|
|
43
|
-
|
|
44
|
-
### Cross-Module Contracts Affected
|
|
45
|
-
|
|
46
|
-
- List which cross-cutting contracts this plan affects (db schema, wire envelope, auth, events, env/config, …)
|
|
47
|
-
- "None" is a valid answer and means the `boundary` check will pass cleanly
|
|
48
|
-
|
|
49
|
-
## Doc Obligations
|
|
50
|
-
|
|
51
|
-
<!-- One row per feature doc whose `owns:` globs intersect the Proposed Changes above — resolve
|
|
52
|
-
them against the injected ownership index. Hand-authored: this is a lookup, not research.
|
|
53
|
-
Amendable while the plan is open; discharged at Completion. -->
|
|
54
|
-
|
|
55
|
-
| Doc | Claim that changes | `owns:` still accurate? |
|
|
56
|
-
| --- | --- | --- |
|
|
57
|
-
| `docs/features/{feature}.md` | what it says today that this plan makes false | yes / no — new paths to add |
|
|
58
|
-
|
|
59
|
-
**"None" is valid** — a plan touching only unowned paths owes no doc update, and says so explicitly. It is not a free pass: `boundary` builds its own touch list from the same Proposed Changes and reports docs this table missed.
|
|
60
|
-
|
|
61
|
-
## Implementation Steps
|
|
62
|
-
|
|
63
|
-
1. Concrete, ordered, testable
|
|
64
|
-
2. Each step ends with something verifiable
|
|
65
|
-
3. ...
|
|
66
|
-
|
|
67
|
-
## Test Obligations
|
|
68
|
-
|
|
69
|
-
<!-- Written by the `testing` skill (plan-gate mode) at the plan gate (after `boundary`). One row per
|
|
70
|
-
promised behavior: layer · target file · oracle · fixtures. Amendable while the
|
|
71
|
-
plan is open; discharged at the verification gate. Do not hand-author. -->
|
|
72
|
-
|
|
73
|
-
## Done Criteria
|
|
74
|
-
|
|
75
|
-
- [ ] Implementation complete
|
|
76
|
-
- [ ] Verification gate passed — every Test Obligations row discharged (satisfied / owes nothing / blocked → backlog), gate run date and results noted here
|
|
77
|
-
- [ ] Every Doc Obligations row discharged — **updated** / **owes nothing** (with the reason) / **blocked** (→ backlog item, so the debt outlives the frozen plan)
|
|
78
|
-
- [ ] Changelog entry created in `docs/history/changelog/`, carrying the gate's results
|
|
79
|
-
- [ ] Plan marked `Status: Complete`, **Completed:** date filled
|
|
80
|
-
|
|
81
|
-
## Open Questions
|
|
82
|
-
|
|
83
|
-
- Question — who decides, by when
|
|
84
|
-
|
|
85
|
-
## Risks
|
|
86
|
-
|
|
87
|
-
- Risk — likelihood / impact / mitigation
|
|
88
|
-
```
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Protected Files
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: documenting critical files that need approval before modification.
|
|
4
|
-
|
|
5
|
-
This doc answers *what is protected and why breaking it hurts* — nothing more. Don't duplicate function-level detail here (signatures, inputs/outputs): it drifts from both the code and the owning feature doc. The owning feature doc is the canonical reference for how the code works; link to it.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
# Protected Files
|
|
9
|
-
|
|
10
|
-
Critical files requiring approval before modification.
|
|
11
|
-
|
|
12
|
-
## File List
|
|
13
|
-
|
|
14
|
-
# Category 1 - Description
|
|
15
|
-
path/to/critical/file1.js
|
|
16
|
-
path/to/critical/file2.js
|
|
17
|
-
|
|
18
|
-
# Category 2 - Description
|
|
19
|
-
path/to/another/file.js
|
|
20
|
-
|
|
21
|
-
## Risk Summary
|
|
22
|
-
|
|
23
|
-
| Category | Risk if Broken |
|
|
24
|
-
|------------|-----------------|
|
|
25
|
-
| Category 1 | Specific impact |
|
|
26
|
-
| Category 2 | Specific impact |
|
|
27
|
-
|
|
28
|
-
## Why Protected
|
|
29
|
-
|
|
30
|
-
### Category 1: [Name]
|
|
31
|
-
|
|
32
|
-
**Purpose:** What these files do, one or two lines
|
|
33
|
-
**Owning doc:** [docs/features/{feature}.md] — canonical reference for how this code works
|
|
34
|
-
**Invariants:**
|
|
35
|
-
- The behavior that must not break, stated as a constraint (not a function tour)
|
|
36
|
-
- Important point 2
|
|
37
|
-
```
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# Project Root README
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: the human-facing entry point at the repository root (`/README.md`) — what visitors and new contributors land on. Distinct from `docs/README.md` (the agent/doc index — see **docs/README.md (Documentation Root)** above). The two coexist; don't merge them.
|
|
4
|
-
|
|
5
|
-
### Strategy
|
|
6
|
-
|
|
7
|
-
The root README answers, in order:
|
|
8
|
-
|
|
9
|
-
1. **What is this?** — one to two sentences, no marketing claims
|
|
10
|
-
2. **What do I get if I install it?** — capability families
|
|
11
|
-
3. **What's it built on?** — terse stack list with versions
|
|
12
|
-
4. **How do I run it?** — the three or four scripts that matter
|
|
13
|
-
5. **How is it laid out?** — directory tree, one-liner per significant folder
|
|
14
|
-
6. **How do I extend it?** — numbered contribution checklist
|
|
15
|
-
7. **What state is it in?** — pre-publish, beta, stable, internal
|
|
16
|
-
|
|
17
|
-
Skip any section that doesn't apply. Don't pad to fill the template.
|
|
18
|
-
|
|
19
|
-
### Writing rules
|
|
20
|
-
|
|
21
|
-
- **Sentence-case headings.** "Getting started", not "Getting Started".
|
|
22
|
-
- **Concrete over abstract.** Real versions, real paths, real commands. No "leverages cutting-edge…".
|
|
23
|
-
- **The tagline answers "what is this?"** — not "why is it great?". Two sentences max.
|
|
24
|
-
- **Tables for enumeration** (routes, commands, endpoints). **Bullets for families and categories.**
|
|
25
|
-
- **Directory tree as a code block**, not a nested markdown list.
|
|
26
|
-
- **Numbered checklist** for "how to add a thing" — readers should be able to follow it top-to-bottom without re-reading.
|
|
27
|
-
- **Point to `docs/` for depth.** The root README links into deep docs; it doesn't host them.
|
|
28
|
-
- **Detect the package manager from the lockfile** (`pnpm-lock.yaml` → pnpm, `yarn.lock` → yarn, otherwise npm) and write commands accordingly. Don't hardcode `npm` if the repo uses pnpm.
|
|
29
|
-
|
|
30
|
-
### Template
|
|
31
|
-
|
|
32
|
-
```markdown
|
|
33
|
-
# {package-name}
|
|
34
|
-
|
|
35
|
-
{One- to two-sentence positioning. What it is and what scope it covers. No superlatives, no value claims.}
|
|
36
|
-
|
|
37
|
-
## What's in the box
|
|
38
|
-
|
|
39
|
-
- **{Family 1}** — {what's in it; a few specific items, comma-listed.}
|
|
40
|
-
- **{Family 2}** — {what's in it.}
|
|
41
|
-
- **{Family 3}** — {what's in it.}
|
|
42
|
-
|
|
43
|
-
The full surface lives in [`{path/to/public-index}`]({path/to/public-index}). ← optional pointer for libraries
|
|
44
|
-
|
|
45
|
-
## Stack
|
|
46
|
-
|
|
47
|
-
- {Framework} {version} · {Language} {version}
|
|
48
|
-
- {Build tool} {version}
|
|
49
|
-
- {Other load-bearing deps}
|
|
50
|
-
|
|
51
|
-
## Getting started
|
|
52
|
-
|
|
53
|
-
\`\`\`bash
|
|
54
|
-
{pm} install
|
|
55
|
-
{pm} run dev # what it does (port, URL)
|
|
56
|
-
{pm} run build # what it does
|
|
57
|
-
{pm} run preview # what it does (omit if not applicable)
|
|
58
|
-
\`\`\`
|
|
59
|
-
|
|
60
|
-
{Optional one-liner about first-run behavior — e.g., "Dev server lands on /playground."}
|
|
61
|
-
|
|
62
|
-
## {Runtime entry point} ← optional; e.g., "The playground", "CLI", "API endpoints"
|
|
63
|
-
|
|
64
|
-
{Brief description of the dev/runtime surface.}
|
|
65
|
-
|
|
66
|
-
| {Thing} | {What it shows / does} |
|
|
67
|
-
| -------------------- | ---------------------- |
|
|
68
|
-
| `{route or command}` | {description} |
|
|
69
|
-
|
|
70
|
-
## Layout
|
|
71
|
-
|
|
72
|
-
\`\`\`
|
|
73
|
-
src/
|
|
74
|
-
├── {entry-file} # {purpose}
|
|
75
|
-
├── {folder}/ # {purpose}
|
|
76
|
-
│ └── ...
|
|
77
|
-
└── {folder}/ # {purpose}
|
|
78
|
-
\`\`\`
|
|
79
|
-
|
|
80
|
-
## Adding a {primary unit}
|
|
81
|
-
|
|
82
|
-
1. {Drop the source under the right family/folder.}
|
|
83
|
-
2. {Re-export from the public surface.}
|
|
84
|
-
3. {Wire into the playground / example app / test harness so reviewers can see it render.}
|
|
85
|
-
4. {Document any divergence from upstream in `docs/{...}`.}
|
|
86
|
-
|
|
87
|
-
## Styling ← optional; replace with whichever cross-cutting concern matters most
|
|
88
|
-
|
|
89
|
-
{Configuration notes that affect every consumer — design tokens, conventions, opt-outs.}
|
|
90
|
-
|
|
91
|
-
## Status
|
|
92
|
-
|
|
93
|
-
{Pre-publish, beta, stable, internal-only. State the stability tier per surface — which APIs are contracts and which are experimental — so readers know what can be relied on.}
|
|
94
|
-
|
|
95
|
-
## License
|
|
96
|
-
|
|
97
|
-
{License name — scope. e.g., "UNLICENSED — internal use only", "MIT".}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Baseline scaffolding behavior
|
|
101
|
-
|
|
102
|
-
The baseline audit **does** scaffold the project root README when missing. The risk this template guards against — template-shaped placeholders that look abandoned — is mitigated by the writing rules above: fill every section with concrete details from the repo (real package manager from the lockfile, real scripts, real layout, real status). Skip sections that genuinely don't apply rather than leaving stubs.
|
|
103
|
-
|
|
104
|
-
**Never overwrite an existing root README** during a baseline. If one is present — even sparse or outdated — leave it untouched. Treat updates to a pre-existing root README as a separate, explicit request.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Security Overview (docs/architecture/security.md)
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: the single place the system's security posture is stated — assets, trust boundaries, controls, and accepted risks. Controls link to the code that implements them; this doc asserts, the code proves.
|
|
4
|
-
|
|
5
|
-
Required: **Trust boundaries**, **Controls**. Optional: Assets, Accepted risks.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
# Security Overview
|
|
9
|
-
|
|
10
|
-
## Assets
|
|
11
|
-
|
|
12
|
-
- {What's worth protecting — data classes, credentials, tenant isolation}
|
|
13
|
-
|
|
14
|
-
## Trust boundaries
|
|
15
|
-
|
|
16
|
-
- {Boundary} — {what crosses it, and what checks the crossing}
|
|
17
|
-
|
|
18
|
-
## Controls
|
|
19
|
-
|
|
20
|
-
| Control | Protects against | Implemented in |
|
|
21
|
-
| ------- | ---------------- | -------------- |
|
|
22
|
-
| {control} | {threat} | `{file/module}` |
|
|
23
|
-
|
|
24
|
-
## Accepted risks
|
|
25
|
-
|
|
26
|
-
- {Risk knowingly carried} — accepted because {reason}; owner: {who}. Revisit if: {trigger}.
|
|
27
|
-
```
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# docs/structure.md (Authority Map)
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: defining which folder owns which topic and how docs are maintained.
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
---
|
|
7
|
-
harness-version: 1.0.0
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Documentation Structure
|
|
11
|
-
|
|
12
|
-
> This file is the entry point for understanding the docs folder.
|
|
13
|
-
> `harness-version` above is the repo's single baseline/version sentinel — the `maintenance` agent (baseline mode) owns it and stamps the installed harness version (semver) on every reconcile.
|
|
14
|
-
|
|
15
|
-
## Authority Map
|
|
16
|
-
|
|
17
|
-
Each topic has one canonical location. Read from here, not from plans or changelogs.
|
|
18
|
-
|
|
19
|
-
| Topic | Authority | Key Files |
|
|
20
|
-
| ----- | --------- | --------- |
|
|
21
|
-
| Code-path ownership (path → doc + module) | feature `owns:` frontmatter | the generated ownership index |
|
|
22
|
-
| System overview | `docs/architecture/` | system-design.md |
|
|
23
|
-
| Steering (domain model, glossary, non-goals) | `docs/architecture/` | domain-model.md, glossary.md, non-goals.md |
|
|
24
|
-
| Architecture decisions (ADs) | `docs/architecture/decisions/` | AD-NNN-*.md |
|
|
25
|
-
| API surface | `docs/architecture/` | api.md |
|
|
26
|
-
| Security | `docs/architecture/` | security.md |
|
|
27
|
-
| Feature behavior | `docs/features/` | {key files} |
|
|
28
|
-
| Setup & development | `docs/operations/` | {key files} |
|
|
29
|
-
| Environment / config surface | `docs/operations/` | environment.md |
|
|
30
|
-
| Testing strategy | `docs/tests/` | strategy.md |
|
|
31
|
-
| Historical plans | `docs/history/plans/` | YYYY-MM-DD-name.md |
|
|
32
|
-
| Change records | `docs/history/changelog/` | `YYYY-MM-DD-{three-words}.md` — one per unit of work, written at commit time |
|
|
33
|
-
| Migration runbooks | `docs/history/migrations/` | YYYY-MM-DD-name.md |
|
|
34
|
-
| Deep-research artifacts | `docs/history/research/{topic}/` | README.md + findings.md + sources.md |
|
|
35
|
-
| Brainstorm design records | `docs/research/{topic}-brainstorm/` (active; legacy `-brainstorming/`) → `docs/history/brainstorms/{topic}/` (harvested; user deletes or commits) | thesis.md + forks.md + ledger.md + state.md |
|
|
36
|
-
| Backlog | `docs/history/` | backlog.md |
|
|
37
|
-
|
|
38
|
-
## The Two Natures
|
|
39
|
-
|
|
40
|
-
Every doc is a **truth document** (states current absolutes, topic-named, updated in place) or a **record** (dated account of activity, frozen or append-only). `architecture/`, `features/`, `operations/`, `tests/` hold truth; `history/`, `research/`, `memory/` hold records.
|
|
41
|
-
|
|
42
|
-
- Truth documents are rewritten in place when reality changes — the change-story goes to a changelog entry, never into the truth doc's body.
|
|
43
|
-
- Records freeze: plans at `Complete`/`Abandoned`, changelog entries and migration runbooks once written/executed. A scope change is a new dated record that links back.
|
|
44
|
-
- Feature docs are the living reference for implemented features; an AD is the living truth for one decision subject, with its dated journey confined to its Decision Changelog tail.
|
|
45
|
-
|
|
46
|
-
## Folder Rules
|
|
47
|
-
|
|
48
|
-
- `docs/features/`: Living reference for implemented features. Each feature doc **carries** the `owns:` / `module:` / `keywords:` / `status:` frontmatter — `owns:` declares the code-path globs it owns (the only ownership key), `module:` is an optional bounded-context label, `keywords:` are discovery terms, `status:` is `active`/`draft`/`deprecated`. The SessionStart hook unions every feature's `owns:` globs into the injected ownership index.
|
|
49
|
-
- `docs/architecture/`: The truth layer for system-wide shape: overview, domain model, glossary, non-goals, API surface, security, and `decisions/` (ADs — one per subject, updated in place, journey in each AD's Decision Changelog). Update when cross-cutting reality changes.
|
|
50
|
-
- `docs/operations/`: How-to procedures for setup, development, and deployment, plus the environment registry. Update when workflows change. One-shot migrations do NOT live here — they are records (`docs/history/migrations/`).
|
|
51
|
-
- `docs/tests/`: Testing strategy and test docs. Present when the repo has a test posture worth documenting.
|
|
52
|
-
- `docs/history/plans/`: Records. Must have `Status:` field. Never modify after completion.
|
|
53
|
-
- `docs/history/changelog/`: Records. One entry per unit of work (`YYYY-MM-DD-{three-words}.md`), written by whoever does the work and frozen inside the commit it describes. Entries carry the refinement context a diff cannot show — the ask in the user's words, iterations and rejections, skill survived/overridden verdicts, discoveries, pins. Format is the `documentation` skill's `templates/changelog-entry.md`; trigger and lifecycle are the `changelog` rule; distillation is the `retro` agent. Immutability begins at commit — a draft in the working tree is mutable until then, never after. Every entry appends a row to `docs/history/CHANGELOG.md`.
|
|
54
|
-
- `docs/history/migrations/`: Records. One-shot migration/upgrade runbooks — authored before execution, outcome-stamped and frozen after.
|
|
55
|
-
- `docs/history/research/{topic}/`: Deep-research artifacts — the dumped output of a research pass, one folder per topic (conventionally `README.md` synthesis + `findings.md` verified claims & citations + `sources.md`). A point-in-time, cited record — **not** a living authority doc: it owns no code (no `owns:` frontmatter) and is never edited to "stay current." A spec/plan links to it for grounding; a new question gets a new topic folder.
|
|
56
|
-
- `docs/research/{topic}-brainstorm/` → `docs/history/brainstorms/{topic}/`: Brainstorm design records — the Brainstorming-Mode session for a topic (working surface `thesis.md` + `forks.md` + `ledger.md` + `state.md` + `basis/` + `fragments/`, plus an untracked `ops/` capture layer deleted at stop), written by the `brainstorm` skill and its twin agent. An active session lives under `docs/research/` (legacy folders carry the older `-brainstorming/` suffix); on a **passed harvest** it **moves** to `docs/history/brainstorms/` — the completion marker — and the **user decides whether the moved folder is deleted or committed** as provenance. Each of the two folders carries a `Readme.md` index (the skill reads it at start instead of scanning). Author-created (never scaffolded empty), one folder per design conversation. Owns no code (no `owns:` frontmatter); the harvest routes its conclusions into `architecture/`/`features/`/`history/`. (Distinct from `docs/history/research/{topic}/` above — that is a frozen deep-research record, not a brainstorm session.)
|
|
57
|
-
- `docs/history/backlog.md`: Tracked work items. Append new items under appropriate priority.
|
|
58
|
-
|
|
59
|
-
## Health Log
|
|
60
|
-
|
|
61
|
-
<!-- Updated by maintenance agent — the sanctioned dated tail in this truth doc (SKILL.md § The Two Natures names the two bridges) -->
|
|
62
|
-
| Date | Review Summary |
|
|
63
|
-
| ---- | -------------- |
|
|
64
|
-
| {today} | Initial baseline — v{harness-version} structure established |
|
|
65
|
-
```
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# System Overview (docs/architecture/system-design.md)
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: the bird's-eye view — what the system is, its subsystems, and how they connect. The first doc a new reader opens after the README; austere and short (two screens max). Depth lives in feature docs — this doc maps, it doesn't explain.
|
|
4
|
-
|
|
5
|
-
Required: **What this is**, **Subsystem map**. Optional: Key flows, Where the truth lives.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
# System Overview
|
|
9
|
-
|
|
10
|
-
## What this is
|
|
11
|
-
|
|
12
|
-
{Two or three sentences: what the system does, for whom, in what environment it runs.}
|
|
13
|
-
|
|
14
|
-
## Subsystem map
|
|
15
|
-
|
|
16
|
-
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
17
|
-
│ Frontend │────▶│ API │────▶│ DB │
|
|
18
|
-
└──────────┘ └──────────┘ └──────────┘
|
|
19
|
-
{One box per subsystem; label the arrows with the contract that crosses them.}
|
|
20
|
-
|
|
21
|
-
- **{Subsystem}** — one line: what it owns. → [owning doc](../features/{feature}.md)
|
|
22
|
-
|
|
23
|
-
## Key flows
|
|
24
|
-
|
|
25
|
-
{At most two or three ASCII flow diagrams for the flows everything else hangs off — request lifecycle, auth, the core domain operation.}
|
|
26
|
-
|
|
27
|
-
## Where the truth lives
|
|
28
|
-
|
|
29
|
-
| Area | Canonical doc |
|
|
30
|
-
| ---- | ------------- |
|
|
31
|
-
| {area} | [{doc}](path) |
|
|
32
|
-
```
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Testing Strategy (docs/tests/strategy.md)
|
|
2
|
-
|
|
3
|
-
Truth document. Use for: the repo's test posture — what is tested at which level, how to run it, and what is deliberately untested. The framework choices come from the harness testing rule; this doc records how *this repo* applies them.
|
|
4
|
-
|
|
5
|
-
Required: **Levels**, **Running**. Optional: Deliberately untested, Adding a test.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
# Testing Strategy
|
|
9
|
-
|
|
10
|
-
## Levels
|
|
11
|
-
|
|
12
|
-
| Layer | Runner | Lives in | Covers |
|
|
13
|
-
| ----- | ------ | -------- | ------ |
|
|
14
|
-
| Unit / integration | {runner} | `tests/` | {what} |
|
|
15
|
-
| E2E | {runner} | `e2e/` | {what} |
|
|
16
|
-
|
|
17
|
-
## Running
|
|
18
|
-
|
|
19
|
-
- `{pm} test` — the whole unit suite (CI gate)
|
|
20
|
-
- `{pm} run test:e2e` — {when to run}
|
|
21
|
-
|
|
22
|
-
## Deliberately untested
|
|
23
|
-
|
|
24
|
-
- {Area} — {why, and what verifies it instead (typecheck, boot check, manual journey)}
|
|
25
|
-
|
|
26
|
-
## Adding a test
|
|
27
|
-
|
|
28
|
-
1. {Where the file goes, what it's named, where fixtures live}
|
|
29
|
-
```
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: schema-design
|
|
3
|
-
description: "Use when designing or altering a relational schema — a new table, column, index, junction, migration, or seed — or reviewing one. Owns the design doctrine: what earns a table, where a fact lives (state column vs. sequence log vs. audit log), scope columns over parallel tables, junction = M:N only, FK policy including append-only tables, uniqueness with nullable columns, vocabulary tables, copying rows between scopes. Naming and column types stay in the `database.md` rule. Triggers on 'new table', 'schema', 'migration', 'add a column', 'junction table', 'foreign key', 'audit log', 'versioning'."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Schema Design — the doctrine
|
|
7
|
-
|
|
8
|
-
You decide **what earns a table and where a fact lives** — for every Nurix relational schema, engine-agnostic (written for SQLite / Cloudflare D1 + Drizzle; a Postgres project keeps the same names and semantics with native types). Naming, the `id`/`slug`/`label` vocabulary, and column types are the `database.md` rule and are never restated here — this skill owns the design arguments consulted at schema-change time.
|
|
9
|
-
|
|
10
|
-
Apply the sections below to the change in hand; when reviewing, report violations with the section that names them.
|
|
11
|
-
|
|
12
|
-
## What earns a table
|
|
13
|
-
|
|
14
|
-
A table is the most expensive home for data — a migration to change its shape, a join to read, a mirror to keep in sync. Default to **not** a table — a concept earns one only with at least one property in the left column.
|
|
15
|
-
|
|
16
|
-
| A table is earned by… | Lacking all of these, the data belongs in… |
|
|
17
|
-
| -------------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
18
|
-
| identity minted at **runtime** — a session, an upload | — |
|
|
19
|
-
| variation **per tenant / user** — a workspace's theme | — |
|
|
20
|
-
| **independent addressing** — queried, indexed, or FK'd in isolation | a **JSON column** on its parent row |
|
|
21
|
-
| **concurrency-safe** writes — racing writers must not clobber a shared blob | — |
|
|
22
|
-
| a **DB-enforced invariant** — immutability trigger, unique, atomic boundary | — |
|
|
23
|
-
| dev-authored, published on deploy, identical for every tenant — plan tiers | **config / a constants file**, validated at build |
|
|
24
|
-
| exactly recomputable from other rows — a tenant's usage total | a **cache** (KV / edge), recomputed on demand |
|
|
25
|
-
| process state dead once the request completes — a retry count | a **log or workflow engine**, never the domain DB |
|
|
26
|
-
| owned by another system-of-record — the payment processor's invoice | a **reference column** — store the id, not the data |
|
|
27
|
-
|
|
28
|
-
Each right-column route is one test: process state — would a product feature break if this vanished the instant the request finished?; derived output — exactly recomputable from other rows + code?; un-addressed detail — is the row ever `SELECT`ed / `JOIN`ed / FK'd alone?; another system's record — does a specialized service (chat, telemetry, object store) already own it?
|
|
29
|
-
|
|
30
|
-
- **Static vocabulary or a fixed graph → config, not a table** — HTTP status labels, a fixed onboarding funnel. Surface it in code as a constant/type; reifying it into tables plus a seed makes the file and the tables a two-copy sync problem. The refined boundary is § Vocabulary / lookup tables.
|
|
31
|
-
- **History → one immutable log + a mutable head.** Never shatter versioning into per-entity `*_revisions` / `*_revision_sections` tables — snapshot the coherent set into one append-only versions table; current state is a projection of the newest entry. A table that is just "old rows of another table" collapses into the snapshot.
|
|
32
|
-
- **A surviving table names the invariant it buys** — content-addressed immutable rows buy reproducibility, a monotonic sequence buys ordering/sync, an atomic write boundary buys multi-row atomicity. Drop the requirement and the table drops with it.
|
|
33
|
-
|
|
34
|
-
Table count tracks **requirements, not domain richness** — a rich domain is not entitled to a table per noun.
|
|
35
|
-
|
|
36
|
-
## State, rules, and history
|
|
37
|
-
|
|
38
|
-
**One fact has one home, chosen by what kind of fact it is.** Confusing these produces the most common redundant table in a schema — a queue whose rows restate state the entity already carries.
|
|
39
|
-
|
|
40
|
-
| The fact | Home | Example |
|
|
41
|
-
| --- | --- | --- |
|
|
42
|
-
| What the entity **is now** | a **column on the entity's own row** | `documents.state = 'blocked'` |
|
|
43
|
-
| What may be **done** about that state | **code** — the transition map, the UI's affordances | which inputs unblock a document |
|
|
44
|
-
| What **was done**, and by whom | the **append-only audit log** | an `audit_log` row: `document.override_applied` |
|
|
45
|
-
| What a consumer must **replay in order** | the **sequence log** | an `app_events` row keyed `(app_id, sequence)` |
|
|
46
|
-
|
|
47
|
-
- **State becomes a column the moment anything selects on it.** `WHERE state = 'blocked'` takes an index; `WHERE json_extract(metadata, '$.state') = 'blocked'` scans the table and is invisible to every schema check. JSON keeps only what § What earns a table leaves it — detail nothing addresses alone.
|
|
48
|
-
- **A pending-work table mirroring row state is the anti-pattern** — `*_actions`, `*_inbox`, `*_flags`. The tell: resolving one of its rows also updates the entity, so two rows answer one question and are free to disagree. The *open question* is a column beside the state (at most one per row ⇒ a column, § A junction spells many-to-many); the *answer given* is an audit-log row.
|
|
49
|
-
- **Legal transitions live in code, never as rows** — a `status_transitions` table is a state machine the database cannot enforce and the code must re-implement anyway to use.
|
|
50
|
-
|
|
51
|
-
**The two logs are not substitutes**, and no one table serves both:
|
|
52
|
-
|
|
53
|
-
| | Sequence log | Audit log |
|
|
54
|
-
| --- | --- | --- |
|
|
55
|
-
| Answers | what happened here, **in order** | who did what, **and whether it succeeded** |
|
|
56
|
-
| Ordinal | a **gapless per-entity `sequence`**, allocated from a counter | none — nothing replays it |
|
|
57
|
-
| Scope | one entity, always | any — **including none**: a sign-up predates every tenant |
|
|
58
|
-
| Records | only what **happened** | **attempts too** — `denied`, `failure` |
|
|
59
|
-
| Read by | cursors replaying forward | investigations, at any age |
|
|
60
|
-
|
|
61
|
-
The bottom two rows are why neither can hold the other's rows: an event at a scope with no entity has no sequence to take, and a refused attempt in a replay stream would have consumers apply something that never happened.
|
|
62
|
-
|
|
63
|
-
### The audit log's own shape
|
|
64
|
-
|
|
65
|
-
**An audit log outlives every row it names, so it stores what it needs to stay readable without them.** Both consequences are missing from most first drafts:
|
|
66
|
-
|
|
67
|
-
- **Denormalize the display at write time** — `actor_label`, `target_label` beside `actor_id` / `target_id`. Ids alone leave the log intact but unreadable once the person or record is deleted, which is the one thing it exists to survive.
|
|
68
|
-
- **Record the attempt, not the success** — `outcome` (`success | failure | denied`) plus a `reason`. Refused sign-ins and permission denials are most of what anyone opens an audit log for; without the column they cannot be written at all.
|
|
69
|
-
- **Keep the columns product-neutral** — `actor_*` · `action` · `outcome` · `target_*` · `scope_path` · `channel` · `source_ip` · `correlation_id` · `changes_json` serve any domain. Per-level tenancy columns tie the log to today's model; a materialized `scope_path` (`workspace:abc/app:def`) makes "everything under this tenant" one prefix scan and survives a new level appearing — at the price of enforcing the hierarchy in code rather than a `CHECK`.
|
|
70
|
-
|
|
71
|
-
## Scope, not parallel tables
|
|
72
|
-
|
|
73
|
-
One entity that exists at several scopes is **one table with a nullable scope column** — never one table per scope, and never one table shared across entity families.
|
|
74
|
-
|
|
75
|
-
- **A table shared by several families carries the union of their columns** — one `settings` table for users, apps, and workspaces. Almost nothing can be `NOT NULL`, the payload lands in JSON beyond every constraint, index, and FK, and a new family widens a table other features already depend on. One table per family.
|
|
76
|
-
- **Two tables declared to have "the same columns" are two schemas maintained by hand** — the drift is silent, surfacing as an incomplete copy, never as an error. Collapse them and discriminate by column.
|
|
77
|
-
- **The scope column is the discriminator** (`app_id IS NULL` = parent scope, set = child scope). Copying a scope is then `INSERT … SELECT` over one table with one column rewritten, so source and target cannot disagree about shape.
|
|
78
|
-
- **A nullable owner column is how a row exists before its owner does** — a pending enrolment or unclaimed record is creatable before the owner is known, which is what lets a `pending_*` / `*_requests` table collapse into the real one.
|
|
79
|
-
- **A reserved row can own the shipped defaults.** A fixed-id "system" parent makes the defaults and a tenant's copy the same kind of row, through the same code. It must then be excluded from every tenant-scoped query — state that invariant where the id is defined.
|
|
80
|
-
|
|
81
|
-
## Copying rows between scopes
|
|
82
|
-
|
|
83
|
-
- **A copied junction row is already correct with no remapping** — its endpoints are `slug` references (§ Keys & the shared vocabulary), and a slug means the same thing in every scope. Rewriting ids through a source→copy map is the most error-prone step in a multi-level copy, and a partial failure leaves wiring pointed into another scope rather than raising.
|
|
84
|
-
- **Provenance is a soft reference — no FK.** `source_id` must outlive its referent; an FK would either block the source's deletion or erase the lineage.
|
|
85
|
-
- **Store the source's version at copy time** — `version` + `source_version` make "is an upgrade available" a comparison of two stored values, not a content diff.
|
|
86
|
-
- **A copy is a row, never a live read.** Nothing at the child scope reads the parent's row at runtime; propagation happens only through an explicit re-copy, so a local edit is never silently overwritten.
|
|
87
|
-
|
|
88
|
-
## A junction spells many-to-many — nothing else
|
|
89
|
-
|
|
90
|
-
**A `_map` table is the schema's notation for M:N. Using it for 1:M is a category error** — the junction's own uniqueness admits many parents per child, so the "one parent" rule stops being enforced the moment it is written this way. Cardinality decides between the only two shapes:
|
|
91
|
-
|
|
92
|
-
| Relationship | Shape |
|
|
93
|
-
| --- | --- |
|
|
94
|
-
| **1:M** — the child has exactly one parent | a **reference column on the child** (`agents.routing_slug`), plus an index |
|
|
95
|
-
| **M:N** — both sides have many | a **`<a>_<b>_map` junction** with a composite unique |
|
|
96
|
-
|
|
97
|
-
- **The test is one question about the child**: can this row ever belong to two parents at once? No ⇒ column. A junction "in case it becomes M:N later" ships the unenforced model today to buy a migration you may never run.
|
|
98
|
-
- **A junction for a 1:M also** makes the association a row that can go missing independently of the child — a child can exist correctly while its wiring does not — and forces a join onto the most common read in the system.
|
|
99
|
-
- **A junction carrying only its two endpoints and timestamps is the tell** — a real M:N junction usually earns its own columns (a role, an order, a status); one that never does is a 1:M waiting to be collapsed into a column.
|
|
100
|
-
- **Collapsing deletes a copy step** — the association travels inside the row it belongs to: no second pass to remap, no copy landing with its wiring half-applied.
|
|
101
|
-
- **A pair already recorded elsewhere needs no table at all.** If an append-only log stores `(parent, child)` on every write, the association table is `SELECT DISTINCT` over that log — a cache free to disagree with the log it derives from (§ What earns a table).
|
|
102
|
-
|
|
103
|
-
## Foreign keys into and out of append-only tables
|
|
104
|
-
|
|
105
|
-
**An append-only table can afford no `ON DELETE` action at all, so its references to mutable tables are soft — no FK.** Every option is closed to it:
|
|
106
|
-
|
|
107
|
-
| Action | Why it fails on an append-only table |
|
|
108
|
-
| --- | --- |
|
|
109
|
-
| `SET NULL` | It is an **UPDATE**. An append-only trigger aborts it, so the parent's deletion fails — with an error naming the trigger, not the constraint. |
|
|
110
|
-
| `CASCADE` | Deletes history to delete a person. The log exists precisely to outlive its subjects. |
|
|
111
|
-
| `NO ACTION` | Makes anyone who ever appeared in the log undeletable — the hub defect above. |
|
|
112
|
-
|
|
113
|
-
- **`SET NULL` is the trap** — it reads like a safe relaxation of `NO ACTION` and passes review as one.
|
|
114
|
-
- **Record the actor as a plain column** — the same soft-reference treatment provenance gets (`source_id`, `thread_id`). The log keeps naming who acted after the account is gone, which is what an audit trail is for.
|
|
115
|
-
- **`CASCADE` from the append-only side's own parent is still fine** — a cascade is a DELETE, so a `BEFORE UPDATE` trigger never sees it: an App's log dying with the App is legitimate, distinct from erasing a log to delete a person.
|
|
116
|
-
- **State the exemption where it exists.** A catalog whose rows must not disappear under a referencing row (a service definition, a vocabulary) keeps `NO ACTION` deliberately — that guarantee is worth one line saying so.
|
|
117
|
-
|
|
118
|
-
## Uniqueness with a nullable column
|
|
119
|
-
|
|
120
|
-
**`UNIQUE (a, b)` does not constrain rows where `b` is `NULL`** — SQL treats every `NULL` as distinct, so a composite unique over a nullable discriminator silently permits exactly the duplicates it was introduced to keep apart. Write one partial index per scope instead:
|
|
121
|
-
|
|
122
|
-
```sql
|
|
123
|
-
CREATE UNIQUE INDEX <t>_parent_slug_unique ON <t> (parent_id, slug) WHERE child_id IS NULL;
|
|
124
|
-
CREATE UNIQUE INDEX <t>_child_slug_unique ON <t> (child_id, slug) WHERE child_id IS NOT NULL;
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**Prove a uniqueness claim by inserting the duplicate it forbids** — a schema review cannot tell a firing index from a silent one by reading.
|
|
128
|
-
|
|
129
|
-
## Vocabulary / lookup tables
|
|
130
|
-
|
|
131
|
-
A controlled vocabulary earns a **table** only when a user row FKs into it and reads its `label` / `description` at runtime — a service catalog rendered in a picker; static dev-authored config nobody references by FK stays **config** (§ What earns a table) — a `doc_type` value list. Enumerable is not tabular, and a `type`-style column validated against the constants file beats an FK to a seeded mirror. An earned table has a fixed shape: `id` (UUID) · `slug` (UNIQUE) · `label` · optional `description` · `status` · timestamps.
|
|
132
|
-
|
|
133
|
-
- **Seeds are generated, never hand-written** — the source of truth is a CSV or a shared package; a generator emits the `*.seed.sql` with UUIDv5 ids and an idempotent `ON CONFLICT(slug)` upsert that preserves live counts / admin-tuned columns. ❌ Hand-editing seed SQL — regenerate it.
|
|
134
|
-
|
|
135
|
-
## Run
|
|
136
|
-
|
|
137
|
-
1. **Route every new fact through § What earns a table** — default to *not* a table; name the left-column property that earns one, or the right-column home it takes instead.
|
|
138
|
-
2. **Classify every fact by § State, rules, and history** — now-state → entity column; rules → code; what-was-done → audit log; replayable → sequence log.
|
|
139
|
-
3. **Check cardinality before any junction** (§ A junction spells many-to-many) and every FK's `ON DELETE` (§ Keys, § Append-only).
|
|
140
|
-
4. **Prove uniqueness claims by inserting the forbidden duplicate** — a schema review cannot tell a firing index from a silent one by reading.
|
|
141
|
-
5. **Report as a findings list** — one line per violation: the section, the table/column, the fix.
|