@novare-technologies/nvaid 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +137 -2
  3. package/dist/cli.js +483 -0
  4. package/package.json +49 -4
  5. package/templates/commands/apply.md +36 -0
  6. package/templates/commands/breakdown.md +35 -0
  7. package/templates/commands/contracts.md +43 -0
  8. package/templates/commands/install.md +63 -0
  9. package/templates/commands/intent.md +46 -0
  10. package/templates/nvaid/DESIGN-CODE-DICTIONARY.md +90 -0
  11. package/templates/nvaid/PROJECT-RULES.md +93 -0
  12. package/templates/nvaid/config.yml +87 -0
  13. package/templates/nvaid/intents/.gitkeep +0 -0
  14. package/templates/rules/ISSUE-TRACKER-TEMPLATE.md +221 -0
  15. package/templates/rules/backend-architecture-contract-generation-rules.md +56 -0
  16. package/templates/rules/customer-experience-contract-generation-rules.md +51 -0
  17. package/templates/rules/frontend-architecture-contract-generation-rules.md +56 -0
  18. package/templates/rules/quality-architecture-contract-generation-rules.md +86 -0
  19. package/templates/rules/solutions-architecture-contract-generation-rules.md +59 -0
  20. package/templates/rules/unit-breakdown-rules.md +121 -0
  21. package/templates/skills/backend/SKILL.md +34 -0
  22. package/templates/skills/customer-experience/SKILL.md +26 -0
  23. package/templates/skills/daily-construction-update/SKILL.md +27 -0
  24. package/templates/skills/frontend/SKILL.md +30 -0
  25. package/templates/skills/github/SKILL.md +142 -0
  26. package/templates/skills/pr-review/SKILL.md +119 -0
  27. package/templates/skills/project-ticketing/SKILL.md +26 -0
  28. package/templates/skills/quality/SKILL.md +31 -0
  29. package/templates/skills/r3-analytics/SKILL.md +26 -0
  30. package/templates/skills/release-plan/SKILL.md +27 -0
  31. package/templates/skills/solutions/SKILL.md +29 -0
  32. package/templates/skills/unit-breakdown/SKILL.md +31 -0
