savepoint 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/.claude/settings.local.json +12 -1
  2. package/.golangci.yml +11 -0
  3. package/.savepoint/Design.md +37 -36
  4. package/.savepoint/{audit/v1.1/E02-cross-platform-compatibility/proposals.md → releases/v1.1/epics/E02-cross-platform-compatibility/E02-Audit.md} +48 -38
  5. package/.savepoint/releases/v1.1/epics/E03-ui-visual-refinement/E03-Audit.md +195 -0
  6. package/.savepoint/releases/v1.1/epics/E03-ui-visual-refinement/E03-Detail.md +14 -1
  7. package/.savepoint/releases/v1.1/epics/E03-ui-visual-refinement/tasks/T006-forced-256-color-profile.md +3 -3
  8. package/.savepoint/{audit/v1.1/E04-epic-navigation/proposals.md → releases/v1.1/epics/E04-epic-navigation/E04-Audit.md} +65 -54
  9. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/E05-Audit.md +237 -0
  10. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/E05-Detail.md +25 -16
  11. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/tasks/T001-update-agents-md.md +17 -6
  12. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/tasks/T002-update-router-md.md +15 -5
  13. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/tasks/T003-update-design-md.md +19 -5
  14. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/tasks/T004-implement-m-hotkey.md +11 -1
  15. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/tasks/T005-update-help-overlay.md +9 -6
  16. package/.savepoint/releases/v1.1/epics/E05-tasking-permissions/tasks/T006-tests-and-quality-gates.md +29 -13
  17. package/.savepoint/releases/v1.1/epics/E06-audit-command/E06-Audit.md +56 -0
  18. package/.savepoint/releases/v1.1/epics/E06-audit-command/E06-Detail.md +63 -0
  19. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T005-proposals.md +44 -0
  20. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T007-apply-close.md +35 -0
  21. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T009-integration.md +40 -0
  22. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T010-audit-file-migration.md +45 -0
  23. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T011-model-tab-state.md +26 -0
  24. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T012-epic-audit-render.md +33 -0
  25. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T013-handle-tab-keys.md +34 -0
  26. package/.savepoint/releases/v1.1/epics/E06-audit-command/tasks/T014-tab-indicator.md +33 -0
  27. package/.savepoint/releases/v1.1/epics/E07-init-command/E07-Audit.md +336 -0
  28. package/.savepoint/releases/v1.1/epics/E07-init-command/E07-Detail.md +61 -0
  29. package/.savepoint/releases/v1.1/epics/E07-init-command/tasks/T001-cli-entrypoint.md +37 -0
  30. package/.savepoint/releases/v1.1/epics/E07-init-command/tasks/T002-target-validation.md +28 -0
  31. package/.savepoint/releases/v1.1/epics/E07-init-command/tasks/T003-scaffold-writer.md +46 -0
  32. package/.savepoint/releases/v1.1/epics/E07-init-command/tasks/T004-atomic-writes.md +27 -0
  33. package/.savepoint/releases/v1.1/epics/E07-init-command/tasks/T005-magic-prompt.md +25 -0
  34. package/.savepoint/releases/v1.1/epics/E07-init-command/tasks/T006-clipboard.md +26 -0
  35. package/.savepoint/releases/v1.1/epics/E07-init-command/tasks/T007-integration-test.md +26 -0
  36. package/.savepoint/releases/v1.1/epics/E08-board-command/E08-Audit.md +333 -0
  37. package/.savepoint/releases/v1.1/epics/E08-board-command/E08-Detail.md +68 -0
  38. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T001-cli-entrypoint.md +26 -0
  39. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T002-non-tty-fallback.md +27 -0
  40. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T003-tui-app-shell.md +28 -0
  41. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T004-board-model.md +29 -0
  42. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T005-detail-pane.md +27 -0
  43. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T006-status-transitions.md +29 -0
  44. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T007-theme-fallbacks.md +29 -0
  45. package/.savepoint/releases/v1.1/epics/E08-board-command/tasks/T008-integration-test.md +27 -0
  46. package/.savepoint/releases/v1.1/epics/E09-doctor-command/E09-Audit.md +207 -0
  47. package/.savepoint/releases/v1.1/epics/E09-doctor-command/E09-Detail.md +65 -0
  48. package/.savepoint/releases/v1.1/epics/E09-doctor-command/tasks/T001-cli-entrypoint.md +24 -0
  49. package/.savepoint/releases/v1.1/epics/E09-doctor-command/tasks/T002-config-router-validation.md +28 -0
  50. package/.savepoint/releases/v1.1/epics/E09-doctor-command/tasks/T003-structure-checks.md +29 -0
  51. package/.savepoint/releases/v1.1/epics/E09-doctor-command/tasks/T004-dependency-checks.md +27 -0
  52. package/.savepoint/releases/v1.1/epics/E09-doctor-command/tasks/T005-audit-orphan-checks.md +28 -0
  53. package/.savepoint/releases/v1.1/epics/E09-doctor-command/tasks/T006-quality-gates-report.md +31 -0
  54. package/.savepoint/releases/v1.1/epics/E11-board-refresh-fix/E11-Detail.md +36 -0
  55. package/.savepoint/releases/v1.1/epics/E11-board-refresh-fix/tasks/T001-debug-logging.md +25 -0
  56. package/.savepoint/releases/v1.1/epics/E11-board-refresh-fix/tasks/T002-increase-debounce.md +21 -0
  57. package/.savepoint/releases/v1.1/epics/E11-board-refresh-fix/tasks/T003-error-handling.md +22 -0
  58. package/.savepoint/releases/v1.1/epics/E11-board-refresh-fix/tasks/T004-test-verify.md +29 -0
  59. package/.savepoint/releases/v1.1/epics/E12-validation-fix/E12-Audit.md +444 -0
  60. package/.savepoint/releases/v1.1/epics/E12-validation-fix/E12-Detail.md +45 -0
  61. package/.savepoint/releases/v1.1/epics/E12-validation-fix/tasks/T001-default-phase.md +35 -0
  62. package/.savepoint/releases/v1.1/epics/E12-validation-fix/tasks/T002-default-status.md +19 -0
  63. package/.savepoint/releases/v1.1/epics/E12-validation-fix/tasks/T003-better-errors.md +29 -0
  64. package/.savepoint/releases/v1.1/epics/E12-validation-fix/tasks/T004-validate-on-write.md +25 -0
  65. package/.savepoint/releases/v1.1/epics/E12-validation-fix/tasks/T005-tests.md +37 -0
  66. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/E13-Audit.md +118 -0
  67. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/E13-Detail.md +73 -0
  68. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/tasks/T001-safe-cleanup.md +66 -0
  69. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/tasks/T002-bug-fixes.md +35 -0
  70. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/tasks/T003-centralize-duplication.md +60 -0
  71. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/tasks/T004-infrastructure.md +33 -0
  72. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/tasks/T005-decompose-update.md +37 -0
  73. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/tasks/T006-async-io.md +40 -0
  74. package/.savepoint/releases/v1.1/epics/E13-audit-remediation/tasks/T007-test-coverage.md +37 -0
  75. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/E14-Audit.md +267 -0
  76. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/E14-Detail.md +54 -0
  77. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/tasks/T001-group-model.md +39 -0
  78. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/tasks/T002-data-interfaces.md +42 -0
  79. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/tasks/T003-discover-orphans.md +33 -0
  80. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/tasks/T004-epic-panel-headings.md +35 -0
  81. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/tasks/T005-shell-tokenization.md +27 -0
  82. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/tasks/T006-unify-enums.md +29 -0
  83. package/.savepoint/releases/v1.1/epics/E14-structural-improvements/tasks/T007-testutil-package.md +28 -0
  84. package/.savepoint/releases/v1.1/epics/E15-hardening/E15-Detail.md +43 -0
  85. package/.savepoint/releases/v1.1/epics/E15-hardening/tasks/T001-benchmarks.md +31 -0
  86. package/.savepoint/releases/v1.1/epics/E15-hardening/tasks/T002-fuzz-targets.md +28 -0
  87. package/.savepoint/releases/v1.1/epics/E15-hardening/tasks/T003-debug-flag.md +30 -0
  88. package/.savepoint/releases/v1.1/epics/E15-hardening/tasks/T004-dist-checksums.md +27 -0
  89. package/.savepoint/releases/v1.1/epics/E15-hardening/tasks/T005-windows-targets.md +28 -0
  90. package/.savepoint/releases/v1.1/epics/E15-hardening/tasks/T006-abbreviation-splitting.md +26 -0
  91. package/.savepoint/releases/v1.1/epics/E15-hardening/tasks/T007-root-test-allowlist.md +28 -0
  92. package/.savepoint/releases/v1.1/epics/_archived/T001-cli-entrypoint.md +25 -0
  93. package/.savepoint/releases/v1.1/epics/_archived/T002-quality-gates.md +27 -0
  94. package/.savepoint/releases/v1.1/epics/_archived/T003-snapshot.md +27 -0
  95. package/.savepoint/releases/v1.1/epics/_archived/T004-ai-reconcile.md +29 -0
  96. package/.savepoint/releases/v1.1/epics/_archived/T006-tui-review.md +31 -0
  97. package/.savepoint/releases/v1.1/epics/_archived/T008-skip-handling.md +34 -0
  98. package/.savepoint/releases/v1.1/v1.1-PRD.md +67 -7
  99. package/.savepoint/router.md +9 -16
  100. package/AGENTS.md +38 -23
  101. package/README.md +0 -1
  102. package/agent-skills/savepoint-audit/SKILL.md +86 -34
  103. package/agent-skills/savepoint-build-task/SKILL.md +7 -2
  104. package/agent-skills/savepoint-create-plan/SKILL.md +7 -2
  105. package/agent-skills/savepoint-create-task/SKILL.md +44 -31
  106. package/agent-skills/savepoint-draft-prd/SKILL.md +7 -2
  107. package/agent-skills/savepoint-system-design/SKILL.md +7 -2
  108. package/agent_skills_test.go +91 -0
  109. package/cmd/board.go +59 -0
  110. package/cmd/board_test.go +137 -0
  111. package/cmd/doctor.go +53 -0
  112. package/cmd/doctor_test.go +146 -0
  113. package/cmd/init.go +63 -0
  114. package/cmd/init_test.go +104 -0
  115. package/internal/board/board.go +40 -36
  116. package/internal/board/board_test.go +27 -82
  117. package/internal/board/card.go +43 -23
  118. package/internal/board/card_test.go +41 -5
  119. package/internal/board/column.go +44 -13
  120. package/internal/board/column_test.go +5 -2
  121. package/internal/board/detail.go +0 -47
  122. package/internal/board/epic_panel.go +118 -22
  123. package/internal/board/epic_panel_test.go +302 -17
  124. package/internal/board/help.go +1 -0
  125. package/internal/board/help_test.go +1 -0
  126. package/internal/board/integration_test.go +266 -0
  127. package/internal/board/interfaces.go +65 -0
  128. package/internal/board/interfaces_test.go +114 -0
  129. package/internal/board/io.go +93 -0
  130. package/internal/board/model.go +79 -118
  131. package/internal/board/plain.go +88 -0
  132. package/internal/board/plain_test.go +117 -0
  133. package/internal/board/release.go +1 -9
  134. package/internal/board/release_test.go +6 -6
  135. package/internal/board/status.go +4 -4
  136. package/internal/board/theme.go +24 -0
  137. package/internal/board/theme_test.go +31 -0
  138. package/internal/board/transitions.go +113 -88
  139. package/internal/board/transitions_test.go +164 -141
  140. package/internal/board/tui.go +32 -0
  141. package/internal/board/update.go +325 -215
  142. package/internal/board/update_test.go +299 -18
  143. package/internal/board/util.go +76 -0
  144. package/internal/board/view.go +31 -28
  145. package/internal/board/view_test.go +12 -2
  146. package/internal/board/watch.go +35 -5
  147. package/internal/buildtool/main.go +2 -10
  148. package/internal/buildtool/main_test.go +46 -0
  149. package/internal/data/config.go +17 -3
  150. package/internal/data/config_test.go +49 -0
  151. package/internal/data/discover.go +26 -0
  152. package/internal/data/discover_test.go +34 -10
  153. package/internal/data/errors.go +4 -0
  154. package/internal/data/lifecycle.go +13 -6
  155. package/internal/data/lifecycle_test.go +14 -11
  156. package/internal/data/parser.go +21 -6
  157. package/internal/data/parser_test.go +31 -7
  158. package/internal/data/task.go +0 -9
  159. package/internal/data/write.go +85 -11
  160. package/internal/data/write_test.go +167 -0
  161. package/internal/doctor/checks.go +567 -0
  162. package/internal/doctor/checks_test.go +716 -0
  163. package/internal/doctor/gates.go +193 -0
  164. package/internal/doctor/gates_test.go +166 -0
  165. package/internal/doctor/interfaces.go +64 -0
  166. package/internal/doctor/interfaces_test.go +104 -0
  167. package/internal/doctor/repairs.go +80 -0
  168. package/internal/doctor/repairs_test.go +81 -0
  169. package/internal/doctor/report.go +157 -0
  170. package/internal/doctor/report_test.go +89 -0
  171. package/internal/init/clipboard.go +146 -0
  172. package/internal/init/clipboard_test.go +74 -0
  173. package/internal/init/install.go +16 -0
  174. package/internal/init/integration_test.go +197 -0
  175. package/internal/init/prompt.go +14 -0
  176. package/internal/init/prompt_test.go +77 -0
  177. package/internal/init/scaffold.go +59 -0
  178. package/internal/init/scaffold_test.go +179 -0
  179. package/internal/init/template_freshness_test.go +56 -0
  180. package/internal/init/validate.go +85 -0
  181. package/internal/init/validate_test.go +141 -0
  182. package/internal/init/write.go +73 -0
  183. package/internal/init/write_test.go +91 -0
  184. package/internal/styles/styles_test.go +133 -0
  185. package/internal/testutil/fixture.go +113 -0
  186. package/internal/testutil/fs.go +26 -0
  187. package/main.go +101 -4
  188. package/package.json +2 -2
  189. package/project-audit/audit_report_glm_5.1.md +411 -0
  190. package/project-audit/audit_report_opus_4.6 +406 -0
  191. package/project-audit/consolidated-audit-report.md +456 -0
  192. package/savepoint +0 -0
  193. package/templates/project/.savepoint/Design.md +2 -2
  194. package/templates/project/.savepoint/router.md +10 -10
  195. package/templates/project/AGENTS.md +33 -21
  196. package/templates/project/agent-skills/savepoint-audit/SKILL.md +87 -0
  197. package/templates/project/agent-skills/savepoint-build-task/SKILL.md +44 -0
  198. package/templates/project/agent-skills/savepoint-create-plan/SKILL.md +33 -0
  199. package/templates/project/agent-skills/savepoint-create-task/SKILL.md +44 -0
  200. package/templates/project/agent-skills/savepoint-draft-prd/SKILL.md +37 -0
  201. package/templates/project/agent-skills/savepoint-system-design/SKILL.md +38 -0
  202. package/templates/prompts/audit-reconciliation.prompt.md +33 -28
  203. package/templates/prompts/design.prompt.md +3 -1
  204. package/.savepoint/audit/v1/E01/proposals.md +0 -168
  205. package/.savepoint/audit/v1/E01/snapshot.md +0 -78
  206. package/.savepoint/audit/v1/E01-go-setup/proposals.md +0 -166
  207. package/.savepoint/audit/v1/E01-go-setup/snapshot.md +0 -71
  208. package/.savepoint/audit/v1/E01-scaffolding/proposals/AGENTS.md +0 -66
  209. package/.savepoint/audit/v1/E01-scaffolding/proposals/Design.md +0 -210
  210. package/.savepoint/audit/v1/E01-scaffolding/proposals/epic-Design.md +0 -117
  211. package/.savepoint/audit/v1/E01-scaffolding/proposals/quality-review.md +0 -101
  212. package/.savepoint/audit/v1/E01-scaffolding/snapshot.md +0 -54
  213. package/.savepoint/audit/v1/E02-data-model/snapshot.md +0 -128
  214. package/.savepoint/audit/v1/E02-data-readers/proposals.md +0 -123
  215. package/.savepoint/audit/v1/E02-data-readers/snapshot.md +0 -54
  216. package/.savepoint/audit/v1/E03-board-tui-core/proposals.md +0 -146
  217. package/.savepoint/audit/v1/E03-board-tui-core/snapshot.md +0 -57
  218. package/.savepoint/audit/v1/E03-cli-foundation/snapshot.md +0 -106
  219. package/.savepoint/audit/v1/E04-board-components/proposals.md +0 -118
  220. package/.savepoint/audit/v1/E04-board-components/snapshot.md +0 -77
  221. package/.savepoint/audit/v1/E04-templates-and-prompts/snapshot.md +0 -115
  222. package/.savepoint/audit/v1/E05-init-command/snapshot.md +0 -125
  223. package/.savepoint/audit/v1/E05-phase-transitions/proposals.md +0 -83
  224. package/.savepoint/audit/v1/E05-phase-transitions/snapshot.md +0 -36
  225. package/.savepoint/audit/v1/E06-atari-noir-layout/proposals.md +0 -130
  226. package/.savepoint/audit/v1/E06-atari-noir-layout/snapshot.md +0 -84
  227. package/.savepoint/audit/v1/E06-tui-board/snapshot.md +0 -64
  228. package/.savepoint/audit/v1/E07-audit-pipeline/snapshot.md +0 -165
  229. package/.savepoint/audit/v1/E08-board-workflow-cleanup/snapshot.md +0 -65
  230. package/.savepoint/audit/v1.1/E02-cross-platform-compatibility/snapshot.md +0 -41
  231. package/.savepoint/audit/v1.1/E04-epic-navigation/snapshot.md +0 -48
  232. package/ink-cli-ui-design.zip +0 -0
  233. package/savepoint.exe +0 -0
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: E15-hardening/T003-debug-flag
3
+ status: planned
4
+ objective: Add --debug flag and SAVEPOINT_DEBUG env var for structured debug logging
5
+ depends_on: []
6
+ ---
7
+
8
+ # T003: Add --debug Flag and SAVEPOINT_DEBUG Env Var
9
+
10
+ ## Context Files
11
+
12
+ - `main.go` — CLI entrypoint, --version flag
13
+ - `cmd/` — command dispatch
14
+ - `internal/board/` — board init, file watchers, command dispatch
15
+
16
+ ## Acceptance Criteria
17
+
18
+ - [ ] --debug flag accepted at CLI level
19
+ - [ ] SAVEPOINT_DEBUG env var recognized
20
+ - [ ] Debug output includes board init, file watcher events, and command dispatch
21
+ - [ ] Debug output is off by default (no performance impact)
22
+ - [ ] `go test ./...` passes with no regressions
23
+
24
+ ## Implementation Plan
25
+
26
+ - [ ] Define debug logging helper in a shared location
27
+ - [ ] Add --debug flag parsing in main.go
28
+ - [ ] Instrument key points in board init, file watcher, and update dispatch
29
+ - [ ] Add tests for debug flag behavior
30
+ - [ ] Run `make build && make test`
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: E15-hardening/T004-dist-checksums
3
+ status: planned
4
+ objective: Generate checksums.txt during make dist using Go crypto APIs
5
+ depends_on: []
6
+ ---
7
+
8
+ # T004: Add Distribution Checksums
9
+
10
+ ## Context Files
11
+
12
+ - `internal/buildtool/main.go` — dist() function that creates tar.gz archives
13
+ - `Makefile` — dist target
14
+
15
+ ## Acceptance Criteria
16
+
17
+ - [ ] dist() generates checksums.txt file with SHA256 hashes
18
+ - [ ] checksums.txt is included in the dist directory
19
+ - [ ] Existing archive creation behavior preserved
20
+ - [ ] `go test ./...` passes
21
+
22
+ ## Implementation Plan
23
+
24
+ - [ ] Add SHA256 checksum computation in dist() using crypto/sha256
25
+ - [ ] Write checksums.txt to dist directory
26
+ - [ ] Add tests for checksum generation
27
+ - [ ] Run `make build && make test`
@@ -0,0 +1,28 @@
1
+ ---
2
+ id: E15-hardening/T005-windows-targets
3
+ status: planned
4
+ objective: Add Windows amd64 and arm64 build targets to buildtool
5
+ depends_on: []
6
+ ---
7
+
8
+ # T005: Add Windows Build Targets
9
+
10
+ ## Context Files
11
+
12
+ - `internal/buildtool/main.go` — targets list, build logic, localExecutable
13
+
14
+ ## Acceptance Criteria
15
+
16
+ - [ ] Windows amd64 target added
17
+ - [ ] Windows arm64 target added
18
+ - [ ] .exe suffix handled for Windows binaries
19
+ - [ ] Existing Linux and Darwin targets preserved
20
+ - [ ] `go test ./...` passes
21
+
22
+ ## Implementation Plan
23
+
24
+ - [ ] Add windows-amd64 and windows-arm64 to targets list
25
+ - [ ] Handle .exe suffix in build output path
26
+ - [ ] Update localExecutable to detect Windows
27
+ - [ ] Update tests for new targets
28
+ - [ ] Run `make build && make test`
@@ -0,0 +1,26 @@
1
+ ---
2
+ id: E15-hardening/T006-abbreviation-splitting
3
+ status: planned
4
+ objective: Fix splitChecklistSentences to skip periods preceded by known abbreviations
5
+ depends_on: []
6
+ ---
7
+
8
+ # T006: Fix Abbreviation Handling in Checklist Sentence Splitting
9
+
10
+ ## Context Files
11
+
12
+ - `internal/board/detail.go:88` — splitChecklistSentences function
13
+
14
+ ## Acceptance Criteria
15
+
16
+ - [ ] Known abbreviations (e.g., "e.g.", "i.e.") do not trigger sentence breaks
17
+ - [ ] Existing sentence splitting behavior preserved for non-abbreviation periods
18
+ - [ ] Abbreviation list is configurable/extensible
19
+ - [ ] `go test ./...` passes with no regressions
20
+
21
+ ## Implementation Plan
22
+
23
+ - [ ] Define known abbreviation set
24
+ - [ ] Add abbreviation check before period-based sentence split
25
+ - [ ] Add test cases for abbreviations in sentences
26
+ - [ ] Run `make build && make test`
@@ -0,0 +1,28 @@
1
+ ---
2
+ id: E15-hardening/T007-root-test-allowlist
3
+ status: planned
4
+ objective: Move agent_skills_test.go to a test package and extract audit allowlist to a named constant
5
+ depends_on: []
6
+ ---
7
+
8
+ # T007: Move Root-Level Test and Extract Audit Allowlist
9
+
10
+ ## Context Files
11
+
12
+ - `agent_skills_test.go` — root-level package main test
13
+ - `internal/board/epic_panel.go:116-119` — allowedSections map
14
+
15
+ ## Acceptance Criteria
16
+
17
+ - [ ] agent_skills_test.go moved to cmd_test package (or appropriate location)
18
+ - [ ] allowedSections extracted to a named constant with documentation
19
+ - [ ] All existing tests still pass after refactoring
20
+ - [ ] `go test ./...` passes with no regressions
21
+
22
+ ## Implementation Plan
23
+
24
+ - [ ] Move agent_skills_test.go to an appropriate internal test package
25
+ - [ ] Update imports and paths in moved test
26
+ - [ ] Extract allowedSections map to a named constant
27
+ - [ ] Update any references in epic_panel.go
28
+ - [ ] Run `make build && make test`
@@ -0,0 +1,25 @@
1
+ ---
2
+ id: E06-audit-command/T001-cli-entrypoint
3
+ status: in_progress
4
+ objective: "Create CLI entrypoint for savepoint audit command"
5
+ depends_on: []
6
+ ---
7
+
8
+ # T001: CLI Entrypoint
9
+
10
+ ## Acceptance Criteria
11
+
12
+ - `savepoint audit --help` shows usage: `audit <epic-id|release> [--skip --reason]`
13
+ - `savepoint audit <epic-id>` runs audit for that epic
14
+ - `savepoint audit <release>` runs audit for all unaudited epics in that release
15
+ - `savepoint audit --skip --reason "..."` skips the audit and logs reason
16
+ - Unknown arguments show error and exit non-zero
17
+
18
+ ## Implementation Plan
19
+
20
+ - [x] Add `cmd/audit.go` with CLI argument parsing
21
+ - [x] Wire audit command into main.go
22
+ - [x] Implement arg validation for epic-id (E##) and release (v#.#) formats
23
+ - [x] Add subcommand dispatch to audit workflow
24
+ - [x] Test `savepoint audit --help` output
25
+ - [x] Run `make build && make test`
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: E06-audit-command/T002-quality-gates
3
+ status: done
4
+ objective: "Implement quality gate runner that blocks on failure"
5
+ depends_on: ["E06-audit-command/T001-cli-entrypoint"]
6
+ phase: build
7
+ ---
8
+
9
+ # T002: Quality Gates
10
+
11
+ ## Acceptance Criteria
12
+
13
+ - Reads `quality_gates` from `.savepoint/config.yml`
14
+ - Runs each configured command (lint, typecheck, test)
15
+ - Blocks audit if any gate fails and `block_on_failure: true`
16
+ - Continues if `block_on_failure: false` but logs failure
17
+ - Shows clear output: which gates passed/failed
18
+
19
+ ## Implementation Plan
20
+
21
+ - [x] Add `internal/audit/gates.go`
22
+ - [x] Read config `quality_gates` struct
23
+ - [x] Implement `RunGates(ctx) error` that executes each command
24
+ - [x] Handle null gates (skip if not configured)
25
+ - [x] Add exit code propagation for blocking behavior
26
+ - [x] Test with configured gates in .savepoint/config.yml
27
+ - [x] Run `make build && make test`
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: E06-audit-command/T003-snapshot
3
+ status: planned
4
+ objective: "Generate file tree and changed-files snapshot"
5
+ depends_on: ["E06-audit-command/T002-quality-gates"]
6
+ ---
7
+
8
+ # T003: Snapshot Generation
9
+
10
+ ## Acceptance Criteria
11
+
12
+ - Generates `.savepoint/audit/{release}/{epic}/snapshot.md`
13
+ - Includes file tree (gitignore-respecting)
14
+ - Includes list of changed files (from git)
15
+ - Does NOT include file contents (no code in snapshot)
16
+ - Snapshot path matches expected format
17
+
18
+ ## Implementation Plan
19
+
20
+ - [ ] Add `internal/audit/snapshot.go`
21
+ - [ ] Implement `GenerateSnapshot(epic, release) error`
22
+ - [ ] Walk directory tree respecting .gitignore
23
+ - [ ] Run `git diff --name-only` for changed files
24
+ - [ ] Write snapshot.md with tree + changed-files sections
25
+ - [ ] Create audit directory if not exists
26
+ - [ ] Test snapshot output format
27
+ - [ ] Run `make build && make test`
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: E06-audit-command/T004-ai-reconcile
3
+ status: planned
4
+ objective: "Generate AI prompt for semantic review, parse findings"
5
+ depends_on: ["E06-audit-command/T003-snapshot"]
6
+ ---
7
+
8
+ # T004: AI Reconcile (Semantic Review)
9
+
10
+ ## Acceptance Criteria
11
+
12
+ - Generates a prompt file for human to give to their AI
13
+ - Prompt includes: snapshot, epic E##-Detail.md, changed files list, AGENTS.md Code Style rules
14
+ - Prompt instructs AI to check against 10 Code Style rules
15
+ - After human runs AI, parses findings for "Must Fix Before Close" section
16
+ - Fails audit if "Must Fix Before Close" has any items
17
+
18
+ ## Implementation Plan
19
+
20
+ - [ ] Add `internal/audit/reconcile.go`
21
+ - [ ] Implement `GeneratePrompt(epic, release) (string, error)`
22
+ - [ ] Embed 10 Code Style rules in prompt template
23
+ - [ ] Include snapshot.md content in prompt
24
+ - [ ] Include epic E##-Detail.md in prompt
25
+ - [ ] Include changed files list in prompt
26
+ - [ ] Implement `ParseFindings(output) (hasIssues bool, err)`
27
+ - [ ] Check for "Must Fix Before Close" header and non-empty content
28
+ - [ ] Test prompt generation and finding parsing
29
+ - [ ] Run `make build && make test`
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: E06-audit-command/T006-tui-review
3
+ status: planned
4
+ objective: "Implement TUI review mode for approving/rejecting proposals"
5
+ depends_on: ["E06-audit-command/T005-proposals"]
6
+ ---
7
+
8
+ # T006: TUI Review Mode
9
+
10
+ ## Acceptance Criteria
11
+
12
+ - Shows each proposal as a side-by-side diff (old vs new)
13
+ - User can Approve, Reject, or Edit each proposal
14
+ - Edit opens inline editor to modify the "With" section
15
+ - High-divergence warning if proposal changes >50% of file
16
+ - Shows progress: X of Y proposals reviewed
17
+ - Keyboard: arrow nav, Enter approve, Backspace reject, e edit, q quit
18
+
19
+ ## Implementation Plan
20
+
21
+ - [ ] Add `internal/audit/review.go` with Bubble Tea model
22
+ - [ ] Create `ReviewModel` with proposals, current index, decisions
23
+ - [ ] Implement `RenderProposal` showing old/new side-by-side
24
+ - [ ] Add keyboard handlers: Up/Down (nav), Enter (approve), Backspace (reject), e (edit)
25
+ - [ ] Implement edit mode: text area for "With" content
26
+ - [ ] Add high-divergence check (config threshold from config.yml)
27
+ - [ ] Show progress bar: "Proposal 1 of 5"
28
+ - [ ] Track decisions: approved/rejected/edited map
29
+ - [ ] Return decisions to caller for apply step
30
+ - [ ] Test review flow manually
31
+ - [ ] Run `make build && make test`
@@ -0,0 +1,34 @@
1
+ ---
2
+ id: E06-audit-command/T008-skip-handling
3
+ status: planned
4
+ objective: "Implement audit skip with logging"
5
+ depends_on: ["E06-audit-command/T001-cli-entrypoint"]
6
+ ---
7
+
8
+ # T008: Skip Handling
9
+
10
+ ## Acceptance Criteria
11
+
12
+ - `--skip --reason "..."` flags are required together
13
+ - Missing reason shows error
14
+ - Skipped audit logged to `.savepoint/audit-log.md`
15
+ - Log entry includes: timestamp, epic, release, reason, skipped-by
16
+ - Skipped epic still advances router (no changes to docs)
17
+
18
+ ## Implementation Plan
19
+
20
+ - [ ] Add `internal/audit/log.go`
21
+ - [ ] Implement `LogSkip(epic, release, reason) error`
22
+ - [ ] Parse existing audit-log.md or create new
23
+ - [ ] Append new entry in format:
24
+ ```markdown
25
+ ## {timestamp}
26
+
27
+ - **Epic:** {epic}
28
+ - **Release:** {release}
29
+ - **Reason:** {user reason}
30
+ - **Status:** ⚠ skipped
31
+ ```
32
+ - [ ] Update router to advance past skipped epic
33
+ - [ ] Test skip flow with valid/invalid args
34
+ - [ ] Run `make build && make test`
@@ -42,22 +42,82 @@ v1.1 is the "love what you look at" release. It takes the functional board from
42
42
  - Existing `E` key dropdown retained
43
43
  - 2 tasks planned
44
44
 
45
- 5. **Tasking Permissions & Router Updates (E05)** *Not started*
45
+ 5. **Tasking Permissions & Router Updates (E05)** *Audited and complete*
46
46
  - Agents can only set `status: in_progress`; user alone sets `done` or retreats
47
- - New TUI `m` hotkey explicitly updates router to the focused task
48
- - Router update decoupled from navigation — browse without side effects
49
- - Last task in epic detected router shows `audit-pending`
47
+ - New TUI `p` priority hotkey explicitly updates router to the focused non-done task
48
+ - Router task priority decoupled from navigation — browse without side effects
49
+ - Priority writes keep router in `task-building`; audit handoff remains explicit
50
+ - All 6 tasks done
51
+
52
+ 6. **Audit Command (E06)** — *Planned*
53
+ - `savepoint audit <epic-id|release>` runs full pipeline
54
+ - Quality gates block on failure
55
+ - AI semantic review checks 10 Code Style rules — blocks if "Must Fix Before Close" has items
56
+ - TUI review mode for approving/rejecting proposals
57
+ - Updates Design.md last_audited, marks epic status: audited
58
+ - 9 tasks planned
59
+
60
+ 7. **Init Command (E07)** — *Planned*
61
+ - `savepoint init [dir] [--force] [--install]` scaffolds .savepoint/
62
+ - Target validation (empty/compatible/already-initialized)
63
+ - Template-based scaffold with project name interpolation
64
+ - Magic prompt output to stdout + clipboard
65
+ - Best-effort clipboard (doesn't fail on error)
66
+ - 7 tasks planned
67
+
68
+ 8. **Board Command (E08)** — *Planned*
69
+ - `savepoint board [--release <release>] [--epic <epic>]` launches TUI
70
+ - `savepoint` (no args) defaults to board
71
+ - Bubble Tea TUI with 3-column Kanban
72
+ - Detail pane for selected task
73
+ - Keyboard navigation (arrows, vim-style j/k/h/l)
74
+ - Status transitions with gate enforcement
75
+ - Non-TTY plain table fallback
76
+ - 8 tasks planned
77
+
78
+ 9. **Doctor Command (E09)** — *Planned*
79
+ - `savepoint doctor [--epic <epic>]` runs diagnostics
80
+ - Config, router, structure, YAML validation
81
+ - Dependency checks (missing deps, cycles, duplicates)
82
+ - Audit state and orphan detection
83
+ - Ad-hoc quality gate runner
84
+ - Human-readable diagnostic output with repair suggestions
85
+ - Exit codes: 0=clean, 1=problems, 2=error
50
86
  - 6 tasks planned
51
87
 
88
+ 10. **Task File Validation & Auto-Fix (E12)** — *In Progress*
89
+ - Default `phase: build` when `status=in_progress` but phase missing
90
+ - Default `status: planned` when both status and column missing
91
+ - Better error hints with suggested fixes
92
+ - Validate on write with helpful messages
93
+
94
+ 11. **Codebase Audit Remediation (E13)** — *In Progress*
95
+ - Fix cycle detection bug producing inaccurate error paths
96
+ - Remove dead code, stdlib reimplementations, hardcoded state maps
97
+ - Centralize duplicated logic (normalization, frontmatter extraction, shared utilities)
98
+ - Fix AtomicWrite cross-device fallback and config accent defaults
99
+ - Add quality gate timeout
100
+ - Remove committed binaries, add gitignore and linter config
101
+ - Decompose `update.go` monolith into focused handlers
102
+ - Extract synchronous I/O from `Update()` into `tea.Cmd` async pattern
103
+ - Add test coverage for untested packages
104
+ - 7 tasks planned
105
+
52
106
  ## Epic breakdown
53
107
 
54
108
  | # | Epic | Status | Tasks |
55
109
  |---|------|--------|-------|
56
110
  | 01 | TUI Optimisation | Audited | 7/7 done |
57
- | 02 | Cross-Platform Compatibility | Planned | 0/4 done |
111
+ | 02 | Cross-Platform Compatibility | Audited | 4/4 done |
58
112
  | 03 | UI Visual Refinement | Planned | 0/4 done |
59
- | 04 | Epic Navigation | Designing | 0/2 done |
60
- | 05 | Tasking Permissions & Router Updates | Planned | 0/6 done |
113
+ | 04 | Epic Navigation | Audited | 2/2 done |
114
+ | 05 | Tasking Permissions & Router Updates | Audited | 6/6 done |
115
+ | 06 | Audit Command | Planned | 0/9 done |
116
+ | 07 | Init Command | Planned | 0/7 done |
117
+ | 08 | Board Command | Planned | 0/8 done |
118
+ | 09 | Doctor Command | Planned | 0/6 done |
119
+ | 10 | Task File Validation & Auto-Fix | In Progress | 5/5 done |
120
+ | 13 | Codebase Audit Remediation | In Progress | 0/7 done |
61
121
 
62
122
  ## Success criteria
63
123
 
@@ -14,9 +14,9 @@ Read `.savepoint/PRD.md` only for vision changes. Read `.savepoint/Design.md` on
14
14
  ```yaml
15
15
  state: task-building
16
16
  release: v1.1
17
- epic: E05-tasking-permissions
18
- task: E05-tasking-permissions/T005-update-help-overlay
19
- next_action: Build E05-tasking-permissions/T005-update-help-overlay.
17
+ epic: E14
18
+ task: E15-hardening/T001-benchmarks
19
+ next_action: Build E15-hardening/T001-benchmarks.
20
20
  ```
21
21
 
22
22
  ## State → action
@@ -39,26 +39,19 @@ Epic exists, tasks missing.
39
39
 
40
40
  **Next:** 1) Re-read epic, 2) Create task files at `tasks/TNNN-slug.md` with `status: planned`, `objective`, `depends_on`, 3) Add `## Implementation Plan` checkboxes per task. When all planned → first unblocked task.
