forgetrail 0.4.13 → 0.4.15

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 (43) hide show
  1. package/INITIAL_PROMPT.md +1 -1
  2. package/README.md +1 -1
  3. package/TRY_FORGETRAIL.md +44 -5
  4. package/WORKFLOW.md +15 -2
  5. package/content/AGENT_INTEGRATION_claude.md +3 -2
  6. package/content/AGENT_INTEGRATION_cursor.md +2 -1
  7. package/content/COMPANION_TOOLS.md +1 -0
  8. package/content/FORGETRAIL_LITE.md +41 -75
  9. package/content/GREENFIELD_INTAKE.md +9 -2
  10. package/content/LITE_WORKFLOW_TRACKING.json +2 -1
  11. package/content/NEW_PROJECT_BOOTSTRAP.md +2 -3
  12. package/content/companion-tools.json +18 -0
  13. package/content/cursor-rules/npm-name-hold.mdc +1 -1
  14. package/content/cursor-rules/spec-completion.mdc +4 -1
  15. package/content/cursor-rules/specs-and-todo.mdc +5 -1
  16. package/content/cursor-rules/url-host-matching.mdc +12 -13
  17. package/content/cursor-rules/user-facing-content.mdc +2 -2
  18. package/content/cursor-rules/writing-voice.mdc +6 -0
  19. package/content/forgetrail-workspace-README.md +2 -4
  20. package/content/hooks/README.md +36 -0
  21. package/content/hooks/claude-settings-hooks.json +20 -0
  22. package/content/hooks/cursor-hooks.json +30 -0
  23. package/content/hooks/guard-edit.mjs +85 -0
  24. package/content/hooks/guard-shell.mjs +168 -0
  25. package/content/hooks/session-start.mjs +93 -0
  26. package/content/hooks/session-stop.mjs +56 -0
  27. package/content/hooks/validate-tracking-core.mjs +229 -0
  28. package/content/hooks/validate-tracking.mjs +65 -0
  29. package/docs/SPEC_FEATURE_TEMPLATE.md +12 -4
  30. package/docs/TECHNICAL_REFERENCE.md +1 -1
  31. package/package.json +2 -1
  32. package/prompts/microcopy-centralization.md +1 -1
  33. package/prompts/pre-launch-audit.md +8 -0
  34. package/prompts/propagate-to-forgetrail.md +1 -1
  35. package/prompts/rules-audit.md +74 -0
  36. package/prompts/second-family-critique.md +43 -0
  37. package/prompts/spec-review.md +65 -0
  38. package/scripts/forgetrail-cli.mjs +6 -0
  39. package/scripts/install.mjs +43 -1
  40. package/scripts/workspace-index.mjs +128 -0
  41. package/workflow_tracking.json +1 -0
  42. package/content/cursor-rules/forgetrail-no-trailer.mdc +0 -49
  43. package/content/cursor-rules/us-english.mdc +0 -9
package/INITIAL_PROMPT.md CHANGED
@@ -41,7 +41,7 @@ Record pattern, provider (e.g. `ollama/ibm/granite4.1:8b`), env var names, paths
41
41
 
42
42
  **External listing/article URLs (if the hero flow imports from pasted URLs):** follow **`FORGETRAIL_LITE.md` §7.2** — layered fetch and parse, **don’t blame users** for correct URLs when selectors rot, optional **single** structured **verbatim** recover from stripped page text (env-gated). Expand into **`docs/TECHNICAL_REFERENCE.md`** using the ForgeTrail template subsection on deterministic extractors vs markup drift.
43
43
 
44
- **Git commits:** use `git commit -F <file>` or plain `-m`; no unrequested attribution trailers (`Made-with:`, `Co-Authored-By:`, etc.). **Git 2.32.0+** (2021) supports `--trailer` natively — not a compatibility problem on current Git. **Pre-2.32 only:** if commit fails with `unknown option 'trailer'`, use `bash -c "git commit -F path/to/msg.txt"` or upgrade Git. See **`FORGETRAIL_LITE.md` §8.9**.
44
+ **Git commits:** use `git commit -F <file>` or plain `-m` at natural stopping points with concise summaries. Verify checks pass before committing.
45
45
 
46
46
  Skip the **“copy-paste paths”** section below unless we are using a **local** ForgeTrail folder.
47
47
 
package/README.md CHANGED
@@ -49,7 +49,7 @@ A 7-phase playbook, a live `.forgetrail/workflow_tracking.json`, and templates p
49
49
  ## xFacts label
50
50
 
