@techierathore/techieflow 1.0.2 → 1.0.3

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 (174) hide show
  1. package/.claude/commands/TechieFlow/agents/analyst.md +0 -5
  2. package/.claude/commands/TechieFlow/agents/architect.md +0 -6
  3. package/.claude/commands/TechieFlow/agents/flow-master.md +41 -215
  4. package/.claude/commands/TechieFlow/agents/verifier.md +23 -64
  5. package/.claude/commands/TechieFlow/tasks/_metrics-emit-gate.md +24 -117
  6. package/.claude/commands/TechieFlow/tasks/_smoke-test-policy.md +20 -84
  7. package/.claude/commands/TechieFlow/tasks/_status-update-gate.md +10 -74
  8. package/.claude/commands/TechieFlow/tasks/_yolo-mode.md +20 -58
  9. package/.claude/commands/TechieFlow/tasks/amend-docs.md +20 -143
  10. package/.claude/commands/TechieFlow/tasks/build-phase.md +14 -224
  11. package/.claude/commands/TechieFlow/tasks/day1-brownfield.md +31 -505
  12. package/.claude/commands/TechieFlow/tasks/day1-greenfield.md +28 -213
  13. package/.claude/commands/TechieFlow/tasks/deploy-checklist.md +19 -0
  14. package/.claude/commands/TechieFlow/tasks/devguide.md +10 -219
  15. package/.claude/commands/TechieFlow/tasks/fix-issues.md +10 -129
  16. package/.claude/commands/TechieFlow/tasks/log-miss.md +19 -158
  17. package/.claude/commands/TechieFlow/tasks/metrics-report.md +1 -1
  18. package/.claude/commands/TechieFlow/tasks/mockups.md +12 -117
  19. package/.claude/commands/TechieFlow/tasks/refresh-status.md +9 -130
  20. package/.claude/commands/TechieFlow/tasks/split-brd.md +10 -126
  21. package/.claude/commands/TechieFlow/tasks/triage-and-fix.md +14 -0
  22. package/.claude/commands/TechieFlow/tasks/triage-issues.md +11 -152
  23. package/.claude/commands/TechieFlow/tasks/verify-phase.md +36 -572
  24. package/.opencode/plugin/techieflow.js +39 -12
  25. package/.tfcore/agents/analyst.md +0 -5
  26. package/.tfcore/agents/architect.md +0 -6
  27. package/.tfcore/agents/flow-master.md +41 -215
  28. package/.tfcore/agents/verifier.md +23 -64
  29. package/.tfcore/core-config.yaml +10 -0
  30. package/.tfcore/hooks/block-git.sh +4 -4
  31. package/.tfcore/hooks/guard-artifacts.sh +2 -2
  32. package/.tfcore/hooks/guard-build.sh +76 -0
  33. package/.tfcore/hooks/guard-db.sh +90 -0
  34. package/.tfcore/hooks/guard-metrics.sh +56 -0
  35. package/.tfcore/hooks/guard-status-html.sh +116 -71
  36. package/.tfcore/hooks/guard-status.sh +43 -16
  37. package/.tfcore/hooks/guard-verify.sh +70 -48
  38. package/.tfcore/hooks/sweep-artifacts.sh +2 -2
  39. package/.tfcore/install-manifest.yaml +0 -18
  40. package/.tfcore/routing.yaml +25 -14
  41. package/.tfcore/standards/coding-standards-core.md +61 -0
  42. package/.tfcore/standards/coding-standards-dotnet.md +93 -0
  43. package/.tfcore/tasks/_metrics-emit-gate.md +24 -117
  44. package/.tfcore/tasks/_smoke-test-policy.md +20 -84
  45. package/.tfcore/tasks/_status-update-gate.md +10 -74
  46. package/.tfcore/tasks/_yolo-mode.md +20 -58
  47. package/.tfcore/tasks/amend-docs.md +20 -143
  48. package/.tfcore/tasks/build-phase.md +14 -224
  49. package/.tfcore/tasks/day1-brownfield.md +31 -505
  50. package/.tfcore/tasks/day1-greenfield.md +28 -213
  51. package/.tfcore/tasks/deploy-checklist.md +19 -0
  52. package/.tfcore/tasks/devguide.md +10 -219
  53. package/.tfcore/tasks/fix-issues.md +10 -129
  54. package/.tfcore/tasks/log-miss.md +19 -158
  55. package/.tfcore/tasks/metrics-report.md +1 -1
  56. package/.tfcore/tasks/mockups.md +12 -117
  57. package/.tfcore/tasks/refresh-status.md +9 -130
  58. package/.tfcore/tasks/split-brd.md +10 -126
  59. package/.tfcore/tasks/triage-and-fix.md +14 -0
  60. package/.tfcore/tasks/triage-issues.md +11 -152
  61. package/.tfcore/tasks/verify-phase.md +36 -572
  62. package/.tfcore/telemetry/SCHEMA.md +43 -7
  63. package/.tfcore/telemetry/tf-metrics.sh +152 -17
  64. package/.tfcore/templates/project-brief-tmpl.yaml +1 -1
  65. package/.tfcore/templates/stack-defaults/dotnet.md +35 -0
  66. package/.tfcore/templates/stack-questions.md +77 -0
  67. package/.tfcore/templates/v4custom/app-agents-md-tmpl.md +3 -4
  68. package/.tfcore/templates/v4custom/app-architecture-tmpl.md +107 -115
  69. package/.tfcore/templates/v4custom/app-brd-tmpl.md +108 -184
  70. package/.tfcore/templates/v4custom/app-checklist-tmpl.md +48 -73
  71. package/.tfcore/templates/v4custom/app-claude-md-tmpl.md +1 -1
  72. package/.tfcore/templates/v4custom/app-coding-standards-tmpl.md +52 -0
  73. package/.tfcore/templates/v4custom/app-deployment-checklist-tmpl.md +86 -0
  74. package/.tfcore/templates/v4custom/app-devguide-tmpl.md +69 -146
  75. package/.tfcore/templates/v4custom/app-phases-tmpl.md +35 -0
  76. package/.tfcore/templates/v4custom/app-productguide-tmpl.md +38 -35
  77. package/.tfcore/templates/v4custom/app-project-status-tmpl.md +63 -73
  78. package/.tfcore/templates/v4custom/app-uidesign-tmpl.md +62 -37
  79. package/.tfcore/templates/v4custom/app-usageguide-tmpl.md +69 -54
  80. package/.tfcore/templates/v4custom/build-invocation-ladder.md +17 -180
  81. package/.tfcore/templates/v4custom/build-subagent-prompt.md +17 -0
  82. package/.tfcore/templates/v4custom/metrics-report-template.md +2 -2
  83. package/.tfcore/user-guide.md +0 -23
  84. package/.tfcore/utils/__pycache__/tf-brd-status.cpython-312.pyc +0 -0
  85. package/.tfcore/utils/__pycache__/tf-checklist-edit.cpython-312.pyc +0 -0
  86. package/.tfcore/utils/__pycache__/tf-codex-bind.cpython-312.pyc +0 -0
  87. package/.tfcore/utils/__pycache__/tf-codex-telemetry.cpython-312.pyc +0 -0
  88. package/.tfcore/utils/__pycache__/tf-day1-files.cpython-312.pyc +0 -0
  89. package/.tfcore/utils/__pycache__/tf-devguide-list.cpython-312.pyc +0 -0
  90. package/.tfcore/utils/__pycache__/tf-doc-check.cpython-312.pyc +0 -0
  91. package/.tfcore/utils/__pycache__/tf-log-miss.cpython-312.pyc +0 -0
  92. package/.tfcore/utils/__pycache__/tf-misses-md.cpython-312.pyc +0 -0
  93. package/.tfcore/utils/__pycache__/tf-mockups-locate.cpython-312.pyc +0 -0
  94. package/.tfcore/utils/__pycache__/tf-opencode-audit.cpython-312.pyc +0 -0
  95. package/.tfcore/utils/__pycache__/tf-perf-grade.cpython-312.pyc +0 -0
  96. package/.tfcore/utils/__pycache__/tf-render-html.cpython-312.pyc +0 -0
  97. package/.tfcore/utils/__pycache__/tf-split-brd.cpython-312.pyc +0 -0
  98. package/.tfcore/utils/__pycache__/tf-status-facts.cpython-312.pyc +0 -0
  99. package/.tfcore/utils/__pycache__/tf-triage.cpython-312.pyc +0 -0
  100. package/.tfcore/utils/__pycache__/tf-verify-list.cpython-312.pyc +0 -0
  101. package/.tfcore/utils/__pycache__/tf-verify-verdict.cpython-312.pyc +0 -0
  102. package/.tfcore/utils/tf-brd-status.py +176 -0
  103. package/.tfcore/utils/tf-brd-status.sh +19 -0
  104. package/.tfcore/utils/tf-build-list.py +191 -0
  105. package/.tfcore/utils/tf-build-list.sh +20 -0
  106. package/.tfcore/utils/tf-build.sh +143 -0
  107. package/.tfcore/utils/tf-cdp-relay.ps1 +64 -0
  108. package/.tfcore/utils/tf-checklist-edit.py +133 -0
  109. package/.tfcore/utils/tf-day1-files.py +208 -0
  110. package/.tfcore/utils/tf-day1-files.sh +20 -0
  111. package/.tfcore/utils/tf-devguide-list.py +249 -0
  112. package/.tfcore/utils/tf-devguide-list.sh +18 -0
  113. package/.tfcore/utils/tf-doc-check.py +1267 -0
  114. package/.tfcore/utils/tf-doc-check.sh +29 -0
  115. package/.tfcore/utils/tf-emit.sh +203 -13
  116. package/.tfcore/utils/tf-fix-close.sh +83 -0
  117. package/.tfcore/utils/tf-goal.sh +193 -62
  118. package/.tfcore/utils/tf-harness.sh +4 -9
  119. package/.tfcore/utils/tf-log-miss.py +197 -0
  120. package/.tfcore/utils/tf-log-miss.sh +14 -0
  121. package/.tfcore/utils/tf-misses-md.py +211 -0
  122. package/.tfcore/utils/tf-misses-md.sh +13 -0
  123. package/.tfcore/utils/tf-mockups-locate.py +66 -0
  124. package/.tfcore/utils/tf-mockups-locate.sh +18 -0
  125. package/.tfcore/utils/tf-opencode-audit.py +23 -7
  126. package/.tfcore/utils/tf-perf-grade.py +97 -0
  127. package/.tfcore/utils/tf-perf-grade.sh +12 -0
  128. package/.tfcore/utils/tf-phase.sh +74 -0
  129. package/.tfcore/utils/tf-routing-bind.sh +10 -5
  130. package/.tfcore/utils/tf-routing.sh +6 -7
  131. package/.tfcore/utils/tf-split-brd.py +304 -0
  132. package/.tfcore/utils/tf-split-brd.sh +22 -0
  133. package/.tfcore/utils/tf-status-evidence.sh +68 -0
  134. package/.tfcore/utils/tf-status-facts.py +309 -0
  135. package/.tfcore/utils/tf-status-facts.sh +20 -0
  136. package/.tfcore/utils/tf-triage.py +243 -0
  137. package/.tfcore/utils/tf-triage.sh +16 -0
  138. package/.tfcore/utils/tf-verify-boot.sh +250 -0
  139. package/.tfcore/utils/tf-verify-emit.sh +110 -0
  140. package/.tfcore/utils/tf-verify-env.sh +88 -0
  141. package/.tfcore/utils/tf-verify-list.py +270 -0
  142. package/.tfcore/utils/tf-verify-list.sh +13 -0
  143. package/.tfcore/utils/tf-verify-screens.mjs +283 -0
  144. package/.tfcore/utils/tf-verify-screens.sh +22 -0
  145. package/.tfcore/utils/tf-verify-tests.sh +123 -0
  146. package/.tfcore/utils/tf-verify-verdict.py +283 -0
  147. package/.tfcore/utils/tf-verify-verdict.sh +15 -0
  148. package/.tfcore/utils/tf-yolo.sh +59 -0
  149. package/README.md +114 -1149
  150. package/docs/TechieFlow-Installation.md +1 -5
  151. package/opencode.jsonc +13 -33
  152. package/package.json +1 -5
  153. package/scripts/install.mjs +52 -46
  154. package/.claude/commands/TechieFlow/tasks/advanced-elicitation.md +0 -117
  155. package/.claude/commands/TechieFlow/tasks/author-brd.md +0 -79
  156. package/.claude/commands/TechieFlow/tasks/document-project.md +0 -343
  157. package/.claude/commands/TechieFlow/tasks/execute-checklist.md +0 -86
  158. package/.claude/commands/TechieFlow/tasks/index-docs.md +0 -173
  159. package/.claude/commands/TechieFlow/tasks/kb-mode-interaction.md +0 -75
  160. package/.claude/commands/TechieFlow/tasks/shard-doc.md +0 -185
  161. package/.codex/config.toml +0 -46
  162. package/.codex/hooks.json +0 -63
  163. package/.codex/rules/techieflow.rules +0 -8
  164. package/.tfcore/hooks/codex-adapter.py +0 -248
  165. package/.tfcore/tasks/advanced-elicitation.md +0 -117
  166. package/.tfcore/tasks/author-brd.md +0 -79
  167. package/.tfcore/tasks/document-project.md +0 -343
  168. package/.tfcore/tasks/execute-checklist.md +0 -86
  169. package/.tfcore/tasks/index-docs.md +0 -173
  170. package/.tfcore/tasks/kb-mode-interaction.md +0 -75
  171. package/.tfcore/tasks/shard-doc.md +0 -185
  172. package/.tfcore/utils/tf-codex-bind.py +0 -196
  173. package/.tfcore/utils/tf-codex-telemetry.py +0 -60
  174. package/WORKFLOW.html +0 -1986
