@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,28 +1,35 @@
1
1
  # Risks
2
2
 
3
- > Tracked risks to the project. Each risk is R-NNN. A risk is anything that could prevent a work unit from shipping, prevent a phase from completing, or invalidate an architectural commitment if it materialises.
3
+ A **risk** is something that could go wrong and would matter if it did. Filed here so it's visible both to you and to anyone else looking at the project. Zero risks on a real project usually means underthinking, not zero risk. See [the glossary](../GLOSSARY.md#risk) for the full definition.
4
4
 
5
5
  ## Index
6
6
 
7
7
  | ID | Risk | Severity | Status | Date opened |
8
8
  | --- | --- | --- | --- | --- |
9
- | _none yet_ | | | | |
9
+ | _none yet — add a row when you spot something to watch_ | | | | |
10
10
 
11
- ## Severity scale
11
+ ## Severity
12
12
 
13
- - **High** — blocks active work or threatens an architectural commitment
14
- - **Medium** — would slow work materially if it materialises
15
- - **Low** — worth tracking; not blocking
13
+ - **High** — would block work or invalidate a major decision if it happens
14
+ - **Medium** — would slow things down materially
15
+ - **Low** — worth knowing about; not blocking
16
16
 
17
17
  ## Status
18
18
 
19
19
  - **open** — being watched
20
- - **mitigated** — action taken; risk reduced
21
- - **materialised** — happened; see linked WU or session for response
22
- - **closed** — no longer applicable
20
+ - **mitigated** — something's been done to reduce it
21
+ - **materialised** — it happened; see the linked work unit or session for what we did
22
+ - **closed** — no longer relevant
23
23
 
24
- ## How to add a risk
24
+ ## When to file a risk
25
25
 
26
- 1. Add a new row to the table with R-NNN (next available number)
27
- 2. If the risk is large enough to warrant detail, write a `R-NNN-short-title.md` file beside this index
28
- 3. Reference the risk from any work unit it affects
26
+ - You can imagine something going wrong and want it surfaced rather than forgotten
27
+ - You're about to commit to a path and there's a known downside
28
+ - An open question has implications if it resolves the wrong way — file the risk separately so the project tracks it even before the question resolves
29
+ - A dependency (a person, a service, a piece of hardware) might not be available when you need it
30
+
31
+ > Example: "R002 — School wifi is unreliable on Mondays after maintenance; the morning briefing must degrade gracefully when offline."
32
+
33
+ ## How to file one
34
+
35
+ Add a row to the table above with the next R-NNN number. If the risk is large enough to warrant detail (options for mitigation, escalation plan), write a `RNNN-short-title.md` file beside this index too. Reference the risk from any work unit it affects.
@@ -1,27 +1,29 @@
1
1
  # Sessions
2
2
 