51
51
  - **AppFacts:** [viewer](https://appfacts.dev/v#af1.eNp1Uk1r3DAQ_StiTg1o10mOPrUYcihJCCS3UsqsNNaqK2uENHbiLvvfi2x320tvg3hf8zRnmKC90xBxIGjhgbOjt4w-gAaZU30riYxqlDAHHx1oKIIyFmgBjfiJQEPwhmKp4C8JzZF29_vbFWhO0J4hYHQjugr4ihO-muyTaPU2J1pn0JDHKH4J8cyW9j9LTbB5tvDEloLqOAp9iHrJLGw4qE9P3csNaDhykRXYBR5tHzATXDRYSgXab2eI0MLnoYqYVSNtEk2xJ9CQ_u9RKE-UlR9SoIGioHiOcNGr6C-2G_3VHGlANWHwdsEojFbVEpWPPWWKhq6094zRBcob929qZSkFnqvRUvmV4Uh6HyhlKmVjPfhAuwMWsmrZKooaMKJbYsLlu4Yymev6_zSjIUP7pzSVMk_eUlY9Z_VOh-KFFvZh9MHW_0toTujox6peuSmmoRacKXHxwnmugiKptE3jvBzHw97w0HQoGOYiu-Wydo-PXdPXSZYbu_wGeaPbgQ) · [raw](https://github.com/Catalyst-Forge-LLC/forgetrail/blob/main/APP_FACTS.md)
52
- - **ToolFacts:** [viewer](https://toolfacts.dev/v#tf1.eNrFl8Fy2zYQhl9lhye7IymJL53RzVVjTxrV8shuc8hkPDC4pBCBAAuAUjWevHv_pUhJVdxceuCNAyyA_9tdLJYv2SabvhtlTlWcTbMbH0p-DMpY-n12Tw8cNhyyUZbzhq2v8T3NZiopu4uJWmNMwiQa7zD1dnI1ucJITCo1EQNKJ7MRG2s0uyhHXNdKr3h8NXmL4bVxOcYqXY9jf1ZoXDKi5iXjv1k3ab-39VrZcR285hhhloJysfYhYS6m3Pjs2yjTgXPGcmWjrA_8V2MwlE0_f8Esl0HWYiKx5YpT2GGx845bxJiMU3Ja7OyT97LP55fePRtlTa6SeEhDeimoJucnLgrWSYADq1wYGJByUGEsRziLK5Gp4UKZdpy2PqyPh3dYjC0KaGccjn2r2ifQZNMUGoZRE2rf-vDPTgdNColBkoC9kR0L67dPqVM3-Rq9owvjrHFMvz0s7sgH8rUgKktHaVSrtLokVSrjENeI-FSKlMupXqnIFBpYwr0HP9Svsncsr7N3k_-XfOadY0kqk3YEnXo9pcCpCS6SX49AoteqZOpyckQ3i-Xt-8fl9Yf503KxeBy1WNsVpxUH-rRYfryZLz5NKoypSIVvkI8noPDtvbjgtoG_neZhoJctICFhVz731pc7KjtBkBxIUXc_KyzvYnbxbvzz5SlKZBX0ao5jJcEH4XhoJRBcTyeFxraSCPmsnkX5847WvMNB55F4xM4WWT9oENSp9NzrpvV56qRREXwlw_HNT0iqUwCUtesmN2lg9REzGt-ckxI5hI2qOrV5JIHRTQhtFgX_FfroIvccyXkpC8q1JiIk4qIxmRTZFpdncZrJtbQmDo3aI-heT3dZKjk0YW_qmIvG2qPVedZ11fShrYqDIvXOf6XKdzU7cMEIHwrVvyGu8Sbeq5Q4DHX3O4T-xkj6QdO47kTtL44AnlS580ocfPuAo6P41WuJR46HaVCc7cqgoAHqUAEiJU9oQ6QYGEeiYV-Rz2DueHu_z8-PRq99UQzKAb-yKwzbnJ69TygSqsZburNe5cDQFqXClSgeKiBc1Ode-5geGopZEyJu1HfdwnoPeHs4Y6DXB2oIj_xrzqetSasOlPccS2CQ7NFCOg93BOwA_B_D3fn9-mEhv5PVEvomtXfsJFIUpZ1Ch_1f6flLnw-DJij-RsaFCajh0qLKEyZ9uty1NidR1U9SuC_8PTLa7p1k68nLbRyWiisC1_6M_Wg2NwN3G22rdOxg5x8e30uvKr896hnB68IsxMlrb39I8kct_wxxcCDRQs1ezKGkyNOMml9KnHoaKlWNy_ZFfvYap2Gf7zf-9g9m9jXP) · [raw](https://github.com/Catalyst-Forge-LLC/forgetrail/blob/main/mcp-server/TOOL_FACTS.md)
52
+ - **ToolFacts:** [viewer](https://toolfacts.dev/v#tf1.eNrFl8Fy2zYQhl9lhye7Iylxe-iMbq4ae9KolkdWm0Mm44HBJYUIBFgAtKrx5N37L0VKquLm0gNvHGAB_N_uYrF8yZ6z6dUoc6ribJrd-FDyKihj6ffZPT1weOaQjbKcn9n6Gt_TbKaSsruYqDXGJEyi8Q5Tbyc_Ta7eYigmlZqIEaWTeRYjazS7KGdc10qvefzjRAw3xuUYq3Q9jv1hoXHJiJyXjP9m3aT95tZrZcd18JpjhFkKysXah4S5mHLjs6-jTAfOGcuVjbI-8F-NwVA2_fQZs1wGWYuJxJYrTmGHxc47bhljMk7JabGzT97LPp9eev88K2tylcRFGtJLQTU5P3JRsE4CHFjlwsCAlIMKYznCW1yJTA0fyrTjtPVhczy8w2JsUUA743DsW9U-gSabptAwjJpQ-9aHf3Y6aFJIEJJE7I3sWFi_fUydusmX6B1dGGeNY_rtYXFHPpCvBVFZOkqjWqX1JalSGYfARsSnUqRcTvVaRabQwBLuPfihfpW9Y3mdvZv8v-Qz7xxLUpm0I-jUmykFTk1wkfxmBBK9USVTl5Qjulksb9-tltfv54_LxWI1arG2a05rDvRxsfxwM198nFQYU5EK3yAfT0Dh23txwW0DfzvNw0AvW0BCwq597q0vd1R2giA5kKLuglZY3sXs4mr88-UpSmQV9HqOYyXBB-F4aCUQXE8nlca2kgj5rJ5E-dOONrzDQeeRWGFni6wfNAjqVHruddP6PHXSqAi-kuH45gck1SkAytp1k5s0sPqIGY1vzkmJHMJGVZ3aPJLA6CaENouC_wJ9dJF7juS8lAXlWhMREnHRmEyKbIvLszjN5FpaE4dG7RF0r6e7LJUcmrA3dcxFY-3R6jzrumr60FbFQZF6579S5buaHbhghA-F6t8Q13gT71VKHIa6-x1Cf2Mk_aBpXHei9hdHAE-q3HklDr59wNFR_Oq1xCPHwzQoznZtUNAAdagAkZIntCFSDIwj0bCvyGcwd7y93-fnB6M3vigG5YBf2RWGbU5P3icUCVXjLd1Zr3JgaItS4UoUDxUQLupzr31MDw3FrAkRN-qbbmGzB7w9nDHQ6wM1hEf-NefT1qR1B8p7jiUwSPZoIZ2HOwJ2AP734e78fv2wkN_Iagl9k9o7dhIpitJOocP-r_T8pc-HQRMUvyPjwgTUcGlR5QmTPl3uWpuTqOonKdwX_h4ZbfdOsvXk5TYOS8UVgWt_xn40m5uBu422VTp2sPP3q3fSq8pvj3pC8LowC3Hy2tvvkvxRyz9DHBxItFCzF3MoKfI0o-aXEqeehkpV47J9lp-9xmnY5_uNv_4DNJk1_w) · [raw](https://github.com/Catalyst-Forge-LLC/forgetrail/blob/main/mcp-server/TOOL_FACTS.md)
53
53
  - **SkillFacts:** [viewer](https://skillfacts.dev/v#sf1.eNq9lN9v20YMx_-Vg_rSGJHspsA26C1LmmKo1xqzsZcoMGSZtq6W7oy7Uzyj6d-19_1lI3n65dhe1wItgqQVyePxSH4_n4LHIH51Gai0hCAOVtqswZlUFsFlsIRHKPQWDDpuUpcWe-vEHUWg8xGMlVqhaxS9jkZosS51lUVDmjn5SDGFzEBZynu9TbMcwisO3Ei1RFtWGatNaDeyoNu2ldlqDn6jsIwMhMvBXzejgsTP4TZPLYhCriDbZwWIVC1FmUrl8FdEXe3DnTabVaF3c_zM8Lp19NFqJVLLOS2-A0qhV8JAps2SLjf6EVSqMrz_U2B1Zeh_Qe7c1sbD4Vq6vFpEmS6HTSNCriwcj2-GB03bVotC2vxU0z5fBlJZZyrsj1Z2bgCbwvflgC2IA_hriy2TDtMocPQINMoSjUBFrmQBvnY04-FluDPScV6ndUEJV2AAH4Htvf_q4oeLQi-G1M9hmW1DCwZnPJx9-DCe313fzKZRSUVg8ITG8LaSS-7XZWAqdV0tuWwLqcnyMVhst6UtSQsMczRBngOFVOs1WDetFukalLvFEZQ4eEk98flngE_GQ_7rPewmRn-EzL2T2UavVt78B9iqhCnehOd-67U1eLgMFpVaFrCcp8bJFa4jbuU9mmFtMJ467qCAEp-9x04qrYC33TqpUp8Dw7GruS5hi1X2NqFrV4TyoMcDF6851Tfsi0l3eDAMw0SxEuZc77yWVywS1NeraJQEiSKNxqI7nahWobE43LVEHSR47RN4hcbCCzRRtT5j0ckzUaTOWPTFmaham5TsR4uT6m7mEIvTY0hUN4Uu5v8OAZ_Xqj9OlBBe_t-SSIhW_scTOda-v43EH4tG-2SqxR-LWvtk68Qfi077iXqufM4Ziu8gfp_4uf69tUGA_zqggDc9B0Ed-B8saK9rcNAajojQes5CIVFHSOBG3T8kylOBP1ssxIKoQKY-FmKOx0rBYD2-1fSoWFyNrn4KR7-EVyOy1REalyBHGYRp5XJtaI4Z_pX13W2e-Q6H1K0ba45L9LstxKKShZsv9qS_w63qTXq320VZ7eS58tBJPgyXRL0QU8os7ig1HuwvbqKeBP7gPxjMv2QZDG4bwAwG6H92dx3zpycNRzBqGseUccN2T5zGMfbcYU-Hnsb7DgHErj6DyJkoPNngBVdiv9B6I6h5rXq8mpg9nUh62hGsu0hMNILJitT1Gfb7zUTMUE7coGjAPXshJp599PXD2VdX0OLp3KCmTCx0fK3sfc8nDbROzphr6IvJN_FsLTyBp24kbH3vkYb2mmnefNdN5qk_seZaGgfd19CNzN8JbqfQ1gfbEdZOQe1LSHsGtHM4-xLMuDe_eqKJlmhkf0ncuqgj3jDZzg1q1sAOfXTKT-S2xzt0-Hx-HsyRwdsGW1559wwVlszDy9MIuxD__I3VIsPEYi_uDzesO3QaYBeow-Dzv2dji3E) · [raw](https://github.com/Catalyst-Forge-LLC/forgetrail/blob/main/content/skills/forgetrail/SKILL_FACTS.md)
54
54
 
55
55
  ## Development
package/TRY_FORGETRAIL.md CHANGED
@@ -61,11 +61,50 @@ Already have a long PRD? Save it as `docs/GENESIS.md` and use the kickoff line a
61
61
 
62
62
  ---
63
63
 
64
- ## After the try: graduation ladder
65
-
66
- 1. **Stay on Lite** for small tools and weekend builds. Enough for many projects.
67
- 2. **Add MCP** when you live in Cursor/Claude: `npx -y forgetrail-mcp` (set `FORGETRAIL_ROOT` to a `forgetrail` install or clone). See [mcp-server/README.md](mcp-server/README.md).
68
- 3. **Full `_forgetrail/` install** when you need the whole template tree on disk (offline / no MCP). `npx forgetrail install` (without `--lite`).
64
+ ## Next step: Connect the ForgeTrail MCP server
65
+
66
+ Once you have verified the protocol on a first project, connecting the **ForgeTrail MCP server** is the natural upgrade:
67
+
68
+ 1. **Token efficiency:** Instead of pasting or re-reading the 28k-token Lite file, the agent pulls phase playbooks, templates, checklists, and anti-patterns on demand via MCP tools. Your prompt stays clean and focused on your app code.
69
+ 2. **Dynamic lessons:** The agent queries `searchLessons` and `getAntiPatterns` before large tasks, avoiding known traps across hundreds of prior sessions.
70
+ 3. **Structured validation:** `validateTracking` catches schema errors immediately.
71
+
72
+ ### How to connect (Cursor)
73
+
74
+ Add this to `.cursor/mcp.json` in your workspace or globally in Cursor Settings:
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "forgetrail": {
80
+ "command": "node",
81
+ "args": ["Z:/workspace/forgetrail/mcp-server/dist/index.js"],
82
+ "env": {
83
+ "FORGETRAIL_ROOT": "Z:/workspace/forgetrail"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ Or via npx (packaged release):
91
+
92
+ ```json
93
+ {
94
+ "mcpServers": {
95
+ "forgetrail": {
96
+ "command": "npx",
97
+ "args": ["-y", "forgetrail-mcp"]
98
+ }
99
+ }
100
+ }
101
+ ```
102
+
103
+ ### Graduation ladder
104
+
105
+ 1. **Lite file:** Portable protocol for weekend projects and single-turn prototypes.
106
+ 2. **MCP server:** Full tool suite with on-demand retrieval, subagent decomposition, and dynamic lessons for substantive products.
107
+ 3. **Template in repo (`_forgetrail/`):** Full offline file tree when building without internet or MCP access (`forgetrail install`).
69
108
 
70
109
  ---
71
110
 
package/WORKFLOW.md CHANGED
@@ -28,7 +28,7 @@ These phases emerged from the actual build sequence across all sessions. They're
28
28
 
29
29
  **Entry criteria:** Architecture is confirmed. Tech choices are locked.
30
30
 
31
- **Exit criteria:** The app runs. You can see data on screen. Core CRUD works. The happy path functions end to end, even if roughly.
31
+ **Exit criteria:** The app runs. You can see data on screen. Core CRUD works. The happy path functions end to end, even if roughly. A runnable `verify` script in `package.json` (or equivalent test runner) exists and passes cleanly.
32
32
 
33
33
  **What actually happened:** In a single massive turn, Claude created the SvelteKit project, installed 9 dependencies, built 4 backend services (data, scraper, LLM, docx), 4 API routes, 5 frontend components, and imported 44 existing jobs. The app was usable within one turn.
34
34
 
@@ -90,7 +90,7 @@ These phases emerged from the actual build sequence across all sessions. They're
90
90
 
91
91
  **Entry criteria:** Features are stable. You're thinking about other people using the app.
92
92
 
93
- **Exit criteria:** CODE_QUALITY findings are triaged. Auth works. Payments work. Documentation is consolidated and current. Error messages are user-facing, not developer-facing.
93
+ **Exit criteria:** CODE_QUALITY findings are triaged. Auth works. Payments work. Documentation is consolidated and current. Error messages are user-facing, not developer-facing. Post-deploy smoke check verifies the live URL and asserts response codes (HTTP 200, assets resolve, zero 500 errors).
94
94
 
95
95
  **What actually happened:** Session 6 produced a 26-finding CODE_QUALITY.md, fixed PocketBase field size limits (5K default was silently truncating LLM output), fixed state propagation bugs, and added OAuth. Session 7 added Stripe billing, token usage tracking, consolidated 7 docs into 5, built a marketing landing page, and hardened fonts for ATS compatibility. Session 9 ran a comprehensive black hat security audit (prompts/black-hat-audit.md), producing a 27-finding BLACK_HAT_REPORT.md separate from CODE_QUALITY.md, implemented a full promo code system with Stripe integration, and added centralized Zod input validation across all API routes.
96
96
 
@@ -292,6 +292,19 @@ FilePress publishes Markdown. It does not replace Default-A for an interactive a
292
292
 
293
293
  ---
294
294
 
295
+ ## 1g. Host safety hooks (enforcement layer)
296
+
297
+ ForgeTrail includes deterministic host hooks (`.forgetrail/hooks/` with `.cursor/hooks.json` and `.claude/settings.json` adapters) that enforce project rules at the tool layer rather than relying solely on prompt attention:
298
+
299
+ - **Shell guards:** Runs pre-commit verification (`pnpm run verify`), prevents package manager divergence (e.g. `npm`/`yarn` when `pnpm-lock.yaml` is present), gates `git push` on explicit user approval, and flags destructive operations (`git reset --hard`, `rm -rf`).
300
+ - **Edit guards:** Requires user confirmation before mutating environment secrets (`.env*`) or canonical/completed specs (`specs/completed/**`).
301
+ - **Session start injection:** Dynamically injects project name, current phase, open exit criteria, and last session notes on session start, retiring always-on static phase rules.
302
+ - **Tracking validation:** Validates `.forgetrail/workflow_tracking.json` on save, returning issues immediately.
303
+
304
+ Where the host supports hooks, tool-level denial and injection take the load off agent context budgets.
305
+
306
+ ---
307
+
295
308
  ## 2. Per-Phase Playbook
296
309
 
297
310
  ### Phase 1: Architecture + Planning
@@ -6,8 +6,9 @@ Claude-based coding agents integrate with ForgeTrail through MCP, extended plann
6
6
 
7
7
  | Capability | ForgeTrail use |
8
8
  |------------|--------------|
9
- | ForgeTrail MCP | `getNewProjectKickoff`, `getPhaseGuidance`, `getCompanionSuggestions`, `runAudit`, `searchLessons`, `validateTracking` |
10
- | Extended planning / "plan before code" | Phase 1 — produce a reviewable plan artifact; lock `PHASE_1_BRIEF.md` before scaffolding (`getPlanModePatterns`) |
9
+ | ForgeTrail MCP | `getNewProjectKickoff`, `getPhaseGuidance`, `getCompanionSuggestions`, `runAudit`, `searchLessons`, `validateTracking`, `getForgeTrailHooks` |
10
+ | Settings hooks (`.claude/settings.json`) | Host-level enforcement: commit attribution bans, pnpm lock, tracking validation |
11
+ | Extended planning / "plan before code" | Phase 1: produce a reviewable plan artifact; lock `PHASE_1_BRIEF.md` before scaffolding (`getPlanModePatterns`) |
11
12
  | gstack slash commands (optional) | Sprint execution inside phases — see WORKFLOW §1b; persist outcomes in tracking |
12
13
  | Subagents / agent teams (when available) | Parallel audits and research — `suggestSubagentDecomposition` |
13
14
  | Project `CLAUDE.md` / `AGENTS.md` | Trailer-ban + methodology pointers from kickoff `.forgetrail/` copies |
@@ -6,7 +6,8 @@ Cursor agents (Composer, Agent mode) map well to ForgeTrail via MCP, **Cursor ru
6
6
 
7
7
  | Cursor capability | ForgeTrail use |
8
8
  |-------------------|--------------|
9
- | ForgeTrail MCP tools | Methodology delivery — `getNewProjectKickoff`, `getPhaseGuidance`, `getCompanionSuggestions`, `runAudit`, `validateTracking`, etc. |
9
+ | ForgeTrail MCP tools | Methodology delivery: `getNewProjectKickoff`, `getPhaseGuidance`, `getCompanionSuggestions`, `runAudit`, `validateTracking`, etc. |
10
+ | Cursor hooks (`.cursor/hooks.json`) | Host-level enforcement: commit attribution bans, pnpm lock, git push approval, phase context injection on session start |
10
11
  | `.cursor/rules/*.mdc` | Persistent phase + lessons discipline from kickoff (`forgetrail-phase-status`, `forgetrail-lessons-gate`, `forgetrail-lessons-mcp`) |
11
12
  | Plan mode (`SwitchMode` / plan) | Phase 1 architecture — explore before edits; export to `PHASE_1_BRIEF.md` on approval (`getPlanModePatterns`) |
12
13
  | Task / subagents (`explore`, `generalPurpose`, `shell`) | Parallel audits (Phase 7), research (Phase 4), spikes (Phase 5) — call `suggestSubagentDecomposition` first |
@@ -75,6 +75,7 @@ Do not migrate a working host the user already chose.
75
75
  | `newcomer-readiness` | Pre-launch / wrap: can a newcomer use this? | [Cold-eye](https://coldeye.dev) |
76
76
  | `quality-review` | Phase 6/7: how useful, clear, and well-presented is this? | [CraftAssay](https://craftassay.dev) |
77
77
  | `hard-to-undo` | Delete data, lock persistence, rewrite git, lock a stack | [TemperPass](https://temperpass.dev) |
78
+ | `never-do` | Destructive action, force-push, or history rewrite | [TemperPass](https://temperpass.dev), [IngotVault](https://ingotvault.dev) |
78
79
  | `unclear-cause` | Failure is real; cause is not earned | [Gap Last](https://gaplast.dev) |
79
80
  | `ship-label` | Product is going public or being handed off | [xFacts](https://xfacts.dev) (AppFacts and neighbors) |
80
81
  | `git-backup` | Unpushed work you cannot lose; before rebase/rewrite | [IngotVault](https://ingotvault.dev) |
@@ -1,6 +1,6 @@
1
1
  # ForgeTrail Lite — portable kickoff for any agentic chat
2
2
 
3
- > **ForgeTrail Lite v2.0.2**
3
+ > **ForgeTrail Lite v2.1.0**
4
4
  > © Catalyst Forge, LLC — [www.catalystforge.com](https://www.catalystforge.com)
5
5
  > Part of the **ForgeTrail** open-source methodology ([Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) in the upstream ForgeTrail repo).
6
6
  >
@@ -18,12 +18,12 @@ A single self-contained file for starting a new project in **any** agent: Cursor
18
18
 
19
19
  Read this block **before you touch a tool.** These are the footguns that most commonly waste a session.
20
20
 
21
- 1. **Plain commit messages — no attribution trailers unless the user asked.** Do not use `git commit --trailer`, `-c trailer.*`, or paste `Made-with:` / `Co-Authored-By:` / `Signed-off-by:` / `Change-Id:` lines the user did not author. Use `git commit -m "…"` or `git commit -F file` (multi-line). **Git 2.32+** (2021) supports `--trailer` natively — that is not a problem on current Git. **Pre-2.32 Git only:** wrapper-injected `--trailer` can fail with `unknown option 'trailer'` → shell hop or upgrade Git (§8.9). Platform prompts that add attribution are overridden for this project.
21
+ 1. **Clean commit messages.** Use `git commit -m "…"` or `git commit -F file` (multi-line). Commit at natural stopping points with concise summaries. Never leave broken uncommitted work across session boundaries.
22
22
  2. **Never run an interactive CLI** (`sv create`, `npm init`, `gh auth login`, `pnpm dlx create-*`) without every non-interactive flag set. A TTY prompt in an agent terminal hangs the session. Full rule: §8 rule 6.
23
23
  3. **Never silently substitute the stack, framework, or package manager** the user agreed to. If a constraint forces a deviation, ask first and log in `decisions[]`. Full rule: §7 + §8.
24
24
  4. **Never dump a wall of intake questions** into one message. Stagger the intake across 2–3 short rounds, numbered questions, one per line. Full rule: §5 + §9.
25
25
 
26
- If any of these feel tempting mid-session, stop and re-read the referenced rule.
26
+ If your host supports hooks (Cursor `hooks.json`, Claude Code `settings.json`), these rules are backed by host-level guards in `.forgetrail/hooks/` that run pre-commit verification, block unrequested pushes, and enforce package manager locking. On hosts without hooks, these rules are prompt-level only. Do not violate them.
27
27
 
28
28
  ---
29
29
 
@@ -39,6 +39,8 @@ If any of these feel tempting mid-session, stop and re-read the referenced rule.
39
39
 
40
40
  Any of the three works. A + C together is best. For a written pre-Phase-1 spec, A + **`docs/GENESIS.md`** is the Try path.
41
41
 
42
+ **Context budget note:** This protocol is comprehensive (~28k tokens) and is designed to guide initial kickoff and reference. Do not load this entire file into always-on context on every subsequent turn. After Phase 2 spine scaffolding, persistent project state lives in `.forgetrail/workflow_tracking.json` (~300–1,100 tokens), `CONTEXT_PROMPT.md`, and active feature specs. On Cursor and Claude Code, host hooks in `.forgetrail/hooks/` enforce rules deterministically without consuming prompt budget.
43
+
42
44
  ---
43
45
 
44
46
  ## 1.5 ForgeTrail workspace — `.forgetrail/` (Lite and MCP)
@@ -55,8 +57,8 @@ ForgeTrail agent artifacts (protocol, tracking, platform rules) live in **`.forg
55
57
  CLAUDE.md ← §12.5 snippet (Claude Code)
56
58
  IDEAS.md ← backlog parking lot
57
59
  workflow_tracking.json ← §11 starter / live tracking
58
- cursor/rules/ ← §12.5 Cursor rule snippets
59
- forgetrail-no-trailer.mdc
60
+ hooks/ ← host safety hooks (scripts + configs)
61
+ cursor/rules/ ← §12 Cursor rule snippets
60
62
  forgetrail-updates-log.mdc
61
63
  README.md ← local setup notes (optional; upstream: forgetrail-workspace-README.md)
62
64
  ```
@@ -84,7 +86,7 @@ Product docs (`README.md`, `CONTEXT_PROMPT.md`, `docs/PHASE_1_BRIEF.md`) stay **
84
86
  When a boot surfaces a gap in **ForgeTrail Lite itself** (not a one-off app bug), capture it in **`.forgetrail/FORGETRAIL_LITE_UPDATES.md`** so it can be merged back into upstream `FORGETRAIL_LITE.md` without losing context.
85
87
 
86
88
  - **Upstream template:** `forgetrail/content/FORGETRAIL_LITE_UPDATES.md` (empty starter — copy into `.forgetrail/`).
87
- - **Cursor rule:** `.forgetrail/cursor/rules/forgetrail-updates-log.mdc` (§12.6) — symlink into `.cursor/rules/` with the no-trailer rule (§1.5).
89
+ - **Cursor rule:** `.forgetrail/cursor/rules/forgetrail-updates-log.mdc` (§12.5) — symlink into `.cursor/rules/` (§1.5).
88
90
  - **Log session-local incidents** in `.forgetrail/workflow_tracking.json → `gotchas[]` instead — routine bugs and product-only notes do not belong in the updates file.
89
91
  - **Write for maintainers:** what went wrong, which Lite § should change, optional pointer to this repo. Tighten or cross-link if the topic is already covered.
90
92
 
@@ -110,8 +112,8 @@ The **human** only needs to do two things: copy ForgeTrail Lite into **`.forgetr
110
112
  | `.forgetrail/FORGETRAIL_LITE.md` | **Human** (once, from upstream) | Before the first agent session |
111
113
  | Git repo (`.git/`) + initial commit | **Agent** (runs `git init` if missing) | First session, before Phase 1 intake |
112
114
  | `.forgetrail/AGENTS.md` | **Agent** (from §12 snippet) | First session, right after reading this file |
113
- | `.forgetrail/cursor/rules/forgetrail-no-trailer.mdc` | **Agent** (from §12.5 snippet) | First session — symlink/copy to `.cursor/rules/` for Cursor |
114
- | `.forgetrail/cursor/rules/forgetrail-updates-log.mdc` | **Agent** (from §12.6 snippet) | First session — symlink/copy to `.cursor/rules/` for Cursor |
115
+ | `.forgetrail/cursor/rules/forgetrail-updates-log.mdc` | **Agent** (from §12.5 snippet) | First session — symlink/copy to `.cursor/rules/` for Cursor |
116
+ | `.forgetrail/hooks/` + `.cursor/hooks.json` | **Agent** (from upstream `content/hooks/`) | First session — host-level safety and tracking enforcement |
115
117
  | `.forgetrail/FORGETRAIL_LITE_UPDATES.md` | **Agent** (from upstream template) | Optional — when logging Lite protocol gaps (§1.6) |
116
118
  | `.forgetrail/workflow_tracking.json` | **Agent** (from §11 starter) | First session |
117
119
  | `docs/FORGETRAIL_PROGRESS.md` | **Agent** (template + refreshed on phase changes / status script) | Phase 2+ (§4.6) |
@@ -139,12 +141,12 @@ Every project flows through these phases. The agent **pauses at every phase tran
139
141
  | # | Phase | Entry | Exit |
140
142
  |---|-------|-------|------|
141
143
  | **1** | **Plan** | user has a rough idea | `docs/PHASE_1_BRIEF.md` is complete and **locked**; stack, hero flow, v1 scope, and major decisions are in `.forgetrail/workflow_tracking.json → decisions[]` |
142
- | **2** | **Build (spine)** | Phase 1 brief is locked | a **runnable end-to-end hero flow** exists in one pass: project init, deps installed, data path working, routes + components + hero journey wired, `CONTEXT_PROMPT.md` written by merging the brief |
144
+ | **2** | **Build (spine)** | Phase 1 brief is locked | a **runnable end-to-end hero flow** exists in one pass: project init, deps installed, data path working, routes + components + hero journey wired, `CONTEXT_PROMPT.md` written by merging the brief, and a runnable `verify` script in `package.json` passing cleanly |
143
145
  | 3 | Stabilize | spine runs | critical bugs fixed, error paths handled, the happy path + 1–2 known sad paths are reliable |
144
146
  | 4 | Iterate | hero flow is solid | secondary features land one at a time; each complex feature has a short **delivery spec** (§3.1) before multi-file work; each ships with tests or at least a manual test note |
145
147
  | 5 | Refine | feature set feels complete | refactor for clarity, split modules, remove dead code, tighten types/validation |
146
148
  | 6 | Align | code is clean | brand, naming, copy, and UX are coherent; `README.md` matches reality |
147
- | 7 | Harden | product is coherent | security review, performance pass, deploy pipeline, docs for the next operator |
149
+ | 7 | Harden | product is coherent | security review, performance pass, deploy pipeline, post-deploy live smoke check (HTTP 200, assets resolve), docs for the next operator |
148
150
 
149
151
  **Deep focus in Lite:** Phases **1** and **2**. Most projects die because the brief was skipped and the spine was half-built. Phases 3–7 are real but mostly need the user to say "let's move on" — the agent's job after Phase 2 is to keep `.forgetrail/workflow_tracking.json` current and not regress.
150
152
 
@@ -190,18 +192,24 @@ When archetype ≠ `product`, **prune** the non-applicable exit criteria in the
190
192
 
191
193
  ## 4. Edge cases
192
194
 
193
- ## 5. Acceptance criteria
195
+ ## 5. How to test (verifier command)
196
+
197
+ ```bash
198
+ pnpm test
199
+ ```
200
+
201
+ ## 6. Acceptance criteria (boolean-checkable)
194
202
 
195
- 1. Given …, when …, then …
203
+ - [ ] Given ..., when ..., then ...
196
204
 
197
- ## 6. Open questions
205
+ ## 7. Open questions
198
206
 
199
207
  ## Implementation summary
200
208
 
201
209
  (Filled when moving to specs/completed/)
202
210
  ```
203
211
 
204
- Do **not** scaffold or refactor from a vague chat request when a spec is warranted. Draft the skeleton, get a quick user nod on goals/non-goals/AC, then build. On finish: mark TODO `[x]`, fill Implementation summary, move to `specs/completed/`.
212
+ Do **not** scaffold or refactor from a vague chat request when a spec is warranted. Draft the skeleton, ensure a runnable verifier command is present, get a quick user nod on goals/non-goals/AC, then build. A delivery spec without a runnable verifier command fails spec review. On finish: mark TODO `[x]`, fill Implementation summary, move to `specs/completed/`.
205
213
 
206
214
  ---
207
215
 
@@ -225,7 +233,7 @@ Before touching files or running setup, verify the tools this protocol depends o
225
233
  - **Ask the user:** *"Git isn't installed. I can wait while you install it with `<OS-specific command>`, or we can proceed without source control for now and you can add git later. Which would you prefer?"*
226
234
  3. If the user proceeds **without git**, enter **no-git mode**: skip step 2, step 5, and the commits in step 12. Set `.forgetrail/workflow_tracking.json → project.sourceControl = "deferred"` and append a `gotchas[]` entry noting git is not yet installed. Treat "install git + run the missed commits" as a Phase 7 hardening task. Never pretend commits happened.
227
235
  4. The agent **must not install git itself** — always run the install command by asking the user to execute it, or instruct them to run it in their own terminal. System-wide installs require user consent.
228
- 5. **Note the git version.** **`git commit --trailer`** exists from **Git 2.32.0** (2021). Assume **2.32+** on normal dev machines. **Pre-2.32 only:** injected `--trailer` can error with `unknown option 'trailer'`; upgrade Git or use the legacy shell-hop in §8.9. ForgeTrail still bans **unrequested attribution** in messages on every version (§8.9).
236
+ 5. **Check git configuration.** Ensure basic git configuration (`user.name`, `user.email`) exists before making baseline commits.
229
237
 
230
238
  **Node.js** (needed before pnpm and from step 10 onward):
231
239
 
@@ -234,7 +242,7 @@ Before touching files or running setup, verify the tools this protocol depends o
234
242
  - **Windows:** `winget install OpenJS.NodeJS.LTS` or download from <https://nodejs.org/>.
235
243
  - **macOS:** `brew install node` or the LTS installer from <https://nodejs.org/>.
236
244
  - **Linux:** distro packages (`nodejs` / `nodejs-lts`) or NodeSource / nvm — prefer **20+** to match Lite defaults (§7).
237
- 3. **Minimum versions:** **Node 20+** recommended (Default A/B stack). **Node 16.13+** is the floor for **corepack**-based pnpm bootstrap only — if the machine is older, ask the user to upgrade Node before continuing.
245
+ 3. **Minimum version:** **Node 20+** (Active LTS). If the machine has an older Node version, ask the user to upgrade Node before continuing.
238
246
  4. The agent **must not install Node system-wide** without user consent — same as git: give one concrete command, wait, then re-check.
239
247
 
240
248
  **npm** (bundled with the official Node.js installer; needed to install pnpm when corepack is unavailable):
@@ -246,7 +254,7 @@ Before touching files or running setup, verify the tools this protocol depends o
246
254
  **pnpm** (needed from step 10 onward — install **after** Node and npm):
247
255
 
248
256
  1. Run `pnpm --version`. If it prints a version, continue.
249
- 2. If it errors, try **corepack** first (ships with Node 16.13+):
257
+ 2. If it errors, try **corepack** first:
250
258
  - Run `corepack enable`, then `corepack prepare pnpm@latest --activate` (or the version in `packageManager` once `package.json` exists), then re-check `pnpm --version`.
251
259
  3. If corepack is unavailable or still doesn't resolve pnpm:
252
260
  - Confirm **`npm --version`** works, then ask the user to run **`npm install -g pnpm`** (may need admin / sudo). Re-check `pnpm --version`.
@@ -304,14 +312,13 @@ Log anything non-obvious in **`gotchas[]`** (e.g. *"Playwright browsers installe
304
312
  .DS_Store
305
313
  ```
306
314
  Add `.forgetrail/` **only** if you chose §1.5 branch **B** (gitignore). Do **not** add it when committing `.forgetrail/`. Log the choice in `decisions[]`. (The full `.gitignore` lands in Phase 2 per §14.)
307
- 3. **Create `.forgetrail/`** if missing. **Create all platform rule files unconditionally** inside it (see §1.5), even if the current session is only one tool. Users switch between tools between sessions — someone who starts in Cursor today may resume in Claude Code tomorrow, or vice versa. Creating them upfront costs nothing and prevents the same `--trailer` injection bug from recurring under a different tool next week.
315
+ 3. **Create `.forgetrail/`** if missing. **Create platform rule files** inside it (see §1.5), even if the current session is only one tool. Users switch between tools between sessions.
308
316
  1. **`.forgetrail/AGENTS.md`** — use the §12 snippet verbatim. Covers Codex CLI and any other `AGENTS.md`-native tool (cite explicitly or symlink to repo root locally if your tool requires root `AGENTS.md`).
309
- 2. **`.forgetrail/cursor/rules/forgetrail-no-trailer.mdc`** — use the §12.5 snippet verbatim. **Symlink or copy** into `.cursor/rules/` so Cursor loads it.
310
- 3. **`.forgetrail/CLAUDE.md`** — use the §12.5 snippet (the same Markdown body; the file name is what Claude Code auto-loads). Overrides Claude Code's `Co-Authored-By: Claude` trailer injection. Harmless in non-Claude tools.
311
- 4. **`.forgetrail/cursor/rules/forgetrail-updates-log.mdc`** — use the §12.6 snippet verbatim. **Symlink or copy** into `.cursor/rules/` so Cursor reminds agents when to update `FORGETRAIL_LITE_UPDATES.md` (§1.6). Optional: copy the upstream **`FORGETRAIL_LITE_UPDATES.md`** starter into `.forgetrail/` when you expect protocol feedback during the project.
312
- If any of these already exists and its content conflicts with the Lite defaults, **do not overwrite** — flag the conflict to the user and ask how to reconcile. Log the reconciliation decision in `decisions[]`. On **pre-2.32 Git**, rule files cannot stop argv-level `--trailer` injection (§8.9) — use the shell hop or upgrade Git.
317
+ 2. **`.forgetrail/cursor/rules/forgetrail-updates-log.mdc`** — use the §12.5 snippet verbatim. **Symlink or copy** into `.cursor/rules/` so Cursor reminds agents when to update `FORGETRAIL_LITE_UPDATES.md` (§1.6). Optional: copy the upstream **`FORGETRAIL_LITE_UPDATES.md`** starter into `.forgetrail/` when you expect protocol feedback during the project.
318
+ 3. **`.forgetrail/hooks/` and `.cursor/hooks.json`** — install host safety hooks (`content/hooks/`) into `.forgetrail/hooks/` and copy `cursor-hooks.json` to `.cursor/hooks.json`. On Cursor, this runs pre-commit verification, enforces pnpm lock consistency, gates git push at the tool level, and injects live phase context at session start. For Claude Code, add `claude-settings-hooks.json` into `.claude/settings.json`.
319
+ If any of these already exists and its content conflicts with the Lite defaults, **do not overwrite** — flag the conflict to the user and ask how to reconcile. Log the reconciliation decision in `decisions[]`.
313
320
  4. **Create `.forgetrail/workflow_tracking.json`** if it does not exist, using the starter block in §11. Fill `project.name`, `project.created` (today's date), and a one-line `project.description` from whatever the user has already said.
314
- 5. **If git was initialized in step 2**, make the first commit now so the user has a clean baseline. **What lands in the commit depends on §1.5:** if **committing `.forgetrail/`**, steps 3–4 artifacts are included; if **gitignoring `.forgetrail/`**, only `.gitignore` (and any `.cursor/rules/` copies) — the workspace stays local-only and that is expected, not a mistake. Example: `git add -A && git commit -m "chore: ForgeTrail Lite bootstrap"`. Use a **plain `-m` message only** — do **not** use `--trailer`, `-c trailer.*`, or `git interpret-trailers` (see §8 rule 9). Skip this step if the repo already had history — do not squash or amend what's there. Skip entirely if the user is in no-git mode (§4.1).
321
+ 5. **If git was initialized in step 2**, make the first commit now so the user has a clean baseline. **What lands in the commit depends on §1.5:** if **committing `.forgetrail/`**, steps 3–4 artifacts are included; if **gitignoring `.forgetrail/`**, only `.gitignore` (and any `.cursor/rules/` copies) — the workspace stays local-only and that is expected, not a mistake. Example: `git add -A && git commit -m "chore: ForgeTrail Lite bootstrap"`. Skip this step if the repo already had history — do not squash or amend what's there. Skip entirely if the user is in no-git mode (§4.1).
315
322
  6. **Ask the §5 intake questions.** Do not write any project code yet. For the first user-facing reply, follow §9 (plain product language, one clear "reply with," no methodology jargon).
316
323
  7. **Create `docs/`** (if missing) and **draft `docs/PHASE_1_BRIEF.md`** from the §6 template using the user's answers. Show it to the user, iterate, then **lock it**: set `phases.1.exitCriteria.phase1BriefLocked = true` (and the related exit criteria) in `.forgetrail/workflow_tracking.json`, and record major commitments in `decisions[]`.
317
324
  8. **Pause for explicit approval** before moving to Phase 2. Do not advance `currentPhase` silently. **Explicit approval** means the user has reviewed the locked brief and given a clear, unambiguous affirmative — examples: *"locked,"* *"approved,"* *"go to phase 2,"* *"ship it,"* *"start building."* Silence, ambiguous nods (*"cool,"* *"interesting,"* *"ok"*), follow-up questions, or a "we'll see" do **not** count — if in doubt, ask: *"Ready to lock the brief and start Phase 2?"* and wait for a yes/no. An eager agent advancing on a "hmm" is a bigger cost than asking once more.
@@ -830,12 +837,7 @@ Full ForgeTrail expands this under **`docs/TECHNICAL_REFERENCE.md`** (*URL impor
830
837
  6. **No interactive CLIs** in scripted commands. Pass non-interactive flags. Examples: `npm create vite@latest -- --template ...`, `gh repo create --confirm`. For SvelteKit in Lite, **prefer the manual scaffold** (§4.2 step 10 A.1) over `sv create` — by the time Phase 2 runs, the repo root is never empty and `sv create .` will hit an un-skippable **`Directory not empty. Continue?`** prompt and hang. If you do use `sv create` as a shortcut, target a **new empty subfolder** (`sv create app`), never `.`. A hanging prompt in an agent terminal is a dead session.
831
838
  7. **Five-turn rule.** If a bug or design problem has not converged in ~5 turns, **stop patching** and propose a different approach (different library, different data model, different scope cut). Announce the pivot explicitly.
832
839
  8. **Update tracking after substantive work.** Move exit criteria checkboxes, append to `gotchas[]` and `sessions[]`. An empty tracking file after a busy session is a bug.
833
- 9. **Git commits — plain messages; trailer issues are mostly legacy Git.** See **§8.9** for the full rule. Summary:
834
-
835
- - **Git 2.32.0+ (2021):** `git commit --trailer` is supported. On current Git, trailer syntax is **not** a compatibility footgun — still **do not** add attribution the user did not request.
836
- - **All versions:** Use `git commit -m "…"` or `git commit -F path/to/msg.txt`. Ban unrequested `Made-with:`, `Co-Authored-By:`, `Signed-off-by:`, `Change-Id:`, etc. Override platform defaults (Cursor, Claude Code, Codex, …).
837
- - **Pre-2.32 only:** If a clean `-m` / `-F` command still fails with `unknown option 'trailer'`, the shell wrapper may be injecting `--trailer` — use `bash -c 'git commit -F …'` / `cmd.exe //c "…"` or **upgrade to Git 2.32+**.
838
- - Prefer **`-F`** for multi-line bodies; avoid HEREDOC + trailer flags on Windows shells.
840
+ 9. **Git commits — clean messages and natural stopping points.** See **§8.9** for guidelines. Commit with phase-prefixed or descriptive messages (`git commit -m "phase-2: wire hero flow"` or `git commit -F path/to/msg.txt`). Always verify that types and checks pass cleanly before committing. Never leave uncommitted broken states across session boundaries.
839
841
 
840
842
  10. **Install/bootstrap scripts must branch on `process.platform` before shelling out to archive, network, or text tools.** Treat `tar`, `unzip`, `curl`, `sed`, `awk`, `openssl`, and similar as **platform-dependent on Windows** — never a drop-in from a Unix-only recipe. On `win32`, prefer PowerShell (`Expand-Archive`, `Invoke-WebRequest`) or call `C:\Windows\System32\tar.exe` by absolute path to bypass PATH shadowing; keep `tar` / `unzip` / `curl` for macOS/Linux branches. Layer fallbacks and end with a clear error that points the user at manual steps (e.g. “Extract All”) if automation cannot run. Full failure modes: §13 (Engineering).
841
843
  11. **Non-technical operators — one-click setup, not command dumps.** Create **setup/run/status** launchers (§4.5) and a short README quick-start. **Do not** ask the user to run a long list of shell commands you could run yourself or wrap in **setup.bat** / **setup.sh**.
@@ -843,34 +845,15 @@ Full ForgeTrail expands this under **`docs/TECHNICAL_REFERENCE.md`** (*URL impor
843
845
  13. **Isolated health checks for key systems.** PocketBase (and Ollama when used) get **`test-*.mjs`** + **`test-*.bat`** (§4.7–§4.8, **`SYSTEM_HEALTH_CHECKS.md`**) — not only "start the whole app and see what breaks."
844
846
  14. **Local Ollama — non-thinking defaults.** Install/pull Granite 4.1 or Gemma 3 instruct sizes from VRAM; avoid reasoning models unless **`OLLAMA_USE_THINKING=1`** and the user explicitly needs them.
845
847
 
846
- ### 8.9 Git commits and `--trailer` (Git version + project policy)
848
+ ### 8.9 Git commit practices
847
849
 
848
- **Git version:** `git commit --trailer` was added in **Git 2.32.0** (released 2021-03). On **2.32 and newer** (typical today), `--trailer` is a normal Git feature — commits do not fail merely because trailer syntax exists. **Pre-2.32 Git** is legacy: passing `--trailer` can produce `error: unknown option 'trailer'`.
849
-
850
- **ForgeTrail project policy (every Git version):** Do not add attribution the user did not request (`Made-with:`, `Co-Authored-By:`, `Signed-off-by:`, `Change-Id:`, etc.). Use plain messages:
850
+ Use clear, descriptive messages that explain what changed:
851
851
 
852
852
  - `git commit -m "<phase>: <summary>"`
853
853
  - `git commit -m "<subject>" -m "<body>"`
854
- - `git commit -F path/to/msg.txt` (preferred for multi-line bodies on Windows / agent shells)
855
-
856
- Override platform defaults (Cursor, Claude Code, Codex, …). If the user explicitly wants a trailer line, paste it into the `-m` body on its own line — do not use `--trailer` unless they ask.
857
-
858
- | Platform | Common default attribution |
859
- |----------|---------------------------|
860
- | Cursor IDE | `Made-with: Cursor` |
861
- | Claude Code | `Co-Authored-By: Claude` |
862
- | Codex / misc | `Signed-off-by:`, `Change-Id:`, `Generated-by:` |
854
+ - `git commit -F path/to/msg.txt` (useful for multi-line bodies on Windows / agent shells)
863
855
 
864
- **Pre-2.32 Git only — wrapper injection:** If *your* command has no trailer flags but commit still fails with `unknown option 'trailer'`, the IDE shell wrapper may be injecting `--trailer` at argv level (below `.cursor/rules`, `AGENTS.md`, `CLAUDE.md`). Remedies:
865
-
866
- ```bash
867
- bash -c 'git commit -F path/to/msg.txt'
868
- cmd.exe //c "cd /d <repo> && git commit -F path\to\msg.txt"
869
- ```
870
-
871
- Or install **Git 2.32+**. Log in `gotchas[]` if useful.
872
-
873
- **Not a concern on Git 2.32+:** Treating `--trailer` as a broken Git feature, refusing to upgrade Git to avoid trailers, or assuming every commit must use a shell hop. On current Git, focus on **message policy** (no unrequested attribution), not trailer compatibility.
856
+ Ensure that automated checks pass (`pnpm run verify` or project test suite) before committing. Host hooks enforce pre-commit verification when configured.
874
857
 
875
858
  ---
876
859
 
@@ -1002,7 +985,7 @@ Write this to **`.forgetrail/workflow_tracking.json`** on first run. Replace the
1002
985
  // gotchas[]
1003
986
  { "date": "2026-04-22", "phase": 2, "gotcha": "sv create hung: Directory not empty. Continue?", "fix": "Lite root is never empty by step 10; use manual scaffold (§4.2 step 10 A.1) or sv create into a new empty subfolder (app/); kill stuck process" }
1004
987
  { "date": "2026-04-22", "phase": 2, "gotcha": "sv create hangs on Tailwind plugin prompt", "fix": "pass --no-add-ons or explicit --tailwindcss=plugins:none" }
1005
- { "date": "2026-04-22", "phase": 2, "gotcha": "git commit failed with 'unknown option trailer' on pre-2.32 Git", "fix": "§8.9 — wrapper injected --trailer; bash -c 'git commit -F msg.txt' or upgrade to Git 2.32+" }
988
+ { "date": "2026-04-22", "phase": 2, "gotcha": "port 8090 already in use by background process", "fix": "configured PUBLIC_POCKETBASE_URL with port 8096 in .env" }
1006
989
  { "date": "2026-04-23", "phase": 2, "gotcha": "tar -xf on Windows: (a) 'Cannot connect to Z: resolve failed' — bsdtar parses drive letters as remote host; (b) 'This does not look like a tar archive' — GNU tar from Git Bash shadowed bsdtar on PATH", "fix": "On win32 branch: PowerShell Expand-Archive (or C:\\Windows\\System32\\tar.exe by absolute path) with cwd + basename, not full X:\\... path; see §13 Engineering" }
1007
990
 
1008
991
  // sessions[]
@@ -1017,7 +1000,7 @@ Save this as `.forgetrail/AGENTS.md` so agents that auto-load it (Codex, Cursor,
1017
1000
 
1018
1001
  ```markdown
1019
1002
  <!--
1020
- Agent protocol based on ForgeTrail Lite v2.0.2.
1003
+ Agent protocol based on ForgeTrail Lite v2.1.0.
1021
1004
  © Catalyst Forge, LLC — www.catalystforge.com
1022
1005
  Licensed under Apache License 2.0 (upstream ForgeTrail repo).
1023
1006
  -->
@@ -1033,7 +1016,7 @@ This repository uses **ForgeTrail Lite** as its project kickoff and operating pr
1033
1016
  - **Log decisions:** every material decision goes into `.forgetrail/workflow_tracking.json → decisions[]` with a one-line "why."
1034
1017
  - **Plain first reply:** first user-facing message after bootstrap is product language, not methodology jargon. See `.forgetrail/FORGETRAIL_LITE.md` §9.
1035
1018
  - **Ask questions as numbered lists, one per line.** Never mash multiple questions into a paragraph. See §5.
1036
- - **Git commits:** plain `-m` or `-F` only; no unrequested attribution trailers (§8.9). Git **2.32+** supports `--trailer` natively — focus on message policy, not trailer compatibility. **Pre-2.32 only:** `unknown option 'trailer'` → shell hop or upgrade Git.
1019
+ - **Git commits:** plain `-m` or `-F` at natural stopping points with concise summaries. Verify checks pass before committing. See §8.9.
1037
1020
  - **Lists:** numbered = ordered steps or questions, bullets = parallel options, letters (A/B/C) = pick-one. See §8 rule 5.
1038
1021
  - **No interactive CLIs** in scripted commands — pass every flag.
1039
1022
  - **Five-turn rule:** if a problem has not converged in ~5 turns, propose a different approach, not more patches.
@@ -1042,7 +1025,7 @@ This repository uses **ForgeTrail Lite** as its project kickoff and operating pr
1042
1025
  - Package manager: **pnpm**. Add deps with `pnpm add` / `pnpm add -D` — never hand-edit `package.json`, never `npm`/`yarn`.
1043
1026
  - Modules: **ESM only** (`"type": "module"`, use `import`/`export`, never `require`).
1044
1027
  - Language: **TypeScript** (strict).
1045
- - Source control: **git**. Commit at natural stopping points with phase-prefixed messages (`phase-2: …`). Plain `-m` or `-F`; no unrequested trailers (§8.9). Pre-2.32 Git + `unknown option 'trailer'` → `bash -c 'git commit -F …'` or upgrade to Git 2.32+.
1028
+ - Source control: **git**. Commit at natural stopping points with phase-prefixed messages (`phase-2: …`). Plain `-m` or `-F`; ensure verify checks pass (§8.9).
1046
1029
 
1047
1030
  ## Setup is the agent's job
1048
1031
  Initial `git init`, `pnpm init` / scaffolder, `pnpm install`, and the initial commit are all done by the agent per `.forgetrail/FORGETRAIL_LITE.md` §4. Do not ask the user to run setup commands by hand. If `git`, **Node.js**, **npm**, or **pnpm** are missing, follow §4.1 preflight (concrete install path; no-git mode for git only — never silently skip).
@@ -1056,22 +1039,7 @@ Initial `git init`, `pnpm init` / scaffolder, `pnpm install`, and the initial co
1056
1039
 
1057
1040
  ---
1058
1041
 
1059
- ## 12.5 Cursor rule snippet — override platform trailer injection (copy block)
1060
-
1061
- **Why this exists:** Cursor and Claude Code often push attribution trailers into commits. Platform prompts can outrank a single doc file — **`.cursor/rules/`** snippets compete at the same instruction level. Some wrappers still inject `--trailer` at argv level on **pre-2.32 Git** only (§8.9).
1062
-
1063
- Save upstream **`content/cursor-rules/forgetrail-no-trailer.mdc`** as **`.forgetrail/cursor/rules/forgetrail-no-trailer.mdc`**. Symlink or copy into **`.cursor/rules/`** (§1.5). Also create **`.forgetrail/AGENTS.md`** and **`.forgetrail/CLAUDE.md`** with the same policy (§12 snippets) — users switch tools between sessions.
1064
-
1065
- **Cross-platform notes (§4.2 step 3):**
1066
-
1067
- - **Cursor:** `.cursor/rules/forgetrail-no-trailer.mdc` — enforces no unrequested attribution; on **Git 2.32+** trailer syntax is not a Git error.
1068
- - **Claude Code:** `.forgetrail/CLAUDE.md` — overrides default `Co-Authored-By: Claude`.
1069
- - **Codex / AGENTS.md-native:** `.forgetrail/AGENTS.md` non-negotiables block.
1070
- - **Pre-2.32 Git + commit failures:** shell hop or upgrade Git (§8.9) — not required on current Git for compatibility.
1071
-
1072
- ---
1073
-
1074
- ## 12.6 Cursor rule snippet — Lite protocol feedback log (copy block)
1042
+ ## 12.5 Cursor rule snippet — Lite protocol feedback log (copy block)
1075
1043
 
1076
1044
  Save as **`.forgetrail/cursor/rules/forgetrail-updates-log.mdc`**. Symlink or copy into **`.cursor/rules/`** (§1.5). Use the file at `content/cursor-rules/forgetrail-updates-log.mdc` in the ForgeTrail repo as the canonical upstream text — keep it in sync when §1.6 changes.
1077
1045
 
@@ -1107,7 +1075,6 @@ These are the failures ForgeTrail sees most often. The agent should re-read this
1107
1075
  - **Defaulting to reasoning/thinking Ollama models** (R1, QwQ, etc.) for general product features — wastes VRAM and adds latency; use Granite 4.1 / Gemma 3 unless the brief requires thinking models (§4.8).
1108
1076
  - **Non-idempotent setup scripts.** Any "bootstrap" script (DB schema, seed data, migrations) must be safe to run twice. If it errors on second run, it is not done.
1109
1077
  - **"It works on my machine" dev loop.** If an ops step (install, seed, migrate, codegen) happens more than twice, turn it into a `pnpm` script the next session can re-run.
1110
- - **Unrequested attribution trailers.** Banned on all Git versions (§8.9). On **Git 2.32+**, `--trailer` is supported — the issue is **policy**, not Git breakage. Pre-2.32: `unknown option 'trailer'` may appear if a wrapper injects flags.
1111
1078
  - **Shelling out to Unix-named tools on Windows without platform branching.** On Windows, a command like `tar`, `unzip`, `curl`, `sed`, `awk`, or `openssl` may resolve to Microsoft's bundled tool (e.g. bsdtar in System32, native `curl`), a **Git Bash / MSYS2** variant (GNU `tar`, GNU `sed`), or nothing at all — **whichever is first on PATH**. Install and bootstrap scripts are the highest-risk surface: they run earliest, on the freshest user environments, with the weakest toolchain assumptions. Two traps this causes:
1112
1079
  - **Drive-letter-as-host.** bsdtar (ships with Windows 10 1803+) parses `Z:\path\file.zip` as a remote `host:path` and errors with `Cannot connect to Z: resolve failed`. Any absolute Windows path with a drive letter passed to libarchive-style tools can hit this. **Fix:** run the tool with **`cwd` set to the target directory** and pass only the **file basename** — never the full `X:\...` path as a single argument to `tar -xf`.
1113
1080
  - **GNU vs. BSD / Microsoft coin-flip.** GNU `tar` **cannot read zip**; bsdtar can. If Git Bash is on PATH ahead of System32, `tar -xf foo.zip` may invoke GNU `tar` and fail with *"This does not look like a tar archive"* even though another `tar.exe` on the same machine would succeed. **Fix:** in Node scripts, branch on `process.platform === 'win32'` and prefer **PowerShell** built-ins (`Expand-Archive -LiteralPath ... -DestinationPath ...`) or call **`C:\Windows\System32\tar.exe`** by absolute path to sidestep PATH. Keep `unzip` / `tar` / `curl` as the macOS/Linux branch. Layer attempts and fall back with a clear error that points the user at a manual **Extract All** (or equivalent) as last resort.
@@ -1149,7 +1116,6 @@ During Phase 2, create these once the spine is running. Keep them short and hone
1149
1116
  # CLAUDE.md
1150
1117
  # IDEAS.md
1151
1118
  # .forgetrail/workflow_tracking.json
1152
- # .cursor/rules/forgetrail-no-trailer.mdc
1153
1119
  # .cursor/rules/forgetrail-updates-log.mdc
1154
1120
 
1155
1121
  # Deps
@@ -1209,4 +1175,4 @@ ForgeTrail Lite covers the shape of a project. The full **ForgeTrail MCP server*
1209
1175
 
1210
1176
  ---
1211
1177
 
1212
- **ForgeTrail Lite v2.0.2** · © Catalyst Forge, LLC · [www.catalystforge.com](https://www.catalystforge.com) · [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
1178
+ **ForgeTrail Lite v2.1.0** · © Catalyst Forge, LLC · [www.catalystforge.com](https://www.catalystforge.com) · [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
@@ -8,9 +8,16 @@ Use alongside **`getChecklist`** section `before-session-1`. That checklist cove
8
8
 
9
9
  ---
10
10
 
11
- ## 0. Project archetype (ask or infer first)
11
+ ## 0. User goal and audience (the why before the how)
12
12
 
13
- - **Is this a product, an internal tool, or a one-shot?** — **product** (others will use it, possibly pay), **internal-tool** (real recurring users, no market), **one-shot** (gift, event page, demo — one occasion, then done). Often obvious from the problem statement; confirm rather than interrogate.
13
+ - **Who is the user, and what job are they hiring this software to do?**
14
+ - **What is the painful friction, manual workaround, or missing capability today?**
15
+ - **What does success look like once this exists?** (The core outcome, not the implementation).
16
+ - Anchor on intent before locking technical constraints. Record answers in `PHASE_1_BRIEF.md` §1.
17
+
18
+ ## 0.5 Project archetype (ask or infer next)
19
+
20
+ - **Is this a product, an internal tool, or a one-shot?** (product: others will use it, possibly pay; internal-tool: real recurring users, no market; one-shot: gift, event page, demo: one occasion, then done). Often obvious from the problem statement; confirm rather than interrogate.
14
21
  - The archetype **prunes the lifecycle**: internal tools make Phase 6 optional and drop payments/business-plan criteria from Phase 7; one-shots collapse phases 5–7 into a single polish-and-ship gate. See **WORKFLOW.md §1d**.
15
22
  - Record in **`PHASE_1_BRIEF.md`**, **`decisions[]`**, and **`project.archetype`** in the tracking file, then prune the tracking template's exit criteria to match (log the pruning as a decision).
16
23
 
@@ -26,7 +26,8 @@
26
26
  "exitCriteria": {
27
27
  "runnableSpine": false,
28
28
  "heroFlowEndToEnd": false,
29
- "contextPromptWritten": false
29
+ "contextPromptWritten": false,
30
+ "verifyScriptWorking": false
30
31
  }
31
32
  },
32
33
  "3": { "name": "Stabilize", "status": "pending", "exitCriteria": {} },
@@ -24,7 +24,7 @@ On a **new project folder**, commands like `git status`, `git log`, or `git rev-
24
24
  1. Write kickoff artifacts first: **`.forgetrail/workflow_tracking.json`**, guardrails, optional Cursor rules.
25
25
  2. Check with `git rev-parse --is-inside-work-tree`. If it returns false or errors, run **`git init -b main`** at the repo root (or `git init` + `git branch -m main` on older Git). **Never** re-init an existing repo.
26
26
  3. Write a **minimal** `.gitignore` now — at least `node_modules/`, `.env`, `.DS_Store`. Add `.forgetrail/` **only** if you chose the gitignore branch in **`FORGETRAIL_LITE.md` §1.5** (default MCP greenfield: **commit `.forgetrail/`**).
27
- 4. Make a **first commit** when steps 1–3 are done so the user has a clean baseline (plain `-m` or `-F`; no attribution trailers — see Rules below). Skip if the repo already had history; skip entirely in no-git mode.
27
+ 4. Make a **first commit** when steps 1–3 are done so the user has a clean baseline (plain `-m` or `-F`). Skip if the repo already had history; skip entirely in no-git mode.
28
28
 
29
29
  Do **not** treat an early missing-repo git error as blocking. Prefer **`git rev-parse --is-inside-work-tree`** over blind `git status` when you only need to know whether init is required.
30
30
 
@@ -109,7 +109,6 @@ Call **`getProgressiveDocSchedule`** for the canonical phase → doc matrix (WOR
109
109
  - **`.forgetrail/`** — create the directory. Write **`.forgetrail/workflow_tracking.json`** inside it (output from **`getInitialWorkflowTracking`**), then fill `project.name`, `project.created`, `project.description`, and update phases as you work. Add **`.forgetrail/`** to **`.gitignore`** if the repo may be published.
110
110
  - **`docs/GENESIS.md`** (optional but preferred on the Try path) — what-not-how product spec from **`getGenesisSpecPrompt`** / **`TRY_FORGETRAIL.md`**. If present at kickoff, ingest with **`ingestPlanArtifact`** before locking the brief.
111
111
  - **Git repo** — if `git rev-parse --is-inside-work-tree` fails, **`git init -b main`** after bootstrap files exist (see **Greenfield git**). A failed early `git status` on an empty folder is **not** an error. Add minimal **`.gitignore`** and an optional first commit before Phase 1 intake.
112
- - **Trailer-ban guardrails — create unconditionally, regardless of current agent.** Users switch tools mid-project. Write **`AGENTS.md`**, **`CLAUDE.md`**, and **`.forgetrail/cursor/rules/forgetrail-no-trailer.mdc`** under **`.forgetrail/`**; **symlink or copy** the `.mdc` into **`.cursor/rules/`**. Core text: no unrequested attribution in commit messages. **`git commit --trailer`** is normal on **Git 2.32+**; pre-2.32 may need a shell hop if the wrapper injects `--trailer` — see **`FORGETRAIL_LITE.md` §4.2 step 3, §8.9, §12.5**.
113
112
  - **Cursor users:** `.cursor/rules/forgetrail-phase-status.mdc` — from **`getForgeTrailCursorPhaseRule`**. **`forgetrail-lessons-gate.mdc`** + **`forgetrail-lessons-mcp.mdc`** — from **`getForgeTrailCursorLessonsRules`** or **`getNewProjectKickoff`** (lessons workflow before substantial changes).
114
113
 
115
114
  **End of Phase 1 (before scaffolding):**
@@ -144,7 +143,7 @@ Call **`getProgressiveDocSchedule`** for the canonical phase → doc matrix (WOR
144
143
  - After substantive work, **update `.forgetrail/workflow_tracking.json`**: exit criteria, `decisions`, `gotchas`, `sessions` per **`getTrackingSchema`**. Run **`validateTracking`** to catch structural drift.
145
144
  - If a problem does not converge after **~5 turns**, propose a **different approach**, not more patches.
146
145
  - **When the project ends** (shipped, delivered, shelved), run the **wrap protocol** (WORKFLOW §1e): sweep `gotchas[]` + `decisions[]` for generalizable lessons, run the propagation prompt in **Harvest mode**, set `project.status` to `"wrapped"`, and add a final `sessions[]` entry with end state and handoff pointers.
147
- - **Git commits:** `git commit -F <file>` or plain `-m`; no unrequested attribution trailers. **Git 2.32.0+** supports `--trailer` — focus on message policy, not Git version anxiety. **Pre-2.32 only:** `unknown option 'trailer'` → `bash -c "git commit -F …"` or upgrade Git. See **`FORGETRAIL_LITE.md` §8.9** and **`.cursor/rules/commit-messages.mdc`**.
146
+ - **Git commits:** `git commit -F <file>` or plain `-m` at natural stopping points with concise summaries. Run verification checks prior to commit.
148
147
 
149
148
  ---
150
149
 
@@ -163,6 +163,24 @@
163
163
  }
164
164
  ]
165
165
  },
166
+ {
167
+ "id": "never-do",
168
+ "tier": "A",
169
+ "phases": ["1", "2", "3", "4", "5", "6", "7"],
170
+ "trigger": "An agent attempts a destructive action, force-push, or history rewrite.",
171
+ "tools": [
172
+ {
173
+ "name": "TemperPass",
174
+ "homepage": "https://temperpass.dev",
175
+ "offer": "TemperPass acts as the confirmation gate before hard-to-undo actions proceed."
176
+ },
177
+ {
178
+ "name": "IngotVault",
179
+ "homepage": "https://ingotvault.dev",
180
+ "offer": "IngotVault takes an immutable local snapshot before risky git operations or rewrites."
181
+ }
182
+ ]
183
+ },
166
184
  {
167
185
  "id": "unclear-cause",
168
186
  "tier": "A",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Reserve an npm name with a throwaway 0.0.0 stub; the user always publishes
3
- alwaysApply: true
3
+ alwaysApply: false
4
4
  ---
5
5
 
6
6
  # Initial npm name hold
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  description: Where delivery specs live after implementation — completed vs partial
3
- alwaysApply: true
3
+ globs:
4
+ - "specs/**"
5
+ - "TODO.md"
6
+ alwaysApply: false
4
7
  ---
5
8
 
6
9
  # Spec Completion Protocol
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  description: New specs must match ForgeTrail conventions and get a TODO.md entry
3
- alwaysApply: true
3
+ globs:
4
+ - "specs/**"
5
+ - "docs/**"
6
+ - "TODO.md"
7
+ alwaysApply: false
4
8
  ---
5
9
 
6
10
  # Specs and TODO Backlog