@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.
- package/.claude/commands/TechieFlow/agents/analyst.md +0 -5
- package/.claude/commands/TechieFlow/agents/architect.md +0 -6
- package/.claude/commands/TechieFlow/agents/flow-master.md +41 -215
- package/.claude/commands/TechieFlow/agents/verifier.md +23 -64
- package/.claude/commands/TechieFlow/tasks/_metrics-emit-gate.md +24 -117
- package/.claude/commands/TechieFlow/tasks/_smoke-test-policy.md +20 -84
- package/.claude/commands/TechieFlow/tasks/_status-update-gate.md +10 -74
- package/.claude/commands/TechieFlow/tasks/_yolo-mode.md +20 -58
- package/.claude/commands/TechieFlow/tasks/amend-docs.md +20 -143
- package/.claude/commands/TechieFlow/tasks/build-phase.md +14 -224
- package/.claude/commands/TechieFlow/tasks/day1-brownfield.md +31 -505
- package/.claude/commands/TechieFlow/tasks/day1-greenfield.md +28 -213
- package/.claude/commands/TechieFlow/tasks/deploy-checklist.md +19 -0
- package/.claude/commands/TechieFlow/tasks/devguide.md +10 -219
- package/.claude/commands/TechieFlow/tasks/fix-issues.md +10 -129
- package/.claude/commands/TechieFlow/tasks/log-miss.md +19 -158
- package/.claude/commands/TechieFlow/tasks/metrics-report.md +1 -1
- package/.claude/commands/TechieFlow/tasks/mockups.md +12 -117
- package/.claude/commands/TechieFlow/tasks/refresh-status.md +9 -130
- package/.claude/commands/TechieFlow/tasks/split-brd.md +10 -126
- package/.claude/commands/TechieFlow/tasks/triage-and-fix.md +14 -0
- package/.claude/commands/TechieFlow/tasks/triage-issues.md +11 -152
- package/.claude/commands/TechieFlow/tasks/verify-phase.md +36 -572
- package/.opencode/plugin/techieflow.js +39 -12
- package/.tfcore/agents/analyst.md +0 -5
- package/.tfcore/agents/architect.md +0 -6
- package/.tfcore/agents/flow-master.md +41 -215
- package/.tfcore/agents/verifier.md +23 -64
- package/.tfcore/core-config.yaml +10 -0
- package/.tfcore/hooks/block-git.sh +4 -4
- package/.tfcore/hooks/guard-artifacts.sh +2 -2
- package/.tfcore/hooks/guard-build.sh +76 -0
- package/.tfcore/hooks/guard-db.sh +90 -0
- package/.tfcore/hooks/guard-metrics.sh +56 -0
- package/.tfcore/hooks/guard-status-html.sh +116 -71
- package/.tfcore/hooks/guard-status.sh +43 -16
- package/.tfcore/hooks/guard-verify.sh +70 -48
- package/.tfcore/hooks/sweep-artifacts.sh +2 -2
- package/.tfcore/install-manifest.yaml +0 -18
- package/.tfcore/routing.yaml +25 -14
- package/.tfcore/standards/coding-standards-core.md +61 -0
- package/.tfcore/standards/coding-standards-dotnet.md +93 -0
- package/.tfcore/tasks/_metrics-emit-gate.md +24 -117
- package/.tfcore/tasks/_smoke-test-policy.md +20 -84
- package/.tfcore/tasks/_status-update-gate.md +10 -74
- package/.tfcore/tasks/_yolo-mode.md +20 -58
- package/.tfcore/tasks/amend-docs.md +20 -143
- package/.tfcore/tasks/build-phase.md +14 -224
- package/.tfcore/tasks/day1-brownfield.md +31 -505
- package/.tfcore/tasks/day1-greenfield.md +28 -213
- package/.tfcore/tasks/deploy-checklist.md +19 -0
- package/.tfcore/tasks/devguide.md +10 -219
- package/.tfcore/tasks/fix-issues.md +10 -129
- package/.tfcore/tasks/log-miss.md +19 -158
- package/.tfcore/tasks/metrics-report.md +1 -1
- package/.tfcore/tasks/mockups.md +12 -117
- package/.tfcore/tasks/refresh-status.md +9 -130
- package/.tfcore/tasks/split-brd.md +10 -126
- package/.tfcore/tasks/triage-and-fix.md +14 -0
- package/.tfcore/tasks/triage-issues.md +11 -152
- package/.tfcore/tasks/verify-phase.md +36 -572
- package/.tfcore/telemetry/SCHEMA.md +43 -7
- package/.tfcore/telemetry/tf-metrics.sh +152 -17
- package/.tfcore/templates/project-brief-tmpl.yaml +1 -1
- package/.tfcore/templates/stack-defaults/dotnet.md +35 -0
- package/.tfcore/templates/stack-questions.md +77 -0
- package/.tfcore/templates/v4custom/app-agents-md-tmpl.md +3 -4
- package/.tfcore/templates/v4custom/app-architecture-tmpl.md +107 -115
- package/.tfcore/templates/v4custom/app-brd-tmpl.md +108 -184
- package/.tfcore/templates/v4custom/app-checklist-tmpl.md +48 -73
- package/.tfcore/templates/v4custom/app-claude-md-tmpl.md +1 -1
- package/.tfcore/templates/v4custom/app-coding-standards-tmpl.md +52 -0
- package/.tfcore/templates/v4custom/app-deployment-checklist-tmpl.md +86 -0
- package/.tfcore/templates/v4custom/app-devguide-tmpl.md +69 -146
- package/.tfcore/templates/v4custom/app-phases-tmpl.md +35 -0
- package/.tfcore/templates/v4custom/app-productguide-tmpl.md +38 -35
- package/.tfcore/templates/v4custom/app-project-status-tmpl.md +63 -73
- package/.tfcore/templates/v4custom/app-uidesign-tmpl.md +62 -37
- package/.tfcore/templates/v4custom/app-usageguide-tmpl.md +69 -54
- package/.tfcore/templates/v4custom/build-invocation-ladder.md +17 -180
- package/.tfcore/templates/v4custom/build-subagent-prompt.md +17 -0
- package/.tfcore/templates/v4custom/metrics-report-template.md +2 -2
- package/.tfcore/user-guide.md +0 -23
- package/.tfcore/utils/__pycache__/tf-brd-status.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-checklist-edit.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-codex-bind.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-codex-telemetry.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-day1-files.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-devguide-list.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-doc-check.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-log-miss.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-misses-md.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-mockups-locate.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-opencode-audit.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-perf-grade.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-render-html.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-split-brd.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-status-facts.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-triage.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-verify-list.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-verify-verdict.cpython-312.pyc +0 -0
- package/.tfcore/utils/tf-brd-status.py +176 -0
- package/.tfcore/utils/tf-brd-status.sh +19 -0
- package/.tfcore/utils/tf-build-list.py +191 -0
- package/.tfcore/utils/tf-build-list.sh +20 -0
- package/.tfcore/utils/tf-build.sh +143 -0
- package/.tfcore/utils/tf-cdp-relay.ps1 +64 -0
- package/.tfcore/utils/tf-checklist-edit.py +133 -0
- package/.tfcore/utils/tf-day1-files.py +208 -0
- package/.tfcore/utils/tf-day1-files.sh +20 -0
- package/.tfcore/utils/tf-devguide-list.py +249 -0
- package/.tfcore/utils/tf-devguide-list.sh +18 -0
- package/.tfcore/utils/tf-doc-check.py +1267 -0
- package/.tfcore/utils/tf-doc-check.sh +29 -0
- package/.tfcore/utils/tf-emit.sh +203 -13
- package/.tfcore/utils/tf-fix-close.sh +83 -0
- package/.tfcore/utils/tf-goal.sh +193 -62
- package/.tfcore/utils/tf-harness.sh +4 -9
- package/.tfcore/utils/tf-log-miss.py +197 -0
- package/.tfcore/utils/tf-log-miss.sh +14 -0
- package/.tfcore/utils/tf-misses-md.py +211 -0
- package/.tfcore/utils/tf-misses-md.sh +13 -0
- package/.tfcore/utils/tf-mockups-locate.py +66 -0
- package/.tfcore/utils/tf-mockups-locate.sh +18 -0
- package/.tfcore/utils/tf-opencode-audit.py +23 -7
- package/.tfcore/utils/tf-perf-grade.py +97 -0
- package/.tfcore/utils/tf-perf-grade.sh +12 -0
- package/.tfcore/utils/tf-phase.sh +74 -0
- package/.tfcore/utils/tf-routing-bind.sh +10 -5
- package/.tfcore/utils/tf-routing.sh +6 -7
- package/.tfcore/utils/tf-split-brd.py +304 -0
- package/.tfcore/utils/tf-split-brd.sh +22 -0
- package/.tfcore/utils/tf-status-evidence.sh +68 -0
- package/.tfcore/utils/tf-status-facts.py +309 -0
- package/.tfcore/utils/tf-status-facts.sh +20 -0
- package/.tfcore/utils/tf-triage.py +243 -0
- package/.tfcore/utils/tf-triage.sh +16 -0
- package/.tfcore/utils/tf-verify-boot.sh +250 -0
- package/.tfcore/utils/tf-verify-emit.sh +110 -0
- package/.tfcore/utils/tf-verify-env.sh +88 -0
- package/.tfcore/utils/tf-verify-list.py +270 -0
- package/.tfcore/utils/tf-verify-list.sh +13 -0
- package/.tfcore/utils/tf-verify-screens.mjs +283 -0
- package/.tfcore/utils/tf-verify-screens.sh +22 -0
- package/.tfcore/utils/tf-verify-tests.sh +123 -0
- package/.tfcore/utils/tf-verify-verdict.py +283 -0
- package/.tfcore/utils/tf-verify-verdict.sh +15 -0
- package/.tfcore/utils/tf-yolo.sh +59 -0
- package/README.md +114 -1149
- package/docs/TechieFlow-Installation.md +1 -5
- package/opencode.jsonc +13 -33
- package/package.json +1 -5
- package/scripts/install.mjs +52 -46
- package/.claude/commands/TechieFlow/tasks/advanced-elicitation.md +0 -117
- package/.claude/commands/TechieFlow/tasks/author-brd.md +0 -79
- package/.claude/commands/TechieFlow/tasks/document-project.md +0 -343
- package/.claude/commands/TechieFlow/tasks/execute-checklist.md +0 -86
- package/.claude/commands/TechieFlow/tasks/index-docs.md +0 -173
- package/.claude/commands/TechieFlow/tasks/kb-mode-interaction.md +0 -75
- package/.claude/commands/TechieFlow/tasks/shard-doc.md +0 -185
- package/.codex/config.toml +0 -46
- package/.codex/hooks.json +0 -63
- package/.codex/rules/techieflow.rules +0 -8
- package/.tfcore/hooks/codex-adapter.py +0 -248
- package/.tfcore/tasks/advanced-elicitation.md +0 -117
- package/.tfcore/tasks/author-brd.md +0 -79
- package/.tfcore/tasks/document-project.md +0 -343
- package/.tfcore/tasks/execute-checklist.md +0 -86
- package/.tfcore/tasks/index-docs.md +0 -173
- package/.tfcore/tasks/kb-mode-interaction.md +0 -75
- package/.tfcore/tasks/shard-doc.md +0 -185
- package/.tfcore/utils/tf-codex-bind.py +0 -196
- package/.tfcore/utils/tf-codex-telemetry.py +0 -60
- package/WORKFLOW.html +0 -1986
|
@@ -1,507 +1,33 @@
|
|
|
1
1
|
# day1-brownfield
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
customTechnicalDocuments:
|
|
35
|
-
brd: docs/{AppName}-BRD.md
|
|
36
|
-
architecture: docs/{AppName}-Architecture.md
|
|
37
|
-
codingStandards: docs/{AppName}-Coding-Standards.md
|
|
38
|
-
```
|
|
39
|
-
Write the file back. Other TechieFlow tasks read this and use the right paths.
|
|
40
|
-
- In the same write, set `devLoadAlwaysFiles` to the project's concrete paths (the stock agents always-load these):
|
|
41
|
-
```yaml
|
|
42
|
-
devLoadAlwaysFiles:
|
|
43
|
-
- docs/{AppName}-Coding-Standards.md
|
|
44
|
-
- docs/{AppName}-Architecture.md
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 1.5. Discovery hints — harvest existing docs before inferring anything
|
|
48
|
-
|
|
49
|
-
**First, auto-detect harvest candidates:** Glob `docs/*.md` and repo-root `*.md` (exclude `docs/OldDocs/`, generated `.html`, `CLAUDE.md`, `PROJECT-STATUS.md`, `README.md` unless it contains requirements content). These are the docs available for harvesting.
|
|
50
|
-
|
|
51
|
-
If `{Hints}` was passed as a command argument, use it (detected docs not excluded by the hints are harvested too). Otherwise ask exactly ONCE (then move on regardless of the answer):
|
|
52
|
-
|
|
53
|
-
> "I found these existing docs: {numbered list of detected candidates, or '(none)'}.
|
|
54
|
-
> Reply `all` (or just press enter) to harvest ALL of them — the default — or list the ones to use.
|
|
55
|
-
> You can also add extra paths and/or custom drafting instructions (stack overrides, scope limits, etc.) in the same reply. `none` = harvest nothing, reverse-doc from code alone."
|
|
56
|
-
|
|
57
|
-
Do NOT ask anything else about existing docs — no merge-vs-new, no keep-vs-overwrite (see §1.6 for the fixed collision policy).
|
|
58
|
-
|
|
59
|
-
Parse the response:
|
|
60
|
-
- **`all` / empty**: every detected candidate goes into `SourceDocs[]`.
|
|
61
|
-
- **A selection** (numbers or names from the list): only those go into `SourceDocs[]`.
|
|
62
|
-
- **Paths** (anything that looks like a relative or absolute file path): collect into `SourceDocs[]`. For each, attempt to **Read** it. If it exists, capture its content for §2/§3. If it doesn't exist, note it in the summary at §8 and continue (do NOT block).
|
|
63
|
-
- **Glob patterns** (e.g. `docs/*.md`): expand with the Glob tool and Read each match.
|
|
64
|
-
- **Instructions** (anything that doesn't look like a path): collect into `CustomInstructions` — a single text blob that §2 and §3 must honor when drafting (stack overrides, scope limits, naming preferences, exclusions).
|
|
65
|
-
- **`none`** or empty: proceed with code-only inference; record `SourceDocs = []` and `CustomInstructions = (none)`.
|
|
66
|
-
|
|
67
|
-
This step is **non-blocking** — never re-ask, never elicit per-doc. One question, one parse, move on.
|
|
68
|
-
|
|
69
|
-
### 1.6. Existing-doc collision policy — fresh canonical docs + OldDocs archive (NO QUESTIONS)
|
|
70
|
-
|
|
71
|
-
This policy is FIXED. **NEVER ask merge-vs-new or keep-vs-overwrite. NEVER write suffixed variants (`-v2`, `-new`, `-updated`) of any deliverable.** Suffixed variants are what broke HTML rendering and traceability in the past.
|
|
72
|
-
|
|
73
|
-
- Every deliverable is ALWAYS written fresh at its canonical name (`docs/{AppName}-BRD.md`, `docs/{AppName}-Architecture.md`, etc.).
|
|
74
|
-
- **Before writing a deliverable whose target file already exists:** create `docs/OldDocs/` if missing, then MOVE the existing file there unchanged (its sibling `.html`, if any, moves with it). On a name collision inside `OldDocs/`, append `-{YYYY-MM-DD}` to the moved file's name; if still colliding, `-2`, `-3`, …
|
|
75
|
-
- This applies to all day-1 deliverables, including root-level `PROJECT-STATUS.md` and `CLAUDE.md` (archived as `docs/OldDocs/PROJECT-STATUS.md` etc.). Exception: `.editorconfig` is machine config, identical across projects — overwrite in place, no archive.
|
|
76
|
-
- **Superseded source docs move too:** after §2/§3 (and §3.5 if it runs) complete, move each harvested source doc whose ROLE is now filled by a new deliverable (old BRDs/requirement specs, old architecture/design notes, dev/phase plans after migration) into `docs/OldDocs/`. Docs that remain independently authoritative (API usage guides, setup/ops guides, third-party integration notes) STAY in `docs/` — they were harvested as input, not replaced.
|
|
77
|
-
- List every moved file in the §8 summary (`archived to docs/OldDocs/: …`) so nothing disappears silently.
|
|
78
|
-
|
|
79
|
-
Net effect: `docs/` always contains exactly one current version of each doc under its canonical name; history lives in `docs/OldDocs/`; render/split/build tasks never face variant ambiguity.
|
|
80
|
-
|
|
81
|
-
### 2. Reverse-document the codebase → `docs/{AppName}-Architecture.md`
|
|
82
|
-
|
|
83
|
-
- Load `.tfcore/templates/v4custom/app-architecture-tmpl.md` as the structural template. Substitute `{AppName}` and `{YYYY-MM-DD}` throughout.
|
|
84
|
-
- Status field: "Current" (this is brownfield).
|
|
85
|
-
- **Source-doc harvesting (do this FIRST, before any inference):**
|
|
86
|
-
- If `SourceDocs[]` from §1.5 contains anything that reads as architecture / design / system / data-flow material, harvest from it directly: copy structural prose verbatim (with attribution), pull diagram intent, map their components to your §4 module table. Do not re-invent what the user already wrote.
|
|
87
|
-
- At the end of the doc, add a `## Sources harvested` section listing each source file that contributed content.
|
|
88
|
-
- **Apply `CustomInstructions`** from §1.5 throughout — if the user said "stack is .NET 8", use .NET 8 in §1; if they said "ignore `legacy/`", skip that folder in the scan.
|
|
89
|
-
- Populate remaining sections by SCANNING the codebase (only for what the source docs didn't cover):
|
|
90
|
-
- **§1 Tech stack:** read `.csproj`/`.sln` files, package references, target frameworks. Note TrBlazeUI / TechieRag presence (look in package references AND in `.claude/` for deployed agent files).
|
|
91
|
-
- **§2 Component map:** scan `src/` (or `source/`) for projects; build a Mermaid `flowchart TB` showing project-level dependencies inferred from `<ProjectReference>` and `using` directives.
|
|
92
|
-
- **§3 Data flow:** if you can identify a primary request path (e.g. controller → service → repo), diagram it as a `sequenceDiagram`. Otherwise leave the template placeholder and add a note "data flow unknown from static analysis — populate after first feature pass."
|
|
93
|
-
- **§4 Module responsibilities:** one row per project under `src/`. Responsibility = one-line summary derived from top-of-namespace XML doc or README mentions.
|
|
94
|
-
- **§5 Cross-cutting:** detect logging library (Serilog/ILogger), auth scheme (JWT/cookies/Identity), telemetry (OTel/AppInsights) by package references.
|
|
95
|
-
- **§6 Deployment:** if `.github/workflows/`, `Dockerfile`, `azure-pipelines.yml` exist, derive the path. Otherwise mark "no CI/CD detected; manual deploy."
|
|
96
|
-
- **§7 ADRs:** seed with `ADR-001 — current stack as-is (reverse-doc baseline).` and any obvious decisions visible in README.
|
|
97
|
-
- **§8 Target architecture:** leave blank unless the BRD (§3 below) calls out a structural change.
|
|
98
|
-
- **§9 Open questions:** include "field-prefix drift" detection (see below) and any TODOs / FIXMEs that look architectural.
|
|
99
|
-
- **Depth mandate (Architecture is a HUMAN document too):** apply the same information-preservation rule as the BRD (§3) — source-doc architecture content carries forward, never gets summarized into a stub. Each module in §4 with non-trivial behavior gets a short prose paragraph (not just a table row), and any significant runtime flow beyond the primary path (background jobs, ingestion pipelines, auth handshakes, external-API round-trips) gets its own `sequenceDiagram` or `flowchart` in the relevant section. A reader skimming only the diagrams should grasp how the system hangs together.
|
|
100
|
-
- **Field-prefix drift detection:** scan `src/`, `source/`, or any `.cs` files for instance-field declarations and note the dominant style (`obj`-prefixed vs bare PascalCase vs `_underscore`/mixed) — §4 uses this to pick the project's field convention. If no style reaches ~80% dominance, add to §9 Open questions: "Standards drift detected — mixed instance-field naming (N obj / M bare / K underscore). §4 picked {chosen}; remediation happens incrementally during implementation."
|
|
101
|
-
- **Table of Contents:** the template at `.tfcore/templates/v4custom/app-architecture-tmpl.md` includes a `## Table of Contents` section. After populating the rest of the doc, regenerate that section to match the actual H2 headings you wrote (drop entries for sections that ended up empty, add entries for any new sections). Use the slug rule from `.tfcore/templates/v4custom/html-render-shell.md §1` — same slug for the link in the TOC and the `id` the renderer will assign. Broken TOC links are a known recurring bug; don't be the next instance.
|
|
102
|
-
- Write the populated doc to `docs/{AppName}-Architecture.md`.
|
|
103
|
-
|
|
104
|
-
### 3. Draft the FULL BRD in one pass → `docs/{AppName}-BRD.md`
|
|
105
|
-
|
|
106
|
-
This is the friction-removal step. **Do NOT run `author-brd`. Do NOT prompt the user per section.** Instead:
|
|
107
|
-
|
|
108
|
-
- Load `.tfcore/templates/v4custom/app-brd-tmpl.md` as the structural template. Substitute `{AppName}` and `{YYYY-MM-DD}` throughout.
|
|
109
|
-
- **Source-doc harvesting takes precedence over inference.** Populate every section in this priority order:
|
|
110
|
-
1. **`SourceDocs[]` from §1.5** — if the user provided existing requirement / spec / functionality docs, harvest from them FIRST. Pull goals, audience, features verbatim where possible. Convert any "the system shall …" / "user can …" prose into numbered `BRD-N` items. Cite the source file inline (e.g. `BRD-7 — From requirements.md §4`).
|
|
111
|
-
2. The reverse-doc from §2 (what the codebase ALREADY does — fills gaps the source docs didn't cover).
|
|
112
|
-
3. README / `docs/` contents (project intent, goals, audience — only for fields still empty after 1 and 2).
|
|
113
|
-
4. Reasonable inference for sections that have no signal anywhere (mark these with `<!-- inferred — please verify -->` HTML comments).
|
|
114
|
-
- **Apply `CustomInstructions`** from §1.5 — if the user said "focus on admin module only", scope BRDs accordingly; if "skip auth", omit auth BRDs even if the codebase implements them.
|
|
115
|
-
- **INFORMATION-PRESERVATION RULE (hard requirement when SourceDocs exist):** the new BRD must be a SUPERSET of the requirements content in the harvested source docs — never a summary of it. Concretely:
|
|
116
|
-
- Every table, matrix, screen inventory, route list, license/feature matrix, navigation-menu tree, persona-detail block, and per-feature workflow in a source BRD/spec **carries forward** into the new doc (updated where stale, attributed where copied) — it does NOT get compressed into a one-liner.
|
|
117
|
-
- **Length sanity check before writing:** if the source docs' requirements content totals X lines and your draft (excluding boilerplate) is under ~60% of X, you compressed — go back and restore the detail. A 1,000-line source BRD should never produce a 250-line replacement.
|
|
118
|
-
- One-line statements are allowed ONLY in the §10 BRD ledger. Everything else is full prose, tables, and diagrams — this is a HUMAN document read as rendered HTML; the coding agents get their compact view later from `*split-brd` / the Checklist.
|
|
119
|
-
- **§4 Development status (brownfield: the reader's first question — "what's built, what's pending?"):** fill the §4 table with ONE row per §9 feature-catalog F-code. Derive each row's Status / % / Phase / Notes from the **strongest evidence available**, in priority order: (1) a migrated dev/phase plan (§3.5) — carry its phase + completion verbatim; (2) the code scan from §2 — a feature whose screens/handlers actually compile and exist is `Done`, partially-present is `Partial`, absent is `Planned`; (3) source-doc status notes. Set the "Snapshot as of" date to today. This is a feature-level SUMMARY only — do NOT restate per-REQ status (that's PROJECT-STATUS + the checklists). Keep it consistent with §3.5's migrated statuses and with PROJECT-STATUS.
|
|
120
|
-
- **§9 Feature catalog (the heart of the doc):** one `### F-{CODE}: {Name}` subsection per feature/capability area found in the source docs and the codebase. Per feature: personas + phase, 1-2 paragraphs of what/why, a screens & routes table, a numbered workflow (inputs → outputs), and the owning BRD-N IDs. If a source doc already has a feature catalog, preserve its feature codes and per-feature detail. Depth scales with the app (8–25 features is normal) — there is NO cap. Every F-code MUST also appear as a row in the §4 Development status table.
|
|
121
|
-
- For §10 Functional requirements ledger: walk the feature catalog and emit `BRD-1`, `BRD-2`, … as one-line `<actor> can <action>` or `system shall <behavior>` statements, each tagged with its catalog feature `(F-CODE)`. Number monotonically. **One BRD per discrete capability — the count scales with the app (20–60 is normal for a real product); NEVER merge capabilities to keep the count low.** If a BRD came directly from a source doc, suffix the line with `<!-- from: <source-file> -->`.
|
|
122
|
-
- For §11 Non-functional: cover performance, security, accessibility, scalability, reliability based on visible NFR signals (auth scheme, target framework, any `aria-` attrs in Razor). Where concrete targets exist (latency, uptime, concurrency), present them as a target table, not buried in prose. **ALWAYS include the standing Observability NFR: Serilog file-based logging in every executable head** — if the §5 cross-cutting scan found Serilog (or an equivalent structured file-logging stack) already wired, record it as met/`Done (pre-existing)`; if the app logs only to console or not at all, add the NFR as `Planned` so it becomes a `REQ-NFR-*` row and gets built (recipe: coding-standards §Logging).
|
|
123
|
-
- **Mermaid mandate:** §6, §7, §8 (context, journey, component) are the MINIMUM — build them from §2's component map (copy verbatim if identical). Additionally, every feature-catalog entry with a multi-step or multi-actor flow gets its own diagram (`flowchart` or `sequenceDiagram`). Target: a reader skimming only the diagrams should grasp how the app works. Simple CRUD features may skip the diagram. **Every diagram MUST follow the authoring rules in `.tfcore/templates/v4custom/html-render-shell.md §5.5` — quote every node/edge/subgraph label and never use `end` as a node id; unquoted special characters in flowchart labels are the #1 cause of broken diagrams in the rendered HTML.**
|
|
124
|
-
- Append a footer:
|
|
125
|
-
```
|
|
126
|
-
---
|
|
127
|
-
Last updated: {YYYY-MM-DD}
|
|
128
|
-
Highest BRD ID: BRD-{N}
|
|
129
|
-
Sources harvested: {comma-separated list of SourceDocs paths, or "none — drafted from reverse-doc"}
|
|
130
|
-
Custom instructions applied: {one-line summary of CustomInstructions, or "none"}
|
|
131
|
-
Drafted from reverse-doc — review and edit. New BRDs may be added (append-only); do not renumber.
|
|
132
|
-
```
|
|
133
|
-
- **Table of Contents:** the template includes a `## Table of Contents` section. Regenerate it after populating the doc so it matches the actual H2 headings, and list each `### F-…` feature-catalog entry as an H3 sub-entry under "Feature catalog". Use the slug rule from `.tfcore/templates/v4custom/html-render-shell.md §1`.
|
|
134
|
-
- Write the populated doc to `docs/{AppName}-BRD.md`.
|
|
135
|
-
|
|
136
|
-
### 3.5. Migrate an existing development/phase plan → split requirement docs (CONDITIONAL)
|
|
137
|
-
|
|
138
|
-
**Trigger:** any doc among `SourceDocs[]` or in `docs/` matching dev-plan patterns — `*Development-Plan*.md`, `*Dev-Plan*.md`, `*Implementation-Plan*.md`, `*Roadmap*.md`, or any doc whose content is a phased plan (Phase 0/1/2…, sprint list, feature-by-feature build order with statuses).
|
|
139
|
-
|
|
140
|
-
**If no such doc exists, SKIP this section entirely** — the user runs `*split-brd {AppName}` later, after reviewing the BRD (the normal flow).
|
|
141
|
-
|
|
142
|
-
**If a dev plan EXISTS, do NOT leave the split as a separate step** — the plan already validates the requirements, so migrate it now:
|
|
143
|
-
|
|
144
|
-
- Execute the logic of `.tfcore/tasks/split-brd.md` inline (read that file and follow §2–§4): classify every `BRD-N` from §3 into `REQ-UI-*` / `REQ-FN-*` / `REQ-RAG-*` / `REQ-NFR-*` and write the one checklist `docs/{AppName}-Checklist.md` (all prefixes in a single Requirements Status table).
|
|
145
|
-
- **Seed from the dev plan (the migration part) — preserve EVERY column the plan tracked.** The plan's own status table is the gold standard; the new **Requirements Status** table (top of the checklist) must be a SUPERSET of it, never a lossy summary:
|
|
146
|
-
- Carry the plan's phase structure into both docs — tag each REQ with its phase (e.g. `**REQ-FN-007** — … (BRD-21, Phase 1)`), and order sections by phase.
|
|
147
|
-
- Fill ALL columns of the Status table for each migrated REQ: **Status**, **%**, **Remarks**, **Details** link. If the old plan had a `% Done` column, carry the number verbatim; if it had a Status/Remarks column with dates and detail (e.g. "Completed 2026-04-30 (DTOs split…)"), carry that whole remark into **Remarks** — do NOT truncate it.
|
|
148
|
-
- COMPLETE / done / shipped → Status `Done (pre-existing)`, `%` = the plan's figure (usually `100%`), Remarks = the plan's completion note + `per {plan-file} §{section}`. Build agents must NOT rebuild these.
|
|
149
|
-
- Partial items (e.g. "50% Scaffolded") → Status `In Progress` or `PARTIAL`, carry the plan's `%` and remark verbatim.
|
|
150
|
-
- Not-yet-started items → Status `Not Started`, `0%`.
|
|
151
|
-
- Add a header note to both docs: `> Migrated from {plan-file} on {YYYY-MM-DD}. Phase structure, completion %, and status remarks carried over verbatim — verify before building.`
|
|
152
|
-
- **Keep the BRD §4 Development status table consistent with this migration:** the feature-level rows in BRD §4 must agree with the per-REQ statuses you just wrote (a feature whose REQs are all `Done (pre-existing)` → `Done` in §4; mixed → `Partial`; none started → `Planned`). The checklist is the live per-REQ truth; BRD §4 is the human feature-level snapshot of the same reality.
|
|
153
|
-
- Do NOT modify the dev-plan file's content. After migration it is superseded — move it to `docs/OldDocs/` per §1.6 and say so in the §8 summary.
|
|
154
|
-
- If the `*split-brd` artifact (`docs/{AppName}-Checklist.md`) already exists (re-run scenario), apply §1.6: archive the old one to `docs/OldDocs/`, write fresh at the canonical name. No questions.
|
|
155
|
-
|
|
156
|
-
### 4. Create the Coding Standards → `docs/{AppName}-Coding-Standards.md`
|
|
157
|
-
|
|
158
|
-
Write the file with the exact content below, substituting `{AppName}` in the title only.
|
|
159
|
-
|
|
160
|
-
**ONE per-project decision first — the instance-field prefix.** The shared rules (no underscores, `a` params, `v` locals, PascalCase everywhere) are fixed; the instance-field convention is decided per project (existing samples: AppManager = `obj` prefix, AstroLyfe = bare PascalCase no-prefix):
|
|
161
|
-
- If the existing code has a clear dominant style (≥80% of instance fields `obj`-prefixed OR ≥80% bare PascalCase), adopt that style.
|
|
162
|
-
- If `{Hints}` / CustomInstructions specify one, that wins.
|
|
163
|
-
- Otherwise default to `obj`.
|
|
164
|
-
Record the decision in the table below (swap the Instance-fields row to `PascalCase, no prefix — e.g. private readonly ILogger<X> Logger;` if no-prefix won), in the §"Enforcement" greps (the missing-obj-prefix grep only applies to obj-style projects), and in CLAUDE.md (§7).
|
|
165
|
-
|
|
166
|
-
```markdown
|
|
167
|
-
# {AppName} Coding Standards
|
|
168
|
-
|
|
169
|
-
**Last Updated:** {today YYYY-MM-DD}
|
|
170
|
-
**Status:** Authoritative for all code under `src/`/`source/` and `tests/`. Conformance enforced via repo-root `.editorconfig` + verifier grep checks in §"Enforcement".
|
|
171
|
-
|
|
172
|
-
## Database Naming Conventions
|
|
173
|
-
|
|
174
|
-
### Tables and Columns
|
|
175
|
-
- PascalCase: `CustomerOrder` NOT `customer_order`
|
|
176
|
-
- Singular: `CustomerOrder` NOT `CustomerOrders`
|
|
177
|
-
- **NEVER use underscores** in any DB object name
|
|
178
|
-
- FK columns: `{TableName}Id` (e.g., `CustomerId`)
|
|
179
|
-
- PK: `{TableName}Id` (e.g., `UserId`)
|
|
180
|
-
|
|
181
|
-
### Stored Procedures & Functions
|
|
182
|
-
- PascalCase verb prefix: `GetCustomerOrders`, `InsertOrder`, `CalculateTotal`
|
|
183
|
-
- Action prefixes: Get / Insert / Update / Delete / Calculate
|
|
184
|
-
|
|
185
|
-
### Indexes & Constraints
|
|
186
|
-
- Index: `IX{Table}{Column}` · PK: `Pk{Table}` · FK: `Fk{Table}{Ref}` · Unique: `Uc{Table}{Column}`
|
|
187
|
-
|
|
188
|
-
## C# Conventions
|
|
189
|
-
|
|
190
|
-
### Classes & Interfaces
|
|
191
|
-
- PascalCase for classes; `I` prefix for interfaces; descriptive names.
|
|
192
|
-
- Async methods end with `Async`.
|
|
193
|
-
|
|
194
|
-
### Fields, Parameters, Locals
|
|
195
|
-
|
|
196
|
-
**NEVER use underscores** anywhere in any identifier.
|
|
197
|
-
|
|
198
|
-
| Kind | Convention | Example |
|
|
199
|
-
|------|-----------|---------|
|
|
200
|
-
| **Instance fields** | `obj` prefix + PascalCase tail (no underscores) | `private readonly ILogger<X> objLogger;`<br>`private readonly HttpClient objHttpClient;`<br>`private string objCachedPublicKey;` |
|
|
201
|
-
| **Static / `const` fields** | PascalCase, no prefix | `private const string CachePrefix = "…";` |
|
|
202
|
-
| **Method parameters** | `a` prefix + PascalCase | `LoginAsync(string aEmail, string aPassword)` |
|
|
203
|
-
| **Local variables** | `v` prefix + PascalCase | `var vResponse = await …` |
|
|
204
|
-
| **Booleans** | same prefix + `Is`/`Has`/`Can` | `IsAuthenticated`, `vIsValid`, `aHasAccess` |
|
|
205
|
-
| **Properties** | PascalCase, no prefix | `public string ConnectionString { get; set; }` |
|
|
206
|
-
| **Constants** | PascalCase, no underscores | `MaxRetryCount` NOT `MAX_RETRY_COUNT` |
|
|
207
|
-
| **Test methods** | Short PascalCase, no underscores — full scenario in XML `<summary>` | `LoginRejectsBadPassword` not `Login_BadPassword_ReturnsUnauthorized` |
|
|
208
|
-
|
|
209
|
-
**Rejected forms:** `_underscore` field prefixes, snake_case anywhere, Hungarian prefixes (`strName`), underscores in test method names.
|
|
210
|
-
|
|
211
|
-
### Controller-action parameters
|
|
212
|
-
The `a`-prefix applies uniformly to `[FromRoute]`/`[FromQuery]`/`[FromBody]`. Parameter name flows through to OpenAPI. Body DTO **property** names stay PascalCase no prefix; only the parameter symbol holding the deserialized DTO gets the `a` prefix.
|
|
213
|
-
|
|
214
|
-
### Environment Variables
|
|
215
|
-
**PascalCase, no separators.** `{AppName}BaseUrl` NOT `APPNAME_BASE_URL` and NOT `AppName__BaseUrl`. Use a custom configuration provider mapping PascalCase env vars → `:`-nested config paths. Read via `IConfiguration["Section:Key"]` only — never `Environment.GetEnvironmentVariable(...)`.
|
|
216
|
-
|
|
217
|
-
### Project & solution naming — the primary head carries the PRODUCT name
|
|
218
|
-
- The product's **primary executable head** project is named exactly `{AppName}` — `src/{AppName}/{AppName}.csproj`. A single-head product's one head IS `{AppName}`.
|
|
219
|
-
- **`{AppName}.App` is BANNED** (owner rule 2026-07-10): "App" says nothing — the product name already names the app. Never scaffold it; if the codebase has one, log a rename REQ (dir + `.csproj` + sln entry + namespaces) in the checklist instead of propagating the name.
|
|
220
|
-
- Secondary heads of a multi-head product take a **descriptive** dotted suffix: `{AppName}.Api`, `{AppName}.Desktop`, `{AppName}.Cli`. Satellites keep their conventional names: `{AppName}.Core` (engine), `{AppName}UI` (RCL), `{AppName}.Core.Tests` / `{AppName}.Tests`.
|
|
221
|
-
|
|
222
|
-
### File Structure
|
|
223
|
-
```csharp
|
|
224
|
-
using System;
|
|
225
|
-
|
|
226
|
-
namespace {AppName}.Services.Example;
|
|
227
|
-
|
|
228
|
-
public class DatabaseService
|
|
229
|
-
{
|
|
230
|
-
private readonly ILogger<DatabaseService> objLogger;
|
|
231
|
-
private readonly IConfiguration objConfiguration;
|
|
232
|
-
|
|
233
|
-
public DatabaseService(ILogger<DatabaseService> aLogger, IConfiguration aConfiguration)
|
|
234
|
-
{
|
|
235
|
-
objLogger = aLogger;
|
|
236
|
-
objConfiguration = aConfiguration;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
public string ConnectionString { get; set; }
|
|
240
|
-
|
|
241
|
-
public async Task<DataTable> GetDataAsync(string aQueryName)
|
|
242
|
-
{
|
|
243
|
-
var vConnString = objConfiguration.GetConnectionString("Default");
|
|
244
|
-
var vResult = await ExecuteQueryAsync(vConnString, aQueryName);
|
|
245
|
-
return vResult;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Best Practices
|
|
251
|
-
- One class per file. File name matches class.
|
|
252
|
-
- File-scoped namespaces. Nullable reference types enabled.
|
|
253
|
-
- Methods small (<20 lines). Single responsibility.
|
|
254
|
-
- Max 3 nesting levels. Early returns for validation.
|
|
255
|
-
- ConfigureAwait(false) in libraries.
|
|
256
|
-
- StringBuilder for loop concatenation. Dispose IDisposable. Cache expensive ops.
|
|
257
|
-
|
|
258
|
-
### XML Documentation (MANDATORY on public members)
|
|
259
|
-
`<summary>`, `<remarks>`, `<param>`, `<returns>`, `<exception>` — all required.
|
|
260
|
-
|
|
261
|
-
### Testing
|
|
262
|
-
- Short PascalCase test name, no underscores. Full scenario in XML `<summary>`.
|
|
263
|
-
- Arrange-Act-Assert. One assertion per test where practical.
|
|
264
|
-
|
|
265
|
-
### Security
|
|
266
|
-
- Never hardcode credentials. Parameterized queries. Validate inputs. Log security events.
|
|
267
|
-
|
|
268
|
-
### Logging — Serilog file sink (MANDATORY, every .NET app type)
|
|
269
|
-
- **Every executable head gets Serilog with a rolling FILE sink — web (Blazor Server/WASM host), API, MAUI, WinForms/WPF desktop, console/CLI, background service. No exceptions, and never wait for the owner to ask.**
|
|
270
|
-
- Wire at startup, before anything else can fail: `Log.Logger = new LoggerConfiguration().MinimumLevel.Information().WriteTo.Console().WriteTo.File("logs/{appname}-.log", rollingInterval: RollingInterval.Day, retainedFileCountLimit: 14).CreateLogger();` then plug into DI (`builder.Services.AddSerilog()` / `builder.Host.UseSerilog()` for hosts; `builder.Logging.AddSerilog()` in `MauiProgram.CreateMauiApp`). Read overrides from `appsettings.json` (`Serilog` section) where the host has one. For MAUI/desktop, root the path in a writable per-app location (`FileSystem.AppDataDirectory` / `Environment.SpecialFolder.LocalApplicationData`), not the install dir.
|
|
271
|
-
- Log unhandled exceptions at the head boundary: `try/catch` + `Log.Fatal` around startup, `AppDomain.CurrentDomain.UnhandledException` / `TaskScheduler.UnobservedTaskException` handlers, and `Log.CloseAndFlush()` on exit.
|
|
272
|
-
- **Class libraries never reference Serilog** — they log through `ILogger<T>` / `Microsoft.Extensions.Logging.Abstractions` only; the head's Serilog config picks those up automatically.
|
|
273
|
-
- App code logs through injected `ILogger<T>` (structured message templates, e.g. `logger.LogInformation("Imported {Count} rows", n)`), not static `Log.*`, outside the startup boundary.
|
|
274
|
-
- The `logs/` output folder is gitignored (the owner adds it — agents never run git).
|
|
275
|
-
- Brownfield: an app already on a working structured file-logging stack (e.g. NLog-to-file) is compliant — record the stack in this section; new heads added to it still use Serilog.
|
|
276
|
-
|
|
277
|
-
### MAUI UI testability — stable AutomationId (MAUI apps only)
|
|
278
|
-
- Every interactive or data-bound control the verifier must reach (buttons, entries, pickers, list/collection views, key labels/values) carries a stable, unique **`AutomationId`** — the native analogue of a stable DOM id for Playwright. Without it Appium selectors drift and the runtime gates (`verify-phase §4a/§4b`) can't reliably find controls on the Android/iOS/Mac Catalyst heads.
|
|
279
|
-
- Name them by intent, not layout: `AutomationId="LoginSubmitButton"`, `AutomationId="ClientsGrid"`, `AutomationId="TotalBalanceValue"` — never positional (`Button2`).
|
|
280
|
-
- Set it on the control whose data the gate asserts (the grid/list itself, the value label), so "rows present AND non-empty" / "value not blank" maps to one addressable element.
|
|
281
|
-
- (Blazor screens use the equivalent `data-testid`/stable element ids for Playwright — same principle.)
|
|
282
|
-
|
|
283
|
-
## Enforcement
|
|
284
|
-
|
|
285
|
-
### .editorconfig (machine-checkable)
|
|
286
|
-
- File-scoped namespaces (`warning`)
|
|
287
|
-
- Async-method `Async` suffix (`warning`)
|
|
288
|
-
- `var` for locals (`warning`)
|
|
289
|
-
- Nullable reference types enabled
|
|
290
|
-
- No `_` prefix on private fields (`warning` via custom naming rule)
|
|
291
|
-
|
|
292
|
-
### Verifier grep checks
|
|
293
|
-
```bash
|
|
294
|
-
# Forbidden underscore-prefix fields
|
|
295
|
-
grep -rE "private(\s+readonly)?\s+\w+\s+_[a-z]" src/ source/ 2>/dev/null
|
|
296
|
-
|
|
297
|
-
# Forbidden test-method underscores
|
|
298
|
-
grep -rE "public\s+(async\s+)?Task\s+\w+_\w+\s*\(" tests/
|
|
299
|
-
|
|
300
|
-
# Field missing obj prefix
|
|
301
|
-
grep -rE "private(\s+readonly)?\s+\w+\s+(?!obj)[A-Z]\w+\s*[;=]" src/ source/ 2>/dev/null | grep -v "static\|const"
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Severity
|
|
305
|
-
- **Error**: file-scoped namespace, underscore field prefix
|
|
306
|
-
- **Warning**: nullable, async suffix
|
|
307
|
-
- **Info**: consider fixing
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
### 5. Create `.editorconfig` at the repo root
|
|
311
|
-
|
|
312
|
-
Copy `.tfcore/templates/v4custom/app-editorconfig-tmpl.editorconfig` verbatim to `.editorconfig` at the repo root. No substitution — the rules are identical across projects.
|
|
313
|
-
|
|
314
|
-
### 5b. Close the `.gitignore` on the stack this repo is written in (MANDATORY)
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
bash .tfcore/utils/tf-gitignore-audit.sh . --fix
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
**Run it here, in this step, and read the output.** The scaffold wrote a `.gitignore`
|
|
321
|
-
covering **TechieFlow's** artifacts — `.tfcore/`, `.claude/`, `node_modules/`,
|
|
322
|
-
`tests/.artifacts/`, `playwright-report/`, `logs/` — every section framework-managed
|
|
323
|
-
and labelled as such. It says **nothing** about the stack the project is written in.
|
|
324
|
-
On brownfield that stack is already on disk and you have just spent §2–§4 reading it,
|
|
325
|
-
so you are the step that knows the answer — and the file the scaffold left is
|
|
326
|
-
complete-looking enough to be read as finished. Existing repos are the likelier
|
|
327
|
-
offenders here, not the safer ones: the build output may already be committed.
|
|
328
|
-
|
|
329
|
-
That is exactly how it went wrong once (TfLens TF-007, 2026-08-29): a repository whose
|
|
330
|
-
`core-config.yaml` and four `.csproj` files said .NET throughout carried an ignore file
|
|
331
|
-
with **no `bin/`, no `obj/`, and no rule of any kind for .NET**. The first build produced
|
|
332
|
-
output and one commit — named, with some irony, *"Updated git ignore"* — swept **1,041**
|
|
333
|
-
build-output files into the index; four later commits reached **1,962**. Those files carry
|
|
334
|
-
the static-web-assets manifest, whose content roots are **machine-absolute** (`/mnt/c/…`
|
|
335
|
-
after a WSL build, `C:\…` after a Windows one), so committing them ships one machine's
|
|
336
|
-
paths to another — a plausible route to precisely the asset 404 that TF-007 is about.
|
|
337
|
-
|
|
338
|
-
**The agent that ran day-1 generated that file and did not read it. That agent was
|
|
339
|
-
responsible**, and the audit exists to make the mistake harder rather than to move the
|
|
340
|
-
blame — a generator's omission is not a defence for the agent operating the generator.
|
|
341
|
-
|
|
342
|
-
Two outputs, and the second one is the one people miss:
|
|
343
|
-
|
|
344
|
-
- **Missing rules** — `--fix` appends them under their own labelled header. Existing
|
|
345
|
-
owner content is never rewritten.
|
|
346
|
-
- **Build output that is ALREADY TRACKED** — reported, never fixed here. **A tracked file
|
|
347
|
-
is never ignored, whatever the ignore file says**, so adding the rule does nothing on
|
|
348
|
-
its own. The audit prints the exact `git rm -r --cached <path>` lines; **put them in
|
|
349
|
-
your §8 summary for the owner to run.** Agents never run git, in any mode.
|
|
350
|
-
|
|
351
|
-
### 6. Create `PROJECT-STATUS.md` at the repo root
|
|
352
|
-
|
|
353
|
-
Load `.tfcore/templates/v4custom/app-project-status-tmpl.md` and substitute:
|
|
354
|
-
- `{AppName}` everywhere
|
|
355
|
-
- `{YYYY-MM-DD}` → today
|
|
356
|
-
- `stack:` line → from §2 detection (e.g. `.NET 9 / Blazor Server / TrBlazeUI`)
|
|
357
|
-
- `last_verified_build:` → run the build using the **invocation ladder** at `.tfcore/templates/v4custom/build-invocation-ladder.md`. MANDATORY workflow:
|
|
358
|
-
1. **Platform probe FIRST** — Read ladder §0. In OpenCode Docker, prove `winrun "dotnet --info"` before building. Then scan the `.sln`/`.slnx` file. A Windows MAUI project uses `winrun "dotnet build <slnx>"`; a standard .NET solution uses container `dotnet build`. Do not check/install `maui-tizen`.
|
|
359
|
-
2. **Symptom-based escalation** — if a build fails with `NETSDK1178`, `Microsoft.iOS.Sdk` missing, `Microsoft.Android.Sdk` missing, `Workload ID not recognized`, or any workload-related error → you are on the WRONG RUNG. In Docker use `winrun` for the Windows head; in WSL switch to rung #4. Do NOT log workload errors as Known blockers.
|
|
360
|
-
3. Try rungs 1-5 in order; do NOT report `not-run` unless ALL five rungs genuinely failed (workload errors don't count — they're wrong-rung signals).
|
|
361
|
-
4. Record `PASS`, `FAIL`, or `not-run` per the ladder's rules. If `FAIL` from a REAL compile error (CS#### codes, missing source references), add a one-line summary to "Known blockers".
|
|
362
|
-
5. **BANNED Known-blocker entries** (these are wrong-rung confessions, not project issues — see the ladder doc's "What NEVER goes into Known blockers" section): "MAUI build cannot run on WSL", "NETSDK1178 workload missing", "iOS/Android SDK missing", "dotnet not in PATH". If you wrote one of these, you didn't follow the ladder. Switch rungs and rebuild.
|
|
363
|
-
6. If the solution mixes MAUI + non-MAUI projects: log the per-platform result for transparency, e.g. "standard projects build in the container; Windows MAUI project builds through `winrun`; solution-level build uses `winrun`."
|
|
364
|
-
- `last_verified_date:` → today
|
|
365
|
-
- `current_phase:` → `Discovery`; if §3.5 ran (dev plan migrated), use `Discovery — requirements split done; next build phase: {first incomplete phase from the dev plan}` instead.
|
|
366
|
-
- **Where I am:** one paragraph from §2's findings — what exists, what state it's in. If §3.5 ran, include which dev-plan phases are already complete.
|
|
367
|
-
- **Next command to run:** HTML is rendered by this task itself (§7.5), so point at the real next step: `/TechieFlow:agents:analyst *split-brd {AppName}` (OpenCode: `/flow-analyst *split-brd {AppName}`) — or, if §3.5 ran (split already done), `/TechieFlow:agents:flow-master *build-phase {AppName}` (OpenCode: `/flow-master *build-phase {AppName}`) (the unified build; it calls trblazeui/techierag itself). **NEVER set `*verify all` as the day-1 next command** — day-1 has verified nothing and a brownfield repo virtually always has unbuilt/PARTIAL features in the freshly-migrated checklist; per the Build → Verify → Handoff ladder (`_status-update-gate.md` item 5), the next step after a brownfield day-1 is `*split-brd` (to create the checklist) or, once the checklist exists, `*build-phase` (to finish building). Verification comes only after the build is substantially complete.
|
|
368
|
-
- **Open requirements:** empty list — populated later by `*split-brd`. If §3.5 ran, list the REQ-* counts per type with phase tags (already populated; `*split-brd` is NOT needed).
|
|
369
|
-
- **Known blockers:** from §2 (build failure, standards drift, etc.) — otherwise "None".
|
|
370
|
-
- **Verification log:** empty table with headers only.
|
|
371
|
-
- **Library feedback summary:** both libraries `0 major, 0 minor` initially.
|
|
372
|
-
- **Standards compliance:** "not yet run".
|
|
373
|
-
- **Deferred / future:** empty.
|
|
374
|
-
|
|
375
|
-
### 7. Create `AGENTS.md` at the repo root (the harness-neutral session memory — both harnesses load it)
|
|
376
|
-
|
|
377
|
-
Copy `.tfcore/templates/v4custom/app-agents-md-tmpl.md` and substitute `{AppName}` throughout. Resolve the field-prefix line to THIS project's §4 decision, e.g.: "Field-prefix convention: `obj` prefix on instance fields (e.g. `private readonly ILogger<X> objLogger;`) — see Coding Standards." or "...bare PascalCase, no prefix — see Coding Standards."
|
|
378
|
-
|
|
379
|
-
`AGENTS.md` carries the CONTENT (required reading, hard rules, project basics, REQ prefixes, verification, slash-command table): OpenCode auto-loads it directly (and skips `CLAUDE.md` whenever an `AGENTS.md` exists); Claude Code loads it through `CLAUDE.md`'s `@AGENTS.md` import. **`AGENTS.md` is committed** (it is NOT in the gitignored framework block). If a previous `AGENTS.md` exists, archive it per the §1.6 collision policy and write fresh.
|
|
380
|
-
|
|
381
|
-
### 7.2. Create `CLAUDE.md` (Claude-only wrapper — imports AGENTS.md)
|
|
382
|
-
|
|
383
|
-
Copy `.tfcore/templates/v4custom/app-claude-md-tmpl.md` and substitute `{AppName}` throughout. It is a thin wrapper: `@AGENTS.md` (Claude resolves the import) plus the Claude-only permissions/tool-preference section. `CLAUDE.md` stays gitignored as before.
|
|
384
|
-
|
|
385
|
-
### 7.4. Create the Usage Guide (test users + test plan) → `docs/{AppName}-UsageGuide.md`
|
|
386
|
-
|
|
387
|
-
Always create this — it is the canonical registry of **test users** and the screen-by-screen **test plan** that every later smoke/verify run (and the human UAT) draws from, so the pipeline never invents throwaway accounts (`.tfcore/tasks/_smoke-test-policy.md`).
|
|
388
|
-
|
|
389
|
-
- Load `.tfcore/templates/v4custom/app-usageguide-tmpl.md` and substitute `{AppName}`.
|
|
390
|
-
- **Test users table:** this is a brownfield app, so the DB may already have accounts. Locate the connection string (`appsettings*.json` / env config) and, if reachable, read the users/identity table and list the **existing** accounts (one row per distinct role) with `Created? = ✅`. Do NOT dump real production passwords you can't see — where a password is unknown, note "{existing — ask owner}" and leave `Created?` ✅. If the DB isn't reachable or has no users, list the *intended* test accounts (one per role from the BRD's actors) as `Created? = ⬜` (planned, to be created with confirmation on first build). **Do NOT create any users in this step.**
|
|
391
|
-
- **Screen-by-screen test plan:** one subsection per screen/menu found in §2's reverse-doc (and the §9 BRD feature catalog), in navigation order, each naming the test user to log in as, the steps, the expected result, and the BRD-N/REQ-* it covers. Cover every feature.
|
|
392
|
-
- **Setup/Deployment + Test + Smoke + Known limitations:** populate from §2 detection (same runbook discipline as handoff — one command per line, omit inapplicable steps).
|
|
393
|
-
- Write to `docs/{AppName}-UsageGuide.md` (subject to the §1.6 collision policy like every other deliverable).
|
|
394
|
-
|
|
395
|
-
### 7.5. Auto-render every day-1 doc to HTML — no separate render step
|
|
396
|
-
|
|
397
|
-
Render the deliverables to HTML NOW, in this same run, by following `.tfcore/tasks/generate-html.md` (which applies the shared shell at `.tfcore/templates/v4custom/html-render-shell.md` — copy buttons, mermaid toolbar, TOC, slug rule):
|
|
398
|
-
|
|
399
|
-
- `docs/{AppName}-BRD.md` → `docs/{AppName}-BRD.html`
|
|
400
|
-
- `docs/{AppName}-Architecture.md` → `docs/{AppName}-Architecture.html`
|
|
401
|
-
- `docs/{AppName}-UsageGuide.md` → `docs/{AppName}-UsageGuide.html`
|
|
402
|
-
- `PROJECT-STATUS.md` → `PROJECT-STATUS.html` (use `layout no-toc`; include the "NEXT COMMAND TO RUN" call-to-action box per render-workflow-docs §5)
|
|
403
|
-
|
|
404
|
-
**Do NOT render the checklist to HTML.** If §3.5 produced `docs/{AppName}-Checklist.md`, leave it as markdown — it is an AI-agent working document, never rendered (HTML mirrors of agent docs only burn tokens and drift).
|
|
405
|
-
|
|
406
|
-
Use the Write tool — NOT bash heredocs. The user should NEVER have to run a render command after day-1; rendering is idempotent, so post-review edits are handled by a quick re-render (`/generate-html @docs/{file}.md`).
|
|
407
|
-
|
|
408
|
-
### 7.6. Generate the Developer Guide (brownfield has as-built code → map it NOW)
|
|
409
|
-
|
|
410
|
-
A brownfield project already has built code, so the screen-by-screen **Developer Guide** — the doc a human uses to chase bugs and catch AI-hallucinated code from page → control → service → data-access → stored proc / query — can and SHOULD be produced at day-1, not deferred to handoff. (Greenfield day-1 has no code, so it has no equivalent step; brownfield does — this is the brownfield-only step that closes the "verifier passed but it's still buggy" gap on day one.)
|
|
411
|
-
|
|
412
|
-
- Run `.tfcore/tasks/devguide.md` for `{AppName}` (the `*devguide {AppName}` task) and follow it end-to-end: discover roles/menus/screens (it reads the §7.4 UsageGuide test-users table + code authorization), **fan out per role** to bound tokens, map each screen's controls + full data lineage, verify every path is a real symbol (`{unresolved — TODO}` rather than an invented proc name), apply **LANDING-TRUTH** + **RENDER-TRUTH**, and render the markdown + sibling `.html` (single `docs/{AppName}-DevGuide.md`, or an index + per-role files under `docs/devguides/` for a large app — the task auto-decides per its §3).
|
|
413
|
-
- **Self-guard:** if the repo turns out to be doc-only (no built UI/code — unusual for brownfield, but possible when day-1 is run before any code lands), the devguide task HALTs itself. Record "DevGuide skipped — no built code yet (run `*devguide {AppName}` after the first build phase)" in the §8 summary and move on; do NOT treat it as an error.
|
|
414
|
-
- **OBSERVE pass (devguide §5a):** the devguide attempts to boot the app and runtime-observe each control. At day-1 the app's stack is often not up yet, so the guide will commonly be stamped **`⚠ STATIC-ONLY — NOT runtime-verified`** — that is EXPECTED and acceptable here; do NOT block day-1 trying to bring a stack up. The user runs `*verify {scope}` / `*devguide {AppName} --update` later (once the stack is up) to runtime-confirm render-status.
|
|
415
|
-
- **Screenshot capture + owner visual-review (devguide §5a/§5b):** the OBSERVE pass captures a screenshot of every screen to `docs/screenshots/{AppName}/` and embeds it in the DevGuide. At day-1 this is usually non-interactive (chained, no live Q&A), so the devguide skips the live "what needs to change?" gate but still captures the shots — **tell the user in §8 to review `docs/screenshots/{AppName}/` and run `*fix-issues {AppName} {folder}` (or `*devguide {AppName} --update`) for any screen that's wrong.** This is how the broken-UI problem surfaces on day-1. (If the stack can't boot, the guide is STATIC-ONLY and no screenshots are captured — noted below.)
|
|
416
|
-
- **Defect logging (devguide §6a) depends on the checklist existing — handle both branches:**
|
|
417
|
-
- **If §3.5 ran** (a dev plan was migrated → `docs/{AppName}-Checklist.md` exists): the devguide logs every confirmed defect into the owning `REQ-*`'s Remarks (and flags `Needs re-verify` where the feature is actually broken) per its §6a — markdown only, never checklist HTML.
|
|
418
|
-
- **If §3.5 did NOT run** (no checklist until `*split-brd`): the devguide cannot map screen → `REQ-*` yet, so its findings stay in the DevGuide's own "Known issues" prose. **Tell the user in §8** to run `*devguide {AppName} --update` immediately AFTER `*split-brd` so those findings get pushed into the freshly-created checklist (otherwise the day-1 defects are lost when the verifier later trusts a clean checklist).
|
|
419
|
-
|
|
420
|
-
### 7a. Emit the run record (telemetry)
|
|
421
|
-
|
|
422
|
-
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.
|
|
423
|
-
|
|
424
|
-
```bash
|
|
425
|
-
cat <<'JSON' | bash .tfcore/utils/tf-emit.sh runs
|
|
426
|
-
{"kind":"run","app":"{AppName}","cmd":"day1-brownfield","mode":null,
|
|
427
|
-
"started":"<start>","ended":"<now>","duration_s":<n>,
|
|
428
|
-
"reqs_touched":[],"reqs_count":0,
|
|
429
|
-
"subagents":[],"files_written":<n>,"build_result":"not-run"}
|
|
430
|
-
JSON
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
`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.
|
|
434
|
-
|
|
435
|
-
### 8. HALT — produce a summary and stop
|
|
436
|
-
|
|
437
|
-
Output a numbered summary listing what was created:
|
|
438
|
-
1. `docs/{AppName}-Architecture.md` — N modules documented, M Mermaid diagrams
|
|
439
|
-
2. `docs/{AppName}-BRD.md` — K BRD requirements drafted (BRD-1 through BRD-K)
|
|
440
|
-
3. `docs/{AppName}-Coding-Standards.md` — created from canonical template
|
|
441
|
-
4. `.editorconfig` — created
|
|
442
|
-
5. `PROJECT-STATUS.md` — current_phase = Discovery
|
|
443
|
-
6. `CLAUDE.md` — created with the project's field-prefix decision pinned
|
|
444
|
-
6a. `AGENTS.md` — created (OpenCode pointer; same content via §7.2)
|
|
445
|
-
7. `docs/{AppName}-UsageGuide.md` — test-users registry (N accounts: M existing ✅ / K planned ⬜) + screen-by-screen test plan
|
|
446
|
-
8. *(only if §3.5 ran)* `docs/{AppName}-Checklist.md` — migrated from `{plan-file}` (X REQs done pre-existing, Y open); the old dev plan is archived to docs/OldDocs/; `*split-brd` is NOT needed for this project
|
|
447
|
-
9. *(§7.6)* DevGuide — `docs/{AppName}-DevGuide.md` (single) or `docs/devguides/` (split): R roles, M screens mapped, {STATIC-ONLY | runtime-verified}, {k} unresolved paths, {d} defects logged ({to the checklist if §3.5 ran, else "in DevGuide prose — run `*devguide --update` after `*split-brd`"}); screenshots in `docs/screenshots/{AppName}/` (if runtime-verified). *(Or "skipped — no built code yet" if the self-guard tripped.)*
|
|
448
|
-
10. HTML renders (§7.5 + §7.6) — list every `.html` written
|
|
449
|
-
|
|
450
|
-
If `SourceDocs[]` was non-empty, also include a "Sources harvested" line listing each file that contributed content (and any that were declared but couldn't be Read).
|
|
451
|
-
|
|
452
|
-
Then say exactly:
|
|
453
|
-
|
|
454
|
-
```
|
|
455
|
-
Day-1 artifacts complete — MD docs, their HTML renders (§7.5), AND the screen-by-screen
|
|
456
|
-
DevGuide (§7.6, the as-built code map) are all written. Nothing left to run.
|
|
457
|
-
|
|
458
|
-
Review the human-readable docs (open the .html files, or edit the .md sources directly).
|
|
459
|
-
The BRD especially is a first-pass draft inferred from the codebase; please verify
|
|
460
|
-
BRD-1..BRD-{N} reflect actual intent. The DevGuide traces each screen page → control →
|
|
461
|
-
service → data-access → proc; it is {STATIC-ONLY — run *verify once the stack is up to
|
|
462
|
-
runtime-confirm | runtime-verified}.
|
|
463
|
-
|
|
464
|
-
{If runtime-verified:} Review the per-screen SCREENSHOTS in docs/screenshots/{AppName}/ — this
|
|
465
|
-
is how each screen actually renders. For any screen that's visually broken or wrong, run
|
|
466
|
-
*fix-issues {AppName} {folder} (drop the screenshots + a note in a folder) — it triages and
|
|
467
|
-
fixes UI + functional bugs and re-verifies.
|
|
468
|
-
|
|
469
|
-
If you edit any .md afterwards, re-render just that file:
|
|
470
|
-
/generate-html @docs/{AppName}-BRD.md (Claude Code form; in OpenCode use the
|
|
471
|
-
plain path without @ — @ there inlines
|
|
472
|
-
the whole file into the prompt;
|
|
473
|
-
multiple paths allowed; docs/ = all
|
|
474
|
-
top-level .md, non-recursive)
|
|
475
|
-
|
|
476
|
-
Next workflow step (after your review): *split-brd {AppName} via /TechieFlow:agents:analyst (OpenCode: /flow-analyst) —
|
|
477
|
-
unless this run already migrated a dev plan (§3.5), in which case the next step is
|
|
478
|
-
*build-phase {AppName} shown in PROJECT-STATUS.md.
|
|
479
|
-
{If §3.5 did NOT run AND the DevGuide flagged defects: immediately after *split-brd, run
|
|
480
|
-
*devguide {AppName} --update so the DevGuide's day-1 findings get logged into the new
|
|
481
|
-
checklist before the verifier trusts it.}
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
If any pre-existing docs were archived (§1.6), append the list: "Archived to docs/OldDocs/: {files}".
|
|
485
|
-
|
|
486
|
-
Do NOT auto-advance past day-1 (no split/build without the user). Rendering HTML is NOT auto-advancing — it is part of day-1 (§7.5).
|
|
487
|
-
|
|
488
|
-
## Output Checklist (verify before saying done)
|
|
489
|
-
|
|
490
|
-
- [ ] `.tfcore/core-config.yaml` updated with customTechnicalDocuments paths
|
|
491
|
-
- [ ] `docs/{AppName}-Architecture.md` exists, contains Mermaid blocks, status = Current
|
|
492
|
-
- [ ] `docs/{AppName}-BRD.md` exists with a populated §4 Development status table (one row per F-code, real Status/% from dev-plan or code scan), a §9 Feature catalog (one `### F-…` per feature, screens table + workflow + diagram where non-trivial), a §10 BRD-N ledger, and a footer showing highest ID
|
|
493
|
-
- [ ] Every BRD Mermaid diagram passes the §5.5 authoring self-check (quoted labels, no `end` node ids) — no diagram will throw "Syntax error" in the rendered HTML
|
|
494
|
-
- [ ] If SourceDocs were harvested: new BRD is a SUPERSET of their requirements content (length sanity check passed — no tables/matrices/inventories dropped)
|
|
495
|
-
- [ ] `docs/{AppName}-Coding-Standards.md` exists with the instance-field convention decided and recorded (obj prefix or no-prefix)
|
|
496
|
-
- [ ] `.editorconfig` exists at repo root
|
|
497
|
-
- [ ] `PROJECT-STATUS.md` exists with current_phase=Discovery and a "Next command to run" pointer
|
|
498
|
-
- [ ] `CLAUDE.md` exists at repo root
|
|
499
|
-
- [ ] `AGENTS.md` exists at repo root (§7.2 OpenCode pointer)
|
|
500
|
-
- [ ] `docs/{AppName}-UsageGuide.md` exists — Test-users table populated (existing accounts from the DB marked ✅, planned ones ⬜; NO users were created in day-1) + screen-by-screen test plan
|
|
501
|
-
- [ ] If a dev/phase plan existed (§3.5): the one `docs/{AppName}-Checklist.md` written with phase tags and pre-existing completions marked `Done` — NOT left for a separate `*split-brd` run
|
|
502
|
-
- [ ] Collision policy §1.6 followed: all deliverables at canonical names, pre-existing versions + superseded source docs moved to `docs/OldDocs/`, NO merge-vs-new question asked, NO `-v2` variants written
|
|
503
|
-
- [ ] §7.5 auto-render done: every day-1 .md deliverable has a fresh sibling .html (shared shell: copy buttons, mermaid toolbar, working TOC) — the user was NOT told to run a render command
|
|
504
|
-
- [ ] §7.6 DevGuide generated (brownfield has as-built code): `docs/{AppName}-DevGuide.md` (single) or `docs/devguides/` (split) + sibling `.html`, with the verification-status banner (STATIC-ONLY is acceptable at day-1) — OR self-guard-skipped because the repo is genuinely doc-only (noted in §8). If §3.5 produced the checklist, devguide defects were logged into it (§6a); if not, the §8 message tells the user to run `*devguide --update` after `*split-brd`
|
|
505
|
-
- [ ] §7.6 if runtime-verified: per-screen screenshots captured to `docs/screenshots/{AppName}/` and the §8 message points the owner at them + `*fix-issues` for any broken screen
|
|
506
|
-
- [ ] Output summary delivered (incl. archived-files list), next command suggested
|
|
507
|
-
- [ ] Did NOT prompt the user mid-task for per-section confirmation
|
|
3
|
+
`*day1-brownfield {App}` brings the framework into a product that already has code. It runs as one flow, start to finish, and the owner reviews everything at the end. It produces the Architecture, the BRD, the mockups, the checklist, the Coding Standards, the scaffold files, the UsageGuide and the DevGuide, all from the code and the documents already in the repository.
|
|
4
|
+
|
|
5
|
+
First, before anything else: `bash .tfcore/utils/tf-phase.sh start day1-brownfield {App}` prints the start time and marks the command running.
|
|
6
|
+
|
|
7
|
+
## Questions, at most three
|
|
8
|
+
|
|
9
|
+
1. `{App}` if missing. PascalCase, no spaces; reject anything else and ask again.
|
|
10
|
+
2. Hints, once: list the markdown files found under `docs/` and at the root (excluding `docs/OldDocs/`, `CLAUDE.md`, `PROJECT-STATUS.md`, and `README.md` unless it holds requirements), then ask: "Reply `all` (or press enter) to harvest all of them, or list the ones to use. Add extra paths or drafting instructions in the same reply. `none` harvests nothing." Parse once: file names into the harvest list, anything else into drafting instructions. Never ask merge-or-new.
|
|
11
|
+
3. The stack: "Which answer set: `dotnet` (`.tfcore/templates/stack-defaults/dotnet.md`), or answer the questions in `.tfcore/templates/stack-questions.md`?" Then only the questions the set leaves open, and only where the code does not already answer them.
|
|
12
|
+
4. The size: count the routed pages in the code (every route counts, sign-in included; dialogs and tabs are regions of a page) and the roles, then confirm: "Size: Small (up to 10 screens, one role, 50 requirements), Medium (up to 20 screens, 100 requirements) or Large (split into phases)? I count {N} screens and {N} roles, so I propose {X}." Kind is `app`, or `library` for a component or service library.
|
|
13
|
+
|
|
14
|
+
## Steps, in this order
|
|
15
|
+
|
|
16
|
+
1. `bash .tfcore/utils/tf-day1-files.sh {App} --size {S|M|L} --kind {app|library}` writes the size, the kind and the document paths into `core-config.yaml`; for Large it also writes `docs/{App}-Phases.md`, whose table you fill first: one row per phase, each within Medium, every screen in exactly one phase. Before rewriting any document that already exists, `bash .tfcore/utils/tf-day1-files.sh --archive <file> ...` moves it to `docs/OldDocs/`. Never write a `-v2` variant.
|
|
17
|
+
2. `bash .tfcore/utils/tf-mockups-locate.sh` moves every mockup found elsewhere in the repository into `docs/mockups/`, the only mockup folder, and lists what is there.
|
|
18
|
+
3. Architecture: `docs/{App}-Architecture.md` from `.tfcore/templates/v4custom/app-architecture-tmpl.md`, in the template's order, Status "Current". Harvest architecture material from the hint documents first, attributed; scan the code only for what they do not cover. Stack decisions come from the project files, citing the source per row; the Solution structure from the projects; the Component map from project references; the Data model from the migrations or entity classes; the Decisions log opens with "current stack as-is" and adds a `planned` row for every structural change the BRD calls for. Scan the instance fields for the dominant naming style; if none reaches about 80 percent, record the drift under Open questions. Quote every mermaid label; never use `end` as a node id.
|
|
19
|
+
4. BRD, first half: `docs/{App}-BRD.md` from `app-brd-tmpl.md`: the header (App, Kind, Size, Stack answer set, Status, Date), Summary, Scope, Users and roles, and the Screens and flow table, one row per routed page found in the code. A dialog is a row under its parent screen with `on /route` in the Route column.
|
|
20
|
+
5. Mockups: run `.tfcore/tasks/mockups.md` for `{App}`. It links the mockups already in `docs/mockups/` to their screens and produces one for every screen that has none, from the code and the running application. Every screen ends with a mockup.
|
|
21
|
+
6. BRD, second half: the Requirements ledger, one `BRD-N` per thing the verifier will test, each naming its screen, linking its mockup and carrying one acceptance line "When <actor> <does what> on <screen>, then <observable result>". Harvested documents come first: every "the system shall" or "the user can" line becomes an item, attributed, and every table, screen inventory and workflow they hold carries in, never compressed to a one-liner. Then the code: what it already does becomes items too. Mark inferred items `<!-- inferred — please verify -->`. The Non-functional table takes a `perf-budget:` only where the owner stated a number, and the logging requirement from the answer set, recorded as met when the scan found it wired. The Development status table has one row per screen with Verified and Open counts from the strongest evidence. If the count would pass the size cap, propose a phase split instead of merging items.
|
|
22
|
+
Large: steps 4 to 6 run once per phase of the Phases table, phase 1 in `docs/{App}-BRD.md` and `docs/{App}-UIDesign.md`, phase n in `docs/{App}-Pn-BRD.md` and `docs/{App}-Pn-UIDesign.md`, each header carrying `Phase | n of m` and its own Size, ids running on across phases.
|
|
23
|
+
7. Checklist: run `.tfcore/tasks/split-brd.md` for `{App}` (Large: with `--all-phases`, one checklist per phase). If a phased plan is among the harvested documents, split-brd migrates its statuses; the plan then moves to `docs/OldDocs/`.
|
|
24
|
+
8. Coding Standards: `docs/{App}-Coding-Standards.md` from `app-coding-standards-tmpl.md`. "Standards applied" names `.tfcore/standards/coding-standards-core.md` and the stack file, plus the choices the stack file leaves open. For dotnet the instance-field prefix follows the drift scan of step 3: the dominant style if one reaches 80 percent, else `obj`; a drafting instruction overrides. "Project rules" holds only rules true of this project alone.
|
|
25
|
+
9. `bash .tfcore/utils/tf-day1-files.sh {App} --prefix {obj|none}` writes `.editorconfig`, `AGENTS.md` and `CLAUDE.md`.
|
|
26
|
+
10. `bash .tfcore/utils/tf-gitignore-audit.sh . --fix`. Read its output. Any untracking commands it prints go into your summary for the owner to run; agents never run git.
|
|
27
|
+
11. Build once through `.tfcore/templates/v4custom/build-invocation-ladder.md`. A real compile error becomes one line under Known blockers; a wrong-rung error never does.
|
|
28
|
+
12. UsageGuide: `docs/{App}-UsageGuide.md` from `app-usageguide-tmpl.md`. Test users: read the users table through the connection string in the configuration and list the existing accounts, one per role, marked as existing, with "ask owner" where a password is unknown; if the database is unreachable, list the intended accounts as planned. Create no user. The Execution guide from the code; one "How to test" section per screen in navigation order, naming the user, the steps, the expected result and the REQ ids.
|
|
29
|
+
13. DevGuide: run `.tfcore/tasks/devguide.md` for `{App}`. Static-only is acceptable at day-1 when the stack cannot boot; a repository with no built code records "DevGuide skipped, no built code" and moves on.
|
|
30
|
+
14. Superseded harvested documents (old requirement or design documents, a migrated plan) move to `docs/OldDocs/` with the archive command of step 1. Documents that stay authoritative on their own (API guides, setup guides) stay.
|
|
31
|
+
15. `bash .tfcore/utils/tf-doc-check.sh --app {App}`; fix every FAIL.
|
|
32
|
+
16. Run the status gate (`.tfcore/tasks/_status-update-gate.md`); the run record carries `"cmd":"day1-brownfield"`.
|
|
33
|
+
17. Stop and say what was written, one line per document, which files were archived, and which screenshots to review. The next command is the one the status gate printed, normally `*build-phase {App}`.
|