41
41
 
42
- ### task-planning
43
-
44
- Reserved for repair/late tasks.
45
-
46
- **Next:** Write implementation plan, set `status: planned`, stop.
47
-
48
42
  ### task-building
49
43
 
50
44
  Task `in_progress`, depends satisfied.
51
45
 
52
- **Next:** Execute plan, tick checkboxes, run quality gates, set `status: done`, update router to next task or `audit-pending`. Stop.
46
+ **Next:** When starting work, set task `status: in_progress` and press `p` in TUI to mark the focused task as router priority. Execute plan, tick checkboxes, run quality gates, update router to next task or `audit-pending`. Stop.
53
47
 
54
48
  ### audit-pending
55
49
 
56
50
  Epic complete, needs audit before next epic.
57
51
 
58
- **Next:** Read snapshot + epic E##-Detail.md + changed files. Write proposals to `.savepoint/audit/{release}/{E##-epic}/proposals.md`:
59
- - Design.md delta
60
- - AGENTS.md Codebase Map refresh
61
- - Epic detail "implemented as" notes
62
- - Quality review against Code Style rules
52
+ **Next:** Fresh audit agent reads epic E##-Detail.md, task files, drift notes, Design.md, AGENTS.md, and scoped changed files. Write one audit file to `.savepoint/releases/{release}/epics/{E##-epic}/E##-Audit.md`:
53
+ - `## Main Findings` user-facing narrative only
54
+ - `## Code Style Review` checklist against AGENTS.md rules
55
+ - `## Proposed Changes` admin/apply blocks using `### Target File`, `### Replace`, `### With`
63
56
 
