@nurix/etna 0.18.23 → 0.18.25

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.
Files changed (61) hide show
  1. package/data/harness-index.json +1 -5
  2. package/data/harnesses/code/harness.json +1 -1
  3. package/data/harnesses/etna/CLAUDE.md +5 -14
  4. package/data/harnesses/etna/harness.json +2 -2
  5. package/package.json +1 -1
  6. package/data/harnesses/mobile/.prettierignore +0 -12
  7. package/data/harnesses/mobile/.prettierrc.json +0 -3
  8. package/data/harnesses/mobile/.vscode/settings.json +0 -10
  9. package/data/harnesses/mobile/CLAUDE.md +0 -151
  10. package/data/harnesses/mobile/agents/brainstorm.md +0 -35
  11. package/data/harnesses/mobile/agents/change-review.md +0 -251
  12. package/data/harnesses/mobile/agents/lld-mode.md +0 -56
  13. package/data/harnesses/mobile/agents/maintenance.md +0 -216
  14. package/data/harnesses/mobile/agents/performance-review.md +0 -223
  15. package/data/harnesses/mobile/harness.json +0 -11
  16. package/data/harnesses/mobile/hooks/generate-ownership-index.mjs +0 -148
  17. package/data/harnesses/mobile/hooks/hooks.json +0 -16
  18. package/data/harnesses/mobile/rules/database.md +0 -38
  19. package/data/harnesses/mobile/rules/general.md +0 -49
  20. package/data/harnesses/mobile/rules/nomenclature.md +0 -34
  21. package/data/harnesses/mobile/rules/nustack.md +0 -150
  22. package/data/harnesses/mobile/rules/react-native.md +0 -132
  23. package/data/harnesses/mobile/rules/testing.md +0 -25
  24. package/data/harnesses/mobile/rules/typescript.md +0 -40
  25. package/data/harnesses/mobile/skills/boundary/SKILL.md +0 -69
  26. package/data/harnesses/mobile/skills/boundary/references/index.md +0 -16
  27. package/data/harnesses/mobile/skills/boundary/references/mechanisms.md +0 -99
  28. package/data/harnesses/mobile/skills/boundary/references/packs/async-messaging.md +0 -81
  29. package/data/harnesses/mobile/skills/boundary/references/packs/auth.md +0 -93
  30. package/data/harnesses/mobile/skills/boundary/references/packs/build-config-runtime.md +0 -93
  31. package/data/harnesses/mobile/skills/boundary/references/packs/cloudflare.md +0 -93
  32. package/data/harnesses/mobile/skills/boundary/references/packs/frontend.md +0 -93
  33. package/data/harnesses/mobile/skills/boundary/references/packs/generic-tail.md +0 -55
  34. package/data/harnesses/mobile/skills/boundary/references/packs/persistence.md +0 -93
  35. package/data/harnesses/mobile/skills/boundary/references/packs/wire-api.md +0 -87
  36. package/data/harnesses/mobile/skills/brainstorm/README.md +0 -162
  37. package/data/harnesses/mobile/skills/brainstorm/SKILL.md +0 -152
  38. package/data/harnesses/mobile/skills/brainstorm/exit-artifacts.md +0 -66
  39. package/data/harnesses/mobile/skills/brainstorm/templates/backlog.md +0 -39
  40. package/data/harnesses/mobile/skills/brainstorm/templates/build.md +0 -37
  41. package/data/harnesses/mobile/skills/brainstorm/templates/decisions.md +0 -29
  42. package/data/harnesses/mobile/skills/brainstorm/templates/doctrine.md +0 -31
  43. package/data/harnesses/mobile/skills/brainstorm/templates/domain-model.md +0 -25
  44. package/data/harnesses/mobile/skills/brainstorm/templates/evidence.md +0 -24
  45. package/data/harnesses/mobile/skills/brainstorm/templates/glossary.md +0 -20
  46. package/data/harnesses/mobile/skills/brainstorm/templates/milestones.md +0 -43
  47. package/data/harnesses/mobile/skills/brainstorm/templates/non-goals.md +0 -17
  48. package/data/harnesses/mobile/skills/brainstorm/templates/plan-doc.md +0 -61
  49. package/data/harnesses/mobile/skills/brainstorm/templates/questions.md +0 -36
  50. package/data/harnesses/mobile/skills/brainstorm/templates/references.md +0 -28
  51. package/data/harnesses/mobile/skills/brainstorm/templates/rejected.md +0 -33
  52. package/data/harnesses/mobile/skills/brainstorm/templates/source-of-truth.md +0 -49
  53. package/data/harnesses/mobile/skills/brainstorm/templates/state.md +0 -1
  54. package/data/harnesses/mobile/skills/brainstorm/templates/tech.md +0 -23
  55. package/data/harnesses/mobile/skills/brainstorm/templates/thesis.md +0 -21
  56. package/data/harnesses/mobile/skills/documentation/SKILL.md +0 -172
  57. package/data/harnesses/mobile/skills/documentation/references/examples.md +0 -203
  58. package/data/harnesses/mobile/skills/documentation/references/style-guide.md +0 -315
  59. package/data/harnesses/mobile/skills/documentation/references/templates.md +0 -1091
  60. package/data/harnesses/mobile/skills/workflow-mapper/SKILL.md +0 -451
  61. package/data/harnesses/mobile/skills/workflow-mapper/references/patterns.md +0 -214
