@nusoft/nuos-build-catalogue 0.12.0 → 0.14.1

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 (56) hide show
  1. package/dist/cli.js +54 -41
  2. package/dist/commands/init.d.ts +12 -2
  3. package/dist/commands/init.js +136 -74
  4. package/dist/commands/plan.d.ts +12 -0
  5. package/dist/commands/plan.js +83 -0
  6. package/dist/commands/write.js +16 -5
  7. package/dist/path-resolution.d.ts +68 -0
  8. package/dist/path-resolution.js +147 -0
  9. package/dist/runtime/ac-parse.js +10 -6
  10. package/dist/runtime/markdown-edit.d.ts +5 -0
  11. package/dist/runtime/markdown-edit.js +13 -6
  12. package/dist/runtime/mis-adapter.js +7 -2
  13. package/package.json +2 -2
  14. package/templates/hooks/install-hooks.sh +44 -0
  15. package/templates/hooks/post-commit +96 -0
  16. package/templates/hooks/pre-commit +162 -0
  17. package/templates/protocols/end-of-session.md +101 -13
  18. package/templates/protocols/persona-new.md +64 -30
  19. package/templates/protocols/plan-orientation.md +122 -0
  20. package/templates/protocols/start-of-session.md +52 -13
  21. package/templates/protocols/wu-new.md +75 -50
  22. package/templates/starter-kit/docs/build/GLOSSARY.md +115 -0
  23. package/templates/starter-kit/docs/build/STATE.md +30 -16
  24. package/templates/starter-kit/docs/build/WELCOME.md +79 -0
  25. package/templates/starter-kit/docs/build/architecture/_index.md +39 -0
  26. package/templates/starter-kit/docs/build/architecture/module-template.md +47 -0
  27. package/templates/starter-kit/docs/build/contracts/_index.md +39 -0
  28. package/templates/starter-kit/docs/build/contracts/contract-template.md +64 -0
  29. package/templates/starter-kit/docs/build/decisions/_index.md +21 -17
  30. package/templates/starter-kit/docs/build/design-system/_index.md +57 -0
  31. package/templates/starter-kit/docs/build/design-system/accessibility.md +77 -0
  32. package/templates/starter-kit/docs/build/design-system/components/_index.md +29 -0
  33. package/templates/starter-kit/docs/build/design-system/components/_template.md +60 -0
  34. package/templates/starter-kit/docs/build/design-system/patterns/_index.md +37 -0
  35. package/templates/starter-kit/docs/build/design-system/patterns/_template.md +57 -0
  36. package/templates/starter-kit/docs/build/design-system/tokens-colour.md +52 -0
  37. package/templates/starter-kit/docs/build/design-system/tokens-motion.md +42 -0
  38. package/templates/starter-kit/docs/build/design-system/tokens-radius-elevation.md +34 -0
  39. package/templates/starter-kit/docs/build/design-system/tokens-spacing.md +48 -0
  40. package/templates/starter-kit/docs/build/design-system/tokens-typography.md +46 -0
  41. package/templates/starter-kit/docs/build/design-system/voice.md +53 -0
  42. package/templates/starter-kit/docs/build/maps/01-template.md +15 -112
  43. package/templates/starter-kit/docs/build/maps/02-template.md +52 -0
  44. package/templates/starter-kit/docs/build/maps/03-template.md +46 -0
  45. package/templates/starter-kit/docs/build/maps/99-template-power-user-operational-plan.md +126 -0
  46. package/templates/starter-kit/docs/build/maps/_index.md +17 -52
  47. package/templates/starter-kit/docs/build/open-questions/_index.md +27 -13
  48. package/templates/starter-kit/docs/build/personas/_index.md +26 -60
  49. package/templates/starter-kit/docs/build/risks/_index.md +20 -13
  50. package/templates/starter-kit/docs/build/sessions/_index.md +18 -16
  51. package/templates/starter-kit/docs/build/ui-ux/_index.md +48 -0
  52. package/templates/starter-kit/docs/build/ui-ux/surface-template.md +72 -0
  53. package/templates/starter-kit/docs/build/work-units/001-template-simple.md +43 -0
  54. package/templates/starter-kit/docs/build/work-units/_index.md +18 -20
  55. package/templates/starter-kit/methodfile.json +19 -8
  56. /package/templates/starter-kit/docs/build/work-units/{001-template.md → 001-template-full.md} +0 -0
@@ -1,52 +1,77 @@
1
1
  # wu-new
2
2
 