64
- After user approves: apply proposals, mark epic `status: audited`, update Design.md `last_audited`, advance router.
57
+ After user approves: apply proposals, mark epic `status: audited`, update Design.md `last_audited`, advance router.
package/AGENTS.md CHANGED
@@ -16,25 +16,29 @@
16
16
  | task-building | savepoint-build-task |
17
17
  | audit-pending | savepoint-audit |
18
18
 
19
- Use `skill` tool.
19
+ Use the `skill` tool when the listed skill is available. If the agent says the skill is not found, read `agent-skills/{skill}/SKILL.md` directly and follow it as the active skill.
20
20
 
21
21
  Read `.savepoint/PRD.md` only for vision changes, `.savepoint/Design.md` only for architecture/audit.
22
22
 
23
23
  ## Task Status
24
24
 
25
25
  - `status`: only `planned`, `in_progress`, or `done`
26
- - `phase` (build/test/audit): only when `status: in_progress`
26
+ - `stage` (build/test/audit): **required** when `status: in_progress` — omitting it is a parse error
27
27
  - Never: todo, doing, blocked, review, audit
28
+ - Agents may set a task to `status: in_progress` when starting implementation.
29
+ - Only the user may set a task to `status: done` or retreat a task to an earlier status.
28
30
 
29
31
  ## Implementation