@@ -1,1091 +0,0 @@
1
- # Documentation Templates
2
-
3
- Templates for all documentation needs. Every template is either a **truth document** (states current absolutes, updated in place) or a **record** (dated account of activity, frozen or append-only) — the split is defined in `SKILL.md` § The Two Natures, and each template below names its nature.
4
-
5
- ---
6
-
7
- ## docs/README.md (Documentation Root)
8
-
9
- Truth document. Use for: the entry point for all documentation in a repo. Created during baseline audit.
10
-
11
- ```
12
- # {Project Name} Documentation
13
-
14
- Technical documentation for {project description}.
15
-
16
- > For documentation organization, authority map, and folder rules, see **[structure.md](structure.md)**.
17
-
18
- ---
19
-
20
- ## Quick Links
21
-
22
- | Document | Description |
23
- | --------------------------------- | ------------------------------------ |
24
- | [Structure](structure.md) | Documentation entry point and rules |
25
- | [Setup](operations/setup.md) | Installation and configuration guide |
26
-
27
- ---
28
-
29
- ## Architecture
30
-
31
- System design, steering docs, and standing decisions — the truth layer.
32
-
33
- - [system-design.md](architecture/system-design.md) - System overview: subsystems and key flows
34
- - [domain-model.md](architecture/domain-model.md) - Entities, relationships, state ownership
35
- - [glossary.md](architecture/glossary.md) - Project vocabulary
36
- - [non-goals.md](architecture/non-goals.md) - What this system deliberately does not do
37
- - [decisions/](architecture/decisions/Readme.md) - Architecture Decisions (ADs)
38
- {list other architecture docs — api.md, security.md — when present}
39
-
40
- ---
41
-
42
- ## Features
43
-
44
- Living reference docs for implemented features (how things currently work).
45
-
46
- - [feature-name.md](features/feature-name.md) - Feature description
47
- {list all feature docs}
48
-
49
- ---
50
-
51
- ## Operations
52
-
53
- How to run, develop, and deploy.
54
-
55
- - [setup.md](operations/setup.md) - Installation and configuration guide
56
- {list all operations docs — environment.md when present}
57
-
58
- ---
59
-
60
- ## History
61
-
62
- The records — everything dated, frozen, or append-only.
63
-
64
- - [CHANGELOG.md](history/CHANGELOG.md) - Master changelog index
65
- - [changelog/](history/changelog/) - Individual changelog entries
66
- - [plans/](history/plans/) - Implementation plans (frozen at completion)
67
- - [migrations/](history/migrations/) - One-shot migration runbooks (frozen once executed)
68
- - [research/](history/research/) - Deep-research artifacts (one folder per topic)
69
- - [backlog.md](history/backlog.md) - Tracked work items and technical debt
70
-
71
- ---
72
-
73
- ## Contributing
74
-
75
- See [CLAUDE.md](../CLAUDE.md) for documentation guidelines.
76
- ```
77
-
78
- ---
79
-
80
- ## docs/structure.md (Authority Map)
81
-
82
- Truth document. Use for: defining which folder owns which topic and how docs are maintained.
83
-
84
- ```
85
- ---
86
- harness-version: 1.0.0
87
- ---
88
-
89
- # Documentation Structure
90
-
91
- > This file is the entry point for understanding the docs folder.
92
- > `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.
93
-
94
- ## Authority Map
95
-
96
- Each topic has one canonical location. Read from here, not from plans or changelogs.
97
-
98
- | Topic | Authority | Key Files |
99
- | ----- | --------- | --------- |
100
- | Code-path ownership (path → doc + module) | feature `owns:` frontmatter | the generated ownership index |
101
- | System overview | `docs/architecture/` | system-design.md |
102
- | Steering (domain model, glossary, non-goals) | `docs/architecture/` | domain-model.md, glossary.md, non-goals.md |
103
- | Architecture decisions (ADs) | `docs/architecture/decisions/` | AD-NNN-*.md |
104
- | API surface | `docs/architecture/` | api.md |
105
- | Security | `docs/architecture/` | security.md |
106
- | Feature behavior | `docs/features/` | {key files} |
107
- | Setup & development | `docs/operations/` | {key files} |
108
- | Environment / config surface | `docs/operations/` | environment.md |
109
- | Testing strategy | `docs/tests/` | strategy.md |
110
- | Historical plans | `docs/history/plans/` | YYYY-MM-DD-name.md |
111
- | Change records | `docs/history/changelog/` | Individual entries |
112
- | Migration runbooks | `docs/history/migrations/` | YYYY-MM-DD-name.md |
113
- | Deep-research artifacts | `docs/history/research/{topic}/` | README.md + findings.md + sources.md |
114
- | Brainstorm design records | `docs/research/{topic}-brainstorming/` (active) → `docs/history/brainstorms/{topic}/` (harvested) | state.md + pillars/ |
115
- | Backlog | `docs/history/` | backlog.md |
116
-
117
- ## The Two Natures
118
-
119
- 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.
120
-
121
- - Truth documents are rewritten in place when reality changes — the change-story goes to a changelog entry, never into the truth doc's body.
122
- - 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.
123
- - 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.
124
-
125
- ## Folder Rules
126
-
127
- - `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.
128
- - `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.
129
- - `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/`).
130
- - `docs/tests/`: Testing strategy and test docs. Present when the repo has a test posture worth documenting.
131
- - `docs/history/plans/`: Records. Must have `Status:` field. Never modify after completion.
132
- - `docs/history/changelog/`: Records. Append-only.
133
- - `docs/history/migrations/`: Records. One-shot migration/upgrade runbooks — authored before execution, outcome-stamped and frozen after.
134
- - `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.
135
- - `docs/research/{topic}-brainstorming/` → `docs/history/brainstorms/{topic}/`: Brainstorm design records — the committed Brainstorming-Mode session for a topic (`state.md` + `pillars/`), written by the `brainstorm` skill. An active session lives under `docs/research/`; on close + harvest it **moves** to `docs/history/brainstorms/` and is **kept** as the provenance the truth layer distils from. 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 copies its conclusions into `architecture/`/`history/`. Retire a topic's folder by hand only when the design line is dead. (Distinct from `docs/history/research/{topic}/` above — that is a frozen deep-research record, not a brainstorm session.)
136
- - `docs/history/backlog.md`: Tracked work items. Append new items under appropriate priority.
137
-
138
- ## Health Log
139
-
140
- <!-- Updated by maintenance agent -->
141
- | Date | Review Summary |
142
- | ---- | -------------- |
143
- | {today} | Initial baseline — v{harness-version} structure established |
144
- ```
145
-
146
- ---
147
-
148
- ## Code-Path Ownership
149
-
150
- **Ownership.** A feature doc is the canonical reference for the code paths in its **`owns:` frontmatter** — the only ownership key. To find what a doc owns, read its `owns:` globs; to find the doc for a path, match the path against the injected ownership index (the union of every feature's `owns:` globs), narrower glob wins. See **Frontmatter Derivation** in `SKILL.md` for turning code into `owns:` globs.
151
-
152
- ---
153
-
154
- ## Scaffold Files (create if missing)
155
-
156
- These standard files must exist after every baseline. Create them with these scaffolds if the repo doesn't already have them.
157
-
158
- ### docs/history/CHANGELOG.md
159
-
160
- ```
161
- # Changelog
162
-
163
- All notable changes to {Project Name} will be documented in this file.
164
-
165
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
166
-
167
- ---
168
-
169
- ## [Unreleased]
170
-
171
- {entries added here as work proceeds}
172
-
173
- ---
174
-
175
- ## Links
176
-
177
- - [Setup Guide](../operations/setup.md)
178
- - [Architecture](../architecture/)
179
-
180
- ---
181
-
182
- ## How to Update This Changelog
183
-
184
- 1. Create a dated change file in `docs/history/changelog/`:
185
- `docs/history/changelog/YYYY-MM-DD-feature-name.md`
186
-
187
- 2. Update this CHANGELOG.md with a high-level summary linking to the detail file
188
-
189
- 3. Follow Keep a Changelog categories:
190
- - **Added** for new features
191
- - **Changed** for changes in existing functionality
192
- - **Deprecated** for soon-to-be removed features
193
- - **Removed** for now removed features
194
- - **Fixed** for bug fixes
195
- - **Security** for security improvements
196
- ```
197
-
198
- ### docs/history/backlog.md
199
-
200
- ```
201
- # Backlog
202
-
203
- Tracked work items, technical debt, and planned improvements. Append new items under the appropriate priority.
204
-
205
- ---
206
-
207
- ## Format
208
-
209
- - **[P0]** Description — discovered by [plan-name or agent-name]
210
-
211
- ---
212
-
213
- ## P0 — Critical
214
-
215
- {items here}
216
-
217
- ## P1 — High
218
-
219
- {items here}
220
-
221
- ## P2 — Medium
222
-
223
- {items here}
224
-
225
- ## P3 — Low
226
-
227
- {items here}
228
- ```
229
-
230
- ### docs/memory/index.md
231
-
232
- ```
233
- ---
234
- type: cross-session-learnings
235
- description: Shared knowledge accumulated across agent sessions. All agents should consult and update this file.
236
- ---
237
-
238
- # Cross-Session Learnings
239
-
240
- ## Documentation Baseline
241
-
242
- - **Baselined:** {today}
243
- - **Structure:** v{harness-version} (architecture, features, operations, history, memory; + tests/ when present)
244
- - **Spec version:** v{harness-version}
245
- <!-- v{harness-version} resolves to the installed harness version — read it from `.claude/harness.json` (`version`) / `docs/structure.md` frontmatter (`harness-version`); never hardcode a literal version here. -->
246
-
247
- ## Learnings
248
-
249
- {Agents append learnings here as they discover gotchas, patterns, and architecture notes}
250
- ```
251
-
252
- ### docs/memory/main.md
253
-
254
- ```
255
- ---
256
- type: project-memory
257
- owner: main-agent
258
- description: Project-wide patterns and conventions confirmed in this codebase. Project facts only — user-centric facts go in ~/.claude/.
259
- ---
260
-
261
- # Main Agent — Project Memory
262
-
263
- Append entries below, oldest at bottom. Format:
264
-
265
- ## YYYY-MM-DD — {topic}
266
-
267
- {1-3 line fact, with file paths or references where relevant}
268
-
269
- ---
270
-
271
- ## {today} — Baseline
272
-
273
- Memory file initialized during documentation baseline.
274
- ```
275
-
276
- ---
277
-
278
- ## Feature Documentation — the LLD (docs/features/{feature}.md)
279
-
280
- Truth document. Use for: every feature in `docs/features/`. The feature doc is the feature's **LLD (low-level design)**: the same file persists from design (Status: Draft, written in LLD Mode) through implementation to live reference (Status: Active). Sections fill in as the feature matures — no template swap. The body always describes the feature as it currently is; the journey lives in the linked plan and changelog entries.
281
-
282
- **Required vs optional.** Four things are required in every feature doc: the frontmatter, **Goal**, **Background**, and **Files** — plus **Current Behavior** once research or implementation exists (at Draft it's the pre-feature baseline; at Active it's how the feature works today). Every other section is optional: include it only when the feature has something real to put in it (no Redux → no Redux section; no risks worth naming → no Risks section). A **minimal form** is sanctioned for small features: frontmatter + Goal + a short how-it-works section + Files. A two-screen doc that is accurate beats a full-template doc with empty sections.
283
-
284
- The four research-derived sections (**Affected Modules**, **Conventions to Follow**, **Current Behavior**, **Ownership Conflicts**) map 1:1 to the `lld-mode` agent's return shape. The orchestrator drops its findings into those slots without restructuring.
285
-
286
- ```yaml
287
- ---
288
- owns: ["src/feature/**", "src/other/file.ts"] # required — code-path globs this doc owns (the only ownership key)
289
- module: billing # optional — single bounded-context label; omit if cross-cutting
290
- keywords: [invoice, pdf] # required — discovery terms
291
- status: active # required — active | draft | deprecated
292
- last-reviewed: YYYY-MM-DD # optional tooling key — stamped on substantive review/update; the maintenance agent ranks audit priority by it (metadata, never narrated in the body)
293
- ---
294
- ```
295
-
296
- > Declare the code paths it owns in its `owns:` frontmatter — projected at Draft, confirmed against real code at Active.
297
-
298
- ```
299
- # {Feature Name}
300
-
301
- <!-- Lifecycle lives in the frontmatter `status:` key (active | draft | deprecated) — the single source of truth. Don't restate it in the body. -->
302
- **Plan:** [history/plans/YYYY-MM-DD-feature-name.md](../history/plans/YYYY-MM-DD-feature-name.md) <!-- added once a plan exists -->
303
-
304
- ## Goal
305
-
306
- One sentence. What this feature accomplishes, in user-facing terms.
307
-
308
- ## Goals & Non-Goals
309
-
310
- **In scope**
311
- - Bullet 1
312
- - Bullet 2
313
-
314
- **Out of scope**
315
- - Bullet 1
316
-
317
- ## Background
318
-
319
- Why this feature exists. The user need, the business trigger, the constraint that pushed it above the line. One paragraph.
320
-
321
- (For Product-level work, also include: problem statement, key hypotheses, open questions.)
322
-
323
- ## Approach
324
-
325
- High-level shape of the solution. ASCII diagram if it helps. Implementation specifics belong in the plan.
326
-
327
- ## Affected Modules
328
-
329
- (From lld-mode research) Files, routes, components, slices this feature involves. Group by module.
330
-
331
- | Module | Path | Role in this feature |
332
- |--------|------|----------------------|
333
-
334
- ## Conventions to Follow
335
-
336
- (From lld-mode research) Naming patterns, structural patterns, doc-fit heuristics confirmed for the area being touched. Cite the source file(s) where the convention is established.
337
-
338
- ## Current Behavior
339
-
340
- (From lld-mode research) How the relevant part of the system works *today*, before this feature lands. Without this baseline the design intent is hard to evaluate.
341
-
342
- ## Ownership Conflicts
343
-
344
- (From lld-mode research) Existing feature docs whose `owns:` globs overlap with the projected scope. Resolve before the plan starts — leave nothing unresolved.
345
-
346
- | Conflicting doc | Overlapping path(s) | Resolution |
347
- |-----------------|---------------------|------------|
348
-
349
- ## Architecture
350
-
351
- [ASCII diagram. Fill once implementation lands. See style-guide.md for box-drawing patterns.]
352
-
353
- ## Key Functions
354
-
355
- ### `functionName(param1, param2)`
356
- **Goal:** What it accomplishes
357
- **Input:**
358
- - `param1` (type) - Description
359
- - `param2` (type) - Description
360
- **Output:** Return type and shape
361
- **Side Effects:** DB writes, API calls, state updates
362
-
363
- ### `hookName(config)`
364
- **Goal:** What it provides
365
- **Returns:** `{ data, loading, error }`
366
- **Triggers:** On mount, on change, manual
367
-
368
- ## State
369
-
370
- **Frontend (at persistence):**
371
- {
372
- "data": [],
373
- "changes": { "added": [], "updated": [], "removed": [] }
374
- // "cache": {} // UNUSED: Deprecated
375
- }
376
-
377
- **Storage:** localStorage `app_state`
378
-
379
- **Backend:**
380
- model Resource {
381
- id String @id
382
- data Json
383
- // oldField String? // UNUSED: Legacy
384
- }
385
-
386
- **API Shape:**
387
- { "status": 1, "data": {...} }
388
-
389
- ## Redux (if applicable)
390
-
391
- **Slice:** `sliceName`
392
-
393
- **Actions:**
394
- - `setData(payload)` - Replace all data
395
- - `upsertItem(item)` - Add or update single item
396
-
397
- **Selectors:**
398
- - `selectAll(state)` → `Array<Item>`
399
- - `selectById(state, id)` → `Item | undefined`
400
-
401
- ## Files
402
-
403
- - `src/path/to/main.js` - Core logic
404
- - `src/path/to/hooks.js` - React hooks
405
-
406
- ## Open Questions
407
-
408
- - Question — who decides, by when
409
- - (Resolved questions: fold the resolution into Background.)
410
-
411
- ## Risks
412
-
413
- - Risk — likelihood / impact / mitigation
414
- ```
415
-
416
- ### Section evolution
417
-
418
- Sections fill in across the feature's lifecycle. No template swap — they accumulate in place.
419
-
420
- | When | Sections written | Source |
421
- | --- | --- | --- |
422
- | Status: Draft (design) | Goal, Goals & Non-Goals, Background, Approach, Open Questions, Risks | User interview |
423
- | Status: Draft (research) | Affected Modules, Conventions to Follow, Current Behavior, Ownership Conflicts | lld-mode agent |
424
- | Status: Draft → Active (implementation lands) | Architecture, Key Functions, State, Redux, Files; `owns:` globs confirmed against real code | Main agent (from actual code) |
425
-
426
- Resolved Open Questions can be summarized into Background; unresolved ones stay visible.
427
-
428
- ---
429
-
430
- ## Changelog
431
-
432
- Record. Use for: recording code changes with function-level detail. Entries are frozen once written — they describe the change as it shipped, and are never edited to match later reality.
433
-
434
- Change categories follow the Keep a Changelog vocabulary — **Added / Changed / Deprecated / Removed / Fixed / Security** — the same six the master `CHANGELOG.md` scaffold instructs. Include only the categories that apply; all six share the same bullet shape (function/file, then detail lines).
435
-
436
- ```
437
- # YYYY-MM-DD - [Title]
438
-
439
- ## Summary
440
-
441
- Brief description of what changed and why.
442
-
443
- ## Changes
444
-
445
- ### Added
446
- - `newFunction(params)` in `path/to/file.js`
447
- - Purpose: What it does
448
- - Used by: Where it's called
449
-
450
- ### Changed
451
- - `existingFunction()` in `path/to/file.js`
452
- - Changed: What's different
453
- - Reason: Why it changed
454
- - Migration: What callers must do
455
-
456
- ### Removed
457
- - `oldFunction()` from `path/to/file.js`
458
- - Replaced by: `newFunction()`
459
-
460
- ### Fixed
461
- - `buggyFunction()` in `path/to/file.js`
462
- - Bug: What was wrong, when it manifested
463
- - Fix: What changed
464
-
465
- (Deprecated / Security follow the same shape.)
466
-
467
- ## Breaking Changes
468
-
469
- ⚠️ **[Change description]**
470
- - Old: Previous behavior
471
- - New: Current behavior
472
- - Impact: What breaks
473
- - Migration: How to fix
474
-
475
- ## Migration Steps
476
-
477
- - [ ] Step 1
478
- - [ ] Step 2
479
-
480
- ## Verified
481
-
482
- - What was exercised end-to-end and the observed result — real runs, real fixtures, measured timings
483
- - A future agent diagnosing a regression starts from this evidence
484
-
485
- ## Files Changed
486
-
487
- - `src/path/file1.js` - Core changes
488
- - `src/path/file2.js` - Supporting updates
489
- ```
490
-
491
- ---
492
-
493
- ## Plan (docs/history/plans/YYYY-MM-DD-feature-name.md)
494
-
495
- Record. Use for: every implementation plan. Plans are created here directly with `Status: Draft`, flip to `Status: In Progress` when work starts, and freeze 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.
496
-
497
- The `boundary` skill parses the **Proposed Changes** sections to check boundary impact before execution. Keep that structure stable — section headings and bullet shape are load-bearing for the parser.
498
-
499
- ```
500
- # {Feature Name}
501
-
502
- **Status:** Draft | In Progress | Complete | Abandoned
503
- **Spec:** [docs/features/{feature}.md](../../features/{feature}.md)
504
- **Started:** YYYY-MM-DD
505
- **Completed:** YYYY-MM-DD <!-- fill when status flips to Complete -->
506
-
507
- ## Background
508
-
509
- 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.
510
-
511
- ## Proposed Changes
512
-
513
- ### New Files
514
-
515
- - `src/path/new-file.js` — purpose
516
-
517
- ### Modified Files
518
-
519
- - `src/path/existing.js` — what changes and why
520
-
521
- ### New Entities / State
522
-
523
- - `entities.foo` — new Redux slice / DB table / persisted shape
524
- - Persisted state addition: `state.bar.baz` (default `null` for existing users on rehydrate)
525
-
526
- ### API Changes
527
-
528
- - `POST /api/foo` — new route, request `{...}`, response `{status, data}`
529
- - `PUT /api/bar` — request shape changes; see Migration
530
-
531
- ### Cross-Module Contracts Affected
532
-
533
- - List which cross-cutting contracts this plan affects (db schema, wire envelope, auth, events, env/config, …)
534
- - "None" is a valid answer and means the `boundary` check will pass cleanly
535
-
536
- ## Implementation Steps
537
-
538
- 1. Concrete, ordered, testable
539
- 2. Each step ends with something verifiable
540
- 3. ...
541
-
542
- ## Done Criteria
543
-
544
- - [ ] Implementation complete and verified
545
- - [ ] Affected docs updated (use the injected ownership index to find them)
546
- - [ ] Changelog entry created in `docs/history/changelog/`
547
- - [ ] Plan marked `Status: Complete`, **Completed:** date filled
548
-
549
- ## Open Questions
550
-
551
- - Question — who decides, by when
552
-
553
- ## Risks
554
-
555
- - Risk — likelihood / impact / mitigation
556
- ```
557
-
558
- ---
559
-
560
- ## Operations Procedure (docs/operations/{procedure}.md)
561
-
562
- 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.
563
-
564
- 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.
565
-
566
- Required: **Goal**, **Steps**, **Verification**. Optional: Preconditions, Troubleshooting, Rollback — include only when they carry real content.
567
-
568
- 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.
569
-
570
- ```
571
- # {Procedure Name}
572
-
573
- **Goal:** What this procedure accomplishes, one line.
574
-
575
- ## Preconditions
576
-
577
- - Access, tools, or state required before starting — exact versions, env vars, credentials location
578
-
579
- ## Steps
580
-
581
- 1. One action per step, exact command in a code block
582
- 2. Note expected output where it disambiguates success from failure
583
-
584
- ## Verification
585
-
586
- - The observable end state that confirms it worked — exact check commands, not "it should work now"
587
-
588
- ## Troubleshooting
589
-
590
- - Symptom → cause → fix (append entries as failures are root-caused)
591
-
592
- ## Rollback
593
-
594
- - How to undo, and when undo stops being possible
595
- ```
596
-
597
- ---
598
-
599
- ## Migration Runbook (docs/history/migrations/YYYY-MM-DD-{slug}.md)
600
-
601
- 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}/`).
602
-
603
- Required: **Goal**, **Steps**, **Verification**, and — after execution — the **Outcome** stamp. Optional: Preconditions, Rollback.
604
-
605
- ```
606
- # Migration: {Title}
607
-
608
- **Goal:** What this migration accomplishes and why it runs now, one or two lines.
609
- **Executes against:** {environment / database / system}
610
-
611
- ## Preconditions
612
-
613
- - Backups taken, feature flags set, access confirmed — exact checks
614
-
615
- ## Steps
616
-
617
- 1. One action per step, exact command in a code block
618
- 2. Note expected output where it disambiguates success from failure
619
-
620
- ## Verification
621
-
622
- - The observable end state that confirms success — exact check commands
623
-
624
- ## Rollback
625
-
626
- - How to undo, and the point of no return
627
-
628
- ## Outcome
629
-
630
- <!-- Stamped once, immediately after execution; the file freezes with it. -->
631
- **Executed:** YYYY-MM-DD — {result: clean | issues encountered + how resolved | aborted + why}
632
- ```
633
-
634
- ---
635
-
636
- ## Protected Files
637
-
638
- Truth document. Use for: documenting critical files that need approval before modification.
639
-
640
- 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.
641
-
642
- ```
643
- # Protected Files
644
-
645
- Critical files requiring approval before modification.
646
-
647
- ## File List
648
-
649
- # Category 1 - Description
650
- path/to/critical/file1.js
651
- path/to/critical/file2.js
652
-
653
- # Category 2 - Description
654
- path/to/another/file.js
655
-
656
- ## Risk Summary
657
-
658
- | Category | Risk if Broken |
659
- |------------|-----------------|
660
- | Category 1 | Specific impact |
661
- | Category 2 | Specific impact |
662
-
663
- ## Why Protected
664
-
665
- ### Category 1: [Name]
666
-
667
- **Purpose:** What these files do, one or two lines
668
- **Owning doc:** [docs/features/{feature}.md] — canonical reference for how this code works
669
- **Invariants:**
670
- - The behavior that must not break, stated as a constraint (not a function tour)
671
- - Important point 2
672
- ```
673
-
674
- ---
675
-
676
- ## Architecture Decision (AD)
677
-
678
- Truth document — with the one sanctioned dated tail. Use for: the standing decision on one architectural **subject** — a system shape, a contract, a substrate choice. Lives in `docs/architecture/decisions/`. The body always states the current decision and its current reasoning. When the decision moves, rewrite the affected sections to what is now true, bump `last-updated`, and append the revision to the **Decision Changelog** — the journey lives in that tail, never in the body. Head is truth; tail is provenance.
679
-
680
- ### One subject per AD
681
-
682
- The unit is the subject, not the individual call. "The persistence layer", "auth", "the design-skill architecture" are subjects; every decision, reversal, and re-decision on a subject lands in that subject's one AD, however many times it moves. Write a second AD only when a genuinely separate subject emerges — never to record a revision of an existing one.
683
-
684
- ### When to write an AD
685
-
686
- Write an AD when **all three** apply:
687
-
688
- 1. The decision is architectural — affects system shape, contracts, or substrate choice, not internal implementation
689
- 2. Alternatives were genuinely considered and rejected
690
- 3. Future maintainers will ask "why is it this way?"
691
-
692
- Don't write an AD for:
693
-
694
- - Standing principles or style preferences (those are stances, not decisions — put them in `docs/architecture/`)
695
- - Routine implementation choices with no rejected alternatives
696
- - Anything you'd be happy reversing without ceremony
697
-
698
- ### Lifecycle
699
-
700
- `Proposed` → `Accepted` → `Deprecated`
701
-
702
- Frontmatter `status:` is the single lifecycle source of truth. An AD stays `Accepted` for as long as its subject is live — revisions rewrite the body and never change the status, and there is **no `Superseded` state**: supersession is an edit plus a changelog entry, not a new document. Set `Deprecated` only when the subject itself is retired (the component is gone, the contract no longer exists); state where the replacement lives, if any.
703
-
704
- ### Naming
705
-
706
- `AD-NNN-short-title.md` — three-digit zero-padded number, kebab-case subject. Numbers are assigned sequentially across the project and never reused.
707
-
708
- ### Structure
709
-
710
- Three sections are required: **Decision**, **Context**, **Consequences** — plus the **Decision Changelog** once the AD has been revised at least once. Everything else is optional — include only when warranted. Decision-first: readers should see the answer in the first paragraph.
711
-
712
- ### Template
713
-
714
- ```markdown
715
- ---
716
- title: "AD-NNN: Short title in sentence case"
717
- status: Accepted # Proposed | Accepted | Deprecated
718
- created: YYYY-MM-DD
719
- last-updated: YYYY-MM-DD # bump on every revision
720
- decision-owner: Name
721
- reviewers: [] # optional
722
- tags: [ad]
723
- ---
724
-
725
- # AD-NNN: Short Title
726
-
727
- ## Decision
728
-
729
- [One paragraph, active voice. "We will…" Lead with the answer — the current answer, whatever the journey was.]
730
-
731
- ## Context
732
-
733
- [The forces in play. What is the problem? Why does it need a decision? Technical, political, social, and project-local pressures — stated as present-tense forces, not as a history of the subject.]
734
-
735
- ## Consequences
736
-
737
- **Positive:**
738
-
739
- - [What becomes easier]
740
-
741
- **Negative:**
742
-
743
- - [What becomes harder, what we accept reluctantly]
744
-
745
- **Risks:**
746
-
747
- - [Second-order effects you can already see, with mitigations if known]
748
-
749
- <!-- Optional sections below. Include only when warranted by the decision's weight. -->
750
-
751
- ## Decision Drivers
752
-
753
- [Hard non-negotiables vs. strong levers. Include when alternatives exist and the criteria aren't self-evident from Context.]
754
-
755
- ## Options Considered
756
-
757
- | Option | Pros | Cons | Outcome |
758
- | ------------ | ---- | ---- | --------------------- |
759
- | **Option A** | … | … | **CHOSEN** |
760
- | Option B | … | … | Eliminated — [reason] |
761
-
762
- ## Deep Comparison
763
-
764
- [Honest framing of the strongest alternative(s). Include when the table doesn't make the reasoning obvious. State the *real* reason each was rejected — not a strawman.]
765
-
766
- ## Architecture in Detail
767
-
768
- [Diagrams, code shape, layer responsibilities. Include when the decision implies non-trivial structure that readers need to understand alongside the *why*. Execution belongs in a plan doc (`docs/history/plans/`) — link to it, don't embed an implementation plan here.]
769
-
770
- ## Open Questions
771
-
772
- 1. **[Question]** — _Default_: [stated default until resolved].
773
-
774
- ## References
775
-
776
- - [External link or cross-reference]
777
-
778
- ## Decision Changelog
779
-
780
- <!-- The provenance tail — append-only, newest first. One entry per revision: what changed, the trigger, the previous choice, and the plan that implemented it. Added on the first revision; the initial acceptance is the last entry. -->
781
-
782
- - YYYY-MM-DD — [What changed] because [trigger]. Implemented by [plan link]. (Previously: [old choice].)
783
- - YYYY-MM-DD — Initial decision accepted. Implemented by [plan link].
784
- ```
785
-
786
- ### Rules
787
-
788
- - **One subject per AD; all its revisions stay inside it.** Two genuinely different subjects means two ADs — a revision of an existing subject never does.
789
- - **The body is always the current truth.** Rewrite affected sections on every revision; never leave a superseded choice narrated in the body — the Decision Changelog carries the journey, with each entry naming the old choice and the trigger.
790
- - Decision-first. The first paragraph after the heading is the answer; readers should not need to scroll.
791
- - **Consequences lists positives, negatives, AND risks.** Pros-only Consequences is the genre's classic failure — one AD's honest resulting context is the input context for the next.
792
- - **Options Considered keeps every genuinely rejected alternative with the real reason.** Informed rejections are the most expensive knowledge to lose; a rejection made with strong prior art in view says so explicitly.
793
- - **Keep it short — one to two pages.** Long decision docs don't get updated. How-it-works detail belongs in the owning feature doc; execution in a plan. Link, don't embed.
794
- - No section numbering (`§5.1.1`). Use markdown headings only — inserting a section shouldn't renumber everything.
795
- - Frontmatter `status` is the single source of truth for lifecycle. Don't also write "Status: Accepted" in the body.
796
- - The Decision Changelog is append-only, newest first. Typo and formatting fixes don't get entries.
797
-
798
- ---
799
-
800
- ## System Overview (docs/architecture/system-design.md)
801
-
802
- 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.
803
-
804
- Required: **What this is**, **Subsystem map**. Optional: Key flows, Where the truth lives.
805
-
806
- ```
807
- # System Overview
808
-
809
- ## What this is
810
-
811
- {Two or three sentences: what the system does, for whom, in what environment it runs.}
812
-
813
- ## Subsystem map
814
-
815
- ┌──────────┐ ┌──────────┐ ┌──────────┐
816
- │ Frontend │────▶│ API │────▶│ DB │
817
- └──────────┘ └──────────┘ └──────────┘
818
- {One box per subsystem; label the arrows with the contract that crosses them.}
819
-
820
- - **{Subsystem}** — one line: what it owns. → [owning doc](../features/{feature}.md)
821
-
822
- ## Key flows
823
-
824
- {At most two or three ASCII flow diagrams for the flows everything else hangs off — request lifecycle, auth, the core domain operation.}
825
-
826
- ## Where the truth lives
827
-
828
- | Area | Canonical doc |
829
- | ---- | ------------- |
830
- | {area} | [{doc}](path) |
831
- ```
832
-
833
- ---
834
-
835
- ## Domain Model (docs/architecture/domain-model.md)
836
-
837
- Truth document. Use for: the entities the system is about — what they are, how they relate, and who owns their state. The vocabulary here must match the glossary and the code; when they disagree, fix the disagreement, don't document around it.
838
-
839
- Required: **Entities**, **Relationships**. Optional: Lifecycle states, Invariants.
840
-
841
- ```
842
- # Domain Model
843
-
844
- ## Entities
845
-
846
- | Entity | What it is | State lives in |
847
- | ------ | ---------- | -------------- |
848
- | {Entity} | {one line} | {table / slice / service} |
849
-
850
- ## Relationships
851
-
852
- - {EntityA} 1—N {EntityB} — {the meaning of the link}
853
- - {EntityB} N—N {EntityC} via {join} — {meaning}
854
-
855
- ## Lifecycle states
856
-
857
- {Only for entities with real state machines.}
858
-
859
- - **{Entity}**: draft → active → archived — {what moves it between states}
860
-
861
- ## Invariants
862
-
863
- - {A relationship or state rule that must always hold, stated as a constraint}
864
- ```
865
-
866
- ---
867
-
868
- ## Glossary (docs/architecture/glossary.md)
869
-
870
- Truth document. Use for: the project's vocabulary — one name per concept, one line per name. Alphabetical. When the code uses a different name than the docs, record it in **In code** so readers can bridge; one concept never gets two doc names.
871
-
872
- ```
873
- # Glossary
874
-
875
- | Term | Meaning | In code |
876
- | ---- | ------- | ------- |
877
- | {Term} | {one-line definition} | `{identifier}` |
878
- ```
879
-
880
- ---
881
-
882
- ## Non-Goals (docs/architecture/non-goals.md)
883
-
884
- 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.
885
-
886
- ```
887
- # Non-Goals
888
-
889
- 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.
890
-
891
- - **{Non-goal}** — {why it's excluded}. Revisit if: {the trigger that would reopen it}.
892
- ```
893
-
894
- ---
895
-
896
- ## API Reference (docs/architecture/api.md)
897
-
898
- Truth document. Use for: the consolidated catalog of the system's HTTP surface — every live route in one place. This is the **index**: request/response shapes stay in the owning feature docs; this doc answers "what exists and where is it documented." If the repo generates an OpenAPI spec, this doc points at it and carries only what the spec can't (auth model, conventions, ownership links).
899
-
900
- Required: **Conventions**, the **route tables**. One row per live route; a route that isn't here doesn't exist.
901
-
902
- ```
903
- # API Reference
904
-
905
- ## Conventions
906
-
907
- - Base path: `/api/v{N}` · Auth: {scheme} · Envelope: `{ "status": 1, "message": "...", "data": {...} }`
908
- - Errors: `{ "status": 0, "message": "...", "data": null }` · Codes: 200/201/400/401/403/404/500
909
-
910
- ## {Resource group}
911
-
912
- | Method | Path | Purpose | Auth | Owning doc |
913
- | ------ | ---- | ------- | ---- | ---------- |
914
- | GET | `/api/foo` | {one line} | {role} | [feature](../features/{feature}.md) |
915
- ```
916
-
917
- ---
918
-
919
- ## Environment Registry (docs/operations/environment.md)
920
-
921
- Truth document. Use for: the config surface — every variable the code reads, in one table. `.env.example` mirrors this doc's variable list.
922
-
923
- **Placeholders only, never real values.** A real-looking password, account ID, or personal profile name in a doc is a leak, and one developer's local setup written as the canonical value is a trap for everyone else. Values in this doc are `{placeholder}` descriptions.
924
-
925
- ```
926
- # Environment Registry
927
-
928
- Every variable the code reads. `.env.example` mirrors this list.
929
-
930
- | Variable | Purpose | Required | Where set | Secret |
931
- | -------- | ------- | -------- | --------- | ------ |
932
- | `DATABASE_URL` | {one line} | yes / default: `{value}` | local `.env` / CI / prod | yes |
933
- ```
934
-
935
- ---
936
-
937
- ## Security Overview (docs/architecture/security.md)
938
-
939
- 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.
940
-
941
- Required: **Trust boundaries**, **Controls**. Optional: Assets, Accepted risks.
942
-
943
- ```
944
- # Security Overview
945
-
946
- ## Assets
947
-
948
- - {What's worth protecting — data classes, credentials, tenant isolation}
949
-
950
- ## Trust boundaries
951
-
952
- - {Boundary} — {what crosses it, and what checks the crossing}
953
-
954
- ## Controls
955
-
956
- | Control | Protects against | Implemented in |
957
- | ------- | ---------------- | -------------- |
958
- | {control} | {threat} | `{file/module}` |
959
-
960
- ## Accepted risks
961
-
962
- - {Risk knowingly carried} — accepted because {reason}; owner: {who}. Revisit if: {trigger}.
963
- ```
964
-
965
- ---
966
-
967
- ## Testing Strategy (docs/tests/strategy.md)
968
-
969
- 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.
970
-
971
- Required: **Levels**, **Running**. Optional: Deliberately untested, Adding a test.
972
-
973
- ```
974
- # Testing Strategy
975
-
976
- ## Levels
977
-
978
- | Layer | Runner | Lives in | Covers |
979
- | ----- | ------ | -------- | ------ |
980
- | Unit / integration | {runner} | `tests/` | {what} |
981
- | E2E | {runner} | `e2e/` | {what} |
982
-
983
- ## Running
984
-
985
- - `{pm} test` — the whole unit suite (CI gate)
986
- - `{pm} run test:e2e` — {when to run}
987
-
988
- ## Deliberately untested
989
-
990
- - {Area} — {why, and what verifies it instead (typecheck, boot check, manual journey)}
991
-
992
- ## Adding a test
993
-
994
- 1. {Where the file goes, what it's named, where fixtures live}
995
- ```
996
-
997
- ---
998
-
999
- ## Project Root README
1000
-
1001
- 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.
1002
-
1003
- ### Strategy
1004
-
1005
- The root README answers, in order:
1006
-
1007
- 1. **What is this?** — one to two sentences, no marketing claims
1008
- 2. **What do I get if I install it?** — capability families
1009
- 3. **What's it built on?** — terse stack list with versions
1010
- 4. **How do I run it?** — the three or four scripts that matter
1011
- 5. **How is it laid out?** — directory tree, one-liner per significant folder
1012
- 6. **How do I extend it?** — numbered contribution checklist
1013
- 7. **What state is it in?** — pre-publish, beta, stable, internal
1014
-
1015
- Skip any section that doesn't apply. Don't pad to fill the template.
1016
-
1017
- ### Writing rules
1018
-
1019
- - **Sentence-case headings.** "Getting started", not "Getting Started".
1020
- - **Concrete over abstract.** Real versions, real paths, real commands. No "leverages cutting-edge…".
1021
- - **The tagline answers "what is this?"** — not "why is it great?". Two sentences max.
1022
- - **Tables for enumeration** (routes, commands, endpoints). **Bullets for families and categories.**
1023
- - **Directory tree as a code block**, not a nested markdown list.
1024
- - **Numbered checklist** for "how to add a thing" — readers should be able to follow it top-to-bottom without re-reading.
1025
- - **Point to `docs/` for depth.** The root README links into deep docs; it doesn't host them.
1026
- - **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.
1027
-
1028
- ### Template
1029
-
1030
- ```markdown
1031
- # {package-name}
1032
-
1033
- {One- to two-sentence positioning. What it is and what scope it covers. No superlatives, no value claims.}
1034
-
1035
- ## What's in the box
1036
-
1037
- - **{Family 1}** — {what's in it; a few specific items, comma-listed.}
1038
- - **{Family 2}** — {what's in it.}
1039
- - **{Family 3}** — {what's in it.}
1040
-
1041
- The full surface lives in [`{path/to/public-index}`]({path/to/public-index}). ← optional pointer for libraries
1042
-
1043
- ## Stack
1044
-
1045
- - {Framework} {version} · {Language} {version}
1046
- - {Build tool} {version}
1047
- - {Other load-bearing deps}
1048
-
1049
- ## Getting started
1050
-
1051
- \`\`\`bash {pm} install {pm} run dev # what it does (port, URL) {pm} run build # what it does {pm} run preview # what it does (omit if not applicable) \`\`\`
1052
-
1053
- {Optional one-liner about first-run behavior — e.g., "Dev server lands on /playground."}
1054
-
1055
- ## {Runtime entry point} ← optional; e.g., "The playground", "CLI", "API endpoints"
1056
-
1057
- {Brief description of the dev/runtime surface.}
1058
-
1059
- | {Thing} | {What it shows / does} |
1060
- | -------------------- | ---------------------- |
1061
- | `{route or command}` | {description} |
1062
-
1063
- ## Layout
1064
-
1065
- \`\`\` src/ ├── {entry-file} # {purpose} ├── {folder}/ # {purpose} │ └── ... └── {folder}/ # {purpose} \`\`\`
1066
-
1067
- ## Adding a {primary unit}
1068
-
1069
- 1. {Drop the source under the right family/folder.}
1070
- 2. {Re-export from the public surface.}
1071
- 3. {Wire into the playground / example app / test harness so reviewers can see it render.}
1072
- 4. {Document any divergence from upstream in `docs/{...}`.}
1073
-
1074
- ## Styling ← optional; replace with whichever cross-cutting concern matters most
1075
-
1076
- {Configuration notes that affect every consumer — design tokens, conventions, opt-outs.}
1077
-
1078
- ## Status
1079
-
1080
- {Pre-publish, beta, stable, internal-only. State what's stable and what's still moving — readers should know whether the API can be relied on.}
1081
-
1082
- ## License
1083
-
1084
- {License name — scope. e.g., "UNLICENSED — internal use only", "MIT".}
1085
- ```
1086
-
1087
- ### Baseline scaffolding behavior
1088
-
1089
- 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.
1090
-
1091
- **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.