@@ -1,127 +1,119 @@
1
- # {AppName} — Architecture
2
-
3
- **Last updated:** {YYYY-MM-DD}
4
- **Status:** Current (brownfield) | Target (greenfield) | Current + planned target (brownfield with structural change)
5
-
6
- <!-- AGENT-ONLY AUTHORING NOTES. Everything in this comment is an instruction to the DRAFTING
7
- AGENT, not content for the document's human reader. Carry it into the generated document
8
- ONLY as this HTML comment (or drop it entirely) — NEVER as visible text: the owner reads
9
- the rendered HTML and must not see authoring instructions (generate-html.md strips any
10
- that leaked from older templates).
11
-
12
- DEPTH MANDATE: this is a HUMAN document, read as rendered HTML. Module rows in §4 with
13
- non-trivial behavior get a prose paragraph beneath the table, and every significant runtime
14
- flow beyond §3's primary path (background jobs, ingestion pipelines, auth handshakes,
15
- external-API round-trips) gets its own sequenceDiagram/flowchart. When harvesting source
16
- docs, preserve their architecture content — superset, never summary.
17
-
18
- MERMAID MANDATE: every diagram MUST follow the authoring rules in
19
- .tfcore/templates/v4custom/html-render-shell.md §5.5 — quote every node/edge/subgraph label
20
- (API["ASP.NET API (v2)"], not API[ASP.NET API (v2)]) and never use `end` as a node id.
21
- Unquoted special characters ( ( ) / & : , … ) in flowchart labels are the #1 cause of
22
- "Syntax error" diagrams in the rendered HTML.
1
+ <!-- tf-schema
2
+ doc: architecture
3
+ file: docs/{App}-Architecture.md
4
+ header: App, Kind, Size, Stack answer set, Date
5
+ section: Stack decisions | required
6
+ section: Solution structure | required
7
+ section: Component map | required
8
+ section: Data model | required
9
+ section: Cross-cutting | required
10
+ section: Decisions log | required
11
+ section: Module responsibilities | optional-small
12
+ section: Open questions | optional
13
+ rule: stack-rows
14
+ rule: head-project
15
+ budget: S 2500 3500 | M 4000 6000 | L 4000 6000
16
+ rule: stack-table
17
+ rule: solution-table
18
+ rule: request-flow
19
+ rule: er-diagram
20
+ rule: decisions-log
23
21
  -->