30
32
 
31
- 1. Read task's `## Acceptance Criteria` + `## Implementation Plan`
32
- 2. Execute in order, tick checkboxes
33
- 3. Verify every AC has passing test/outcome
34
- 4. Run quality gates (build + test)
35
- 5. Update task: tick boxes, fill `## Context Log`, set `status: done`
36
- 6. Update router.md: next task or `audit-pending`
37
- 7. **Stop. Prompt user before continuing.**
33
+ 1. Read task's `## Context Files` using `Read` tool — one call per file, no explore, no glob
34
+ 2. Read task's `## Acceptance Criteria` + `## Implementation Plan`
35
+ 3. When starting implementation, set task frontmatter to `status: in_progress` + `stage: build` (both required together)
36
+ 4. After setting `in_progress`, press `p` in the TUI to mark the focused task as router priority
37
+ 5. Execute in order, tick checkboxes
38
+ 6. Verify every AC has passing test/outcome
39
+ 7. Run quality gates (build + test)
40
+ 8. Update router.md: next task or `audit-pending`
41
+ 9. **Stop. Prompt user before continuing.**
38
42
 
39
43
  ## Drift Check
40
44
 
@@ -47,18 +51,26 @@ If yes → append `## Drift Notes` to task file.
47
51
 
48
52
  The agent that builds an epic **must not audit it**. Start a fresh session.
