bearings 0.2.0 → 0.3.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/README.md +10 -7
- package/dist/chunk-GUIHDRBB.js +659 -0
- package/dist/cli.js +54 -377
- package/dist/update-GAIUBEGX.js +799 -0
- package/package.json +1 -1
- package/templates/AGENTS.md +18 -33
- package/templates/agents/commands/refresh-repo-map.md +161 -0
- package/templates/agents/commands/setup-repo.md +67 -32
- package/templates/agents/skills/commit-convention/SKILL.md +83 -20
- package/templates/agents/skills/defer-work/SKILL.md +2 -2
- package/templates/agents/skills/enforcement-gates/SKILL.md +1 -0
- package/templates/agents/skills/implementing-task/SKILL.md +16 -7
- package/templates/agents/skills/installing-dependencies/SKILL.md +6 -0
- package/templates/agents/skills/recording-decisions/SKILL.md +51 -0
- package/templates/agents/skills/repo-navigation/SKILL.md +27 -8
- package/templates/agents/skills/resurface-deferred-work/SKILL.md +2 -2
- package/templates/agents/skills/secrets-handling/SKILL.md +1 -0
- package/templates/docs/ARCHITECTURE.md +37 -0
- package/templates/docs/CODEBASE_MAP.md +33 -0
- package/templates/docs/DOMAIN.md +33 -0
- package/templates/docs/adr/0000-template.md +12 -0
- package/templates/docs/adr/INDEX.md +6 -0
- package/templates/docs/deferred/INDEX.md +5 -3
- package/templates/agents/commands/current-state.md +0 -163
- package/templates/docs/CURRENT_STATE.md +0 -38
- package/templates/docs/conventions/current-state.md +0 -9
- package/templates/docs/conventions/doc-lifecycle.md +0 -16
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
name: repo-navigation
|
|
2
3
|
description: Use when exploring the repo, locating code, or deciding which docs and paths to read before making changes.
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -6,7 +7,9 @@ description: Use when exploring the repo, locating code, or deciding which docs
|
|
|
6
7
|
|
|
7
8
|
## Purpose
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Route straight to owning source using the codebase map, and load domain,
|
|
11
|
+
architecture, decision, or deferred-work context only when the task actually
|
|
12
|
+
needs it.
|
|
10
13
|
|
|
11
14
|
## Triggers
|
|
12
15
|
|
|
@@ -15,14 +18,27 @@ Explore efficiently without crawling irrelevant, archived, generated, or project
|
|
|
15
18
|
|
|
16
19
|
## Required Workflow
|
|
17
20
|
|
|
18
|
-
1. Read `docs/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
1. Read the entire `docs/CODEBASE_MAP.md` before any source work -> use its
|
|
22
|
+
`path#symbol` anchors as the routing model.
|
|
23
|
+
2. Load `docs/DOMAIN.md` only when the task turns on behavior, requirements,
|
|
24
|
+
workflows, terminology, scope, or domain rules.
|
|
25
|
+
3. Load `docs/ARCHITECTURE.md` only when the task turns on components,
|
|
26
|
+
dependency direction, integrations, state ownership, significant
|
|
27
|
+
dependencies, or environment/build shape.
|
|
28
|
+
4. Load `docs/adr/INDEX.md` and only matching ADRs when a consequential
|
|
29
|
+
decision constrains the task.
|
|
30
|
+
5. Load `docs/deferred/INDEX.md` and only matching details when planning a
|
|
31
|
+
new capability.
|
|
32
|
+
6. If any loaded map is stale -> report the mismatch and continue from direct
|
|
33
|
+
evidence.
|
|
21
34
|
|
|
22
35
|
## Rules
|
|
23
36
|
|
|
24
|
-
- Do: prefer durable docs, manifests, and entry
|
|
25
|
-
|
|
37
|
+
- Do: prefer the codebase map, other durable docs, manifests, and entry
|
|
38
|
+
points before deep file walks.
|
|
39
|
+
- Do not: crawl archived, generated, vendored, or build-output folders unless
|
|
40
|
+
the task explicitly needs them.
|
|
41
|
+
- Do not: load a map whose trigger does not match the current task.
|
|
26
42
|
|
|
27
43
|
## Verification
|
|
28
44
|
|
|
@@ -30,5 +46,8 @@ Explore efficiently without crawling irrelevant, archived, generated, or project
|
|
|
30
46
|
|
|
31
47
|
## References
|
|
32
48
|
|
|
33
|
-
- `docs/
|
|
34
|
-
- `docs/
|
|
49
|
+
- `docs/CODEBASE_MAP.md` - current capability/concern-to-source map.
|
|
50
|
+
- `docs/DOMAIN.md` - business language and workflows.
|
|
51
|
+
- `docs/ARCHITECTURE.md` - stable technical shape and environment.
|
|
52
|
+
- `docs/adr/INDEX.md` - consequential decision registry.
|
|
53
|
+
- `docs/deferred/INDEX.md` - approved postponed-work registry.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
name: resurface-deferred-work
|
|
3
|
+
description: Use when building, planning, or designing work that matches an entry in docs/deferred/INDEX.md.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# Resurface Deferred Work
|
|
@@ -33,4 +34,3 @@ Prevent agents from silently building over parked decisions without confirming t
|
|
|
33
34
|
## References
|
|
34
35
|
|
|
35
36
|
- `docs/deferred/INDEX.md` - parked-work registry.
|
|
36
|
-
- `docs/conventions/doc-lifecycle.md` - lifecycle for deferred plans.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# ARCHITECTURE
|
|
2
|
+
|
|
3
|
+
Answers: how is the system technically shaped? Populated and kept current by `/refresh-repo-map`. Do not hand-edit outside that workflow.
|
|
4
|
+
|
|
5
|
+
## System Boundary
|
|
6
|
+
|
|
7
|
+
<agent: fill via /refresh-repo-map - the system and runtime boundary: what is inside versus outside this codebase.>
|
|
8
|
+
|
|
9
|
+
## Primary Stack
|
|
10
|
+
|
|
11
|
+
<agent: fill via /refresh-repo-map - primary language, runtime, framework, platform, and package manager.>
|
|
12
|
+
|
|
13
|
+
## Significant Dependencies
|
|
14
|
+
|
|
15
|
+
<agent: fill via /refresh-repo-map - architecture-significant dependencies and the role each plays.>
|
|
16
|
+
|
|
17
|
+
## Components and Dependency Direction
|
|
18
|
+
|
|
19
|
+
<agent: fill via /refresh-repo-map - major components and the direction dependencies flow between them.>
|
|
20
|
+
|
|
21
|
+
## Integrations and State Ownership
|
|
22
|
+
|
|
23
|
+
<agent: fill via /refresh-repo-map - external integrations and which component owns which state.>
|
|
24
|
+
|
|
25
|
+
## Runtime and Deployment
|
|
26
|
+
|
|
27
|
+
<agent: fill via /refresh-repo-map - runtime topology and how the system is deployed.>
|
|
28
|
+
|
|
29
|
+
## Development Environment
|
|
30
|
+
|
|
31
|
+
<agent: fill via /refresh-repo-map - local prerequisites and canonical install, run, build, test, and lint commands.>
|
|
32
|
+
|
|
33
|
+
## Architectural Constraints
|
|
34
|
+
|
|
35
|
+
<agent: fill via /refresh-repo-map - durable technical constraints and links to governing ADRs.>
|
|
36
|
+
|
|
37
|
+
<!-- repo-map-synced: <agent: fill via /refresh-repo-map> -->
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# CODEBASE_MAP
|
|
2
|
+
|
|
3
|
+
Answers: where is today's shipped implementation? Organized by capability and concern, not directory order. Populated and kept current by `/refresh-repo-map`. Do not hand-edit outside that workflow.
|
|
4
|
+
|
|
5
|
+
## Executable Entry Points
|
|
6
|
+
|
|
7
|
+
<agent: fill via /refresh-repo-map - the executable entry points into this codebase.>
|
|
8
|
+
|
|
9
|
+
## Capabilities and Concerns
|
|
10
|
+
|
|
11
|
+
<agent: fill via /refresh-repo-map - each shipped capability or technical concern and its owning `path#symbol` anchors.>
|
|
12
|
+
|
|
13
|
+
## Critical Flows
|
|
14
|
+
|
|
15
|
+
<agent: fill via /refresh-repo-map - critical flow chains where one owner table cannot show the route clearly.>
|
|
16
|
+
|
|
17
|
+
## Shared Utilities and Infrastructure
|
|
18
|
+
|
|
19
|
+
<agent: fill via /refresh-repo-map - shared utilities and infrastructure used across capabilities.>
|
|
20
|
+
|
|
21
|
+
## Interfaces and State
|
|
22
|
+
|
|
23
|
+
<agent: fill via /refresh-repo-map - interfaces, state, side effects, and external boundaries.>
|
|
24
|
+
|
|
25
|
+
## Change Hazards
|
|
26
|
+
|
|
27
|
+
<agent: fill via /refresh-repo-map - change hazards that affect safe routing or proof.>
|
|
28
|
+
|
|
29
|
+
## Verification Map
|
|
30
|
+
|
|
31
|
+
<agent: fill via /refresh-repo-map - relevant tests and verification commands per capability.>
|
|
32
|
+
|
|
33
|
+
<!-- repo-map-synced: <agent: fill via /refresh-repo-map> -->
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# DOMAIN
|
|
2
|
+
|
|
3
|
+
Answers: why does this system exist? Populated and kept current by `/refresh-repo-map`. Do not hand-edit outside that workflow.
|
|
4
|
+
|
|
5
|
+
## Problem and Outcomes
|
|
6
|
+
|
|
7
|
+
<agent: fill via /refresh-repo-map - the problem this system solves and the outcomes it produces for its users.>
|
|
8
|
+
|
|
9
|
+
## Actors
|
|
10
|
+
|
|
11
|
+
<agent: fill via /refresh-repo-map - users, operators, and other systems that act on or through this system.>
|
|
12
|
+
|
|
13
|
+
## Use Cases
|
|
14
|
+
|
|
15
|
+
<agent: fill via /refresh-repo-map - the business use cases this system supports.>
|
|
16
|
+
|
|
17
|
+
## Workflows
|
|
18
|
+
|
|
19
|
+
<agent: fill via /refresh-repo-map - the end-to-end workflows actors follow to reach an outcome.>
|
|
20
|
+
|
|
21
|
+
## Ubiquitous Language
|
|
22
|
+
|
|
23
|
+
<agent: fill via /refresh-repo-map - canonical domain terms and their precise meaning in this system.>
|
|
24
|
+
|
|
25
|
+
## Domain Rules
|
|
26
|
+
|
|
27
|
+
<agent: fill via /refresh-repo-map - domain rules and invariants that constrain behavior regardless of implementation.>
|
|
28
|
+
|
|
29
|
+
## Boundaries and Non-Goals
|
|
30
|
+
|
|
31
|
+
<agent: fill via /refresh-repo-map - what this system is explicitly not responsible for.>
|
|
32
|
+
|
|
33
|
+
<!-- repo-map-synced: <agent: fill via /refresh-repo-map> -->
|
|
@@ -8,10 +8,22 @@ State whether this decision is proposed, accepted, superseded, or rejected.
|
|
|
8
8
|
|
|
9
9
|
Describe the forces, constraints, and facts that make a decision necessary.
|
|
10
10
|
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
State exactly which domain or technical concerns this decision applies to.
|
|
14
|
+
|
|
11
15
|
## Decision
|
|
12
16
|
|
|
13
17
|
Record the chosen approach and the scope where it applies.
|
|
14
18
|
|
|
19
|
+
## Alternatives
|
|
20
|
+
|
|
21
|
+
List the alternatives considered and why each was rejected.
|
|
22
|
+
|
|
15
23
|
## Consequences
|
|
16
24
|
|
|
17
25
|
List the tradeoffs, follow-up work, and verification impact.
|
|
26
|
+
|
|
27
|
+
## Supersession
|
|
28
|
+
|
|
29
|
+
State whether this ADR supersedes or is superseded by another ADR, and cross-link both records.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Architecture Decision Records
|
|
2
|
+
|
|
3
|
+
An ADR is warranted when a decision constrains future work, has meaningful alternatives or tradeoffs, or is costly to reverse. Recording a decision here requires an approved consequential decision — never invent or record an unapproved entry. Read this index first, then only matching accepted or superseding ADRs; do not scan every ADR.
|
|
4
|
+
|
|
5
|
+
| ID | Decision | Status | Affected concerns | Supersedes | Detail |
|
|
6
|
+
|---|---|---|---|---|---|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Deferred Work
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|---|---|---|---|
|
|
3
|
+
This folder is not a general backlog and does not hold permanently rejected work or ordinary code TODOs. Recording an entry here requires explicit developer approval — an agent may suggest deferral but never records it unapproved.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
| ID | Postponed item | Reason | Revisit trigger | Detail |
|
|
6
|
+
|---|---|---|---|---|
|
|
7
|
+
|
|
8
|
+
Add a `DEF-NNN-topic.md` detail doc per entry. Read this index before planning a new capability, then open only matching detail files. Remove a row once its work is shipped or rejected.
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate or refresh docs/CURRENT_STATE.md and, if `docs/diagrams/` exists in this repo, docs/diagrams/c4-component.puml — the source-of-truth source map
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /current-state
|
|
6
|
-
|
|
7
|
-
Refresh `docs/CURRENT_STATE.md` and, if `docs/diagrams/` exists in this repo, `docs/diagrams/c4-component.puml` when component topology changes. Runs after each committed task, or standalone when the source map has drifted.
|
|
8
|
-
|
|
9
|
-
This command is the **only** writer for `CURRENT_STATE.md` and, if `docs/diagrams/` exists in this repo, `c4-component.puml`. Do not touch either during implementation.
|
|
10
|
-
|
|
11
|
-
## When to run
|
|
12
|
-
|
|
13
|
-
- After a task is implemented and committed — typical use, run in the same thread.
|
|
14
|
-
- Standalone, when the source map has drifted and needs catching up without a task in progress.
|
|
15
|
-
- First time, to seed `CURRENT_STATE.md` for an existing codebase or a freshly-skeletoned project.
|
|
16
|
-
|
|
17
|
-
## Required sections — CURRENT_STATE.md
|
|
18
|
-
|
|
19
|
-
Exactly these headings, in this order. Empty section: keep the heading with `(none)`. Do not remove.
|
|
20
|
-
|
|
21
|
-
```markdown
|
|
22
|
-
# CURRENT_STATE
|
|
23
|
-
|
|
24
|
-
## Purpose
|
|
25
|
-
|
|
26
|
-
<1–2 sentences, caveman: what codebase does, for whom>
|
|
27
|
-
|
|
28
|
-
## Stack
|
|
29
|
-
|
|
30
|
-
<lang ⊕ framework ⊕ key libs; versions only when material>
|
|
31
|
-
|
|
32
|
-
## Shipped capabilities
|
|
33
|
-
|
|
34
|
-
<flat list, 1 line each — only end-user functionality working today>
|
|
35
|
-
|
|
36
|
-
## Source map
|
|
37
|
-
|
|
38
|
-
<folder/file tree, 1-line purpose per node — tech-lead pointer granularity>
|
|
39
|
-
|
|
40
|
-
## Design patterns in use
|
|
41
|
-
|
|
42
|
-
<pattern name → file/dir>
|
|
43
|
-
|
|
44
|
-
## Public interfaces
|
|
45
|
-
|
|
46
|
-
<HTTP routes / UI routes / CLI cmds / events / queues>
|
|
47
|
-
|
|
48
|
-
## Data model digest
|
|
49
|
-
|
|
50
|
-
<link to docs/diagrams/erd.puml ⊕ 1-line table list>
|
|
51
|
-
|
|
52
|
-
## Component diagram
|
|
53
|
-
|
|
54
|
-
<embed of rendered docs/diagrams/rendered/c4-component.svg, if `docs/diagrams/` exists in this repo>
|
|
55
|
-
|
|
56
|
-
## Known debt / TODOs
|
|
57
|
-
|
|
58
|
-
<short, current; deleted once addressed>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Caveman style — whole file
|
|
62
|
-
|
|
63
|
-
- Bullet fragments. Drop articles (`the`, `a`).
|
|
64
|
-
- Symbols: `→` leads-to · `⊕` and-also · `~` approximately · `Δ` change · `&` and-also.
|
|
65
|
-
- `file:line` over prose: `auth/login.ts:42` ✓ · "line 42 of auth/login.ts" ✗.
|
|
66
|
-
- No hedging (`might`, `could`, `perhaps`) — state or omit.
|
|
67
|
-
- No preamble, no meta, no restating the question.
|
|
68
|
-
- 1 line per entry where possible.
|
|
69
|
-
|
|
70
|
-
Example:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
## Shipped capabilities
|
|
74
|
-
- email/pw signup ⊕ verify
|
|
75
|
-
- JWT auth → 7d refresh
|
|
76
|
-
- profile edit (name, avatar)
|
|
77
|
-
|
|
78
|
-
## Source map
|
|
79
|
-
- src/auth/ — signup, login, JWT issuance
|
|
80
|
-
- login.ts:42 → token mint
|
|
81
|
-
- guards/ — route protection
|
|
82
|
-
- src/users/ — CRUD ⊕ profile
|
|
83
|
-
- src/db/ — Prisma client ⊕ migrations
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Inputs
|
|
87
|
-
|
|
88
|
-
Gather these in order — the diff is the truth source; task or issue context describes intent:
|
|
89
|
-
|
|
90
|
-
1. **`docs/CURRENT_STATE.md`** — baseline to preserve.
|
|
91
|
-
2. **If `docs/diagrams/` exists in this repo, `docs/diagrams/c4-component.puml`** — component baseline.
|
|
92
|
-
3. **Task or issue context** — identify from conversation context, linked issue/spec, or `git log -1 --format=%B`. Read named context docs for intended Δ when present.
|
|
93
|
-
4. **Adjacent planning docs** — read only if linked by the task, issue, spec, or commit message.
|
|
94
|
-
5. **`git diff HEAD~1`** — what actually shipped; trust this over intent docs if they diverge.
|
|
95
|
-
|
|
96
|
-
## Procedure A — generate from scratch (no file exists)
|
|
97
|
-
|
|
98
|
-
Covers (a) existing codebase adopting the methodology, (b) new project past design/skeleton phase.
|
|
99
|
-
|
|
100
|
-
1. **Stack** — read manifests: `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `tsconfig.json`, `vite.config.*`, `next.config.*`, `prisma/schema.prisma`, etc.
|
|
101
|
-
2. **Source map** — walk top-down. Per top-level folder: read `index.*` / `mod.rs` / `__init__.py`, the largest file, any `README.md`. Stop at tech-lead-pointer granularity (deep enough to route a dev to the right file, no deeper). Symbol-level entries only when the symbol _is_ the landmark.
|
|
102
|
-
3. **Public interfaces** — find route registrations (Express/NestJS/FastAPI/Django/etc.), CLI entry points (`bin/`, `cmd/`, `cli.*`), event/queue handlers.
|
|
103
|
-
4. **Data model digest** — read schema + migrations → 1-line table list. Link `docs/diagrams/erd.puml` if it exists; if not, link `prisma/schema.prisma` or equivalent. Do not inline schema.
|
|
104
|
-
5. **Design patterns in use** — recurring shapes by directory naming + import graph (Repository, Service, UseCase, Controller, ...). Pattern → file/dir.
|
|
105
|
-
6. **Shipped capabilities** — user-facing features actually working today. Skip in-flight or planned. If unsure what works, **ask the user**. Do not infer from task files or phase docs.
|
|
106
|
-
7. **Component diagram** — if `docs/diagrams/` exists in this repo and `docs/diagrams/c4-component.puml` does not exist, create a minimal skeleton from the source map's top-level boundaries. Render to SVG via `docker run --rm -v "$PWD:/data" plantuml/plantuml -tsvg docs/diagrams/c4-component.puml`. Embed the rendered SVG path in the section. If `docs/diagrams/` does not exist in this repo, write `(none)` in the section.
|
|
107
|
-
8. **Known debt / TODOs** — grep `TODO|FIXME|HACK|XXX`. Add obvious gaps spotted during the walk.
|
|
108
|
-
9. **Purpose** — 1–2 caveman sentences. If unclear, **ask the user**. Do not guess.
|
|
109
|
-
10. Apply caveman style end-to-end. Re-read once. Cut every word with no signal.
|
|
110
|
-
|
|
111
|
-
After drafting: surface to user, ask for corrections. The first version is a draft, not the answer.
|
|
112
|
-
|
|
113
|
-
## Procedure B — update an existing file
|
|
114
|
-
|
|
115
|
-
Trigger: a task was just committed and `/current-state` is called in the same thread, or standalone drift correction.
|
|
116
|
-
|
|
117
|
-
1. Read `docs/CURRENT_STATE.md` fully — establish the baseline.
|
|
118
|
-
2. If `docs/diagrams/` exists in this repo, read `docs/diagrams/c4-component.puml` — establish the component baseline.
|
|
119
|
-
3. Identify the completed task or issue from conversation context or `git log -1 --format=%B`. Read named context docs for intended Δ when present.
|
|
120
|
-
4. Run `git diff HEAD~1` — confirm what actually shipped. This is the truth source.
|
|
121
|
-
5. Map change to affected sections — most tasks touch 1–3:
|
|
122
|
-
- new dep → **Stack**
|
|
123
|
-
- new user-facing feature working today → **Shipped capabilities**
|
|
124
|
-
- new/renamed/removed file or folder, or purpose shift → **Source map**
|
|
125
|
-
- new endpoint/CLI/event → **Public interfaces**
|
|
126
|
-
- new migration → **Data model digest**
|
|
127
|
-
- new component or container relation → **Component diagram** if `docs/diagrams/` exists in this repo (edit `c4-component.puml`, re-render)
|
|
128
|
-
- new pattern adopted ⊕ old pattern retired → **Design patterns in use**
|
|
129
|
-
- debt resolved → **prune** from Known debt; new debt → add
|
|
130
|
-
- **Purpose** — touch only if scope actually shifted
|
|
131
|
-
6. **Weigh new entries against the existing baseline.** A freshly-shipped task does not automatically replace older, more important entries. If the file is growing past one screen, prune low-signal entries first.
|
|
132
|
-
7. Apply changes with the **Edit tool only** — surgical replacements. Never regenerate the file. Untouched sections stay byte-identical.
|
|
133
|
-
8. **Prune obsolete entries.** File removed → delete source-map line. Pattern retired → delete entry. Debt resolved → delete item. Stale entries are worse than missing ones.
|
|
134
|
-
9. New entries match surrounding density. Caveman throughout.
|
|
135
|
-
10. If `docs/diagrams/` exists in this repo and `c4-component.puml` changed, re-render: `docker run --rm -v "$PWD:/data" plantuml/plantuml -tsvg docs/diagrams/c4-component.puml`. Update the embed path in the Component diagram section if the rendered filename changed.
|
|
136
|
-
11. Re-read after editing. Cut redundancy the diff introduced.
|
|
137
|
-
|
|
138
|
-
After updating: surface the diff of `CURRENT_STATE.md` to the user, flag any conflicts, ask for corrections. Once the user approves (or no corrections are needed), commit with a concise docs message such as:
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
docs: update CURRENT_STATE
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Include only project-required trailers. Stage only `docs/CURRENT_STATE.md` and, if `docs/diagrams/` exists in this repo and changed, `docs/diagrams/c4-component.puml` plus its rendered SVG.
|
|
145
|
-
|
|
146
|
-
## Conflict handling
|
|
147
|
-
|
|
148
|
-
- **Task file says X, diff shows Y** → trust the diff. Note the divergence to the user.
|
|
149
|
-
- **Manual human edit in `CURRENT_STATE.md` conflicts with new change** → trust the new change but **flag the conflict before overwriting**. The human edit may encode context the agent lacks.
|
|
150
|
-
|
|
151
|
-
## Anti-bloat rules
|
|
152
|
-
|
|
153
|
-
- No narrative. No restating code comments.
|
|
154
|
-
- No planned, in-flight, or "next release" features. Only what works today.
|
|
155
|
-
- No duplication of content that lives elsewhere — link instead (`→ prisma/schema.prisma`, `→ docs/diagrams/erd.puml`).
|
|
156
|
-
- File grows with **source-tree structure**, not task count. Growing per-task → wrong content going in; rework the entry until it describes structure, not the task.
|
|
157
|
-
- No business detail — that lives in `docs/features/`. `CURRENT_STATE.md` is a source map, not a feature catalog.
|
|
158
|
-
- No history — `CURRENT_STATE.md` answers "what is"; `CHANGELOG.md` answers "how we got here". They never overlap.
|
|
159
|
-
|
|
160
|
-
## Out of scope
|
|
161
|
-
|
|
162
|
-
- Appending to `CHANGELOG.md`.
|
|
163
|
-
- Editing unrelated requirements, prototypes, class diagrams, ERDs, context diagrams, or container diagrams.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# CURRENT_STATE
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
<agent: fill via /current-state>
|
|
6
|
-
|
|
7
|
-
## Stack
|
|
8
|
-
|
|
9
|
-
- <agent: fill via /current-state>
|
|
10
|
-
- <agent: fill via /current-state>
|
|
11
|
-
|
|
12
|
-
## Shipped capabilities
|
|
13
|
-
|
|
14
|
-
- <agent: fill via /current-state>
|
|
15
|
-
|
|
16
|
-
## Source map
|
|
17
|
-
|
|
18
|
-
- `<agent: fill via /current-state>` - <agent: fill via /current-state>
|
|
19
|
-
|
|
20
|
-
## Design patterns in use
|
|
21
|
-
|
|
22
|
-
- <agent: fill via /current-state> -> <agent: fill via /current-state>
|
|
23
|
-
|
|
24
|
-
## Public interfaces
|
|
25
|
-
|
|
26
|
-
- <agent: fill via /current-state> -> <agent: fill via /current-state>
|
|
27
|
-
|
|
28
|
-
## Data model digest
|
|
29
|
-
|
|
30
|
-
- <agent: fill via /current-state> - <agent: fill via /current-state>
|
|
31
|
-
|
|
32
|
-
## Component diagram
|
|
33
|
-
|
|
34
|
-
- <agent: fill via /current-state>
|
|
35
|
-
|
|
36
|
-
## Known debt / TODOs
|
|
37
|
-
|
|
38
|
-
- <agent: fill via /current-state>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Current State Policy
|
|
2
|
-
|
|
3
|
-
## Policy
|
|
4
|
-
|
|
5
|
-
- Agents read it before broad exploration.
|
|
6
|
-
- If it answers the question, agents should not re-crawl the repo.
|
|
7
|
-
- It should be updated only by an explicit command or maintenance workflow.
|
|
8
|
-
- If stale, agents should report staleness instead of silently rewriting it during unrelated work.
|
|
9
|
-
- Only `/current-state` writes `docs/CURRENT_STATE.md`.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Documentation Lifecycle
|
|
2
|
-
|
|
3
|
-
## Common categories
|
|
4
|
-
|
|
5
|
-
| Category | Examples | Lifecycle |
|
|
6
|
-
|---|---|---|
|
|
7
|
-
| Durable | architecture, ADRs, glossary, operations, current-state conventions | Long-lived |
|
|
8
|
-
| Planning | roadmap, phases, feature plans, task docs | Archived or removed after shipped |
|
|
9
|
-
| Runbooks | deployment, rollback, manual checks, provider setup | Updated when operations change |
|
|
10
|
-
| Deferred work | parked plans and revisit triggers | Removed when built or rejected |
|
|
11
|
-
|
|
12
|
-
## Why this matters
|
|
13
|
-
|
|
14
|
-
- Prevents agents from treating stale plans as shipped behavior.
|
|
15
|
-
- Prevents durable docs from depending on soon-archived docs.
|
|
16
|
-
- Gives agents a clear source of truth for scope disputes.
|