3
- Create a new work unit (WU) for this NuOS Build Method project.
4
-
5
- If arguments are provided (`$ARGUMENTS` for OpenCode/Claude Code, prompt-supplied for Codex), use them as the WU title; otherwise prompt the operator for the title.
6
-
7
- The WU template carries the **six-field outcome shape** (per D046): persona link, trigger, walkthrough with failure paths, verification (= acceptance criteria), contracts produced, contracts consumed. For infrastructure WUs (build, publish, hardening, refactors) the persona/trigger/walkthrough fields are marked `N/A — infrastructure WU` and the rest is unchanged.
8
-
9
- Steps:
10
-
11
- 1. **Determine the next available WU number.** Scan `docs/build/work-units/` and `docs/build/work-units/done/` for the maximum 3-digit prefix. The new number is max + 1.
12
- 2. **Slugify the title** — lowercase, dashes for spaces, no special characters, max 60 chars.
13
- 3. **Ask the operator: is this an outcome WU (a user-facing capability) or an infrastructure WU (build, publish, hardening, refactor)?** If outcome, walk the full six-field flow. If infrastructure, skip persona/trigger/walkthrough and ask for the technical artefacts directly.
14
- 4. **Generate the file** at `docs/build/work-units/<NNN>-<slug>.md` from the template at `starter-kit/docs/build/work-units/001-template.md`. Replace placeholders with operator-supplied values.
15
- 5. **Prompt the operator (outcome WU) for:**
16
- - **Persona** — which P-NNN persona does this outcome serve? If none exists yet, prompt to run `persona-new` first. For paired outcomes (a customer-side outcome paired with an organiser-side one), capture both persona links.
17
- - **Trigger** — the real-world event that makes this outcome necessary. Not a UI click; the event in the persona's life that created the need.
18
- - **Outcome** — one paragraph. Apply the single-sentence test: *"What will be true when this is done that is not true now?"* That sentence is the outcome.
19
- - **Walkthrough** numbered steps from the persona's perspective. For each step, surface the **five failure-path injection points**: (1) what if the persona cannot complete this step in one sitting? (2) what if the information is incorrect or missing? (3) what if the system itself fails? (4) what if the persona makes a mistake? (5) what if they realise immediately afterwards they used the wrong information? Failure handling lives inline at each step, not as a separate section.
20
- - **Acceptance criteria (= verification)** — 5 to 10 criteria, each phrased as an inspection that passes or fails. Apply the auditor's-question test: *"Can a third-party reader confirm 'yes, this is shipped' by inspection alone?"* Each criterion must be evaluable by a person looking at the running system, not inferred from technical state.
21
- - **Contracts produced** — what this WU makes available to other WUs once it lands, in domain language. Not "a row in the bookings table"; "a confirmed booking record, linked to a specific customer and a specific event".
22
- - **Contracts consumed** — what must already exist before this WU can run. Each entry should map to another WU's `Contracts produced` field. If something this WU consumes is not produced by any WU in the plan, surface that gap immediately file it as an open question or a new WU before this one starts.
23
- - **Dependencies** — existing WU numbers this depends on (drawn from the contracts-consumed mapping; blank if none).
24
- - **Decision implemented** — D-NNN if any (blank for none).
25
- - **Forward-compatibility commitments** — if this WU's shape decisions affect later WUs, name them (per Pattern C).
26
- 6. **Prompt the operator (infrastructure WU) for:**
27
- - **Outcome** — single-sentence test as above.
28
- - **Acceptance criteria** same discipline.
29
- - **Dependencies, decision implemented, forward-compatibility commitments** — same as outcome WU.
30
- - **Persona / Trigger / Walkthrough** auto-filled with `N/A infrastructure WU.`
31
- - **Contracts produced** — list the technical artefacts (e.g., "`@nusoft/nuwiki@0.1.4` published privately on npm").
32
- - **Contracts consumed** list the WUs whose output this WU builds on.
33
- 7. **Apply the four quality traps** to the outcome before saving (operator review, not enforced by tooling today):
34
- - **Vagueness:** could this outcome be implemented in more than one way that satisfies its wording but produces different user experiences?
35
- - **Technical language:** does any part describe implementation rather than behaviour?
36
- - **Happy path only:** does the walkthrough describe only what happens when everything goes right?
37
- - **Kitchen sink:** does this WU try to do more than one thing? Could it be split into two outcomes with separate triggers and separate verification?
38
-
39
- Surface any traps that fired and offer to rewrite the affected section before saving.
40
- 8. **Add a row to `docs/build/work-units/_index.md`** in the appropriate phase section, with status `🟢 ready` (or `🔵 proposed` if dependencies aren't met).
41
- 9. **If the WU cites a P-NNN, update that persona's `Used by WUs` list** to include the new WU.
42
- 10. **Surface to the operator:**
43
- - The new WU file path (clickable)
44
- - The row added to `_index.md`
45
- - Any inferred dependencies that should be confirmed
46
- - Any quality traps that fired and were addressed (or deferred to a later refinement)
47
-
48
- **Discipline:** every acceptance criterion must be checkable by inspection, not described as a feature. *"The login page works"* is not an acceptance criterion. *"When a user submits a valid form, a row appears in `users` and an audit entry in `audit_events`"* is.
49
-
50
- **On the six-field shape (per D046):** the planning depth is what makes the catalogue durable. Skipping persona/trigger/walkthrough for an outcome WU produces a feature wearing an outcome-shaped name. Skipping contracts produced/consumed produces an outcome that integrates with nothing. The fields are not bureaucracy; each one closes a category of silent assumption the LLM teammate would otherwise fill in invisibly.
51
-
52
- If the operator pushes back on the auto-numbered slug or wants to adjust acceptance criteria, accommodate. The catalogue's strength is that the operator is in charge of the substance; the protocol just makes sure the substance is recorded properly.
3
+ You are filing a new **work unit** for a project that uses the **NuOS Build Method catalogue**. A work unit is one concrete thing the project will build. The catalogue's value compounds as work units accumulate notes — every session adds to the record of what was attempted, what worked, what didn't, what was learned.
4
+
5
+ **The operator is most likely a domain expert, not a software engineer.** Plain English throughout. Use their words. Define any term you use that isn't obvious from context.
6
+
7
+ ---
8
+
9
+ ## Step 1 — Ask what kind of work unit this is
10
+
11
+ By default, walk the **simple shape** four conversational questions. Use it for everyday product work. The full shape (13 fields, infrastructure language, contracts produced/consumed) is opt-in via `--full`; suggest it only if the operator is filing infrastructure work (build pipelines, publishing flow, refactors).
12
+
13
+ > "Quick check before we file this: is this one piece of user-facing work a feature, a screen, an outcome someone will use or is it infrastructure (a build pipeline, a refactor, a publish flow)?"
14
+
15
+ If user-facing → simple shape. If infrastructure full shape.
16
+
17
+ ## Step 2 Walk the four-field simple shape (the default)
18
+
19
+ Ask in conversation; don't read out the four fields as a list. Weave them.
20
+
21
+ 1. **Title** — *"In five words or so, what's this work unit about?"*
22
+ 2. **Outcome** — *"What's true after this ships that isn't true now? Just a sentence."*
23
+ 3. **Walkthrough** — *"Tell me a story. Walk me through what [persona name] does when this is in place. What do they see? What do they do? And what could go wrong — what if information's missing, or the system fails, or they make a mistake?"*
24
+ 4. **How we'll know it's done** — *"List 3 to 6 things we could check to know this is done. Each one should be either yes or no — not 'better' or 'worse'."*
25
+
26
+ Also ask:
27
+
28
+ - **Which persona is this for?** Show them the list from `docs/build/personas/`. If none yet, file a persona first via `/persona-new`.
29
+
30
+ ## Step 3 Walk the full shape (only when --full or for infrastructure work)
31
+
32
+ The full shape has the four fields above plus:
33
+
34
+ - **Trigger** the real-world event in someone's day that makes them need this
35
+ - **Contracts produced** what this work unit makes available to other work units once it lands; in everyday language
36
+ - **Contracts consumed** what must already be in place for this work unit to start
37
+ - **Dependencies** other work units this depends on
38
+ - **Decision implemented** — D-NNN if this work unit realises a specific decision
39
+ - **Forward-compatibility commitments** any choices made here that affect later work units
40
+
41
+ For infrastructure work, persona / trigger / walkthrough are marked `N/A infrastructure work`.
42
+
43
+ ## Step 4 File the work unit
44
+
45
+ 1. **Number it.** Scan `docs/build/work-units/` and `docs/build/work-units/done/` for the highest existing 3-digit prefix; new number is max + 1.
46
+ 2. **Slugify the title.** Lowercase; dashes for spaces; no special characters; cap at 60 chars.
47
+ 3. **Write the file** at `docs/build/work-units/NNN-slug.md`. Use `001-template-simple.md` for the simple shape, `001-template-full.md` for the full shape.
48
+ 4. **Add a row** to `docs/build/work-units/_index.md`. Status `🔵 proposed` if dependencies aren't met yet, otherwise `🟡 in flight` (if work is starting now) or leave `🔵 proposed` if it's queued.
49
+ 5. **If a persona is cited**, update that persona's "Used by" list to include this work unit.
50
+
51
+ ## Step 5 — Surface to the operator
52
+
53
+ Tell them in plain English:
54
+
55
+ - Where the file landed (clickable path)
56
+ - That the index was updated
57
+ - Anything you noticed during the conversation that's worth flagging (e.g. "this work unit and WU 007 both touch the morning briefing — they might depend on each other; do you want to link them?")
58
+ - The next concrete action
59
+
60
+ ## What to watch for
61
+
62
+ Four quality issues come up during a work-unit conversation. Surface them gently, don't lecture:
63
+
64
+ - **Vagueness** — *"Could this be built in two different ways and both satisfy what you've said? Worth tightening?"*
65
+ - **Technical language slipping in** — *"You said 'an API endpoint that returns a JSON response' — what does the teacher actually see or do?"*
66
+ - **Only the happy path** — *"What happens if the data isn't ready, or they hit save twice?"*
67
+ - **Too big** — *"This feels like two work units to me. Want to split it?"*
68
+
69
+ The catalogue's strength is that the operator is in charge of the substance; the protocol just makes sure the substance gets captured properly.
70
+
71
+ ---
72
+
73
+ ## Why this matters
74
+
75
+ Work units are how the project's work compounds. A work unit filed today is a hook for a future session to add notes against, a contract for other work units to plug into, an entry in the project's audit trail. Sloppy work units rot. Sharp work units accumulate value.
76
+
77
+ If the operator wants to skip a question because the answer feels obvious, ask one more time gently — and then let them skip. The catalogue doesn't enforce content quality; it enforces *capture*. Captured-but-thin is better than not captured at all.
@@ -0,0 +1,115 @@
1
+ # Glossary
2
+
3
+ Every term this catalogue uses, defined once in plain English. If you see a term you don't recognise in any file, this is where to look.
4
+
5
+ ## Acceptance Criteria
6
+
7
+ How you'll know a piece of work is done. A short list — usually 3 to 6 lines — where each line is something you can check by looking. Each should be either yes or no, not "better" or "worse". Often abbreviated **AC**.
8
+
9
+ > Example: "When a teacher opens the morning briefing, they see their three highest-need students at the top of the screen."
10
+
11
+ ## Architecture
12
+
13
+ The big pieces of your project and how they fit together. Filed in `architecture/`. Different from contracts: architecture is about *what the pieces are*; contracts are about *what they exchange*.
14
+
15
+ ## Catalogue
16
+
17
+ This whole folder — `docs/build/` — and everything in it. It's your project's memory: who it's for, what's built, what's been decided, what's still unknown. The catalogue is updated at the start and end of every session so future-you (or anyone joining) can pick up without needing to be told.
18
+
19
+ ## Drift (and why we never let it happen)
20
+
21
+ Drift is when the project's reality diverges from what the catalogue says. Someone makes a decision in conversation and forgets to file it. Someone changes their mind about a persona but the persona file still says the old thing. Two weeks later a new contributor reads the catalogue, builds against what it says, and the work is wrong.
22
+
23
+ **The no-drift rule is the catalogue's load-bearing commitment.** Every decision made in conversation gets saved to the catalogue before the session ends. Every change to an existing artefact flows through the protocol that keeps the catalogue and its search index in sync. The pre-commit hook blocks modifications to accepted decisions (so you can't edit them silently — you have to file a superseding decision and link forward). The post-commit hook auto-refreshes the search index after every commit, so what the AI finds when you ask "what did we decide about X?" is always current.
24
+
25
+ If the AI is asked something and the answer would normally come from project memory but the memory hasn't captured something said in conversation, **the AI should pause the conversation and file the missing artefact first**, then resume. Drift isn't a small problem; it's the failure mode that makes the whole catalogue worthless.
26
+
27
+ ## Contract
28
+
29
+ What a piece of your project guarantees it will provide to other pieces, and what it expects from them in return. Filed one per major piece, in `contracts/`. Written in everyday language — "facts about the world the system now knows" — not database tables or API endpoints.
30
+
31
+ > Example: "Overnight Consolidation contract — produces a per-student plan for tomorrow, ranked by need. Consumes today's record of every interaction with that student."
32
+
33
+ ## Decision
34
+
35
+ A choice that's been made and shouldn't drift. Filed in `decisions/` as **D001**, **D002**, etc. Once a decision is accepted, it doesn't get edited — if circumstances change, file a new decision that supersedes the old one and link forward. Decisions are the project's load-bearing commitments.
36
+
37
+ > When to file one: when you're choosing between two reasonable approaches; when you're adopting a constraint future work must honour; when you're overriding something previously decided.
38
+
39
+ ## Design System
40
+
41
+ The shared visual and interaction language every part of the user-facing project uses. Filed in `design-system/`. Includes:
42
+
43
+ - **Tokens** — colour, typography, spacing, radius, shadow, motion — the smallest atomic units
44
+ - **Components** — the buttons, inputs, cards, modals, navigation elements; each with its variants, states, and accessibility commitments
45
+ - **Patterns** — how components combine into recurring layouts (forms, lists, page templates)
46
+ - **Voice & tone** — how the project speaks in writing (microcopy, error messages, empty states)
47
+ - **Accessibility commitments** — what the project promises (e.g. AA contrast minimum, keyboard-navigable, screen-reader-tested)
48
+
49
+ The design system is end-to-end: every per-surface file in `ui-ux/` references it; every implementation in code consumes it. Changes to design tokens propagate everywhere automatically, so the system stays consistent as it grows.
50
+
51
+ ## Handle
52
+
53
+ The short identifier for any catalogue item: **WU 001**, **D012**, **Q003**, **P002**, **R005**, **M003**. Letters identify the register (Work Unit, Decision, Open Question, Persona, Risk, Map). Numbers run sequentially as items are filed.
54
+
55
+ ## Map
56
+
57
+ A picture of where the project is going. Three of them by default:
58
+
59
+ - **Map 1 — The Horizon**: the whole journey in plain language, written once and updated only when the destination changes
60
+ - **Map 2 — Phases in Detail**: what each phase delivers, with entry and exit conditions
61
+ - **Map 3 — The Near-Term Plan**: what's happening this week or this month
62
+
63
+ Filed in `maps/`.
64
+
65
+ ## Open Question
66
+
67
+ Something the project hasn't decided yet but might need to. Filed in `open-questions/` as **Q001**, **Q002**, etc. When an open question gets resolved, it becomes a Decision (or it becomes obvious and gets closed). The open-questions register is where uncertainty lives until it's ready to settle.
68
+
69
+ ## Outcome
70
+
71
+ What's true after a piece of work ships that wasn't true before. Written as one sentence. The single-sentence test: *can you say what changed in the world?*
72
+
73
+ > Example: "Teachers can see tomorrow's high-priority students before they go home tonight."
74
+
75
+ ## Persona
76
+
77
+ One specific person the project serves. Not a market segment ("teachers"), not a demographic ("women aged 30-50") — one person with a name and a situation. Personas are first-class because everything downstream — work units, UI/UX surfaces, contracts — hangs off who specifically you're building for. Filed in `personas/` as **P001**, **P002**, etc.
78
+
79
+ The seven dimensions of a persona: identity, reality (where they are when they need this), psychology, trigger (what brought them here), history, success (what done looks like for them), constraints (what they cannot or will not do).
80
+
81
+ ## Risk
82
+
83
+ Something that could go wrong and would matter if it did. Filed in `risks/_index.md`. Severity scale:
84
+
85
+ - **High** — blocks work or threatens a decision
86
+ - **Medium** — would slow things materially
87
+ - **Low** — worth tracking; not blocking
88
+
89
+ ## Session
90
+
91
+ A period of focused work — could be an hour, could be an afternoon. Each session starts with `/start-of-session` (which shows you where the project is) and ends with `/end-of-session` (which writes down what just happened). Filed in `sessions/`, one entry per session.
92
+
93
+ ## Surface
94
+
95
+ A piece of the user-facing experience. A page, a screen, a modal, a command-line prompt, an email the user receives — anything they see or interact with. Each surface gets its own file in `ui-ux/`. Different from a screen mockup: a surface file says *who uses it, what they see, what they do, what happens next, which contracts it touches.*
96
+
97
+ ## Trigger
98
+
99
+ The real-world event that makes someone need an outcome. Not a UI interaction — the moment in the persona's day or week that creates the need.
100
+
101
+ > Example trigger for a teacher persona: "It's 4pm on a Tuesday. The teacher is finishing up. Tomorrow's class includes three students with high SEN needs and one new arrival." That's the trigger. "Clicking the planning button" is not.
102
+
103
+ ## UI/UX
104
+
105
+ Short for "user interface and user experience". The catalogue treats UI/UX as a first-class register at `ui-ux/`. One file per surface (see above). Captures the user-facing shape of the project: what people see, what they do, what happens.
106
+
107
+ ## Walkthrough
108
+
109
+ A story of what happens, told from the persona's perspective. Numbered steps describing what they do, what they see, what happens next. Walkthroughs include failure paths — what happens if information is missing, if they make a mistake, if the system fails, if they need to come back tomorrow. Walkthroughs are how outcomes get checked: if you can walk through the persona's day with this in place, you understand what you're building.
110
+
111
+ ## Work Unit
112
+
113
+ One concrete thing the project will build. Filed in `work-units/` as **WU 001**, **WU 002**, etc. Each has a title, an outcome, a walkthrough, and acceptance criteria. Often abbreviated **WU**. Work units are the unit of progress — when one is done, something has changed in the world.
114
+
115
+ > When to file one: when you're about to start work that you'll want to track. The catalogue's value compounds with accumulated work-unit notes — every session adds to the record of *what was attempted, what worked, what didn't, what was learned.*
@@ -1,14 +1,26 @@
1
- # {{PROJECT_NAME}} — Always-Current State
1
+ # {{PROJECT_NAME}} — where we are right now
2
2
 