49
53
 
54
+ ## Audit File Structure
55
+
56
+ - Audit is agent-led via `savepoint-audit`, not a `savepoint audit` CLI pipeline.
57
+ - Write exactly one `.savepoint/releases/{release}/epics/{E##-slug}/E##-Audit.md`.
58
+ - The TUI Audit tab renders `## Main Findings` and `## Code Style Review` only.
59
+ - Keep file-specific `### Target File` / `### Replace` / `### With` blocks under `## Proposed Changes` so admin apply details do not appear in the Epic Detail panel.
60
+ - During audit apply/close, update the same `E##-Audit.md` visible sections so `## Main Findings` and `## Code Style Review` describe the applied outcome, not stale pre-apply blockers.
61
+
50
62
  ## Code Style
51
63
 
52
- 1. One job per file
53
- 2. One-sentence functions
54
- 3. Test branches
55
- 4. Types are documentation
56
- 5. Build, don't speculate
57
- 6. Errors at boundaries
58
- 7. One source of truth
59
- 8. Comments explain WHY
60
- 9. Content in data files
61
- 10. Small diffs
64
+ - **One job per file** — split files when responsibilities mix.
65
+ - **One job per function** — small, named, testable units.
66
+ - **Test branches** — cover meaningful conditionals and edge cases.
67
+ - **Types document intent** — prefer explicit types over comments.
68
+ - **Build only what is needed** — no speculative abstractions.
69
+ - **Handle errors at boundaries** — validate inputs, APIs, IO, and external data.
70
+ - **One source of truth** — no duplicated rules, constants, state, or config.
71
+ - **Comments explain why** — not what the code already says.
72
+ - **Content lives in data** — keep copy/config out of logic.
73
+ - **Small diffs** — minimal, reviewable, behaviour-preserving changes.
62
74
 
