@techierathore/techieflow 1.0.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 (151) hide show
  1. package/.claude/commands/TechieFlow/agents/analyst.md +97 -0
  2. package/.claude/commands/TechieFlow/agents/architect.md +84 -0
  3. package/.claude/commands/TechieFlow/agents/flow-master.md +217 -0
  4. package/.claude/commands/TechieFlow/agents/verifier.md +72 -0
  5. package/.claude/commands/TechieFlow/tasks/_metrics-emit-gate.md +138 -0
  6. package/.claude/commands/TechieFlow/tasks/_smoke-test-policy.md +98 -0
  7. package/.claude/commands/TechieFlow/tasks/_status-update-gate.md +78 -0
  8. package/.claude/commands/TechieFlow/tasks/_yolo-mode.md +77 -0
  9. package/.claude/commands/TechieFlow/tasks/advanced-elicitation.md +117 -0
  10. package/.claude/commands/TechieFlow/tasks/amend-docs.md +149 -0
  11. package/.claude/commands/TechieFlow/tasks/author-brd.md +79 -0
  12. package/.claude/commands/TechieFlow/tasks/build-phase.md +231 -0
  13. package/.claude/commands/TechieFlow/tasks/create-deep-research-prompt.md +278 -0
  14. package/.claude/commands/TechieFlow/tasks/create-doc.md +101 -0
  15. package/.claude/commands/TechieFlow/tasks/day1-brownfield.md +507 -0
  16. package/.claude/commands/TechieFlow/tasks/day1-greenfield.md +224 -0
  17. package/.claude/commands/TechieFlow/tasks/devguide.md +224 -0
  18. package/.claude/commands/TechieFlow/tasks/document-project.md +343 -0
  19. package/.claude/commands/TechieFlow/tasks/execute-checklist.md +86 -0
  20. package/.claude/commands/TechieFlow/tasks/facilitate-brainstorming-session.md +136 -0
  21. package/.claude/commands/TechieFlow/tasks/fix-issues.md +134 -0
  22. package/.claude/commands/TechieFlow/tasks/generate-html.md +115 -0
  23. package/.claude/commands/TechieFlow/tasks/handoff-phase.md +126 -0
  24. package/.claude/commands/TechieFlow/tasks/index-docs.md +173 -0
  25. package/.claude/commands/TechieFlow/tasks/kb-mode-interaction.md +75 -0
  26. package/.claude/commands/TechieFlow/tasks/log-miss.md +160 -0
  27. package/.claude/commands/TechieFlow/tasks/metrics-report.md +143 -0
  28. package/.claude/commands/TechieFlow/tasks/mockups.md +122 -0
  29. package/.claude/commands/TechieFlow/tasks/productguide.md +105 -0
  30. package/.claude/commands/TechieFlow/tasks/refresh-status.md +135 -0
  31. package/.claude/commands/TechieFlow/tasks/render-workflow-docs.md +117 -0
  32. package/.claude/commands/TechieFlow/tasks/shard-doc.md +185 -0
  33. package/.claude/commands/TechieFlow/tasks/split-brd.md +131 -0
  34. package/.claude/commands/TechieFlow/tasks/triage-issues.md +157 -0
  35. package/.claude/commands/TechieFlow/tasks/verify-phase.md +579 -0
  36. package/.claude/commands/generate-html.md +124 -0
  37. package/.codex/config.toml +46 -0
  38. package/.codex/hooks.json +63 -0
  39. package/.codex/rules/techieflow.rules +8 -0
  40. package/.opencode/command/generate-html.md +129 -0
  41. package/.opencode/plugin/techieflow.js +350 -0
  42. package/.tfcore/TOKEN-GUIDE.md +59 -0
  43. package/.tfcore/agents/analyst.md +97 -0
  44. package/.tfcore/agents/architect.md +84 -0
  45. package/.tfcore/agents/flow-master.md +217 -0
  46. package/.tfcore/agents/verifier.md +72 -0
  47. package/.tfcore/checklists/architect-checklist.md +438 -0
  48. package/.tfcore/core-config.yaml +47 -0
  49. package/.tfcore/data/brainstorming-techniques.md +36 -0
  50. package/.tfcore/data/elicitation-methods.md +154 -0
  51. package/.tfcore/data/techieflow-kb.md +807 -0
  52. package/.tfcore/data/technical-preferences.md +3 -0
  53. package/.tfcore/enhanced-ide-development-workflow.md +248 -0
  54. package/.tfcore/hooks/block-git.sh +301 -0
  55. package/.tfcore/hooks/codex-adapter.py +248 -0
  56. package/.tfcore/hooks/guard-artifacts.sh +101 -0
  57. package/.tfcore/hooks/guard-status-html.sh +102 -0
  58. package/.tfcore/hooks/guard-status.sh +124 -0
  59. package/.tfcore/hooks/guard-verify.sh +108 -0
  60. package/.tfcore/hooks/metrics-session.sh +129 -0
  61. package/.tfcore/hooks/session-pointer.sh +52 -0
  62. package/.tfcore/hooks/sweep-artifacts.sh +198 -0
  63. package/.tfcore/install-manifest.yaml +231 -0
  64. package/.tfcore/routing.yaml +105 -0
  65. package/.tfcore/tasks/_metrics-emit-gate.md +138 -0
  66. package/.tfcore/tasks/_smoke-test-policy.md +98 -0
  67. package/.tfcore/tasks/_status-update-gate.md +78 -0
  68. package/.tfcore/tasks/_yolo-mode.md +77 -0
  69. package/.tfcore/tasks/advanced-elicitation.md +117 -0
  70. package/.tfcore/tasks/amend-docs.md +149 -0
  71. package/.tfcore/tasks/author-brd.md +79 -0
  72. package/.tfcore/tasks/build-phase.md +231 -0
  73. package/.tfcore/tasks/create-deep-research-prompt.md +278 -0
  74. package/.tfcore/tasks/create-doc.md +101 -0
  75. package/.tfcore/tasks/day1-brownfield.md +507 -0
  76. package/.tfcore/tasks/day1-greenfield.md +224 -0
  77. package/.tfcore/tasks/devguide.md +224 -0
  78. package/.tfcore/tasks/document-project.md +343 -0
  79. package/.tfcore/tasks/execute-checklist.md +86 -0
  80. package/.tfcore/tasks/facilitate-brainstorming-session.md +136 -0
  81. package/.tfcore/tasks/fix-issues.md +134 -0
  82. package/.tfcore/tasks/generate-html.md +115 -0
  83. package/.tfcore/tasks/handoff-phase.md +126 -0
  84. package/.tfcore/tasks/index-docs.md +173 -0
  85. package/.tfcore/tasks/kb-mode-interaction.md +75 -0
  86. package/.tfcore/tasks/log-miss.md +160 -0
  87. package/.tfcore/tasks/metrics-report.md +143 -0
  88. package/.tfcore/tasks/mockups.md +122 -0
  89. package/.tfcore/tasks/productguide.md +105 -0
  90. package/.tfcore/tasks/refresh-status.md +135 -0
  91. package/.tfcore/tasks/render-workflow-docs.md +117 -0
  92. package/.tfcore/tasks/shard-doc.md +185 -0
  93. package/.tfcore/tasks/split-brd.md +131 -0
  94. package/.tfcore/tasks/triage-issues.md +157 -0
  95. package/.tfcore/tasks/verify-phase.md +579 -0
  96. package/.tfcore/telemetry/SCHEMA.md +678 -0
  97. package/.tfcore/telemetry/install-metrics.sh +390 -0
  98. package/.tfcore/telemetry/pre-commit +94 -0
  99. package/.tfcore/telemetry/tf-metrics.sh +1415 -0
  100. package/.tfcore/templates/architecture-tmpl.yaml +650 -0
  101. package/.tfcore/templates/brainstorming-output-tmpl.yaml +156 -0
  102. package/.tfcore/templates/brownfield-architecture-tmpl.yaml +476 -0
  103. package/.tfcore/templates/competitor-analysis-tmpl.yaml +306 -0
  104. package/.tfcore/templates/front-end-architecture-tmpl.yaml +218 -0
  105. package/.tfcore/templates/fullstack-architecture-tmpl.yaml +823 -0
  106. package/.tfcore/templates/market-research-tmpl.yaml +252 -0
  107. package/.tfcore/templates/project-brief-tmpl.yaml +221 -0
  108. package/.tfcore/templates/v4custom/app-agents-md-tmpl.md +61 -0
  109. package/.tfcore/templates/v4custom/app-architecture-tmpl.md +127 -0
  110. package/.tfcore/templates/v4custom/app-brd-tmpl.md +204 -0
  111. package/.tfcore/templates/v4custom/app-checklist-tmpl.md +90 -0
  112. package/.tfcore/templates/v4custom/app-claude-md-tmpl.md +33 -0
  113. package/.tfcore/templates/v4custom/app-devguide-tmpl.md +167 -0
  114. package/.tfcore/templates/v4custom/app-editorconfig-tmpl.editorconfig +44 -0
  115. package/.tfcore/templates/v4custom/app-library-feedback-tmpl.md +31 -0
  116. package/.tfcore/templates/v4custom/app-productguide-tmpl.md +54 -0
  117. package/.tfcore/templates/v4custom/app-project-status-tmpl.md +98 -0
  118. package/.tfcore/templates/v4custom/app-uidesign-tmpl.md +48 -0
  119. package/.tfcore/templates/v4custom/app-usageguide-tmpl.md +67 -0
  120. package/.tfcore/templates/v4custom/build-invocation-ladder.md +190 -0
  121. package/.tfcore/templates/v4custom/html-render-shell.md +502 -0
  122. package/.tfcore/templates/v4custom/metrics-report-template.md +273 -0
  123. package/.tfcore/templates/v4custom/opencode-operating-contract.md +56 -0
  124. package/.tfcore/user-guide.md +633 -0
  125. package/.tfcore/utils/techieflow-doc-template.md +325 -0
  126. package/.tfcore/utils/tf-assets.sh +310 -0
  127. package/.tfcore/utils/tf-codex-bind.py +196 -0
  128. package/.tfcore/utils/tf-codex-telemetry.py +60 -0
  129. package/.tfcore/utils/tf-emit.sh +1075 -0
  130. package/.tfcore/utils/tf-gitignore-audit.sh +281 -0
  131. package/.tfcore/utils/tf-goal.sh +421 -0
  132. package/.tfcore/utils/tf-harness.sh +160 -0
  133. package/.tfcore/utils/tf-mockup-parity.mjs +555 -0
  134. package/.tfcore/utils/tf-mockup-parity.sh +65 -0
  135. package/.tfcore/utils/tf-opencode-audit.py +126 -0
  136. package/.tfcore/utils/tf-perf.sh +241 -0
  137. package/.tfcore/utils/tf-render-html.py +715 -0
  138. package/.tfcore/utils/tf-render-html.sh +28 -0
  139. package/.tfcore/utils/tf-routing-bind.sh +216 -0
  140. package/.tfcore/utils/tf-routing.sh +247 -0
  141. package/.tfcore/utils/tf-yolo.sh +119 -0
  142. package/.tfcore/working-in-the-brownfield.md +606 -0
  143. package/LICENSE +201 -0
  144. package/README.md +1212 -0
  145. package/WORKFLOW.html +1986 -0
  146. package/docs/TechieFlow-Installation.md +299 -0
  147. package/opencode.jsonc +929 -0
  148. package/package.json +60 -0
  149. package/scripts/install.mjs +992 -0
  150. package/scripts/test-install.mjs +505 -0
  151. package/scripts/validate.mjs +155 -0