22
+ <!-- Authoring notes (agent only; never visible text).
23
+ Sections and order are fixed by the schema above. The Stack decisions table answers the stack
24
+ questions (.tfcore/templates/stack-questions.md); answers taken from an answer set cite it.
25
+ No Deployment section: hosting is decided after UAT and lives in the Deployment Checklist; how a
26
+ developer runs the app lives in the UsageGuide. Detailed per-screen flows live in the DevGuide.
27
+ A brownfield project describes the code as it is; a planned change is a Decisions log row with
28
+ Status "planned" naming the BRD item that drives it.
29
+ Mermaid: quote every label; never use `end` as a node id. -->
30
+
31
+ # {App} — Architecture
32
+
33
+ | | |
34
+ |---|---|
35
+ | App | {App} |
36
+ | Kind | app or library |
37
+ | Size | Small, Medium or Large |
38
+ | Stack answer set | {name, or "none"} |
39
+ | Date | {YYYY-MM-DD} |
40
+
41
+ ## 1. Stack decisions
42
+
43
+ One row per stack question. "Source" says where the answer came from: the answer set, the owner, or the existing code.
44
+
45
+ | Q | Topic | Decision | Source |
46
+ |---|---|---|---|
47
+ | Q1 | Configuration | {…} | {answer set / owner / code} |
48
+ | Q2 | Secrets in development | {…} | {…} |
49
+ | Q3 | Database | {…} | {…} |
50
+ | Q4 | Authentication | {…} | {…} |
51
+ | Q5 | Logging | {…} | {…} |
52
+ | Q6 | Tests | {…} | {…} |
53
+ | Q7 | Layout and naming | {…} | {…} |
54
+ | Q8 | User interface | {…} | {…} |
55
+ | Q11 | Standing rules | {…} | {…} |
56
+
57
+ ## 2. Solution structure
58
+
59
+ | Project | Kind | Purpose |
60
+ |---|---|---|
61
+ | `{App}` | {web app, desktop app, API, …} | {the primary head} |
62
+ | `{App}.Core` | class library | {…} |
63
+ | `{App}Db` | migrations project | {…} |
64
+ | `{App}.Tests` | test project | {…} |
65
+
66
+ ## 3. Component map
24
67
 