63
75
  ## Build
64
76
 
@@ -71,14 +83,17 @@ make build && make test
71
83
  | Module | Purpose |
72
84
  |--------|---------|
73
85
  | `main.go` | CLI entrypoint, --version |
74
- | `internal/board/` | TUI board, overlays, epic sidebar, status glyphs |
86
+ | `cmd/` | CLI command arg parsing and dispatch for init, board, and doctor |
87
+ | `internal/init/` | Target validation, scaffold writing from templates |
88
+ | `internal/board/` | TUI board, overlays, epic sidebar, Next Activity line, router priority key, detail checklist rendering, status glyphs, forced color profile, async update I/O commands, shared board utilities |
75
89
  | `internal/buildtool/` | Makefile helper, cross-compile, archives |
76
- | `internal/data/` | Task/router models, frontmatter parsing, discovery |
90
+ | `internal/doctor/` | Read-only project diagnostics, integrity checks, timed quality gate execution, report formatting, typed repair suggestions |
91
+ | `internal/data/` | Task/router models, frontmatter parsing/splitting, lifecycle validation/defaulting, discovery including root-dir traversal, unified task status constants, canonical write helpers |
92
+ | `internal/testutil/` | Shared Go test fixtures and filesystem helpers for internal package tests |
77
93
  | `internal/styles/` | Atari-Noir palette, TUI styles |
78
- | `cmd/` | CLI subcommands |
79
94
  | `templates/` | Scaffold markdown, YAML, prompts |
80
95
  | `agent-skills/` | Phase-specific skill guides |
81
96
 
82
97
  ## CLI Rules
83
98
 
84
- **Never run `savepoint` commands.** The CLI is for the human. Edit files directly.
99
+ **Never run `savepoint` commands.** The CLI is for the human. Edit files directly.
package/README.md CHANGED
@@ -61,7 +61,6 @@ Built for a cinematic, technical feel without the bloat.
61
61
  | :----------------- | :--------------------------------------------------------------------------------------------------- |
62
62
  | `savepoint init` | Scaffold the loop, write your `AGENTS.md` guide, drop the baby gates, and generate the magic prompt. |
63
63
  | `savepoint board` | Launch the Atari-Noir Kanban TUI to track the vibe. |
64
- | `savepoint audit` | Stop the AI. Sync the map with the territory. |
65
64
  | `savepoint doctor` | Check the integrity of the state machine. |
66
65
 
67
66
  ---