@@ -0,0 +1,135 @@
1
+ # refresh-status
2
+
3
+ Rebuild `PROJECT-STATUS.md` from **ground-truth evidence** after a development session was interrupted (lost internet, revoked/changed model access, crashed agent, killed terminal) — i.e. whenever a build/verify phase died BEFORE its mandatory status-update gate (`.tfcore/tasks/_status-update-gate.md`) ran, leaving PROJECT-STATUS stale, wrong, or silent about work that actually happened.
4
+
5
+ ## Purpose
6
+
7
+ The normal flow guarantees PROJECT-STATUS is accurate because every phase ends by writing it. When a phase is killed mid-flight, that guarantee is broken: code may have been written, checklist tables may be half-updated, and PROJECT-STATUS still points at an old "Next command" that no longer matches reality. **This task does NOT trust PROJECT-STATUS.** It reconstructs the true state from the evidence that actually exists in this framework — the checklist Requirements Status tables, what is really in the working tree (the source files and when they were last touched), and a fresh build — then rewrites PROJECT-STATUS to match and tells you the exact next command.
8
+
9
+ > **No git.** In this framework git is **manual and agent-owned by the human, never by an agent** — no task commits, and nothing here keys off commit history. Ground truth lives in the checklist tables, the files on disk, and the build. (This is a deliberate design rule, mechanically enforced: `.claude/settings.json` DENIES `git`/`gh` and the `.tfcore/hooks/block-git.sh` PreToolUse hook blocks compound forms — see the CLAUDE.md "Hard rules" section.) Do **not** run `git` in this task.
10
+
11
+ This is a **read-and-reconcile** task. It NEVER edits application source code and NEVER implements requirements. Its only writes are to `PROJECT-STATUS.md`, its `.html`, the checklist Requirements Status tables (Status/%/Remarks cells only, never new files, and only when hard evidence says a cell is wrong), and the BRD's **§4 Development status** table — the derived feature-level snapshot (§4.5), including inserting that section into a legacy BRD that predates it.
12
+
13
+ ## Inputs
14
+
15
+ - `{AppName}` argument (required; or resolve from `.tfcore/core-config.yaml`).
16
+ - Optional flag `verify` — after reconciling, chain the verifier on any REQ whose true state is ambiguous (see §5). Default is reconcile-only (fast).
17
+
18
+ ## SEQUENTIAL Execution
19
+
20
+ ### 1. Gather ground truth (read-only — run these in parallel)
21
+
22
+ Collect evidence the interrupted agent could not have faked or selectively updated. Do NOT read PROJECT-STATUS first and reason from it — gather independently, compare last.
23
+
24
+ 1. **Checklist Requirements Status table** (the primary source) — read the top table in the one checklist `docs/{AppName}-Checklist.md` (all REQ prefixes in a single table). This is the per-REQ source of truth (Status / % / Remarks). Terminal statuses: `Verified`, `Done (pre-existing)`, `N/A`. Note `Blocked` rows (library gaps) and especially any row left at `In Progress`/`Implemented` (smoke done, verifier never ran — the classic interruption fingerprint).
25
+ 2. **What is actually in the working tree** — look at the source the checklists imply should exist, and *when it was last touched*:
26
+ - For the REQs the tables claim are done/in-progress, confirm the corresponding components/services/pages actually exist on disk (a row marked `Implemented` whose files are absent is suspect; a row left open whose files DO exist is work that happened but was never recorded).
27
+ - Compare file modification times against PROJECT-STATUS `last_updated` (read in step 4): **source files newer than `last_updated`** are work that landed *after* the last gate write — the status undercounts it. This is the no-git replacement for "what was committed since the last status write".
28
+ - Use `ls -lt`, `find . -newer PROJECT-STATUS.md -type f` (scoped to the app's source dirs), Glob/Grep — read-only inspection only. Never modify, stage, or commit anything.
29
+ 3. **Fresh build** — run the platform probe and then the invocation ladder at `.tfcore/templates/v4custom/build-invocation-ladder.md`. In OpenCode Docker, standard .NET uses container `dotnet`; a Windows MAUI head uses `winrun`, never direct `cmd.exe`; do not check/install `maui-tizen`. Workload errors `NETSDK1178`/`Microsoft.*.Sdk missing` mean wrong rung, not failure. Record PASS/FAIL and real `CS####` errors only.
30
+ 4. **The stale PROJECT-STATUS** — read `PROJECT-STATUS.md` LAST, and only to see what it CLAIMED (`last_updated`, `current_phase`, "Next command"). Treat every field as a hypothesis to confirm or overwrite, never as fact. (Its `last_updated` is also the cutoff you compared file mtimes against in step 2.)
31
+ 5. **Library feedback files** — glance at `docs/{AppName}-TrBlazeUI-Feedback.md` / `docs/{AppName}-TechieRag-Feedback.md` for open `Blocked`-causing entries.
32
+
33
+ ### 2. Detect the interruption signature
34
+
35
+ Decide what really happened by comparing the evidence. Common signatures:
36
+
37
+ - **Worked-but-unrecorded:** source files newer than PROJECT-STATUS `last_updated`, and/or files exist on disk for REQs the tables still show as open → the work landed but the gate never ran. The checklist tables and/or PROJECT-STATUS undercount progress.
38
+ - **In-flight / partial:** a REQ's expected files only partially exist, or the fresh build errors inside them → a phase was mid-implementation. Those REQs are **In Progress**, NOT done — even if a subagent reported them done before dying.
39
+ - **Smoke-without-verify:** checklist rows at `Implemented`/`In Progress` with no `Verified` → self-smoke ran, verifier was cut off. Those REQs need verification, not rebuilding.
40
+ - **Build regressed:** PROJECT-STATUS says `last_verified_build: PASS` but step 1.3 fails → a later edit broke the build; capture the real `CS####` errors as a Known blocker.
41
+ - **Phase boundary lost:** every row is terminal but PROJECT-STATUS still says `current_phase: Build` → phase actually advanced to `Handoff`; correct it.
42
+
43
+ State the detected signature in one or two plain sentences. If evidence conflicts (e.g. a table marks a REQ `Implemented` but the build fails on that file), trust the **build + files on disk over the table cell**, and flag the REQ as `PARTIAL`/`FAIL` with a note.
44
+
45
+ ### 3. Reconstruct the true per-REQ picture
46
+
47
+ For each REQ in the checklist, settle on a status from evidence, in this precedence:
48
+
49
+ 1. **Verifier verdict already in the table** (`Verified`/`FAIL`/`PARTIAL`) → keep, unless step 1.3's build contradicts it.
50
+ 2. **`Done (pre-existing)` / `N/A`** → terminal, keep, never touch.
51
+ 3. **Implementing files present on disk + build PASS + a smoke/verify Remark present** → `Implemented` (pending verify) at minimum; do not upgrade to `Verified` without a verifier verdict.
52
+ 4. **Files absent, partial, or build-broken for that REQ** → `In Progress`; do NOT mark done on a dead subagent's say-so.
53
+ 5. **No evidence of any work** → leave as the original open status.
54
+
55
+ Only write a checklist cell when evidence **contradicts** what's there (e.g. table says `FAIL` but the implementing files are present and the build now passes → set `Implemented` with a dated Remark `recovered by refresh-status: files present + build PASS, pending re-verify`). When in doubt, prefer the *less complete* status — under-claiming triggers a re-verify; over-claiming ships a bug. Never invent `Verified`.
56
+
57
+ **Reconciling a Status column UP to `Verified`** is allowed in exactly one case: the row's Remarks **already carry a dated verifier verdict** (e.g. `VERIFIED 2026-07-07 …`) that the Status column merely lagged. The PreToolUse hook `.tfcore/hooks/guard-verify.sh` blocks any checklist write introducing `Verified` without a same-day run ledger, so first Write `docs/.last-verify.json` as `{"date":"<today>","app":"{AppName}","mode":"reconcile","evidence":"<the pre-existing verdict date(s) + REQ IDs>"}`, then make the cell edit. Reconcile-mode is ONLY for surfacing a pre-existing verdict — never for promoting smoke results or files-on-disk evidence to `Verified`.
58
+
59
+ ### 4. Rewrite PROJECT-STATUS.md (the whole point)
60
+
61
+ Overwrite `PROJECT-STATUS.md` to reflect the reconstructed reality, honoring every minimum in `.tfcore/tasks/_status-update-gate.md`.
62
+
63
+ **Rebuild to the CRISP, FIXED-SHAPE template** (`.tfcore/templates/v4custom/app-project-status-tmpl.md`) — the gate's §"CRISP, FIXED-SHAPE snapshot" applies in full to a reconstruction. Start from the template's section set; do NOT copy forward the old file's per-run dated sections (`## *verify all — formal coverage matrix (…)`, `## *fix-issues — …`, `## *build-phase — …`) or its paragraph-stuffed `current_phase`. If the file you are rebuilding has them, they are the mess this task exists to clean up — drop them, fold any still-true facts into the one-paragraph `## Where I am` + the `## Verification log` table, and keep the result well under ~60 lines. The ONE extra section a reconstruction adds is the `## Recovery note` (item 8) — and only because this was an interrupted-session rebuild. Concretely:
64
+
65
+ 1. `last_updated: {today YYYY-MM-DD}`.
66
+ 2. `current_phase` = where the evidence says the project actually is (not what the file claimed).
67
+ 3. `last_verified_build` + `last_verified_date` from step 1.3's real build.
68
+ 4. **Open requirements** = every non-terminal REQ from the reconciled tables.
69
+ 5. **Next command to run** = the exact command that resumes from the true state (Claude Code + OpenCode forms). Examples:
70
+ - in-flight build work → `/TechieFlow:agents:flow-master *build-phase {AppName}` (OpenCode: `/flow-master *build-phase {AppName}`) (FIX/FRESH mode will re-detect the open REQs from the now-correct table; it calls trblazeui/techierag itself).
71
+ - smoke-without-verify → `/TechieFlow:agents:verifier *verify ui` (OpenCode: `/flow-verifier *verify ui`) (or `functional`/`all`).
72
+ - all built, verify open → `/TechieFlow:agents:verifier *verify all` (OpenCode: `/flow-verifier *verify all`).
73
+ 6. A **Verification log** row only if a verifier actually ran this session (don't fabricate one); otherwise leave the log untouched.
74
+ 7. Library-feedback + standards-compliance lines refreshed only if evidence changed them.
75
+ 8. Add a one-block **`## Recovery note ({today})`** section at the end recording: the interruption signature (step 2), which files were found newer-than-status / present-for-open-REQs, which checklist cells were corrected and why, and any REQ now flagged for re-verify. This is the audit trail so the next session — human or AI — knows this status was reconstructed, not gate-written.
76
+
77
+ Then **re-render** `PROJECT-STATUS.html` via `.tfcore/tasks/generate-html.md` with the shared shell — never hand-rolled HTML. A stale HTML defeats the recovery. Do NOT render the checklists to HTML — they are AI-agent working documents (markdown only); correcting their Requirements Status tables in markdown is sufficient.
78
+
79
+ ### 4.5. Sync the BRD §4 Development status snapshot
80
+
81
+ Bring `docs/{AppName}-BRD.md`'s **§4 Development status** table in line with the reconciled checklist statuses — it is the human, feature-level view of the same reality you just rebuilt. Use the rollup rule in `.tfcore/tasks/_status-update-gate.md` item 9 (feature → its `Requirements: BRD-…` line → the `REQ-*` those BRDs split into → per-REQ Status; map all-terminal → `Done`, mixed → `Partial`, started-but-unverified → `In progress`, none → `Planned`).
82
+
83
+ - **If the BRD already has a Development status section:** refresh its rows from the rollup and set `Snapshot as of {today}`.
84
+ - **If the BRD has NO such section** (a BRD authored before this section existed — e.g. AstroLyfe): **insert it now** (one-time migration). Add a `## 4. Development status` H2 immediately after the Scope section, **renumber the following H2 sections by +1**, and **regenerate the BRD's `## Table of Contents`** to match (slug rule = `.tfcore/templates/v4custom/html-render-shell.md §1`). Then fill the table via the rollup. After this run, the status gate keeps it current on every phase.
85
+ - Touch ONLY the §4 table, the heading renumber + TOC the insert requires, and the snapshot date — never requirement text, feature prose, or BRD-N IDs.
86
+ - Re-render `docs/{AppName}-BRD.html` via `.tfcore/tasks/generate-html.md` (shared shell). If you renumbered, double-check every BRD diagram still passes the §5.5 mermaid self-check (you didn't touch them, but the re-render must not introduce bare labels).
87
+ - Note in the §6 report whether §4 was refreshed in place or inserted (migration), and which features changed status.
88
+
89
+ ### 4a. Emit the run record (telemetry)
90
+
91
+ Same turn as the status/PROJECT-STATUS write. Doctrine + the ten constraints: `.tfcore/tasks/_metrics-emit-gate.md`. Schema: `.tfcore/telemetry/SCHEMA.md` §2. Stamp `started` with `date -u +%Y-%m-%dT%H:%M:%SZ` as your FIRST action of this task — it cannot be reconstructed at the end.
92
+
93
+ ```bash
94
+ cat <<'JSON' | bash .tfcore/utils/tf-emit.sh runs
95
+ {"kind":"run","app":"{AppName}","cmd":"refresh-status","mode":null,
96
+ "started":"<start>","ended":"<now>","duration_s":<n>,
97
+ "reqs_touched":[],"reqs_count":0,
98
+ "subagents":[],"files_written":<n>,"build_result":"not-run"}
99
+ JSON
100
+ ```
101
+
102
+ `reqs_touched` carries REQ IDs only — never requirement text — and `[]` is correct when this task touched no specific REQ. **Telemetry has no veto:** if the emit fails, the phase still succeeded; do not retry, do not diagnose, do not mention it.
103
+
104
+ ### 5. Optional verify pass (only if `verify` flag given, or you flagged ambiguity)
105
+
106
+ If invoked with `verify`, or if step 3 left any REQ in an evidence-ambiguous state (files present but never smoked/verified), chain the verifier: read `.tfcore/tasks/verify-phase.md` and execute it inline with the narrowest scope that covers the ambiguous REQs (`ui` / `functional` / `all` / explicit REQ-ID list) — skip its §0 question, scope is known. The verifier writes verdicts into the tables; then re-run step 4's PROJECT-STATUS write so it reflects the fresh verdicts. The verifier never edits source, so this stays safe to run during recovery.
107
+
108
+ ### 6. Report to the user
109
+
110
+ Print a tight recovery summary (this is for a human who just lost their session):
111
+ - **What happened:** the interruption signature in one line.
112
+ - **What was recovered:** worked-but-unrecorded REQs, in-flight REQs, build state.
113
+ - **What PROJECT-STATUS now says:** current_phase + open-REQ count.
114
+ - **Exact next command** to resume (copy-paste, both harness forms).
115
+ - **Anything needing a human decision** (e.g. half-finished edits to review, or work the human may want to commit manually before resuming — committing is the human's job, never this task's).
116
+
117
+ ## Guardrails
118
+
119
+ - NEVER run `git` (or `gh`). Git is manual in this framework; this task reconstructs status from checklist tables + working-tree files + build only.
120
+ - NEVER edit application source code, requirement text, feature prose, BRD-N IDs, or Architecture content. The ONLY BRD edit permitted is maintaining the **§4 Development status** table — a derived snapshot — plus, for a legacy BRD lacking it, inserting that one section with the heading-renumber + TOC regen described in §4.5. Everything else in the BRD is read-only.
121
+ - NEVER mark a REQ `Verified` without an actual verifier verdict produced this session or already present in the table.
122
+ - NEVER create dated `docs/qa/*.md` / `docs/verify/*.md` files. The checklist tables + PROJECT-STATUS are the only status surfaces.
123
+ - Prefer under-claiming to over-claiming when evidence is thin — a needless re-verify is cheap; a falsely-"done" bug is not.
124
+ - This task is itself a checklist-executing task: it ends by leaving PROJECT-STATUS accurate. Do not hand back before §4 is written.
125
+
126
+ ## Output Checklist
127
+
128
+ - [ ] Ground truth gathered independently (checklist tables, working-tree files + mtimes, fresh build) BEFORE reading PROJECT-STATUS — and WITHOUT git
129
+ - [ ] Interruption signature stated
130
+ - [ ] Per-REQ statuses reconciled from evidence (no fabricated `Verified`)
131
+ - [ ] `PROJECT-STATUS.md` overwritten to true state with a dated `## Recovery note`
132
+ - [ ] BRD §4 Development status table refreshed from the reconciled checklists (or inserted + headings renumbered + TOC regenerated, for a legacy BRD that lacked it) — §4 table only, no requirement text touched
133
+ - [ ] `PROJECT-STATUS.html` and `docs/{AppName}-BRD.html` re-rendered (checklists are NOT rendered to HTML — markdown only)
134
+ - [ ] Optional verify pass run if requested / ambiguity remained
135
+ - [ ] User given the exact copy-paste next command
@@ -0,0 +1,117 @@
1
+ # render-workflow-docs
2
+
3
+ Render BRD.html, Architecture.html, and PROJECT-STATUS.html from their markdown sources.
4
+
5
+ ## Purpose
6
+
7
+ After day-1 (or any phase that changes BRD/Architecture/PROJECT-STATUS), regenerate the human-readable HTML mirrors. Self-contained single-file HTML with Mermaid rendering, copy buttons on every code block, mermaid toolbar (zoom/fit/1:1/fullscreen/popout), inline TOC, and sidebar TOC for long docs.
8
+
9
+ **If the user has ad-hoc HUMAN-readable docs to render (library-feedback files, design notes, archived docs, anything else), use `*generate-html @path/to/file.md` instead — this task only handles the three canonical files.** Note: the **checklist is an AI-agent working document and is NEVER rendered to HTML** — do not render `*-Checklist.md` here or via `generate-html`.
10
+
11
+ ## Inputs
12
+
13
+ - `{AppName}` argument (required).
14
+ - If absent, read `.tfcore/core-config.yaml` → `customTechnicalDocuments.brd` and extract the app name from `docs/{AppName}-BRD*.md`. If both are absent, ask: "Application name?"
15
+
16
+ ## SEQUENTIAL Execution
17
+
18
+ ### 1. Locate sources
19
+
20
+ **Use the Read tool — NOT bash.** Bash file-existence checks trigger permission prompts; the Read tool is auto-allowed.
21
+
22
+ For BRD and Architecture, locate the file using this priority:
23
+
24
+ 1. If `core-config.yaml` has `customTechnicalDocuments.brd` (or `.architecture`) pointing at a specific path, USE that path verbatim.
25
+ 2. Otherwise look for `docs/{AppName}-BRD.md` and any versioned variants matching `docs/{AppName}-BRD*.md` (e.g. `docs/{AppName}-BRD-v2.md`, `docs/{AppName}-BRD-old.md`, `docs/{AppName}-BRD-V3.md`). Same for Architecture. Top-level `docs/` ONLY — never scan `docs/OldDocs/` (the archive folder the day-1 tasks move superseded docs into; archived files are not render candidates). Since the day-1 collision policy (day1-brownfield §1.6) archives old versions instead of suffixing new ones, multiple variants should only occur in projects predating that policy.
26
+
27
+ **If multiple variants are found, ASK before rendering** — list each candidate with its `Last updated:` value if visible, and ask which one to render. This is the one-and-only question this task may ask, and it's required to avoid the bug where a stale BRD gets rendered when a fresh versioned one (`-v2.md`) is sitting next to it.
28
+
29
+ If the user wants to render a different file than what the canonical name pattern resolves to, tell them to use `*generate-html @docs/{the-file}.md` (plain path without `@` under OpenCode) and HALT.
30
+
31
+ PROJECT-STATUS is always at the repo root: `PROJECT-STATUS.md`.
32
+
33
+ Read each of the three resolved files. If any required source is missing, HALT and tell the user which is missing + suggest `*day1-brownfield` / `*day1-greenfield`.
34
+
35
+ For the "Last rendered" subtitle, use today's date — do not bash-fetch file mtimes.
36
+
37
+ ### 2. Render with the framework renderer — one command for every document
38
+
39
+ ```bash
40
+ bash .tfcore/utils/tf-render-html.sh docs/{AppName}-BRD.md docs/{AppName}-Architecture.md PROJECT-STATUS.md
41
+ ```
42
+
43
+ `tf-render-html.sh` implements `.tfcore/templates/v4custom/html-render-shell.md` in full and reads that spec's §2 CSS / §3 theme script / §7 JS **at render time**, so a rendered page cannot drift from the shell — the drift that used to break the mermaid toolbar, the copy buttons and the TOC links is now structurally impossible.
44
+
45
+ Pass every document in ONE invocation; it renders each to a sibling `.html` (same directory, same basename). It refuses `*-Checklist.md` with exit 2.
46
+
47
+ Hand-authoring these files through the Write tool is no longer the path (TfLens TF-003, 2026-08-27): it burned 75–80k output tokens per phase, could not be reproduced run-to-run, and a 130 KB file emitted in one generation could silently truncate with no gate to catch it.
48
+
49
+ `html-render-shell.md` stays the specification — read it to understand or change the shell, not to render.
50
+
51
+ ### 3. Render `docs/{AppName}-BRD.html` (or the chosen variant's `.html` sibling)
52
+
53
+ **Rendered by `tf-render-html.sh` in step 2** — do not hand-author it, and do not bash-heredoc it. This step documents what the output must contain so you can check it, not how to build it.
54
+
55
+ Output path: same directory as the source MD, same basename, `.html` extension (so `docs/{App}-BRD-v2.md` → `docs/{App}-BRD-v2.html`).
56
+
57
+ Apply the full shell. Title: `{AppName} — Business Requirements`. Subtitle: `Last rendered: {today YYYY-MM-DD}`.
58
+
59
+ BRDs typically have ~12 H2 sections (Executive summary, Objectives, Scope, …, Glossary) — the sidebar TOC condition (>6 H2) almost always triggers. Inline TOC is always present.
60
+
61
+ ### 4. Render `docs/{AppName}-Architecture.html` (or chosen variant's `.html` sibling)
62
+
63
+ Same as §3. Title: `{AppName} — Architecture`. Subtitle: `Last rendered: {today YYYY-MM-DD} · Status: {value of "Status:" line from source MD}`.
64
+
65
+ Architecture docs typically have 7–9 H2 sections — usually >6, so sidebar TOC triggers. Inline TOC always present.
66
+
67
+ ### 5. Render `PROJECT-STATUS.html`
68
+
69
+ Apply the shell. Title: `{AppName} — Project Status`. Subtitle: `Last rendered: {today YYYY-MM-DD}`.
70
+
71
+ PROJECT-STATUS usually has 4–6 H2 sections — under the >6 threshold, so NO sidebar (use the `no-toc` class on `.layout`). Inline TOC may still appear if ≥2 H2.
72
+
73
+ **`tf-render-html.sh` emits the "NEXT COMMAND TO RUN" call-to-action box itself** (since 2026-08-31, TfLens TF-010) — you do not add it, and you must not hand-patch it in afterwards. It special-cases `PROJECT-STATUS.md`, reads the **first fenced code block under `## Next command to run`**, and emits this markup immediately after the subtitle `<div>`, above the frontmatter table and the inline TOC:
74
+
75
+ ```html
76
+ <div class="cta-next" style="padding:20px; background:var(--cta-bg); border:2px solid var(--accent); border-radius:10px; margin:20px 0;">
77
+ <div style="font-size:11px; color:var(--muted); letter-spacing:.5px;">NEXT COMMAND TO RUN</div>
78
+ <div style="font-family:var(--mono); font-size:18px; margin-top:6px;">{first line of that code block}</div>
79
+ </div>
80
+ ```
81
+
82
+ Theme variables only, never a hex — that is what `--cta-bg` is for, in both palettes.
83
+
84
+ **If the box is missing, the source is missing, not the render.** The renderer emits nothing when `## Next command to run` is absent or its code block is empty — an absent box is honest, an invented command is not. Fix `PROJECT-STATUS.md` per `_status-update-gate.md` and re-render; do not edit the HTML.
85
+
86
+ > **Why this is worth a paragraph.** From TF-003 (when hand-authoring moved into the script) until 2026-08-31 this section *required* the box and the renderer never emitted one, so the Output Checklist item below was unfalsifiable by reading the task, and the only workaround — patching the generated HTML — was overwritten by the next render. The tell was `--cta-bg`: a shell variable defined in both palettes and used by nothing.
87
+
88
+ Render the frontmatter (project, stack, current_phase, last_verified_build, last_verified_date) as a clear definition list near the top.
89
+
90
+ ### 6. Verify each HTML mentally (per shell §9)
91
+
92
+ This is a review of what you Wrote — do NOT shell out to an HTML validator. Confirm:
93
+
94
+ - Every heading id matches the TOC link slug.
95
+ - Every mermaid fence is wrapped in `<div class="diagram">` with the full 6-button toolbar.
96
+ - **Mermaid validity pass (shell §5.5):** every node/edge/subgraph label containing non-alphanumeric characters is double-quoted (quotes inside the shape brackets), and no node id is the reserved word `end`. Fix any bare label in the emitted HTML rather than rendering a diagram that throws "Syntax error" in the browser.
97
+ - Copy buttons will be added by the JS (no need to verify visually — but make sure the JS block is intact).
98
+ - Sidebar TOC present iff H2 count > 6.
99
+ - The two CDN scripts are present (mermaid, svg-pan-zoom).
100
+
101
+ ### 7. Output summary
102
+
103
+ List the three written file paths (one per line). End with: `Open each in a browser to confirm Mermaid renders correctly. Code blocks have copy buttons; diagrams have a zoom/fit/1:1/fullscreen/popout toolbar.`
104
+
105
+ ## Output Checklist
106
+
107
+ - [ ] All three sources located (BRD/Architecture variants resolved with user input if multiple matched)
108
+ - [ ] Shared shell applied to every output (no hand-rolled palettes)
109
+ - [ ] `docs/{AppName}-BRD.html` (or chosen variant) self-contained
110
+ - [ ] `docs/{AppName}-Architecture.html` (or chosen variant) self-contained
111
+ - [ ] `PROJECT-STATUS.html` self-contained, and its "NEXT COMMAND TO RUN" call-to-action present — **check it with `grep -c "NEXT COMMAND TO RUN" PROJECT-STATUS.html`, which must print `1`.** The renderer emits it (§5); a `0` means `PROJECT-STATUS.md` has no `## Next command to run` code block, which is a status-gate defect to fix in the markdown — never by editing the HTML.
112
+ - [ ] Mermaid blocks wrapped in `.diagram` with toolbar
113
+ - [ ] Mermaid validity pass done (shell §5.5): every non-trivial label double-quoted, no `end` node ids, bare labels fixed not emitted
114
+ - [ ] Copy-button JS + mermaid toolbar JS present in each file
115
+ - [ ] Inline TOC present where H2 count ≥ 2
116
+ - [ ] Sidebar TOC present where H2 count > 6
117
+ - [ ] Every TOC link has a matching heading `id` (shell §1 slug rule)
@@ -0,0 +1,185 @@
1
+ # Document Sharding Task
2
+
3
+ ## Purpose
4
+
5
+ - Split a large document into multiple smaller documents based on level 2 sections
6
+ - Create a folder structure to organize the sharded documents
7
+ - Maintain all content integrity including code blocks, diagrams, and markdown formatting
8
+
9
+ ## Primary Method: Automatic with markdown-tree
10
+
11
+ [[LLM: First, check if markdownExploder is set to true in .tfcore/core-config.yaml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`.
12
+
13
+ If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
14
+
15
+ If the command fails (especially with an error indicating the command is not found or not available), inform the user: "The markdownExploder setting is enabled but the md-tree command is not available. Please either:
16
+
17
+ 1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
18
+ 2. Or set markdownExploder to false in .tfcore/core-config.yaml
19
+
20
+ **IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
21
+
22
+ If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
23
+
24
+ 1. Set markdownExploder to true in .tfcore/core-config.yaml
25
+ 2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
26
+
27
+ I will now proceed with the manual sharding process."
28
+
29
+ Then proceed with the manual method below ONLY if markdownExploder is false.]]
30
+
31
+ ### Installation and Usage
32
+
33
+ 1. **Install globally**:
34
+
35
+ ```bash
36
+ npm install -g @kayvan/markdown-tree-parser
37
+ ```
38
+
39
+ 2. **Use the explode command**:
40
+
41
+ ```bash
42
+ # For PRD
43
+ md-tree explode docs/prd.md docs/prd
44
+
45
+ # For Architecture
46
+ md-tree explode docs/architecture.md docs/architecture
47
+
48
+ # For any document
49
+ md-tree explode [source-document] [destination-folder]
50
+ ```
51
+
52
+ 3. **What it does**:
53
+ - Automatically splits the document by level 2 sections
54
+ - Creates properly named files
55
+ - Adjusts heading levels appropriately
56
+ - Handles all edge cases with code blocks and special markdown
57
+
58
+ If the user has @kayvan/markdown-tree-parser installed, use it and skip the manual process below.
59
+
60
+ ---
61
+
62
+ ## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
63
+
64
+ ### Task Instructions
65
+
66
+ 1. Identify Document and Target Location
67
+
68
+ - Determine which document to shard (user-provided path)
69
+ - Create a new folder under `docs/` with the same name as the document (without extension)
70
+ - Example: `docs/prd.md` → create folder `docs/prd/`
71
+
72
+ 2. Parse and Extract Sections
73
+
74
+ CRITICAL AEGNT SHARDING RULES:
75
+
76
+ 1. Read the entire document content
77
+ 2. Identify all level 2 sections (## headings)
78
+ 3. For each level 2 section:
79
+ - Extract the section heading and ALL content until the next level 2 section
80
+ - Include all subsections, code blocks, diagrams, lists, tables, etc.
81
+ - Be extremely careful with:
82
+ - Fenced code blocks (```) - ensure you capture the full block including closing backticks and account for potential misleading level 2's that are actually part of a fenced section example
83
+ - Mermaid diagrams - preserve the complete diagram syntax
84
+ - Nested markdown elements
85
+ - Multi-line content that might contain ## inside code blocks
86
+
87
+ CRITICAL: Use proper parsing that understands markdown context. A ## inside a code block is NOT a section header.]]
88
+
89
+ ### 3. Create Individual Files
90
+
91
+ For each extracted section:
92
+
93
+ 1. **Generate filename**: Convert the section heading to lowercase-dash-case
94
+ - Remove special characters
95
+ - Replace spaces with dashes
96
+ - Example: "## Tech Stack" → `tech-stack.md`
97
+
98
+ 2. **Adjust heading levels**:
99
+ - The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
100
+ - All subsection levels decrease by 1:
101
+
102
+ ```txt
103
+ - ### → ##
104
+ - #### → ###
105
+ - ##### → ####
106
+ - etc.
107
+ ```
108
+
109
+ 3. **Write content**: Save the adjusted content to the new file
110
+
111
+ ### 4. Create Index File
112
+
113
+ Create an `index.md` file in the sharded folder that:
114
+
115
+ 1. Contains the original level 1 heading and any content before the first level 2 section
116
+ 2. Lists all the sharded files with links:
117
+
118
+ ```markdown
119
+ # Original Document Title
120
+
121
+ [Original introduction content if any]
122
+
123
+ ## Sections
124
+
125
+ - [Section Name 1](./section-name-1.md)
126
+ - [Section Name 2](./section-name-2.md)
127
+ - [Section Name 3](./section-name-3.md)
128
+ ...
129
+ ```
130
+
131
+ ### 5. Preserve Special Content
132
+
133
+ 1. **Code blocks**: Must capture complete blocks including:
134
+
135
+ ```language
136
+ content
137
+ ```
138
+
139
+ 2. **Mermaid diagrams**: Preserve complete syntax:
140
+
141
+ ```mermaid
142
+ graph TD
143
+ ...
144
+ ```
145
+
146
+ 3. **Tables**: Maintain proper markdown table formatting
147
+
148
+ 4. **Lists**: Preserve indentation and nesting
149
+
150
+ 5. **Inline code**: Preserve backticks
151
+
152
+ 6. **Links and references**: Keep all markdown links intact
153
+
154
+ 7. **Template markup**: If documents contain {{placeholders}} ,preserve exactly
155
+
156
+ ### 6. Validation
157
+
158
+ After sharding:
159
+
160
+ 1. Verify all sections were extracted
161
+ 2. Check that no content was lost
162
+ 3. Ensure heading levels were properly adjusted
163
+ 4. Confirm all files were created successfully
164
+
165
+ ### 7. Report Results
166
+
167
+ Provide a summary:
168
+
169
+ ```text
170
+ Document sharded successfully:
171
+ - Source: [original document path]
172
+ - Destination: docs/[folder-name]/
173
+ - Files created: [count]
174
+ - Sections:
175
+ - section-name-1.md: "Section Title 1"
176
+ - section-name-2.md: "Section Title 2"
177
+ ...
178
+ ```
179
+
180
+ ## Important Notes
181
+
182
+ - Never modify the actual content, only adjust heading levels
183
+ - Preserve ALL formatting, including whitespace where significant
184
+ - Handle edge cases like sections with code blocks containing ## symbols
185
+ - Ensure the sharding is reversible (could reconstruct the original from shards)
@@ -0,0 +1,131 @@
1
+ # split-brd
2
+
3
+ Split the BRD into the single AI-targeted requirement doc: the app Checklist (`docs/{AppName}-Checklist.md`).
4
+
5
+ ## Purpose
6
+
7
+ The BRD captures business intent with `BRD-N` IDs. Implementation needs finer-grained, type-tagged requirements. There is **one checklist per app**; the requirement *type* is carried by the REQ prefix, which routes work to the right builder:
8
+ - `REQ-UI-*` → built by `/trblazeui` (from the approved mockups), invoked as a sub-agent by the unified `build-phase`
9
+ - `REQ-RAG-*` → built by `/techierag`, invoked as a sub-agent by `build-phase`
10
+ - `REQ-FN-*` / `REQ-NFR-*` → built directly by `build-phase` (flow-master)
11
+
12
+ This task converts each `BRD-N` into one or more `REQ-*` items inside the one checklist.
13
+
14
+ ## Inputs
15
+
16
+ - `{AppName}` argument (required; or resolve from core-config.yaml).
17
+
18
+ ## SEQUENTIAL Execution
19
+
20
+ ### 1. Load inputs
21
+
22
+ - `docs/{AppName}-BRD.md` — must exist. Parse `BRD-N` IDs and their text.
23
+ - `docs/{AppName}-Architecture.md` — read for module boundaries and stack.
24
+ - `docs/{AppName}-UIDesign.md` + `docs/mockups/*.html` — if they exist (greenfield, post-`*mockups`), read them so each `REQ-UI-*` cites the mockup screen it realizes.
25
+
26
+ ### 2. Classify each BRD-N
27
+
28
+ For each `BRD-N`, classify as UI / FN / RAG / NFR:
29
+ - **UI**: any user-visible change — page, component, form, dashboard, layout.
30
+ - **RAG**: anything involving LLM, embedding, vector search, chat, prompt templates, token tracking, tool calling.
31
+ - **NFR**: performance, security, accessibility, observability, compliance.
32
+ - **FN**: everything else — backend logic, data, APIs, integrations, business rules.
33
+
34
+ A single `BRD-N` may map to multiple REQs (e.g. a "settings page that saves to DB" splits into REQ-UI-N (the page) and REQ-FN-N (the save handler)).
35
+
36
+ ### 2.5. Dev-plan seeding (CONDITIONAL — brownfield projects with an existing plan)
37
+
38
+ Check `docs/` for an existing development/phase plan (`*Development-Plan*.md`, `*Dev-Plan*.md`, `*Implementation-Plan*.md`, `*Roadmap*.md`, or any doc structured as Phase 0/1/2… with build order/statuses). If one exists:
39
+
40
+ - Carry its phase structure into §3 — tag each REQ with its phase (e.g. `(BRD-21, Phase 1)`) and order rows by phase.
41
+ - **Preserve every column the plan tracked** — the Requirements Status table must be a SUPERSET of the plan's, never a lossy summary. For each migrated REQ fill Status, **%**, **Remarks**, Details: carry the plan's `% Done` verbatim and its full dated status remark (e.g. "Completed 2026-04-30 (DTOs split…)") into Remarks — do not truncate.
42
+ - COMPLETE/done/shipped → Status `Done (pre-existing)`, `%` = plan's figure (usually `100%`), Remarks = plan's note + `per {plan-file} §{section}`. Build agents must NOT rebuild these. Partial → `In Progress`/`PARTIAL` with the plan's `%`+remark. Not started → `Not Started`, `0%`.
43
+ - Add a header note to the checklist: `> Migrated from {plan-file} on {YYYY-MM-DD}. Phase structure, completion %, and status remarks carried over verbatim — verify before building.`
44
+ - Do not modify the plan file's content. After migration it is superseded — move it unchanged to `docs/OldDocs/` (create the folder if missing; date-suffix on name collision) and note this in the §6 summary.
45
+
46
+ If no plan exists, skip — classify purely from the BRD.
47
+
48
+ ### 3. Write `docs/{AppName}-Checklist.md`
49
+
50
+ Schema per `.tfcore/templates/v4custom/app-checklist-tmpl.md` — the **Requirements Status** table sits at the TOP (single source of truth for the WHOLE app), with all REQ classes in one table, and the per-REQ detail follows in prefix-grouped sections with `<a id="d-REQ-ID">` anchors the Details column links to:
51
+ ```markdown
52
+ # {AppName} — Checklist
53
+
54
+ ## Goal
55
+ {one paragraph; ties back to BRD §1}
56
+
57
+ ## Requirements Status
58
+ | ID | Requirement | Status | % | Remarks | Details |
59
+ |----|-------------|--------|---|---------|---------|
60
+ | REQ-UI-001 | {short name} | Not Started | 0% | — | [view](#d-req-ui-001) |
61
+ | REQ-FN-001 | {short name} | Not Started | 0% | — | [view](#d-req-fn-001) |
62
+ | REQ-RAG-001 | {short name} | Not Started | 0% | — | [view](#d-req-rag-001) |
63
+ | REQ-NFR-001 | {short name} | Not Started | 0% | — | [view](#d-req-nfr-001) |
64
+ {Status values + % guide + Remarks note — copy the legend from the template}
65
+
66
+ ## UI / Pages
67
+ ### Page: {page name} (`{route}`)
68
+ <a id="d-req-ui-001"></a>
69
+ - **REQ-UI-001** — {description; traces to BRD-X}. *Mockup:* docs/mockups/{screen}.html (if mockups exist).
70
+ - *Acceptance:* {specific testable criterion}; controls do not overlap at desktop + mobile widths (visual gate).
71
+
72
+ ## Functional requirements
73
+ <a id="d-req-fn-001"></a>
74
+ - **REQ-FN-001** — {trigger / acceptance} (BRD-X)
75
+
76
+ <!-- If the source BRD NFR carried a `perf-budget:` line, copy it into the REQ's Acceptance
77
+ bullet VERBATIM — same grammar, same numbers. verify-phase §4c reads it literally and
78
+ grades speed only where it exists. Never synthesize one for an NFR that lacked it, and
79
+ never drop one that was there: both silently change what "Verified" means for that REQ. -->
80
+
81
+
82
+ ## RAG / AI requirements (→ /techierag)
83
+ <a id="d-req-rag-001"></a>
84
+ - **REQ-RAG-001** — {trigger / acceptance via TechieRag} (BRD-X)
85
+
86
+ ## Non-functional
87
+ <a id="d-req-nfr-001"></a>
88
+ - **REQ-NFR-001** — {perf/security/accessibility} (BRD-X)
89
+ ```
90
+
91
+ Cross-link: every REQ-N's description ends with `(BRD-X)` so traceability is two-way.
92
+
93
+ ### 4. Trace check
94
+
95
+ - Every `BRD-N` should appear at least once in the checklist's Requirements Status table.
96
+ - If any `BRD-N` is unmapped, list it in the output summary and ask: "BRD-X has no REQ. Is it deferred, or should I map it now?"
97
+
98
+ ### 5. Output summary
99
+
100
+ Report counts:
101
+ - `K` `REQ-UI-*`, `M` `REQ-FN-*`, `N` `REQ-RAG-*`, `P` `REQ-NFR-*` items in the checklist
102
+ - Any unmapped `BRD-N`s flagged in §4
103
+
104
+ Update `PROJECT-STATUS.md` per `.tfcore/tasks/_status-update-gate.md` (this task counts as a phase — the gate applies):
105
+ - Next phase is always the unified build while any REQ is open: current_phase `Build`, Next command `/TechieFlow:agents:flow-master *build-phase {AppName}` (OpenCode: `/flow-master *build-phase {AppName}`). `build-phase` clusters all open REQs and calls `/trblazeui` (REQ-UI-*, from the mockups) and `/techierag` (REQ-RAG-*) as sub-agents itself — you do NOT point the user at a separate UI or RAG command.
106
+ - `last_updated`: today. Leave `last_verified_build`/`last_verified_date` as-is (no build this phase).
107
+ - Sync "Open requirements" to the new Status table (everything non-terminal).
108
+ - Append a row to "Verification log" — N/A (no verify yet)
109
+ - List unmapped open requirements if any
110
+ - Re-render `PROJECT-STATUS.html` (gate minimum #8). Do NOT render the checklist to HTML — it is an AI-agent working document (markdown only).
111
+
112
+ ### 6. Emit the run record (telemetry)
113
+
114
+ Same turn as the status/PROJECT-STATUS write. Doctrine + the ten constraints: `.tfcore/tasks/_metrics-emit-gate.md`. Schema: `.tfcore/telemetry/SCHEMA.md` §2. Stamp `started` with `date -u +%Y-%m-%dT%H:%M:%SZ` as your FIRST action of this task — it cannot be reconstructed at the end.
115
+
116
+ ```bash
117
+ cat <<'JSON' | bash .tfcore/utils/tf-emit.sh runs
118
+ {"kind":"run","app":"{AppName}","cmd":"split-brd","mode":null,
119
+ "started":"<start>","ended":"<now>","duration_s":<n>,
120
+ "reqs_touched":[],"reqs_count":0,
121
+ "subagents":[],"files_written":<n>,"build_result":"not-run"}
122
+ JSON
123
+ ```
124
+
125
+ `reqs_touched` carries REQ IDs only — never requirement text — and `[]` is correct when this task touched no specific REQ. **Telemetry has no veto:** if the emit fails, the phase still succeeded; do not retry, do not diagnose, do not mention it.
126
+
127
+ ## Output Checklist
128
+
129
+ - [ ] `docs/{AppName}-Checklist.md` exists with REQ-UI/FN/RAG/NFR-* IDs each back-linking to BRD-N, in one Requirements Status table
130
+ - [ ] Every `BRD-N` is mapped or explicitly deferred
131
+ - [ ] `PROJECT-STATUS.md` updated with `Build` phase + `*build-phase` next command (+ re-rendered HTML)