3
- > The single snapshot read at the start of every session. If anything important is not here, it is not real. Update this file at the end of every session via the end-of-session protocol.
3
+ > This file is the snapshot read at the start of every session. If anything important about the project's current state is not here, it is not real. The end-of-session protocol updates this file every time work stops.
4
4
 
5
5
  **Last updated:** {{TODAY}}
6
- **Active phase:** Phase 0 — bootstrap
7
- **Active work unit:** WU 001 — [first work unit name]
6
+
7
+ ## Planning progress
8
+
9
+ This project is at the start of its planning arc. The AI will walk you through five phases before you begin building. Each phase is its own session.
10
+
11
+ | Phase | What it produces | Status |
12
+ | --- | --- | --- |
13
+ | A — Orientation | Project description, 1-3 personas, the horizon map | 🔵 not yet started |
14
+ | B — Architecture & Contracts | The major pieces of the project and what they exchange | 🔵 not yet started |
15
+ | C — UI/UX + Design System | The user-facing surfaces and the shared visual language | 🔵 not yet started |
16
+ | D — Maps | Phases of work and the near-term plan | 🔵 not yet started |
17
+ | E — Initial Work Units | The first 5-10 things to build, in dependency order | 🔵 not yet started |
18
+
19
+ When you run `/start-of-session` on this fresh project, the AI will see this tracker and offer to begin Phase A.
8
20
 