@@ -0,0 +1,221 @@
1
+ ---
2
+ document: Issue Tracker Integration (Jira / GitHub Projects)
3
+ project: "{{PROJECT_NAME}}"
4
+ version: 0.3.0
5
+ owner: "[Process Facilitator name]"
6
+ last_updated: "[YYYY-MM-DD]"
7
+ status: draft
8
+ ---
9
+
10
+ # Issue Tracker Integration
11
+
12
+ **What this file is:** the field shape and creation rules for how Fig. 2's Intent-to-Release
13
+ artifacts show up in Jira or GitHub Projects — one Epic per Intent, one Story or Bug per
14
+ Unit of Work, bundled for shipping by Release Checkpoint rather than by sprint — so the
15
+ tracker and the `aidlc-docs/` artifacts never disagree about what was decided.
16
+
17
+ **What this file is not:** not a replacement for `intent.md`, `unit-breakdown.md`, or any
18
+ contract file. The tracker is the *tracking* layer — status, ownership, checkpoint
19
+ placement, at-a-glance search. The artifacts are the *content* layer — what was actually
20
+ agreed, in full, versioned in git. A ticket field never carries content that only exists in
21
+ the ticket; if it's worth writing down, it's worth writing into the file the AI agent
22
+ actually reads, and the ticket links to it.
23
+
24
+ **Companion files:** [PROJECT-RULES.md](./PROJECT-RULES.md) §7 rule 11 is the operating
25
+ rule this file implements. [unit-breakdown-rules.md](./unit-breakdown-rules.md) governs
26
+ *how* a Unit of Work is decided and classified before it ever becomes the ticket
27
+ described here. The worked example in `docs/templates/samples/` is what every link below
28
+ would actually point at for `INTENT-004`.
29
+
30
+ **Why no sprints:** Scrum's sprint boundary is a batching mechanism for coordinating fixed
31
+ human capacity in fixed time boxes. Once a Unit of Work is small, AI-implemented, and gated
32
+ independently rather than committed to as part of a sprint's bundle, the fixed box adds
33
+ waiting without adding structure. This file uses continuous, pull-based flow instead — see
34
+ §3 for the checkpoint that replaces the sprint as the unit of release planning.
35
+
36
+ ---
37
+
38
+ ## 0. The Rule This File Exists to Enforce
39
+
40
+ A ticket holds three kinds of information, and only two of them belong in ticket fields:
41
+
42
+ 1. **Tracking metadata** (status, gate state, checkpoint, owner) — belongs in ticket
43
+ fields. This is what Jira/GitHub boards are good at, and it's fine for it to live only
44
+ there.
45
+ 2. **Links to content** (the Intent, the contracts, the design docs) — belongs in ticket
46
+ fields, as links, never as pasted text.
47
+ 3. **The content itself** (what the API contract actually says, what the acceptance
48
+ criteria actually are) — belongs *only* in the `aidlc-docs/` artifact. Pasting it into
49
+ a ticket description creates a second copy that drifts the first time either one is
50
+ edited without the other, and the AI agent isn't the one reading the ticket anyway — it
51
+ reads the file.
52
+
53
+ ## 1. Epic — one per Intent
54
+
55
+ Created by the AI agent immediately after the Decomposition Approved gate (Fig. 2, Stage
56
+ 3) — not before, since the Epic's content depends on Joint Elaboration having actually
57
+ happened.
58
+
59
+ | Field | Value | Set By |
60
+ |---|---|---|
61
+ | Issue type | Epic | — |
62
+ | Title | `[<INTENT-ID>] <business objective, short>` | AI |
63
+ | Intent ID | e.g. `INTENT-004` | AI |
64
+ | Link — Intent | permalink to `intent.md` | AI |
65
+ | Link — Unit Breakdown | permalink to `unit-breakdown.md` | AI |
66
+ | Gate: Decomposition Approved | status / approver / date | AI transcribes an approval already recorded in `unit-breakdown.md` — never grants it |
67
+ | Contracts produced | links only, e.g. Solutions / Backend / Frontend / Quality / CX &mdash; each to its own file | AI, from the Contracts Produced table in `unit-breakdown.md` |
68
+ | Role explicitly not pulled in | e.g. `devops: not pulled in — see devops-architecture-contract.md` | AI |
69
+ | Epic owner (accountable human) | Customer Experience Architect (BA/PM) | AI sets, human is the actual owner |
70
+ | Status | see §4 | AI, mechanically |
71
+ | Release Checkpoint | *(blank at creation)* | **Process Facilitator**, following the CX Architect's prioritized backlog — see §3 |
72
+
73
+ **Contracts live here, not on the Story.** Architecture Contracts are produced once per
74
+ Intent, at Joint Elaboration — they are never re-created per Unit of Work. A Story (§2)
75
+ links to whichever of *this* Epic's contracts are relevant to it, via that contract's own
76
+ `covers_units` field; it does not carry its own copy or its own contract.
77
+
78
+ **Worked example (`INTENT-004`):** Title `[INTENT-004] Developer Provisions a mycv
79
+ Environment with a Branch Override`; contracts linked for Solutions, Backend, Frontend,
80
+ Quality, and CX; DevOps flagged not pulled in, linking `devops-architecture-contract.md`.
81
+
82
+ ## 2. Story or Bug — one per Unit of Work, child of its Intent's Epic
83
+
84
+ Created as a stub alongside the Epic (Stage 3), status `Backlog`; filled in as the owning
85
+ role's Per-Role Authoring (Stage 4) and its gate (Stage 5) complete. **One Unit of Work is
86
+ always exactly one Story or one Bug** — never a separate ticket type, never both. Which
87
+ one is decided by `unit-breakdown-rules.md` §3's classification rule (new/changed
88
+ capability &rarr; Story; existing shipped behavior violating its own spec &rarr; Bug), not
89
+ by the tracker.
90
+
91
+ | Field | Value | Set By |
92
+ |---|---|---|
93
+ | Issue type | `Story` or `Bug` (Jira native types; GitHub: Issue labeled `type:story` / `type:bug`, sub-issue of the Epic) — per `unit-breakdown-rules.md` §3 | AI |
94
+ | Title | `[<UNIT-ID>] <short description>` | AI |
95
+ | Unit ID | e.g. `UNIT-004-02` | AI |
96
+ | Owning role | e.g. Backend Solutions Architect | AI, from `unit-breakdown.md` |
97
+ | Link — Unit design | permalink to `unit-XXX-design.md` | AI, added at Stage 4 |
98
+ | Link — Gate approval | permalink to `gate-approval-unit-XXX.md` | AI, added at Stage 5 |
99
+ | Relevant contracts | a **list** of links, one per Epic contract whose `covers_units` names this Unit &mdash; a Story routinely carries more than one | AI |
100
+ | Gate: Per-Unit Design Approved | status / approver / date | AI transcribes; owning Architect grants |
101
+ | Merge Approval | status / approver / date / PR link | AI transcribes; owning Architect grants |
102
+ | Status | see §4 | AI, mechanically |
103
+ | Release Checkpoint | *inherited from the parent Epic — not set independently* | — |
104
+
105
+ **A Story never carries its own Release Checkpoint.** All Units of Work under one Intent
106
+ ship in the same checkpoint as that Intent — splitting them across two checkpoints would
107
+ mean the Intent's own success criteria could be satisfied on one deploy and not the other,
108
+ which breaks the reason the Intent was decomposed as a whole in the first place.
109
+
110
+ **Sub-tasks are not a default part of this shape.** A Unit of Work is already sized to be
111
+ one AI-implementable increment (Fig. 2, Stage 6) — splitting it into sub-tasks by default
112
+ would just be re-inventing what the Unit boundary already does. Add a sub-task only if the
113
+ Unit's own design doc identifies a genuinely separable implementation chunk, and let that
114
+ doc, not the ticket, be the reason why.
115
+
116
+ ## 3. Release Checkpoint — a bundle of Intents, not a date
117
+
118
+ Replaces the sprint as the unit of release planning. A Release Checkpoint is a **named,
119
+ content-defined set of Intents** assigned to ship together — mapped directly onto a native
120
+ tracker construct rather than a bespoke one:
121
+
122
+ | Tracker | Native construct |
123
+ |---|---|
124
+ | Jira | Fix Version / Release |
125
+ | GitHub Projects | Milestone |
126
+
127
+ Both already carry the right semantics out of the box: a bundle of issues, a completion
128
+ percentage, and a "Release" / close action — no custom issue type needed.
129
+
130
+ **Completion rule:** a Release Checkpoint is **Released** — deployment happens — only once
131
+ *every* Epic assigned to it has reached **Intent Complete**: every one of its child
132
+ Stories has reached `Merged`, and each Story's own Definition of Done (`PROJECT-RULES.md`
133
+ §5.1, which already includes the Design-Code Dictionary update) was satisfied on the way
134
+ there. This is deliberately all-or-nothing: one straggler Intent holds the whole checkpoint
135
+ back. That's a real tradeoff, not a hidden one — it buys a release that always contains a
136
+ coherent, fully-tested set of capabilities, at the cost of a fast Intent sometimes waiting
137
+ on a slow sibling. If that tradeoff stops being worth it for a given checkpoint, split it
138
+ into two smaller checkpoints — don't quietly ship a partial one.
139
+
140
+ **Who assigns what:**
141
+
142
+ - The **CX Architect (BA/PM)** decides which Intents belong together and in what order —
143
+ this is the prioritized backlog they already own (see the Roles table).
144
+ - The **Process Facilitator** turns that priority into the actual checkpoint assignment
145
+ (moving the Epic into the Fix Version / Milestone) and watches flow — if a checkpoint's
146
+ scope stops looking realistic given current throughput, that's flagged, not silently
147
+ absorbed by working longer hours.
148
+ - **Release Approval** (Fig. 2, Stage 10) is granted at the checkpoint level by the
149
+ Solutions Architect + CX Architect, once every contained Epic shows Intent Complete —
150
+ read Stage 10 in Fig. 2 as operating on the checkpoint, not on a single Intent in
151
+ isolation.
152
+
153
+ ## 4. Status — Story and Epic tracked separately
154
+
155
+ Kanban-shaped: continuous flow through named columns, not a sprint burndown. Suggested WIP
156
+ limits apply only at genuinely constrained (human-gated) columns — AI-only stages aren't a
157
+ shared human resource in the same way, so capping them is a pipeline-capacity question, not
158
+ a flow-discipline one.
159
+
160
+ ### Story
161
+
162
+ | Status | Fig. 2 stage | Set by | Suggested WIP limit |
163
+ |---|---|---|---|
164
+ | Backlog | 3 &middot; Decomposition Approved | AI creates | none — it's the queue |
165
+ | Design In Progress | 4 &middot; Per-Role Authoring | AI | &asymp;1&ndash;2 per owning role in parallel |
166
+ | Design Approved | 5 &middot; Gate passed | AI transcribes; owning Architect grants | transient, no cap needed |
167
+ | In Progress | 6 &middot; Implementation | AI | pipeline-capacity bound, not human-bound |
168
+ | Gates Running | 7 &middot; Automated Gates (incl. self-correct loop) | AI / pipeline | pipeline-capacity bound |
169
+ | Merge Pending | 7 passed, awaiting 8 | AI | &asymp;1&ndash;2 per owning Architect &mdash; keeps approvals from queuing into a rubber-stamped batch |
170
+ | Merged | 8 &middot; Merge Approved | AI transcribes; owning Architect grants | &mdash; |
171
+
172
+ ### Epic
173
+
174
+ | Status | Meaning | Set by |
175
+ |---|---|---|
176
+ | Backlog | Decomposition Approved, not yet assigned a Release Checkpoint | AI creates |
177
+ | In a Checkpoint | Assigned; child Stories in flight | Process Facilitator assigns; status itself rolls up automatically |
178
+ | Intent Complete | Every child Story is `Merged`, DoD satisfied on each | AI, mechanically, once true |
179
+ | Released | Its Release Checkpoint has been approved and deployed | AI transcribes; Solutions Architect + CX Architect grant, at the checkpoint (§3) |
180
+
181
+ ## 5. Who Creates, Who Schedules
182
+
183
+ - **The AI agent creates and maintains every issue** — Epic and Story, every field in §1
184
+ and §2 except Release Checkpoint — as a direct, mechanical byproduct of the artifacts it
185
+ already produces. This is reversible (edit or close an issue, nothing breaks) and
186
+ evidence-based (every field is a transcription of something already decided in a file),
187
+ so it fits the same "propose, don't dispose" rule that governs the agent's other
188
+ unsupervised actions — see `PROJECT-RULES.md` §7.
189
+ - **A human is the only one who assigns a Release Checkpoint** — see §3's split between the
190
+ CX Architect (priority) and the Process Facilitator (the actual assignment and flow
191
+ health). That's a scope and capacity call the agent has no real visibility into.
192
+ - **Gate and approval fields are transcriptions, not grants.** The AI agent writes
193
+ "Design Approved: yes, [Architect], [date]" into the ticket only after that approval
194
+ already exists in the corresponding `gate-approval-unit-XXX.md` file — it never sets an
195
+ approval field as an independent action.
196
+
197
+ **Known limitation, stated plainly:** neither Jira nor GitHub Projects has a built-in
198
+ permission that technically restricts *which fields* an integration can write — unlike a
199
+ git branch-protection rule, "AI never assigns a Release Checkpoint" is a process convention
200
+ enforced by this document and spot-checked at the Process Facilitator's regular review, not
201
+ a hard technical lock. If the harness's tracker integration ever supports scoped field
202
+ permissions, tighten this from convention to enforcement and update this section.
203
+
204
+ ## 6. Jira vs. GitHub Projects — mechanics
205
+
206
+ | Concept | Jira | GitHub Projects |
207
+ |---|---|---|
208
+ | Epic | Native `Epic` issue type | Tracking issue with native sub-issues, or a Project grouping field |
209
+ | Story / Bug | Native `Story` / `Bug` issue type, linked via Epic Link | Issue, labeled `type:story` / `type:bug`, added as a sub-issue of the Epic |
210
+ | Custom fields (Intent ID, Gate status, etc.) | Custom fields, single-select for status-like values | Project (beta) custom fields — same types available |
211
+ | Release Checkpoint | Fix Version / Release | Milestone |
212
+ | Sprint / Iteration | Native field — **deliberately unused** under this flow model | Native field — **deliberately unused** under this flow model |
213
+ | Link to repo artifact | Web Link / Remote Link to the file's permalink | Native — link or reference the file path directly |
214
+
215
+ ## 7. Change Log
216
+
217
+ | Version | Date | Change | Trigger |
218
+ |---|---|---|---|
219
+ | 0.1.0 | [date] | Initial version | Question raised while reviewing the Mob Elaboration Ceremony: how do Jira/GitHub tickets relate to these artifacts |
220
+ | 0.2.0 | [date] | Replaced Sprint/Iteration with Release Checkpoint (Fix Version / Milestone, bundling Intents, all-or-nothing completion); split the Story and Epic status enums; added WIP-limit guidance; clarified contracts are Intent-level, referenced per-Unit via `covers_units`, never duplicated per Story | Kanban-vs-Scrum discussion; clarifying question on Intent/Unit-of-Work/contract relationships |
221
+ | 0.3.0 | [date] | A Unit of Work is now explicitly Story *or* Bug, classified by `unit-breakdown-rules.md` §3; clarified a Story/Bug carries a list of contract links, not a single one | New companion file: `unit-breakdown-rules.md` |
@@ -0,0 +1,56 @@
1
+ ---
2
+ document: Backend Architecture Contract — Generation Rules
3
+ project: "{{PROJECT_NAME}}"
4
+ version: 0.1.0
5
+ owner: "[Backend Solutions Architect name]"
6
+ last_updated: "[YYYY-MM-DD]"
7
+ status: draft
8
+ ---
9
+
10
+ # Backend Architecture Contract: Generation Rules
11
+
12
+ **What this file is:** the rules the AI agent follows to draft a Backend Architecture
13
+ Contract for an Intent, during Mob Elaboration Phases 2–5 — what triggers producing one,
14
+ and what it must contain when it does.
15
+
16
+ **What this file is not:** not the worked example —
17
+ `docs/templates/samples/contracts/backend-architecture-contract.md` is the canonical
18
+ shape and sign-off format, filled in for `INTENT-004`. Not the draft/human-edit
19
+ relationship either — every generated contract is a starting framework, never a verdict;
20
+ see the AI-Native Engineering Model's §Mob Elaboration for how the Backend Solutions
21
+ Architect accepts, extends, or simplifies it before Sign-Off.
22
+
23
+ **Companion files:** [unit-breakdown-rules.md](./unit-breakdown-rules.md) (same
24
+ Elaboration session). The other five `*-architecture-contract-generation-rules.md` files
25
+ are siblings, one per role.
26
+
27
+ ---
28
+
29
+ ## 1. When This Contract Is Required
30
+
31
+ Any Intent with at least one Unit of Work touching the backend — an API/service layer, an
32
+ async worker or job runner, or a data-store schema. If none of an
33
+ Intent's Units touch these, this contract is not produced — logged the same way
34
+ `devops-architecture-contract-generation-rules.md` §1 logs a skip: the file states "not
35
+ pulled in" and why, rather than simply not existing.
36
+
37
+ ## 2. Required Content
38
+
39
+ - **API Contract Exposed.** Full request/response shape for any new or changed endpoint,
40
+ including error cases (4xx/5xx) — not just the happy path.
41
+ - **Shared Derivation Rules.** Anything another role (most often Frontend) needs to
42
+ independently reproduce — a naming rule, an ID derivation — is defined once, here, and
43
+ referenced elsewhere. It is never re-derived independently by the consuming role.
44
+ - **Data Model Touches.** Which tables/columns are written, and whether a migration is
45
+ needed.
46
+ - **Components Touched (Design-Code Dictionary impact).** Named components this
47
+ Intent's Backend work will add, move, or touch.
48
+ - **What This Contract Deliberately Excludes.** Anything the room discussed and
49
+ explicitly deferred — stated, not silently dropped.
50
+ - **Sign-Off.**
51
+
52
+ ## 3. Change Log
53
+
54
+ | Version | Date | Change | Trigger |
55
+ |---|---|---|---|
56
+ | 0.1.0 | [date] | Initial version | Companion to the five sibling `*-contract-generation-rules.md` files |
@@ -0,0 +1,51 @@
1
+ ---
2
+ document: Customer Experience Contract — Generation Rules
3
+ project: "{{PROJECT_NAME}}"
4
+ version: 0.1.0
5
+ owner: "[Customer Experience Architect name]"
6
+ last_updated: "[YYYY-MM-DD]"
7
+ status: draft
8
+ ---
9
+
10
+ # Customer Experience Contract: Generation Rules
11
+
12
+ **What this file is:** the rules the AI agent follows to draft a Customer Experience
13
+ Contract for an Intent, during Mob Elaboration Phases 2–5 — what triggers producing one,
14
+ and what it must contain when it does.
15
+
16
+ **What this file is not:** not the worked example —
17
+ `docs/templates/samples/contracts/customer-experience-contract.md` is the canonical
18
+ shape and sign-off format, filled in for `INTENT-004`. Not the draft/human-edit
19
+ relationship either — every generated contract is a starting framework, never a verdict;
20
+ see the AI-Native Engineering Model's §Mob Elaboration for how the Customer Experience
21
+ Architect accepts, extends, or simplifies it before Sign-Off.
22
+
23
+ **Companion files:** [unit-breakdown-rules.md](./unit-breakdown-rules.md) (same
24
+ Elaboration session). The other five `*-architecture-contract-generation-rules.md` files
25
+ are siblings, one per role.
26
+
27
+ ---
28
+
29
+ ## 1. When This Contract Is Required
30
+
31
+ **Always.** Every Intent originates from, or must be validated against, a real business
32
+ need — the Customer Experience Architect is the one who closes that loop after the
33
+ technical contracts land, confirming the room's final shape still serves it.
34
+
35
+ ## 2. Required Content
36
+
37
+ - **Reconciliation Against the Original Intent.** Where the final, technically-grounded
38
+ shape narrowed, resolved, or held unchanged against what `intent.md` originally said —
39
+ named explicitly, not silently absorbed into the acceptance criteria without comment.
40
+ - **Final Acceptance Criteria.** The technically-grounded version of the Intent's own
41
+ Success Criteria, incorporating what the other contracts actually committed to — not a
42
+ restatement of the Intent verbatim.
43
+ - **What "Done" Looks Like to the Business.** Tied to a concrete validation scenario, not
44
+ "the code merged."
45
+ - **Sign-Off.**
46
+
47
+ ## 3. Change Log
48
+
49
+ | Version | Date | Change | Trigger |
50
+ |---|---|---|---|
51
+ | 0.1.0 | [date] | Initial version | Companion to the five sibling `*-contract-generation-rules.md` files |
@@ -0,0 +1,56 @@
1
+ ---
2
+ document: Frontend Architecture Contract — Generation Rules
3
+ project: "{{PROJECT_NAME}}"
4
+ version: 0.1.0
5
+ owner: "[Identity Access and Frontend Architect name]"
6
+ last_updated: "[YYYY-MM-DD]"
7
+ status: draft
8
+ ---
9
+
10
+ # Frontend Architecture Contract: Generation Rules
11
+
12
+ **What this file is:** the rules the AI agent follows to draft a Frontend (Identity
13
+ Access and Frontend) Architecture Contract for an Intent, during Mob Elaboration Phases
14
+ 2–5 — what triggers producing one, and what it must contain when it does.
15
+
16
+ **What this file is not:** not the worked example —
17
+ `docs/templates/samples/contracts/frontend-architecture-contract.md` is the canonical
18
+ shape and sign-off format, filled in for `INTENT-004`. Not the draft/human-edit
19
+ relationship either — every generated contract is a starting framework, never a verdict;
20
+ see the AI-Native Engineering Model's §Mob Elaboration for how the Identity Access and
21
+ Frontend Architect accepts, extends, or simplifies it before Sign-Off.
22
+
23
+ **Companion files:** [unit-breakdown-rules.md](./unit-breakdown-rules.md) (same
24
+ Elaboration session). The other five `*-architecture-contract-generation-rules.md` files
25
+ are siblings, one per role.
26
+
27
+ ---
28
+
29
+ ## 1. When This Contract Is Required
30
+
31
+ Any Intent with at least one Unit touching the frontend (web or mobile), a design
32
+ system component, or an identity/access/RBAC/SSO surface. Skipped only for Intents with
33
+ zero user-facing or access-model impact — rare, since most Intents eventually surface
34
+ somewhere in the UI.
35
+
36
+ ## 2. Required Content
37
+
38
+ - **Consumes.** Which Backend contract (if any) this one consumes verbatim, with
39
+ confirmation that no field is locally reinterpreted or renamed.
40
+ - **UI Flow.** The concrete step-by-step, tied to specific screens or components — not a
41
+ general description of the feature.
42
+ - **Shared Derivations, Sourced Not Re-Derived.** Point to the Backend contract's version
43
+ of anything both roles need (an ID derivation, a naming rule); never re-derive it
44
+ independently.
45
+ - **Identity / Access Implications.** Stated explicitly even when the answer is "none for
46
+ this Intent" — never left implicit. This is the one open risk area (SRS §9, no
47
+ RBAC/SSO in POC scope) most likely to get silently assumed away if it isn't required in
48
+ writing every time.
49
+ - **Components Touched (Design-Code Dictionary impact).**
50
+ - **Sign-Off.**
51
+
52
+ ## 3. Change Log
53
+
54
+ | Version | Date | Change | Trigger |
55
+ |---|---|---|---|
56
+ | 0.1.0 | [date] | Initial version | Companion to the five sibling `*-contract-generation-rules.md` files |
@@ -0,0 +1,86 @@
1
+ ---
2
+ document: Quality Architecture Contract — Generation Rules
3
+ project: "{{PROJECT_NAME}}"
4
+ version: 0.5.0
5
+ owner: "[Quality Architect name]"
6
+ last_updated: "[YYYY-MM-DD]"
7
+ status: draft
8
+ ---
9
+
10
+ # Quality Architecture Contract: Generation Rules
11
+
12
+ **What this file is:** the rules the AI agent follows to draft a Quality Architecture
13
+ Contract for an Intent, during Mob Elaboration Phases 2–5 — what triggers producing one,
14
+ and what it must contain when it does. This file owns the **Intent-Specific Gates** only
15
+ (`PROJECT-RULES.md` §5.2) — content that's regenerated fresh per Intent. It does not
16
+ define, and a generated contract must never redefine, the **Solution-Specific Gates**
17
+ (Build, Code Coverage, Code Quality, Reusability/Duplication, Regression Test, SAST) —
18
+ those are fixed codebase-wide thresholds set once in §5.2, not something any single
19
+ Intent opts into or out of.
20
+
21
+ **What this file is not:** not the worked example —
22
+ `docs/templates/samples/contracts/quality-architecture-contract.md` is the canonical
23
+ shape and sign-off format, filled in for `INTENT-004`. Not the draft/human-edit
24
+ relationship either — every generated contract is a starting framework, never a verdict;
25
+ see the AI-Native Engineering Model's §Mob Elaboration for how the Quality Architect
26
+ accepts, extends, or simplifies it before Sign-Off.
27
+
28
+ **Companion files:** [unit-breakdown-rules.md](./unit-breakdown-rules.md) (same
29
+ Elaboration session). The other five `*-architecture-contract-generation-rules.md` files
30
+ are siblings, one per role.
31
+
32
+ ---
33
+
34
+ ## 1. When This Contract Is Required
35
+
36
+ **Almost always.** Any Intent that reaches Implementation (Fig. 2 Stage 6) at all gets a
37
+ Quality Architecture Contract. The rare exception is an Intent whose Units are pure
38
+ documentation or process changes with no code path to test.
39
+
40
+ ## 2. Required Content
41
+
42
+ - **Required Test Coverage table.** One row per meaningful scenario, and — this is the
43
+ load-bearing rule, not a formatting preference — **every row traces to one of the
44
+ owning Unit's own stated Acceptance Criteria** (`unit-XXX-design.md`, per
45
+ `unit-breakdown-rules.md` §2), not surfaced independently from Elaboration discussion
46
+ and hoped to line up. Each row is also classified by type — never left as an unlabeled
47
+ list:
48
+ - **Happy Path** — the primary success scenario(s).
49
+ - **Negative Path** — deliberate invalid input, with a specific expected failure
50
+ response (not just "it errors").
51
+ - **Edge Case** — a boundary condition or ambiguous scenario that's neither a clean
52
+ success nor a clean rejection. This is where a Known Gap most often originates — see
53
+ below.
54
+
55
+ **Both directions of the trace are checked, not just one:** every Acceptance
56
+ Criterion gets at least one covering row, and every row names the criterion it
57
+ verifies — or is marked explicitly supplementary rather than left looking like
58
+ undocumented coverage. A criterion with no covering row is a Known Gap, logged below,
59
+ not silently assumed to be "probably fine." The worked example demonstrates exactly
60
+ this: one row in `quality-architecture-contract.md` traces to nothing, which is how
61
+ its Known Gap got caught rather than missed.
62
+
63
+ Collectively, this table is what `PROJECT-RULES.md` §5.2's Unit Test Gate (and, where
64
+ more than one component is touched, the Integration Test Gate) run against — both
65
+ Intent-Specific. See §5.2 for the full nine-gate taxonomy and where the line sits
66
+ against the six fixed Solution-Specific gates this file never touches.
67
+ - **NFRs in Scope (Intent NFR gate).** Which of the SRS's existing non-functional
68
+ requirements this Intent's Units are held to, *beyond* the solution-wide baseline
69
+ §5.2 already sets; state "none beyond the standing baseline" explicitly when true,
70
+ rather than leaving the section blank.
71
+ - **Known Gaps.** Anything the room identified as untested and consciously accepted —
72
+ flagged, not silently dropped. Matches the worked example's `{user}`-derivation
73
+ collision gap.
74
+ - **Definition of Done addition**, specific to this Intent, beyond `PROJECT-RULES.md`
75
+ §5.1's standing checklist — only if this Intent actually needs one.
76
+ - **Sign-Off.**
77
+
78
+ ## 3. Change Log
79
+
80
+ | Version | Date | Change | Trigger |
81
+ |---|---|---|---|
82
+ | 0.1.0 | [date] | Initial version | Companion to the five sibling `*-contract-generation-rules.md` files |
83
+ | 0.2.0 | [date] | Required Test Coverage rows must now be classified Happy Path / Negative Path / Edge Case, and explicitly tied to `PROJECT-RULES.md` §5.2's Unit/Integration Test Gates | Quality gate types were unspecified; §5.2 was a placeholder |
84
+ | 0.3.0 | [date] | Scoped this file to Intent-Specific Gates only; Solution-Specific Gates (Code Coverage, Code Quality, Reusability, SAST, Build) are fixed in §5.2 and out of scope for any generated contract | Gate taxonomy split into Intent-Specific vs. Solution-Specific categories |
85
+ | 0.4.0 | [date] | Required Test Coverage rows must now trace to the owning Unit's stated Acceptance Criteria in both directions — every criterion covered, every row justified | Should a Unit's acceptance criteria be the same thing its unit tests are based on? |
86
+ | 0.5.0 | [date] | Solution-Specific gate list now includes Regression Test (added in `PROJECT-RULES.md` §5.2) — six fixed gates, nine total | Should Quality Gates include a card for regression testing? |
@@ -0,0 +1,59 @@
1
+ ---
2
+ document: Solutions Architecture Contract — Generation Rules
3
+ project: "{{PROJECT_NAME}}"
4
+ version: 0.1.0
5
+ owner: "[Solutions Architect name]"
6
+ last_updated: "[YYYY-MM-DD]"
7
+ status: draft
8
+ ---
9
+
10
+ # Solutions Architecture Contract: Generation Rules
11
+
12
+ **What this file is:** the rules the AI agent follows to draft a Solutions Architecture
13
+ Contract for an Intent, during Mob Elaboration Phases 2–5 — what triggers producing one,
14
+ and what it must contain when it does.
15
+
16
+ **What this file is not:** not the worked example —
17
+ `docs/templates/samples/contracts/solutions-architecture-contract.md` is the canonical
18
+ shape and sign-off format, filled in for `INTENT-004`. Not the draft/human-edit
19
+ relationship either — every generated contract is a starting framework, never a verdict;
20
+ see the AI-Native Engineering Model's §Mob Elaboration for how the Solutions Architect
21
+ accepts, extends, or simplifies it before Sign-Off.
22
+
23
+ **Companion files:** [unit-breakdown-rules.md](./unit-breakdown-rules.md) (same
24
+ Elaboration session). The other five `*-architecture-contract-generation-rules.md` files
25
+ are siblings, one per role.
26
+
27
+ ---
28
+
29
+ ## 1. When This Contract Is Required
30
+
31
+ **Always.** Every Intent gets a Solutions Architecture Contract, even when the honest
32
+ assessment is "no cross-cutting impact, no new ADR needed." This is the one contract
33
+ never marked "not pulled in" — someone has to always confirm nothing systemic was
34
+ missed, and that confirmation *is* the contract. An empty-looking assessment is a
35
+ completed one, not a skipped one.
36
+
37
+ ## 2. Required Content
38
+
39
+ - **System-Level Assessment.** Does this Intent introduce a new system container, cross
40
+ a boundary named in the SRS's System Containers (Fig. 2), or need a new ADR? State the
41
+ answer plainly, including when it's "no" on every count — don't omit the section
42
+ because the answer is negative.
43
+ - **What This Intent Is Allowed to Touch.** An explicit boundary statement: which
44
+ containers/components are in scope for this Intent's Units of Work, and which are
45
+ explicitly out.
46
+ - **AI-Agent Guardrail Implications.** Does this Intent introduce any unsupervised-action
47
+ surface `PROJECT-RULES.md` §7 doesn't already cover — a new destructive operation, a
48
+ new external API call, a new credential path? Flag it explicitly; don't assume the
49
+ existing rules cover a case they were never written against.
50
+ - **Cross-Role Consistency Check.** Confirms the other contracts produced this session
51
+ don't contradict each other — this is the Solutions Architect's half of Phase 6's
52
+ Consistency Gate, recorded in writing rather than only spoken in the room.
53
+ - **Sign-Off.**
54
+
55
+ ## 3. Change Log
56
+
57
+ | Version | Date | Change | Trigger |
58
+ |---|---|---|---|
59
+ | 0.1.0 | [date] | Initial version | Companion to the five sibling `*-contract-generation-rules.md` files |
@@ -0,0 +1,121 @@
1
+ ---
2
+ document: Unit of Work Decomposition Rules
3
+ project: "{{PROJECT_NAME}}"
4
+ version: 0.2.0
5
+ owner: "[Process Facilitator name]"
6
+ last_updated: "[YYYY-MM-DD]"
7
+ status: draft
8
+ ---
9
+
10
+ # Unit of Work Decomposition Rules
11
+
12
+ **What this file is:** the rules the AI agent follows when proposing a Unit of Work
13
+ breakdown at Mob Elaboration Phase 2 (Strawman Review) — how to cut one Intent into
14
+ Units, how to classify each Unit as a Story or a Bug, and the sizing signals that say a
15
+ strawman is cut wrong before the room spends time negotiating around a bad boundary.
16
+
17
+ **What this file is not:** not the ticket field shape (`ISSUE-TRACKER-TEMPLATE.md`
18
+ governs that), not the ceremony's choreography (the AI-Native Engineering Model's
19
+ &sect; Mob Elaboration governs that), not the Intent template itself. This file governs
20
+ one specific judgment call: given an approved Intent, what its Units of Work are.
21
+
22
+ **Companion files:** [ISSUE-TRACKER-TEMPLATE.md](./ISSUE-TRACKER-TEMPLATE.md) is where a
23
+ Unit of Work, once decided here, becomes a ticket. [PROJECT-RULES.md](./PROJECT-RULES.md)
24
+ §7 rule 12 is the operating rule this file implements.
25
+
26
+ ---
27
+
28
+ ## 1. What a Unit of Work Is
29
+
30
+ The smallest slice of an Intent that can be:
31
+
32
+ - **designed** by one owning role, without needing another role's design to already
33
+ exist first (though it may *reference* another role's contract),
34
+ - **gated** independently at Fig. 2's Stage 5 (Per-Unit Design Approved) and Stage 8
35
+ (Merge Approval), without waiting on a sibling Unit's gate, and
36
+ - **implemented** by the AI agent in one sitting, without losing the earlier reasoning
37
+ in its own context (`PROJECT-RULES.md` §7 rule 8, scope discipline).
38
+
39
+ A Unit of Work is never split further inside the ticket tracker by default
40
+ (`ISSUE-TRACKER-TEMPLATE.md` §2) — the Unit boundary *is* the atomic boundary. If a
41
+ "Unit" doesn't fit in one sitting, it was cut wrong; fix the cut, don't add sub-tasks
42
+ around it.
43
+
44
+ ## 2. Acceptance Criteria — every Unit states its own
45
+
46
+ A Unit of Work carries its own Acceptance Criteria, stated once in its design doc
47
+ (`unit-XXX-design.md`, Fig. 2 Stage 4) — narrowed from the Intent's own Success Criteria
48
+ (`intent.md`) down to just this Unit's slice. Not a restatement of the whole Intent's
49
+ criteria on every Unit; each Unit states only the part of "done" that's actually its own
50
+ to satisfy.
51
+
52
+ **The traceability rule this exists to enforce:** the Quality Architecture Contract's
53
+ Required Test Coverage table (`quality-architecture-contract-generation-rules.md` §2) is
54
+ generated *from* this list, not surfaced independently and hoped to line up. Every
55
+ stated Acceptance Criterion gets at least one Happy Path, Negative Path, or Edge Case
56
+ test row that verifies it; every test row traces back to a criterion it verifies, or is
57
+ marked explicitly supplementary rather than left looking like undocumented coverage. A
58
+ criterion with no covering test row is a Known Gap (`PROJECT-RULES.md` §6) the same way
59
+ an untested edge case already is — not silently assumed to be "probably fine."
60
+
61
+ Without a named source, a Unit's tests and its actual "done" bar are two independently
62
+ populated lists that happen to usually agree — right up until they don't. This is the
63
+ rule that closes that gap. See the worked example: `unit-004-02-backend-design.md`'s
64
+ four Acceptance Criteria are what `quality-architecture-contract.md`'s test table
65
+ traces to, row by row — including the one row that traces to nothing, which is exactly
66
+ how that Unit's Known Gap got caught instead of missed.
67
+
68
+ ## 3. Story or Bug — the classification rule
69
+
70
+ Every Unit of Work is exactly one of these two ticket types. Classify per Unit, not per
71
+ Intent — one Intent can produce a mix of both.
72
+
73
+ | Classify as | When | Example |
74
+ |---|---|---|
75
+ | **Story** | The Unit adds or changes a capability &mdash; net-new or intentionally different behavior | The branch-override selector itself (`UNIT-004-01`) |
76
+ | **Bug** | The Unit brings existing, already-shipped behavior back in line with a spec, contract, or FR it currently violates | A previously merged Unit's `{user}` derivation collides on two usernames in production |
77
+
78
+ **Boundary case:** a defect found *during* Construction of a Story, before that Story's
79
+ own Merge Approval, is fixed inside that same Unit — it does not spin out as a separate
80
+ Bug. Only a defect discovered *after* a Unit has already merged becomes its own Bug-type
81
+ Unit — under a fast, often single-Unit Intent of its own, or folded into a Known Gap per
82
+ `PROJECT-RULES.md` §6 if it isn't urgent enough to justify a full Mob Elaboration pass by
83
+ itself.
84
+
85
+ ## 4. Decomposition Heuristics
86
+
87
+ Applied by the AI agent when proposing the Phase 2 strawman, and by the room when
88
+ critiquing it:
89
+
90
+ - **One primary owning role per Unit.** If a Unit's design would need two Architects to
91
+ co-author it, it's two Units connected by a contract, not one Unit that spans both.
92
+ This is what turns Fig. 2 Stage 4 into "&times;N roles in parallel" instead of one
93
+ tangled design.
94
+ - **A shared dependency is a contract, not a split.** When two Units both need the same
95
+ answer to something (the worked example's `{user}` derivation rule), that answer is
96
+ negotiated once, in a contract, and referenced by both — never independently
97
+ re-derived, and never used as a reason to merge the two Units into one.
98
+ - **Size to one sitting.** If a Unit's own design doc is trending toward the size of
99
+ several of the worked examples combined, that's a smell the Unit is actually two.
100
+ - **Don't split to satisfy an org chart.** A Unit boundary is justified by an
101
+ independent design-and-gate need, never by "everyone should have something to own."
102
+ Splitting a naturally single-role, single-behavior change into two Units just to give
103
+ a second role a ticket produces busywork, not independence.
104
+ - **Watch the Unit count as a signal, not a rule.** One Unit for an Intent that went
105
+ through full Joint Elaboration is a sign the Intent probably didn't need the
106
+ cross-role machinery at all. More than roughly six to eight Units is a sign the
107
+ "Intent" was actually several Intents bundled together and should have been split
108
+ before Elaboration, not after.
109
+
110
+ ## 5. Numbering
111
+
112
+ `UNIT-<INTENT-NUMBER>-<sequence>`, zero-padded two digits — `UNIT-004-01`,
113
+ `UNIT-004-02`, matching the worked example in `docs/templates/samples/`. Sequence order
114
+ follows the order Units are listed in `unit-breakdown.md`, not build or gate order.
115
+
116
+ ## 6. Change Log
117
+
118
+ | Version | Date | Change | Trigger |
119
+ |---|---|---|---|
120
+ | 0.1.0 | [date] | Initial version | Clarifying how Units of Work get decomposed, classified (Story/Bug), and sized, separate from how they're ticketed |
121
+ | 0.2.0 | [date] | Added §2: every Unit states its own Acceptance Criteria, and the Quality Architecture Contract's test coverage table must trace to them, not be surfaced independently | Should a Unit's acceptance criteria be the same thing its unit tests are based on? |