25
- ## Table of Contents
26
-
27
- <!-- Auto-maintained by the analyst/day-1 tasks. Use the slug rule from .tfcore/templates/v4custom/html-render-shell.md §1 so links work in both MD and rendered HTML. Update this list whenever you add/rename a section. -->
28
-
29
- 1. [Tech stack](#tech-stack)
30
- 2. [Component map](#component-map)
31
- 3. [Data flow — primary path](#data-flow-primary-path)
32
- 4. [Module responsibilities](#module-responsibilities)
33
- 5. [Cross-cutting concerns](#cross-cutting-concerns)
34
- 6. [Deployment architecture](#deployment-architecture)
35
- 7. [Architectural decisions (ADR-style log)](#architectural-decisions-adr-style-log)
36
- 8. [Target architecture (brownfield only — if enhancement changes structure)](#target-architecture-brownfield-only-if-enhancement-changes-structure)
37
- 9. [Open questions / risks](#open-questions-risks)
38
-
39
- ## 1. Tech stack
40
- | Layer | Choice | Version | Notes |
41
- |-------|--------|---------|-------|
42
- | Runtime | .NET 9 | … | … |
43
- | UI | Blazor [Server/WASM/Auto] + TrBlazeUI | … | … |
44
- | AI/RAG | TechieRag | … | If applicable |
45
- | DB | SQL Server / SQLite / Postgres | … | … |
46
- | Vector store | SqliteVec / PgVector / Qdrant | … | If RAG |
47
- | Auth | … | … | … |
48
-
49
- ## 2. Component map
50
68
  ```mermaid
51
69
  flowchart TB
52
- subgraph UI["Blazor UI"]
53
- Dash["Dashboard"]
54
- Settings["Settings"]
55
- end
56
- subgraph BE["Backend"]
57
- API["API"]
58
- Auth["Auth"]
59
- Rag["RAG service"]
60
- end
61
- subgraph Data["Data"]
62
- SQL[("SQL")]
63
- Vec[("Vector")]
64
- end
65
- UI --> API
66
- API --> Auth
67
- API --> Rag
68
- Rag --> Vec
69
- API --> SQL
70
+ UI["UI"] --> Svc["Services"]
71
+ Svc --> Data["Data access"]
72
+ Data --> DB[("Database")]
70
73
  ```
71
74
 
72
- ## 3. Data flow — primary path
73
- ```mermaid
74
- sequenceDiagram
75
- actor U
76
- participant UI
77
- participant API
78
- participant Svc as Service
79
- participant DB
80
- U->>UI: action
81
- UI->>API: HTTPS
82
- API->>Svc: call
83
- Svc->>DB: query
84
- DB-->>Svc: rows
85
- Svc-->>API: dto
86
- API-->>UI: json
87
- UI-->>U: render
88
- ```
75
+ **How a request travels** (one typical request, in words; per-screen detail is in the DevGuide):
76
+ 1. {The page calls …}
77
+ 2. {The service …}
78
+ 3. {The data access …}
79
+ 4. {The result is shown …}
80
+
81
+ ## 4. Data model
89
82
 
90
- ## 4. Module responsibilities
91
- | Module | Responsibility | Depends on |
92
- |--------|----------------|------------|
93
- | `src/{AppName}.Web` | UI host | Domain, Infra |
94
- | `src/{AppName}.Domain` | Entities, business rules | (none) |
95
- | `src/{AppName}.Infrastructure` | EF, external services | Domain |
96
- | `src/{AppName}.Rag` | TechieRag wiring (if applicable) | Domain |
97
-
98
- ## 5. Cross-cutting concerns
99
- - Logging — Serilog file-based logging (rolling file sink under `logs/`, wired at startup in EVERY executable head — web, API, MAUI, desktop, console; app code logs via `ILogger<T>`). This is a TechieFlow standing requirement, not a per-app choice — see Coding Standards §Logging.
100
- - Error handling — global middleware; ProblemDetails responses
101
- - Auth — JWT / cookie / Azure AD
102
- - Caching — IMemoryCache / Redis
103
- - Telemetry — OpenTelemetry / Application Insights
104
-
105
- ## 6. Deployment architecture
106
83
  ```mermaid
107
- flowchart LR
108
- Dev["Dev"] --> CI["GitHub Actions"]
109
- CI --> Reg["Container Reg"]
110
- Reg --> AKS["Azure App Service / AKS"]
111
- AKS --> ProdDB[("SQL")]
84
+ erDiagram
85
+ USER ||--o{ ENTRY : writes
86
+ ENTRY {
87
+ int EntryId PK
88
+ string Title
89
+ }
112
90
  ```
113
91
 
114
- ## 7. Architectural decisions (ADR-style log)
115
- - **ADR-001 — <decision>.** Reason: …
116
- - **ADR-002 — <decision>.** Reason: …
92
+ | Entity | Key fields | Notes |
93
+ |---|---|---|
94
+ | {Entity} | {…} | {…} |
117
95
 
118
- ## 8. Target architecture (brownfield only — if enhancement changes structure)
119
- ```mermaid
120
- flowchart TB
121
- Existing["existing module"] --> New["new / changed module"]
122
- New --> Removed["removed box (struck through in prose)"]
123
- ```
124
- Describe deltas: what's added, what's removed, what's renamed, migration path.
96
+ ## 5. Cross-cutting
97
+
98
+ - **Identity:** {AppManager API, or the mechanism chosen at Q4}.
99
+ - **Configuration:** {…}
100
+ - **Logging:** {…}
101
+ - **Errors:** {…}
102
+
103
+ ## 6. Decisions log
104
+
105
+ One row per decision. Every package added to the project has a row saying why.
106
+
107
+ | Date | Decision | Why | Status |
108
+ |---|---|---|---|
109
+ | {YYYY-MM-DD} | {…} | {…} | decided, planned, done |
110
+
111
+ ## 7. Module responsibilities
112
+
113
+ | Module | Responsibility | Depends on |
114
+ |---|---|---|
115
+ | {…} | {…} | {…} |
116
+
117
+ ## 8. Open questions
125
118
 
126
- ## 9. Open questions / risks
127
- - …
119
+ - {…}
@@ -1,204 +1,128 @@
1
- # {AppName} — Business Requirements
2
-
3
- <!-- AGENT-ONLY AUTHORING NOTES. Everything in this comment is an instruction to the DRAFTING
4
- AGENT, not content for the document's human reader. Carry it into the generated document
5
- ONLY as this HTML comment (or drop it entirely) — NEVER as visible text: the owner reads
6
- the rendered HTML and must not see authoring instructions (generate-html.md strips any
7
- that leaked from older templates).
8
-
9
- STABLE IDS: every requirement has a BRD-{N} ID. IDs are append-only across revisions.
10
-
11
- DEPTH MANDATE (read before drafting): this is a HUMAN document, read as rendered HTML by the
12
- product owner. It is NOT the coding checklist (that's docs/{AppName}-Checklist.md / split-brd
13
- output). One-line entries belong ONLY in §10's requirements ledger. Every other section is
14
- full prose, tables, and Mermaid diagrams. §9 Feature catalog is the heart of the document —
15
- one detailed subsection per feature, with screens, workflows, and a diagram wherever the flow
16
- is non-trivial. When harvesting existing source docs, this document must be an
17
- information-preserving SUPERSET of their requirements content: carry their tables, matrices,
18
- screen inventories, and menus forward (updated, not summarized away). If a reader of the old
19
- doc would miss something in this one, the draft is wrong.
20
-
21
- MERMAID MANDATE: every diagram MUST follow the authoring rules in
22
- .tfcore/templates/v4custom/html-render-shell.md §5.5 — quote every node/edge/subgraph label
23
- (A["Order Service (v2)"], not A[Order Service (v2)]) and never use `end` as a node id.
24
- Unquoted special characters ( ( ) / & : , … ) in flowchart labels are the #1 cause of
25
- "Syntax error" diagrams in the rendered HTML.
1
+ <!-- tf-schema
2
+ doc: brd
3
+ file: docs/{App}-BRD.md
4
+ header: App, Kind, Size, Stack answer set, Status, Date
5
+ section: Summary | required | max 200
6
+ section: Scope | required
7
+ section: Users and roles | required
8
+ section: Screens and flow | required
9
+ section: Requirements | required
10
+ section: Non-functional requirements | required
11
+ section: Development status | required
12
+ section: Context diagram | optional-small
13
+ section: Constraints and assumptions | optional-small
14
+ section: Risks | optional-small
15
+ section: Glossary | optional
16
+ budget: S 6000 8000 | M 10000 15000 | L 10000 15000
17
+ rule: brd-ledger
18
+ rule: screens-table
19
+ rule: mockup-links
26
20
  -->
21
+ <!-- Authoring notes (agent only; never visible text).
22
+ Sections and order are fixed by the schema above; tf-doc-check.sh refuses the document otherwise.
23
+ Word counts exclude code blocks and comments. The budget is met by shorter prose, never by dropping
24
+ a screen, a field or a requirement. BRD ids are append-only and never renumbered.
25
+ Size and requirement cap: Small up to 10 screens, one role, 50 requirements; Medium up to 20 screens,
26
+ 100 requirements; Large is split into phases, each phase its own BRD. Every routed page is a screen;
27
+ dialogs, tabs and panels are regions of their page and are listed under it.
28
+ Large project: one BRD per phase, phase 1 in docs/{App}-BRD.md, phase n in docs/{App}-Pn-BRD.md; the
29
+ header gains a row "| Phase | n of m |", Size is the phase's own size (Small or Medium), and BRD-N
30
+ runs on from the previous phase's last id. The phase plan is docs/{App}-Phases.md.
31
+ Mermaid: quote every label (A["Order (v2)"]); never use `end` as a node id. -->
27
32
 
33
+ # {App} — Business Requirements
28
34
 
29
- ## Table of Contents
30
-
31
- <!-- Auto-maintained by the analyst/day-1 tasks. Use the slug rule from .tfcore/templates/v4custom/html-render-shell.md §1 so links work in both MD and rendered HTML. Update this list whenever you add/rename a section. List each `### F-…` catalog entry as an H3 sub-entry under Feature catalog. -->
32
-
33
- 1. [Executive summary](#executive-summary)
34
- 2. [Business objectives](#business-objectives)
35
- 3. [Scope](#scope)
36
- 4. [Development status](#development-status)
37
- 5. [Stakeholders / users](#stakeholders-users)
38
- 6. [Context diagram](#context-diagram)
39
- 7. [User journey — primary use case](#user-journey-primary-use-case)
40
- 8. [Component sketch](#component-sketch)
41
- 9. [Feature catalog](#feature-catalog)
42
- 10. [Functional requirements (BRD ledger)](#functional-requirements-brd-ledger)
43
- 11. [Non-functional requirements](#non-functional-requirements)
44
- 12. [Constraints & assumptions](#constraints-assumptions)
45
- 13. [Success metrics](#success-metrics)
46
- 14. [Risks](#risks)
47
- 15. [Glossary](#glossary)
48
-
49
- ## 1. Executive summary
50
- <2-3 paragraphs: what we're building/changing and why it matters.>
51
-
52
- ## 2. Business objectives
53
- - <measurable objective 1>
54
- - <measurable objective 2>
55
-
56
- ## 3. Scope
57
- **In scope:** …
58
- **Out of scope (explicit):** …
59
-
60
- ## 4. Development status
61
-
62
- <!-- SNAPSHOT (point-in-time) of what is BUILT vs PENDING, at the feature level — the first thing a
63
- reader of an existing app wants to know. This is a HUMAN summary, NOT a competing source of truth:
64
- the LIVE per-requirement status lives in PROJECT-STATUS.md + the one checklist's
65
- "Requirements Status" table. Do NOT duplicate per-REQ status here — one row per feature only.
66
- • Brownfield: fill from the migrated dev-plan and/or the code scan (what actually compiles/runs).
67
- Mirror the phase tags used in the checklists.
68
- • Greenfield: this is the build ROADMAP — every row is "Planned" with its target phase.
69
- One row per §9 Feature-catalog F-code; group/order by phase. Keep the as-of date honest.
70
- AUTO-MAINTAINED after day-1: the status gate (every build/verify/handoff phase) and
71
- *refresh-status re-derive this table from the checklists and re-render the HTML, so it
72
- tracks reality without manual edits — see _status-update-gate.md item 9. -->
73
-
74
- **Snapshot as of {YYYY-MM-DD}.** Live, per-requirement status: see `PROJECT-STATUS.md` and the **Requirements Status** table in `docs/{AppName}-Checklist.md`.
75
-
76
- | Feature (F-code) | Phase | Status | % | Notes |
77
- |------------------|-------|--------|---|-------|
78
- | F-{CODE}: {name} | {0 / 1 / 2 … or MVP} | Done | 100 | {what works} |
79
- | F-{CODE}: {name} | {phase} | Partial | {0–100} | {what's done / what's left} |
80
- | F-{CODE}: {name} | {phase} | Planned | 0 | {not started} |
81
-
82
- **Legend:** **Done** = shipped & working · **In progress** = actively being built · **Partial** = some sub-features done, others pending · **Planned** = not started. (Maps to the checklist's `Done (pre-existing)` / `In Progress` / `PARTIAL` / `Not Started`.)
83
-
84
- ## 5. Stakeholders / users
85
- <!-- Full persona detail, not just a 2-row table. For each persona: role mapping (if an external auth/licensing system is involved), responsibilities, key screens, registration/onboarding path. If the app has license tiers / feature gating, include the full license & feature matrix here or as its own H2 (and add it to the TOC). -->
86
- | Role | Needs |
87
- |------|-------|
88
- | End user | … |
89
- | Admin | … |
90
-
91
- ## 6. Context diagram
92
- ```mermaid
93
- flowchart LR
94
- User(["End User"]) --> App["{AppName}"]
95
- App --> DB[("Database")]
96
- App --> LLM[/"LLM Provider"/]
97
- ```
35
+ | | |
36
+ |---|---|
37
+ | App | {App} |
38
+ | Kind | app or library |
39
+ | Size | Small, Medium or Large |
40
+ | Stack answer set | {name of the answer set, or "none"} |
41
+ | Status | Draft, Approved |
42
+ | Date | {YYYY-MM-DD} |
98
43
 
99
- ## 7. User journey — primary use case
100
- ```mermaid
101
- sequenceDiagram
102
- actor U as User
103
- participant W as Web UI
104
- participant A as App API
105
- U->>W: action
106
- W->>A: request
107
- A-->>W: response
108
- W-->>U: result
109
- ```
44
+ ## 1. Summary
110
45
 
111
- ## 8. Component sketch
112
- ```mermaid
113
- flowchart TB
114
- UI["Blazor UI — TrBlazeUI"] --> API["ASP.NET API"]
115
- API --> SQL[("SQL")]
116
- API --> Rag["RAG — TechieRag"]
117
- Rag --> Vec[("Vector store")]
118
- ```
46
+ {What it is, for whom, why it exists. At most 200 words.}
47
+
48
+ ## 2. Scope
49
+
50
+ **In:**
51
+ - {…}
52
+
53
+ **Out:**
54
+ - {…}
55
+
56
+ ## 3. Users and roles
57
+
58
+ | Role | Who they are | What they need |
59
+ |---|---|---|
60
+ | {Role} | {…} | {…} |
61
+
62
+ ## 4. Screens and flow
119
63
 
120
- ## 9. Feature catalog
64
+ One row per routed page. A dialog is a row under its parent screen with `on /route` in the Route column; it is not counted as a screen.
121
65
 
122
- <!-- THE HUMAN-READABLE HEART OF THE BRD. One `### F-{CODE}: {Name}` subsection per
123
- feature / capability area. A real app typically has 8–25 entries; depth scales with
124
- the app, NOT with a template quota. Repeat the skeleton below per feature.
125
- Per feature include, where applicable:
126
- - personas + phase/priority
127
- - 1-2 paragraphs of what/why
128
- - screens & routes table
129
- - workflow / processing steps (numbered), inputs → outputs
130
- - a Mermaid diagram for any multi-step or multi-actor flow (flowchart or
131
- sequenceDiagram) — generic features (simple CRUD lists) may skip the diagram
132
- - the BRD-N IDs this feature owns (forward links into §10)
133
- Every F-code here MUST appear as a row in the §4 Development status table. -->
66
+ | Screen | Route | Role | Mockup | Fields |
67
+ |---|---|---|---|---|
68
+ | {Screen name} | `/route` | {Role} | [mockup](mockups/{screen-slug}.html) | {field, field, field} |
69
+ | {Dialog name} (dialog) | on `/route` | {Role} | [mockup](mockups/{screen-slug}.html) | {field, field} |
134
70
 
135
- ### F-{CODE}: {Feature name}
71
+ **Primary journey:**
72
+ 1. {The user opens … and …}
73
+ 2. {…}
136
74
 
137
- **Personas:** <who uses it> · **Phase:** <0/1/2/… or MVP/Later>
75
+ ## 5. Requirements
138
76
 
139
- <1-2 paragraphs: what this feature does and why it exists.>
77
+ One item per thing the verifier will test. Each names its screen, links the mockup, and states its acceptance in the form the checklist will carry. Items are grouped under a `###` heading per screen that opens with one plain sentence saying what the screen does. A title is everyday words; an acceptance line is at most 30 words, target 20, and holds one behaviour: a line that bundles steps ("slots shown; Enter advances; empties dropped; a timer starts") is split into one item each (owner, 2026-09-06).
140
78
 
141
- | Screen | Route | Description |
142
- |--------|-------|-------------|
143
- | … | `/…` | … |
79
+ ### {Screen name}
144
80
 
145
- **Workflow:**
146
- 1. <step>
147
- 2. <step>
81
+ {One plain sentence: what this screen does, for whom.}
82
+
83
+ - **BRD-1** — {Title}. *Screen:* {Screen name} · *Mockup:* [mockup](mockups/{screen-slug}.html)
84
+ - *Acceptance:* When {actor} {does what} on {screen}, then {a result a browser robot can observe}.
85
+ - **BRD-2** — {Title}. *Screen:* {Screen name} · *Mockup:* [mockup](mockups/{screen-slug}.html)
86
+ - *Acceptance:* When …, then ….
87
+
88
+ ## 6. Non-functional requirements
89
+
90
+ | Id | Area | Requirement | Measure |
91
+ |---|---|---|---|
92
+ | BRD-{N} | Performance | {…} | perf-budget: p95 load <= 2000ms @ concurrency 1 |
93
+ | BRD-{N} | Security | {…} | {…} |
94
+ | BRD-{N} | Logging | {from the Stack answer set} | {…} |
95
+
96
+ The `perf-budget:` measure is machine-read by the verifier, in exactly this form: `perf-budget: <p50|p95|max> <ttfb|load> <= <N>ms [@ concurrency <N>]`. Write one only where the owner stated a number.
97
+
98
+ ## 7. Development status
99
+
100
+ Written by the status gate after every build, verify and handoff; not by hand.
101
+
102
+ **Snapshot as of {YYYY-MM-DD}.** Live per-requirement status: `PROJECT-STATUS.md` and the Requirements Status table in `docs/{App}-Checklist.md`.
103
+
104
+ | Screen | Requirements | Verified | Open | Status |
105
+ |---|---|---|---|---|
106
+ | {Screen} | {n} | {n} | {n} | Planned, In progress, Partial, Done |
107
+
108
+ ## 8. Context diagram
148
109
 
149
110
  ```mermaid
150
111
  flowchart LR
151
- A["input"] --> B{"decision"} --> C["output"]
112
+ User(["User"]) --> App["{App}"]
113
+ App --> DB[("Database")]
152
114
  ```
153
115
 
154
- **Requirements:** BRD-x, BRD-y (see §10)
155
-
156
- ## 10. Functional requirements (BRD ledger)
157
-
158
- <!-- The machine-traceable ledger consumed by *split-brd and the coding pipeline.
159
- One line per discrete capability, `<actor> can <action>` or `system shall <behavior>`.
160
- Each line names its catalog feature: `(F-CODE)`. The count scales with the app —
161
- one BRD per capability, NEVER merge capabilities to keep the list short. -->
162
-
163
- - **BRD-1** — <one-line requirement> *(F-{CODE})*
164
- - **BRD-2** — <one-line requirement> *(F-{CODE})*
165
-
166
- ## 11. Non-functional requirements
167
- <!-- Keep the BRD-N IDs, but give each NFR its target table when there are concrete numbers
168
- (latency, uptime, concurrency, import throughput), as a human reader expects.
169
- The Observability/logging NFR below is a TechieFlow STANDING requirement — it appears in
170
- EVERY .NET app's BRD (web, API, MAUI, desktop, console, background service), never gets
171
- dropped, and split-brd turns it into a REQ-NFR row like any other NFR.
172
-
173
- PERFORMANCE — the `perf-budget:` line is MACHINE-READ. verify-phase §4c grades a REQ on
174
- speed if and ONLY if it carries one, in exactly this grammar:
175
- perf-budget: <p50|p95|max> <ttfb|load> <= <N>ms [@ concurrency <N>]
176
- Omit it and the perf gate simply never fires for that REQ — which is the correct outcome
177
- when there is no agreed number. Do NOT invent a budget to make the row look complete: a
178
- threshold nobody agreed to produces failures nobody asked for, and the first false failure
179
- is the moment gate verdicts stop being believed. Write one only where the owner states it.
180
- Prose like "should feel fast" is not a budget and is deliberately not gradeable. -->
181
- - **BRD-N** — Performance: …
182
- <!-- e.g. Public pages stay responsive under normal load.
183
- perf-budget: p95 load <= 2000ms @ concurrency 1
184
- perf-budget: p95 ttfb <= 500ms @ concurrency 50 -->
185
-
186
- - **BRD-N+1** — Security: …
187
- - **BRD-N+2** — Accessibility: …
188
- - **BRD-N+3** — Observability: Serilog file-based logging in every executable head — rolling file sink under `logs/`, wired at startup, unhandled exceptions logged (see Coding Standards §Logging).
189
-
190
- ## 12. Constraints & assumptions
191
- - …
192
-
193
- ## 13. Success metrics
194
- - …
195
-
196
- ## 14. Risks
116
+ ## 9. Constraints and assumptions
117
+
118
+ - {…}
119
+
120
+ ## 10. Risks
121
+
197
122
  | Risk | Likelihood | Impact | Mitigation |
123
+ |---|---|---|---|
124
+ | {…} | {…} | {…} | {…} |
198
125
 
199
- ## 15. Glossary
200
- - TrBlazeUI, TechieRag, REQ-UI-*, REQ-FN-*, REQ-RAG-*, REQ-NFR-*
126
+ ## 11. Glossary
201
127
 
202
- ---
203
- Last updated: {YYYY-MM-DD}
204
- Highest BRD ID: BRD-{N}
128
+ - {Term} — {meaning}