9
21
  ## What is currently in flight
10
22
 
11
- [One paragraph describing what work is happening right now. Edit when work changes shape.]
23
+ [Filled in once Phase A is underway. Today, this is a brand-new catalogue with no work in flight yet.]
12
24
 
13
25
  ## What just shipped
14
26
 
@@ -16,7 +28,7 @@ Nothing yet — this catalogue was just adopted on {{TODAY}}.
16
28
 
17
29
  ## What is next
18
30
 
19
- [The next concrete action. Should be specific enough that an LLM teammate can pick it up and start without further context.]
31
+ Run `/start-of-session` to begin. The AI will read this file and walk you through Phase A of planning.
20
32
 
21
33
  ## Open questions blocking progress
22
34
 
@@ -32,16 +44,18 @@ None currently filed. Filed risks live in [`risks/_index.md`](risks/_index.md).
32
44
  | --- | --- | --- |
33
45
  | _none yet_ | | |
34
46
 
35
- ## Work units in flight
47
+ ## Active work units
48
+
49
+ | Work Unit | Status | Notes |
50
+ | --- | --- | --- |
51
+ | _none yet — phase E of planning produces the first batch_ | | |
36
52
 
37
- | WU | Status | Owner | Notes |
38
- | --- | --- | --- | --- |
39
- | WU 001 | 🟡 in flight | — | First work unit |
53
+ ## How to read this file
40
54
 