3
- > Chronological audit trail of every session run on this project. One entry per session, named `YYYY-MM-DD-short-description.md`. The session log is the catalogue's replay history; a fresh operator (human or agent) should be able to read the most recent entries and pick up exactly where work stopped.
3
+ A **session** is a period of focused work could be an hour, could be an afternoon. Each session starts with `/start-of-session` (which tells you where the project is) and ends with `/end-of-session` (which writes down what just happened). One file per session lives here in date order, named `YYYY-MM-DD-short-description.md`. See [the glossary](../GLOSSARY.md#session) for the full definition.
4
+
5
+ The session log is the project's **replay history**. Anyone joining mid-project — or future-you opening this folder six months later — should be able to read the most recent entries and pick up exactly where work stopped, without needing to ask.
4
6
 
5
7
  ## Index
6
8
 
7
- | Date | Session | Active WU | Notes |
9
+ | Date | Session | Active work unit | Notes |
8
10
  | --- | --- | --- | --- |
9
- | {{TODAY}} | [Adopt the catalogue scaffold](0000-00-00-template.md) | WU 001 | First session; catalogue bootstrapped |
11
+ | _filled in automatically when you run `/end-of-session`_ | | | |
12
+
13
+ ## What a session entry captures
10
14
 
11
- ## How to add a session entry
15
+ - **What this session was about** — one paragraph
16
+ - **What was done** — chronological, in plain language
17
+ - **Decisions made** — linked to the D-NNN files filed in this session
18
+ - **Open questions raised** — linked to the Q-NNN files
19
+ - **Risks identified** — linked
20
+ - **What's next** — the next concrete action; what the next session should start with
21
+ - **Resume hint** — if mid-phase (planning or work) when this session ended, a one-paragraph note of where you were so the next session picks up cleanly
12
22
 
13
- 1. Copy `0000-00-00-template.md` to `YYYY-MM-DD-short-description.md` (today's date, dashes-not-spaces description)
14
- 2. Fill in the template
15
- 3. Add a row to the table above
16
- 4. Link the entry from STATE.md if the session significantly shifted state
23
+ The honest test for a good session entry: **could a future-you (or anyone joining the project) read it and answer "what happened, why, and what's next?" without contacting you?** If yes, the entry is sufficient.
17
24
 
18
- ## What a session entry must include
25
+ ## How session entries are filed
19
26
 
20
- - What this session was about (one paragraph)
21
- - What was done (chronological narrative)
22
- - Decisions that surfaced (linked)
23
- - Open questions raised (linked)
24
- - Risks identified (linked)
25
- - What's next (the concrete next action)
27
+ Run `/end-of-session`. It writes the entry, updates this index, refreshes STATE.md, commits everything in one atomic step, and the post-commit hook refreshes the search index in the background.
26
28
 
27
- The auditor's-question test: *could a third-party auditor read this entry and answer "what happened, why, and what's next?" without contacting the team?* If yes, sufficient.
29
+ **Never close a session without `/end-of-session`.** Work that isn't written down is work that's lost. The whole catalogue is built on the assumption that every period of work gets captured before it closes.
@@ -0,0 +1,48 @@
1
+ # UI/UX
2
+
3
+ A **surface** is a piece of the user-facing experience — a page, a screen, a modal, a command, an email, a notification. Each surface lives here as its own file. The register captures *what people see, what they do, and what happens next.* Implementation lives in code; **the visual + interaction language each surface uses lives in [the design system register](../design-system/_index.md).**
4
+
5
+ See [the glossary](../GLOSSARY.md#surface) for the full definition of a surface.
6
+
7
+ ## Index
8
+
9
+ | Surface | Persona | Status |
10
+ | --- | --- | --- |
11
+ | _none yet — populated during the UI/UX + Design System phase of planning (phase C)_ | | |
12
+
13
+ ## What goes in a surface file
14
+
15
+ For each user-facing surface:
16
+
17
+ - **Who uses it** — link to the persona(s) in `personas/`
18
+ - **When they reach it** — the trigger; what's happening in their day that brings them here
19
+ - **What they see** — the content, the layout, the components from the design system that appear
20
+ - **What they do** — the actions available
21
+ - **What happens next** — where they go, what the system does
22
+ - **What contracts it touches** — link to the contracts in `contracts/` this surface reads from or writes to
23
+ - **What design-system pieces it uses** — the components, patterns, tokens, voice samples
24
+
25
+ A surface file is *what's true about the experience*. It's not a mockup or wireframe; it's a description detailed enough that a designer or developer reading it knows what to build.
26
+
27
+ ## When the UI/UX register gets populated
28
+
29
+ During the **UI/UX + Design System** phase of planning (phase C), after architecture is in place. Phase C produces TWO things in parallel:
30
+
31
+ 1. **The design system** — the shared vocabulary every surface uses
32
+ 2. **The surface files** — one per page/screen/modal/command/email — each consuming the design system
33
+
34
+ This phase is end-to-end: it produces a complete design system AND the per-surface application of it.
35
+
36
+ ## How UI/UX connects to everything else
37
+
38
+ - Every surface names ≥1 persona
39
+ - Every surface names ≥1 contract it touches
40
+ - Every surface references the design-system pieces it uses
41
+ - Work units that build surfaces name which surface(s) they build
42
+ - Surface changes that affect a persona's experience get filed as decisions
43
+
44
+ ## How to add a surface
45
+
46
+ During planning: the AI does this for you via `nuos-catalogue ui-ux create`.
47
+
48
+ Outside planning: copy `surface-template.md` to `<short-surface-name>.md`, fill it in, and add a row to the table above.
@@ -0,0 +1,72 @@
1
+ # [Surface name]
2
+
3
+ > *Replace bracketed placeholders. Delete this hint block once filled in.*
4
+
5
+ **Type:** [page / screen / modal / command / email / notification / printable]
6
+ **Status:** 🔵 proposed / 🟡 in flight / 🟢 live / ⚫ retired
7
+ **Last updated:** {{TODAY}}
8
+
9
+ ## Who uses this surface
10
+
11
+ [Link to the persona(s). One per row.]
12
+
13
+ - [P001 — name](../personas/P001-name.md): [one-line note on how they use this surface]
14
+
15
+ ## When they reach it
16
+
17
+ [The trigger — what's happening in the persona's day that brings them here. Not "they click a link"; describe the moment.]
18
+
19
+ > Example: "It's 4pm on a Tuesday. The teacher is winding down for the day. They want a quick look at tomorrow's high-need students before they go home."
20
+
21
+ ## What they see
22
+
23
+ [Describe the content and layout. Reference design-system components by name.]
24
+
25
+ - [Component or pattern from design-system] — [what it shows]
26
+ - [Component] — [...]
27
+ - ...
28
+
29
+ > Example: "Heading using `Display.large` token (see design-system/typography.md). Below it, a vertical list of `Card.priority` components — see design-system/components/card.md — one per student, ranked by priority."
30
+
31
+ ## What they do
32
+
33
+ [Actions available on this surface. One per row.]
34
+
35
+ - [Action] → [what happens]
36
+ - [Action] → [...]
37
+
38
+ ## What happens next
39
+
40
+ [Where the user goes after this surface, or what the system does in the background.]
41
+
42
+ ## Contracts this surface touches
43
+
44
+ [Which contracts does this surface read from or write to? Link to the contract files.]
45
+
46
+ - **Reads:** [contract link]
47
+ - **Writes:** [contract link]
48
+
49
+ ## Design system pieces this surface uses
50
+
51
+ [What components, patterns, tokens, voice samples are consumed here. Link to the design system files.]
52
+
53
+ - **Components:** [list, linked]
54
+ - **Patterns:** [list, linked]
55
+ - **Tokens:** [list, linked]
56
+ - **Voice samples:** [microcopy keys or examples, linked to design-system/voice.md]
57
+
58
+ ## Accessibility
59
+
60
+ [What this surface promises for accessibility. Should match or extend the design-system accessibility commitments.]
61
+
62
+ - [Commitment: e.g. fully keyboard-navigable]
63
+ - [Commitment: e.g. AA contrast minimum]
64
+ - [...]
65
+
66
+ ## Open questions about this surface
67
+
68
+ [Link to Q-NNN entries that affect this surface specifically.]
69
+
70
+ ## Notes
71
+
72
+ [Date-stamped notes about how this surface has evolved.]
@@ -0,0 +1,43 @@
1
+ # Work Unit [NNN] — [short title]
2
+
3
+ > *This is the simple work-unit template. Use this one for everyday work units. Use `001-template-full.md` for infrastructure work (build, publish, refactor) or when you need to track contracts produced and consumed.*
4
+
5
+ **Status:** 🔵 proposed / 🟡 in flight / 🟣 awaiting review / ✅ shipped / 🔴 blocked
6
+ **For:** [persona handle and name — e.g. [P001 — name](../personas/P001-name.md)]
7
+ **Last updated:** {{TODAY}}
8
+
9
+ ## What's done when this ships
10
+
11
+ [One paragraph. What's true about the world after this work unit ships that wasn't true before? Plain language.]
12
+
13
+ > Example: "When teachers open the morning briefing, they see their three highest-need students at the top of the screen, with the actions they took yesterday and the actions recommended for today."
14
+
15
+ ## Walkthrough
16
+
17
+ [A short story of someone using this. Numbered steps from the persona's perspective. Include what happens if things go wrong.]
18
+
19
+ 1. [What happens first; what the persona does or sees]
20
+ 2. ...
21
+ 3. ...
22
+
23
+ **What if something goes wrong:**
24
+
25
+ - [If the data they need isn't ready: ...]
26
+ - [If they make a mistake: ...]
27
+ - [If the system fails: ...]
28
+
29
+ ## How we'll know it's done
30
+
31
+ [3-6 things you can check. Each one should be yes/no, not "better" or "worse".]
32
+
33
+ 1. [Checkable statement]
34
+ 2. [Checkable statement]
35
+ 3. ...
36
+
37
+ ## Notes / log
38
+
39
+ > *Updated at the end of every session this work unit is touched. Append dated entries with what was attempted, what worked, what didn't, what was learned, and what comes next.*
40
+
41
+ ### {{TODAY}} — initial filing
42
+
43
+ [Why this work unit was filed; the moment it became clear it was worth a separate WU.]
@@ -1,34 +1,32 @@
1
- # Work Units
1
+ # Work units
2
2
 
3
- > Concrete, buildable pieces of work. Each work unit has an outcome, acceptance criteria, dependencies, and a status. Work units are the unit of progress; the catalogue's compounding value comes from accumulated WU notes.
3
+ A **work unit** is one concrete thing the project will build. Each one has a title, an outcome (what's true after it ships that wasn't true before), a story of someone using it, and a short list of how you'll know it's done. 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, and what was learned. See [the glossary](../GLOSSARY.md#work-unit) for the full definition.
4
4
 
5
5
  ## Index
6
6
 
7
- | WU | Title | Status | Depends on | Notes |
8
- | --- | --- | --- | --- | --- |
9
- | 001 | [first WU title] | 🟡 in flight | | First work unit |
7
+ | WU | Title | Status | Notes |
8
+ | --- | --- | --- | --- |
9
+ | _none yet file your first one with `/wu-new`_ | | | |
10
10
 
11
- ## Status legend
11
+ ## What status means
12
12
 
13
13
  - 🔵 **proposed** — written down, not yet started
14
14
  - 🟡 **in flight** — actively being worked on
15
- - 🟣 **built / awaiting review** — implementation done, review pending
16
- - ✅ **merged / shipped** — complete and integrated
17
- - 🔴 **blocked** — cannot proceed; see notes for blocker
15
+ - 🟣 **awaiting review** — implementation done, review pending
16
+ - ✅ **shipped** — complete; lives in `done/`
17
+ - 🔴 **blocked** — cannot proceed; the WU's notes say why
18
18
 
19
- ## Deferred / proposed-with-trigger work units
19
+ ## When to file a work unit
20
20
 
21
- A work unit can be `🔵 proposed` in three flavours:
21
+ When you're about to start (or have just started) work that you'll want to track. Anything bigger than "edit a paragraph" deserves one. Smaller work can land inside an existing work unit's notes.
22
22
 
23
- - **proposed-ready** eligible to activate at next priority review
24
- - **proposed-deferred-with-trigger** committed, awaiting a checkable condition (state the condition in the WU itself)
25
- - **proposed-blocked-on-question** cannot activate until an open question resolves; link to the Q-NNN
23
+ If a work unit is **proposed** but can't start yet, say why right in its title or notes:
24
+ - _waiting on Q003_ an open question must resolve first
25
+ - _waiting on WU 007_ another work unit must ship first
26
+ - _deferred — start when [specific condition]_ — set a checkable trigger
26
27
 
27
- The quarterly catalogue review walks each deferred WU and re-evaluates its trigger.
28
+ ## How to file one
28
29
 
29
- ## How to add a work unit
30
+ Easiest way: run `/wu-new`. The AI will walk you through the four fields (title, outcome, walkthrough, how-we-know-it's-done) and save the file in the right place, then add a row to this index.
30
31
 
31
- 1. Copy `001-template.md` to `NNN-short-title-with-dashes.md` (next available number)
32
- 2. Fill in the template
33
- 3. Add a row to the table above
34
- 4. If the WU resolves an open question, link it; if the WU was created in response to a decision, link the decision
32
+ If you'd rather file manually: copy `001-template-simple.md` to `NNN-short-title.md` and fill it in. Use `001-template-full.md` instead if your work unit is infrastructure (build, publish, refactor) and you want the fuller shape (contracts produced/consumed, forward-compatibility notes).
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://nusoft.dev/schemas/methodfile/v1.json",
3
3
  "method": {
4
- "version": "1.0",
4
+ "version": "1.1",
5
5
  "lastValidatedAt": "{{TODAY}}"
6
6
  },
7
7
  "project": {
@@ -12,23 +12,34 @@
12
12
  "catalogue": {
13
13
  "root": "docs/build/",
14
14
  "registers": {
15
+ "personas": "personas/",
16
+ "maps": "maps/",
17
+ "architecture": "architecture/",
18
+ "contracts": "contracts/",
19
+ "uiUx": "ui-ux/",
20
+ "designSystem": "design-system/",
15
21
  "decisions": "decisions/",
22
+ "openQuestions": "open-questions/",
16
23
  "workUnits": "work-units/",
17
- "sessions": "sessions/",
18
24
  "risks": "risks/",
19
- "openQuestions": "open-questions/"
25
+ "sessions": "sessions/"
20
26
  },
21
27
  "snapshot": "STATE.md",
28
+ "welcome": "WELCOME.md",
29
+ "glossary": "GLOSSARY.md",
22
30
  "protocols": {
23
31
  "startOfSession": "START-OF-SESSION.md",
24
32
  "endOfSession": "END-OF-SESSION.md"
25
- },
26
- "supportingLayers": {
27
- "philosophy": "../philosophy/",
28
- "contracts": "../contracts/",
29
- "guides": "../guides/"
30
33
  }
31
34
  },
35
+ "planning": {
36
+ "phaseA_orientation": "not_started",
37
+ "phaseB_architecture": "not_started",
38
+ "phaseC_uiUxDesignSystem": "not_started",
39
+ "phaseD_maps": "not_started",
40
+ "phaseE_initialWorkUnits": "not_started",
41
+ "completedAt": null
42
+ },
32
43
  "harness": {
33
44
  "wired": false,
34
45
  "runtime": {