41
- ## Status legend
55
+ - **Planning progress** shows where you are in the 5-phase arc that takes a brand-new project to "ready to build"
56
+ - **What is currently in flight** describes ongoing work; updated when work changes shape
57
+ - **What just shipped** notes the most recent completion(s)
58
+ - **What is next** points at the immediate concrete action
59
+ - Below: open questions, risks, decisions, and active work units — pulled from their respective registers for quick scanning
42
60
 
43
- - 🔵 **proposed** written down, not yet started
44
- - 🟡 **in flight** — actively being worked on
45
- - 🟣 **built / awaiting review** — implementation done, review pending
46
- - ✅ **merged / shipped** — complete and integrated
47
- - 🔴 **blocked** — cannot proceed; see notes for blocker
61
+ This file is the project's executive summary. The detail lives in the register files; this is the one-screen view that says where the project is.
@@ -0,0 +1,79 @@
1
+ # Welcome — what this catalogue is, and how it works
2
+
3
+ You're looking at the **catalogue** for {{PROJECT_NAME}}. It's your project's memory. Read this once and you'll understand the whole shape. It takes five minutes.
4
+
5
+ ## What the catalogue is for
6
+
7
+ A real project — one that handles real complexity — has more moving parts than anyone can hold in their head. Who's it for? What does each piece do? What did we decide last month? What are we still unsure about? What's at risk? Without a place to keep all of this, you end up rebuilding the same understanding over and over, every time you sit down to work, every time someone new joins, every time you open a fresh chat with an AI.
8
+
9
+ The catalogue solves that. Everything load-bearing about your project lives here in plain Markdown files, organised into ten **registers**. The catalogue stays current through two protocols — `/start-of-session` and `/end-of-session` — that run at the bookends of every period of work.
10
+
11
+ You don't have to remember any of it. The catalogue does.
12
+
13
+ ## The principle that makes it work
14
+
15
+ **Project memory never drifts from project reality.** Every decision made in conversation gets saved before the session ends. Every change to an existing piece flows through a protocol that keeps the catalogue and its search index in sync. The pre-commit hook blocks silent edits to accepted decisions. The post-commit hook auto-refreshes the search index after every commit. The AI you're working with reads from the catalogue and writes back to it; what it finds when you ask "what did we decide about X?" is always current.
16
+
17
+ If anything ever feels out of date, that's a bug, not a feature. The repair is to file the missing piece before continuing.
18
+
19
+ ## How a project gets built
20
+
21
+ A project starts with a 5-phase **planning arc** the AI walks you through. Each phase is its own session. By the end of the arc, the catalogue has the substrate that makes everything downstream coherent.
22
+
23
+ 1. **Orientation** (~30 min) — what is this project, who's it for. You'll describe the project in your own words and name 1-3 specific people it serves.
24
+
25
+ 2. **Architecture & Contracts** (~60-90 min) — what are the major pieces, what does each one provide to the others. The shape of the system in everyday language.
26
+
27
+ 3. **UI/UX + Design System** (~60-90 min) — every page, screen, modal, or command the user touches, plus the complete design system (colour, typography, spacing, components, patterns, voice, accessibility commitments) that every surface uses. End-to-end: a surface in `ui-ux/` references components in `design-system/`; a component carries tokens; tokens propagate everywhere. The system stays consistent as it grows because everything references one shared language.
28
+
29
+ 4. **Maps** (~45 min) — the journey from now to done. Phases. What's happening this week, this month.
30
+
31
+ 5. **Initial Work Units** (~60 min) — the first 5 to 10 concrete things to build, ordered by what depends on what.
32
+
33
+ After phase 5, you start building. Every session from then on follows the same shape: `/start-of-session` shows where you are, you work, `/end-of-session` writes down what just happened.
34
+
35
+ ## The eleven registers
36
+
37
+ | Register | What lives here | Handle |
38
+ | --- | --- | --- |
39
+ | **personas/** | One file per specific person the project serves | P001, P002… |
40
+ | **maps/** | The horizon, the phases, the near-term plan | M001, M002, M003 |
41
+ | **architecture/** | What the major pieces are and how they relate | (per-module files) |
42
+ | **contracts/** | What each piece provides to the others | (per-contract files) |
43
+ | **ui-ux/** | Every user-facing surface (page, screen, command, email) | (per-surface files) |
44
+ | **design-system/** | The shared visual + interaction language every surface uses (tokens, components, patterns, voice) | (per-piece files) |
45
+ | **decisions/** | Choices made and not to be drifted from | D001, D002… |
46
+ | **open-questions/** | Things we haven't decided yet | Q001, Q002… |
47
+ | **work-units/** | Concrete things being built | WU 001, WU 002… |
48
+ | **risks/** | Things that could go wrong | R001, R002… |
49
+ | **sessions/** | A log of every period of work | one file per session |
50
+
51
+ The full vocabulary lives in [`GLOSSARY.md`](GLOSSARY.md). Read it once; come back when you need it.
52
+
53
+ ## The three commands you need
54
+
55
+ Everything else is automatic.
56
+
57
+ ```text
58
+ npx @nusoft/nuos-build-catalogue init — once, when starting a new project
59
+ /start-of-session — every time you begin working
60
+ /end-of-session — every time you stop
61
+ ```
62
+
63
+ `/start-of-session` reads where you are, what just happened, what's next, and surfaces any blockers. If this is the very first session on a fresh project, it routes you into the orientation phase of the planning arc.
64
+
65
+ `/end-of-session` writes down what was attempted, what worked, what didn't, what was learned. It commits. The catalogue's search index updates in the background.
66
+
67
+ That's it. The catalogue handles the rest.
68
+
69
+ ## What never to do
70
+
71
+ - **Never close a session without `/end-of-session`.** Work that isn't written down is work that's lost.
72
+ - **Never edit an accepted decision file.** If something changes, file a new decision that supersedes the old one. The pre-commit hook will block silent edits.
73
+ - **Never make an architectural decision in conversation without filing it.** If the AI says "let's go with X" and you agree, file it as a decision *before moving on*. Drift is the failure mode that makes the catalogue worthless.
74
+
75
+ ## Where to go from here
76
+
77
+ - **Brand new project?** Run `/start-of-session`. The AI will walk you through phase 1 of planning. By the end of today you'll have the project oriented.
78
+ - **Returning to existing work?** Same — `/start-of-session` reads STATE.md, the latest session log, and the active work unit. You'll be told where you are and what's next within a minute.
79
+ - **Want to look around first?** Open [`STATE.md`](STATE.md) for the current snapshot, [`maps/01-the-horizon.md`](maps/01-the-horizon.md) for the whole-project picture, or [`GLOSSARY.md`](GLOSSARY.md) for any term you don't recognise.
@@ -0,0 +1,39 @@
1
+ # Architecture
2
+
3
+ The **architecture** register describes the major pieces of {{PROJECT_NAME}} and how they relate. Each major piece (module, service, surface, area of responsibility) gets its own file. The architecture is *what the pieces are*; the [contracts register](../contracts/_index.md) is *what they exchange*. See [the glossary](../GLOSSARY.md#architecture) for the full definition.
4
+
5
+ ## Index
6
+
7
+ | Module | Purpose | Status |
8
+ | --- | --- | --- |
9
+ | _none yet — populated during the Architecture phase of planning (phase B)_ | | |
10
+
11
+ ## What goes in this register
12
+
13
+ For each major piece of your project:
14
+
15
+ - **What it does** — a paragraph in plain language
16
+ - **Who's responsible for it** — which persona or role uses it most directly
17
+ - **What it depends on** — other modules, external services, hardware
18
+ - **What depends on it** — what would break if this module went away
19
+ - **Open questions about it** — anything unresolved about its shape
20
+ - **Links to relevant contracts** — what this module produces and consumes
21
+
22
+ Architecture files are *what's true about each piece*; they're not implementation specs. Implementation lives in code; this register lives in the catalogue.
23
+
24
+ ## When the architecture register gets populated
25
+
26
+ During the **Architecture & Contracts** phase of planning (phase B), after the orientation phase. The AI walks you through identifying the major pieces of your project — usually 3-7 modules for a starting project — and helps you file one architecture entry per module.
27
+
28
+ ## How architecture connects to everything else
29
+
30
+ - Every work unit names which module it lives in
31
+ - Every contract belongs to exactly one module (the one that owns it)
32
+ - Every UI/UX surface references which modules it talks to
33
+ - Architecture changes (a module splits, two modules merge, a new module enters scope) get filed as decisions
34
+
35
+ ## How to add a module
36
+
37
+ During planning: the AI does this for you via `nuos-catalogue architecture create`.
38
+
39
+ Outside planning: copy `module-template.md` to `<short-module-name>.md`, fill it in, and add a row to the table above. Use `nuos-catalogue architecture create` if you want the interactive prompts.
@@ -0,0 +1,47 @@
1
+ # [Module name]
2
+
3
+ > *Replace bracketed placeholders. Delete this hint block once filled in.*
4
+
5
+ **Status:** 🔵 proposed / 🟡 in flight / 🟢 active / ⚫ retired
6
+ **Owner:** [persona handle and name — or "infrastructure" if not user-facing]
7
+ **Last updated:** {{TODAY}}
8
+
9
+ ## What this module does
10
+
11
+ [One paragraph in plain language. Avoid implementation language. Describe the responsibility, not the code.]
12
+
13
+ > Example: "The Overnight Consolidation module processes every interaction with a student during a school day and produces, by morning, a per-student plan ranked by need."
14
+
15
+ ## Who uses it directly
16
+
17
+ [List the personas who interact with this module via UI/UX surfaces. Each as `[P001](../personas/P001-name.md)` with a one-line note on how they use it.]
18
+
19
+ ## What it depends on
20
+
21
+ - **Other modules:** [list with links to their architecture files]
22
+ - **External services:** [APIs, vendors, hardware]
23
+ - **Hardware or infrastructure:** [if relevant]
24
+
25
+ ## What depends on it
26
+
27
+ [What would break if this module went away or returned wrong results? List the affected modules + the affected user-facing surfaces.]
28
+
29
+ ## Contracts this module owns
30
+
31
+ [List the contracts in `contracts/` that this module produces. One per row.]
32
+
33
+ | Contract | What it provides |
34
+ | --- | --- |
35
+ | [contract handle/file] | [one-line description] |
36
+
37
+ ## Open questions about this module
38
+
39
+ [Link to Q-NNN entries in `open-questions/` that affect this module specifically. If none yet, write _none currently_.]
40
+
41
+ ## Decisions specific to this module
42
+
43
+ [Link to D-NNN entries that affect just this module. Cross-cutting decisions can stay in the decisions register without being linked here.]
44
+
45
+ ## Notes
46
+
47
+ [Date-stamped notes about how this module has evolved. Use this section the way you'd use a work unit's notes section — what was tried, what worked, what didn't.]
@@ -0,0 +1,39 @@
1
+ # Contracts
2
+
3
+ A **contract** is what one piece of the project guarantees it will provide to other pieces — and what it expects from them in return. Written in everyday language: "facts about the world the system now knows", not database tables or API endpoints. The contracts register is where the project commits to what each piece is responsible for. See [the glossary](../GLOSSARY.md#contract) for the full definition.
4
+
5
+ ## Index
6
+
7
+ | Contract | Owner module | Status |
8
+ | --- | --- | --- |
9
+ | _none yet — populated during the Architecture phase of planning (phase B)_ | | |
10
+
11
+ ## What a contract captures
12
+
13
+ For each major module, one contract describes:
14
+
15
+ - **What this module produces** — the facts, capabilities, or guarantees other modules can rely on. *"After Overnight Consolidation runs, every active student has a tomorrow-plan ranked by need."*
16
+ - **What this module consumes** — what must already be in place for this module to do its job. *"Overnight Consolidation needs today's interaction records for every active student."*
17
+ - **What it does not provide** — things adjacent that someone might assume are included but aren't. Naming the negative space prevents drift.
18
+ - **How it fails** — what happens if its inputs are missing, late, or wrong; what downstream modules can rely on as the failure behaviour.
19
+
20
+ Contracts are **load-bearing commitments**. They're the boundaries between modules — and they don't drift silently. If a contract changes, that's an architectural decision that gets filed.
21
+
22
+ ## When the contracts register gets populated
23
+
24
+ During the **Architecture & Contracts** phase of planning (phase B). The AI walks you through one contract per module. Each contract gets filed as you go.
25
+
26
+ After planning, contracts evolve. Adding a new produced fact, or relaxing a consumed precondition, is usually a decision — file it in the decisions register and update the contract to match.
27
+
28
+ ## How contracts connect to everything else
29
+
30
+ - Every contract belongs to exactly one module (the architecture file in `architecture/`)
31
+ - Every work unit names which contract(s) it produces or consumes
32
+ - Every UI/UX surface references the contracts it talks to
33
+ - Contract changes get filed as decisions
34
+
35
+ ## How to add a contract
36
+
37
+ During planning: the AI does this for you via `nuos-catalogue contract create`.
38
+
39
+ Outside planning: copy `contract-template.md` to `<short-name>.md`, fill it in, and add a row to the table above. Or use `nuos-catalogue contract create` for the interactive prompts.
@@ -0,0 +1,64 @@
1
+ # Contract: [module name]
2
+
3
+ > *Replace bracketed placeholders. Delete this hint block once filled in.*
4
+
5
+ **Owner module:** [link to the architecture file for this module]
6
+ **Status:** 🔵 proposed / 🟡 in flight / 🟢 active / ⚫ retired
7
+ **Last updated:** {{TODAY}}
8
+
9
+ ## In one sentence
10
+
11
+ [What does this module make true in the world? One sentence. *"Overnight Consolidation produces, by morning, a per-student plan ranked by need."*]
12
+
13
+ ## What this module produces
14
+
15
+ [What facts, capabilities, or guarantees can other parts of the system rely on, once this module is in place? Use everyday language. Bullet list.]
16
+
17
+ - [fact 1]
18
+ - [fact 2]
19
+ - ...
20
+
21
+ ## What this module consumes
22
+
23
+ [What must already be true (data, signals, services) before this module can do its job? Bullet list, with links to other contracts where the input is produced.]
24
+
25
+ - [input 1] — produced by [contract link]
26
+ - [input 2] — produced by [contract link or "external — [source]"]
27
+ - ...
28
+
29
+ ## What this module does not provide
30
+
31
+ [The negative space. Things adjacent that someone might assume are included but aren't. Naming these prevents downstream confusion.]
32
+
33
+ - [thing it doesn't do, despite proximity]
34
+ - ...
35
+
36
+ ## How it fails
37
+
38
+ [What happens when inputs are missing, late, or wrong? What can downstream modules rely on as the failure behaviour? *"If today's interaction records are missing, Overnight Consolidation skips that student in tomorrow's plan and surfaces a flag in the morning briefing."*]
39
+
40
+ ## Personas this contract serves
41
+
42
+ [The personas whose outcomes depend on this contract. Linked to their P-NNN files.]
43
+
44
+ ## Work units that produce this contract
45
+
46
+ [As work units ship that fulfil this contract, link them here. During planning this list is empty; it fills in as the project builds.]
47
+
48
+ | WU | Status |
49
+ | --- | --- |
50
+
51
+ ## Work units that consume this contract
52
+
53
+ [Work units elsewhere in the project that rely on this contract being in place.]
54
+
55
+ | WU | Status |
56
+ | --- | --- |
57
+
58
+ ## Decisions that shaped this contract
59
+
60
+ [Link to D-NNN files that materially shaped what this contract is. Examples: "D003 — All overnight processing happens on-device".]
61
+
62
+ ## Notes
63
+
64
+ [Date-stamped notes about how this contract has evolved.]