savepoint 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/.claude/settings.local.json +20 -0
  2. package/.prettierignore +4 -0
  3. package/.savepoint/Design.md +196 -0
  4. package/.savepoint/PRD.md +58 -0
  5. package/.savepoint/audit/E01-go-setup/proposals.md +166 -0
  6. package/.savepoint/audit/E01-go-setup/snapshot.md +71 -0
  7. package/.savepoint/audit/E01-scaffolding/proposals/AGENTS.md +66 -0
  8. package/.savepoint/audit/E01-scaffolding/proposals/Design.md +210 -0
  9. package/.savepoint/audit/E01-scaffolding/proposals/epic-Design.md +117 -0
  10. package/.savepoint/audit/E01-scaffolding/proposals/quality-review.md +101 -0
  11. package/.savepoint/audit/E01-scaffolding/snapshot.md +54 -0
  12. package/.savepoint/audit/E02-data-model/snapshot.md +128 -0
  13. package/.savepoint/audit/E02-data-readers/proposals.md +123 -0
  14. package/.savepoint/audit/E02-data-readers/snapshot.md +54 -0
  15. package/.savepoint/audit/E03-board-tui-core/proposals.md +146 -0
  16. package/.savepoint/audit/E03-board-tui-core/snapshot.md +57 -0
  17. package/.savepoint/audit/E03-cli-foundation/snapshot.md +106 -0
  18. package/.savepoint/audit/E04-board-components/proposals.md +118 -0
  19. package/.savepoint/audit/E04-board-components/snapshot.md +77 -0
  20. package/.savepoint/audit/E04-templates-and-prompts/snapshot.md +115 -0
  21. package/.savepoint/audit/E05-init-command/snapshot.md +125 -0
  22. package/.savepoint/audit/E05-phase-transitions/proposals.md +83 -0
  23. package/.savepoint/audit/E05-phase-transitions/snapshot.md +36 -0
  24. package/.savepoint/audit/E06-tui-board/snapshot.md +64 -0
  25. package/.savepoint/audit/E07-audit-pipeline/snapshot.md +165 -0
  26. package/.savepoint/audit/E08-board-workflow-cleanup/snapshot.md +65 -0
  27. package/.savepoint/config.yml +27 -0
  28. package/.savepoint/releases/v1/PRD.md +66 -0
  29. package/.savepoint/releases/v1/epics/E01-go-setup/Design.md +39 -0
  30. package/.savepoint/releases/v1/epics/E01-go-setup/tasks/T001-init-module.md +42 -0
  31. package/.savepoint/releases/v1/epics/E01-go-setup/tasks/T002-entrypoint.md +23 -0
  32. package/.savepoint/releases/v1/epics/E01-go-setup/tasks/T003-directory-structure.md +24 -0
  33. package/.savepoint/releases/v1/epics/E01-go-setup/tasks/T004-makefile.md +23 -0
  34. package/.savepoint/releases/v1/epics/E02-data-readers/Design.md +61 -0
  35. package/.savepoint/releases/v1/epics/E02-data-readers/tasks/T001-task-struct.md +29 -0
  36. package/.savepoint/releases/v1/epics/E02-data-readers/tasks/T002-frontmatter-parser.md +30 -0
  37. package/.savepoint/releases/v1/epics/E02-data-readers/tasks/T003-router-reader.md +29 -0
  38. package/.savepoint/releases/v1/epics/E02-data-readers/tasks/T004-config-reader.md +29 -0
  39. package/.savepoint/releases/v1/epics/E02-data-readers/tasks/T005-discovery.md +30 -0
  40. package/.savepoint/releases/v1/epics/E03-board-tui-core/Design.md +38 -0
  41. package/.savepoint/releases/v1/epics/E03-board-tui-core/tasks/T001-model.md +29 -0
  42. package/.savepoint/releases/v1/epics/E03-board-tui-core/tasks/T002-update-loop.md +30 -0
  43. package/.savepoint/releases/v1/epics/E03-board-tui-core/tasks/T003-view.md +34 -0
  44. package/.savepoint/releases/v1/epics/E03-board-tui-core/tasks/T004-styles.md +29 -0
  45. package/.savepoint/releases/v1/epics/E03-board-tui-core/tasks/T005-layout.md +42 -0
  46. package/.savepoint/releases/v1/epics/E04-board-components/Design.md +44 -0
  47. package/.savepoint/releases/v1/epics/E04-board-components/tasks/T001-column.md +34 -0
  48. package/.savepoint/releases/v1/epics/E04-board-components/tasks/T002-card.md +33 -0
  49. package/.savepoint/releases/v1/epics/E04-board-components/tasks/T003-epic-panel.md +49 -0
  50. package/.savepoint/releases/v1/epics/E04-board-components/tasks/T004-detail-overlay.md +40 -0
  51. package/.savepoint/releases/v1/epics/E04-board-components/tasks/T005-release-dropdown.md +33 -0
  52. package/.savepoint/releases/v1/epics/E04-board-components/tasks/T006-help-overlay.md +34 -0
  53. package/.savepoint/releases/v1/epics/E05-phase-transitions/Design.md +38 -0
  54. package/.savepoint/releases/v1/epics/E05-phase-transitions/tasks/T001-phase-stepping.md +29 -0
  55. package/.savepoint/releases/v1/epics/E05-phase-transitions/tasks/T002-gates.md +31 -0
  56. package/.savepoint/releases/v1/epics/E05-phase-transitions/tasks/T003-write-task.md +31 -0
  57. package/.savepoint/releases/v1/epics/E05-phase-transitions/tasks/T004-write-router.md +31 -0
  58. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/Design.md +42 -0
  59. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T001-color-system.md +39 -0
  60. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T002-header-and-dividers.md +52 -0
  61. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T003-footer-status-bar.md +52 -0
  62. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T004-component-refinement.md +53 -0
  63. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T005-restore-nav-hints.md +39 -0
  64. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T007-detail-card-fixes.md +36 -0
  65. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T008-checkbox-states.md +38 -0
  66. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T009-router-priority-marker.md +41 -0
  67. package/.savepoint/releases/v1/epics/E06-atari-noir-layout/tasks/T010-auto-refresh-watcher.md +61 -0
  68. package/.savepoint/releases/v1/epics/_archived/E01-archive-and-reset/Design.md +39 -0
  69. package/.savepoint/releases/v1/epics/_archived/E01-archive-and-reset/tasks/T001-archive-epics.md +20 -0
  70. package/.savepoint/releases/v1/epics/_archived/E01-archive-and-reset/tasks/T002-rewrite-prd.md +22 -0
  71. package/.savepoint/releases/v1/epics/_archived/E01-archive-and-reset/tasks/T003-create-epic-stubs.md +24 -0
  72. package/.savepoint/releases/v1/epics/_archived/E01-archive-and-reset/tasks/T004-update-router.md +22 -0
  73. package/.savepoint/releases/v1/epics/_archived/E01-scaffolding/Design.md +118 -0
  74. package/.savepoint/releases/v1/epics/_archived/E01-scaffolding/handoff.md +9 -0
  75. package/.savepoint/releases/v1/epics/_archived/E01-scaffolding/tasks/T001-package-baseline.md +45 -0
  76. package/.savepoint/releases/v1/epics/_archived/E01-scaffolding/tasks/T002-typescript-build.md +48 -0
  77. package/.savepoint/releases/v1/epics/_archived/E01-scaffolding/tasks/T003-vitest-smoke.md +43 -0
  78. package/.savepoint/releases/v1/epics/_archived/E01-scaffolding/tasks/T004-lint-format-gates.md +45 -0
  79. package/.savepoint/releases/v1/epics/_archived/E01-scaffolding/tasks/T005-scaffold-verification.md +40 -0
  80. package/.savepoint/releases/v1/epics/_archived/E02-data-model/Design.md +142 -0
  81. package/.savepoint/releases/v1/epics/_archived/E02-data-model/tasks/T001-domain-ids-status.md +27 -0
  82. package/.savepoint/releases/v1/epics/_archived/E02-data-model/tasks/T002-markdown-frontmatter-boundary.md +28 -0
  83. package/.savepoint/releases/v1/epics/_archived/E02-data-model/tasks/T003-task-documents.md +29 -0
  84. package/.savepoint/releases/v1/epics/_archived/E02-data-model/tasks/T004-release-epic-router-config-readers.md +30 -0
  85. package/.savepoint/releases/v1/epics/_archived/E02-data-model/tasks/T005-dependency-validation.md +29 -0
  86. package/.savepoint/releases/v1/epics/_archived/E02-data-model/tasks/T006-epic-task-set-reader.md +29 -0
  87. package/.savepoint/releases/v1/epics/_archived/E02-data-model/tasks/T007-quality-gates.md +31 -0
  88. package/.savepoint/releases/v1/epics/_archived/E02-domain-phase-model/Design.md +40 -0
  89. package/.savepoint/releases/v1/epics/_archived/E02-domain-phase-model/tasks/T001-phase-types.md +27 -0
  90. package/.savepoint/releases/v1/epics/_archived/E02-domain-phase-model/tasks/T002-phase-frontmatter.md +25 -0
  91. package/.savepoint/releases/v1/epics/_archived/E02-domain-phase-model/tasks/T003-simplify-config.md +26 -0
  92. package/.savepoint/releases/v1/epics/_archived/E02-domain-phase-model/tasks/T004-simplify-router-domain.md +24 -0
  93. package/.savepoint/releases/v1/epics/_archived/E03-cli-foundation/Design.md +122 -0
  94. package/.savepoint/releases/v1/epics/_archived/E03-cli-foundation/tasks/T001-argument-parser-contract.md +28 -0
  95. package/.savepoint/releases/v1/epics/_archived/E03-cli-foundation/tasks/T002-help-text-generation.md +28 -0
  96. package/.savepoint/releases/v1/epics/_archived/E03-cli-foundation/tasks/T003-terminal-environment-detection.md +27 -0
  97. package/.savepoint/releases/v1/epics/_archived/E03-cli-foundation/tasks/T004-command-stub-modules.md +29 -0
  98. package/.savepoint/releases/v1/epics/_archived/E03-cli-foundation/tasks/T005-cli-runner-dispatch.md +34 -0
  99. package/.savepoint/releases/v1/epics/_archived/E03-cli-foundation/tasks/T006-entrypoint-quality-gates.md +32 -0
  100. package/.savepoint/releases/v1/epics/_archived/E03-cli-simplify/Design.md +43 -0
  101. package/.savepoint/releases/v1/epics/_archived/E03-cli-simplify/tasks/T001-strip-args.md +26 -0
  102. package/.savepoint/releases/v1/epics/_archived/E03-cli-simplify/tasks/T002-strip-help.md +23 -0
  103. package/.savepoint/releases/v1/epics/_archived/E03-cli-simplify/tasks/T003-strip-run.md +23 -0
  104. package/.savepoint/releases/v1/epics/_archived/E03-cli-simplify/tasks/T004-delete-commands.md +24 -0
  105. package/.savepoint/releases/v1/epics/_archived/E03-cli-simplify/tasks/T005-update-cli-tests.md +22 -0
  106. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/Design.md +48 -0
  107. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T001-board-data-phases.md +26 -0
  108. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T002-phase-rendering.md +28 -0
  109. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T003-detail-pane-phases.md +27 -0
  110. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T004-phase-transitions.md +42 -0
  111. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T005-phase-gates.md +24 -0
  112. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T006-phase-write-back.md +24 -0
  113. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T007-remove-audit-flow.md +27 -0
  114. package/.savepoint/releases/v1/epics/_archived/E04-board-phase-integration/tasks/T008-board-tests.md +25 -0
  115. package/.savepoint/releases/v1/epics/_archived/E04-templates-and-prompts/Design.md +85 -0
  116. package/.savepoint/releases/v1/epics/_archived/E04-templates-and-prompts/tasks/T001-project-template-assets.md +17 -0
  117. package/.savepoint/releases/v1/epics/_archived/E04-templates-and-prompts/tasks/T002-release-and-prompt-assets.md +20 -0
  118. package/.savepoint/releases/v1/epics/_archived/E04-templates-and-prompts/tasks/T003-template-registry-renderer.md +22 -0
  119. package/.savepoint/releases/v1/epics/_archived/E04-templates-and-prompts/tasks/T004-template-integrity-tests.md +17 -0
  120. package/.savepoint/releases/v1/epics/_archived/E04-templates-and-prompts/tasks/T005-template-closeout-quality-gates.md +16 -0
  121. package/.savepoint/releases/v1/epics/_archived/E05-init-command/Design.md +88 -0
  122. package/.savepoint/releases/v1/epics/_archived/E05-init-command/tasks/T001-init-cli-contract.md +22 -0
  123. package/.savepoint/releases/v1/epics/_archived/E05-init-command/tasks/T002-target-validation.md +23 -0
  124. package/.savepoint/releases/v1/epics/_archived/E05-init-command/tasks/T003-scaffold-writer.md +24 -0
  125. package/.savepoint/releases/v1/epics/_archived/E05-init-command/tasks/T004-magic-prompt-and-clipboard.md +23 -0
  126. package/.savepoint/releases/v1/epics/_archived/E05-init-command/tasks/T005-dev-deps-install-option.md +24 -0
  127. package/.savepoint/releases/v1/epics/_archived/E05-init-command/tasks/T006-init-command-integration.md +28 -0
  128. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/Design.md +53 -0
  129. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/tasks/T001-delete-dead-src.md +23 -0
  130. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/tasks/T002-delete-dead-tests.md +26 -0
  131. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/tasks/T003-delete-assets.md +25 -0
  132. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/tasks/T004-clean-savepoint.md +28 -0
  133. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/tasks/T005-rewrite-agents-md.md +28 -0
  134. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/tasks/T006-clean-package-json.md +23 -0
  135. package/.savepoint/releases/v1/epics/_archived/E05-project-cleanup/tasks/T007-verify.md +25 -0
  136. package/.savepoint/releases/v1/epics/_archived/E06-tui-board/Design.md +104 -0
  137. package/.savepoint/releases/v1/epics/_archived/E06-tui-board/tasks/T001-board-command-data.md +23 -0
  138. package/.savepoint/releases/v1/epics/_archived/E06-tui-board/tasks/T002-board-view-state.md +24 -0
  139. package/.savepoint/releases/v1/epics/_archived/E06-tui-board/tasks/T003-transition-gates-and-writes.md +25 -0
  140. package/.savepoint/releases/v1/epics/_archived/E06-tui-board/tasks/T004-terminal-theme.md +23 -0
  141. package/.savepoint/releases/v1/epics/_archived/E06-tui-board/tasks/T005-ink-board-ui.md +26 -0
  142. package/.savepoint/releases/v1/epics/_archived/E06-tui-board/tasks/T006-board-integration-audit-entry.md +24 -0
  143. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/Design.md +88 -0
  144. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T001-audit-cli-contract.md +23 -0
  145. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T002-quality-gate-runner.md +23 -0
  146. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T003-snapshot-and-prompt.md +23 -0
  147. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T004-audit-orchestration-router.md +27 -0
  148. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T005-proposal-validation-apply.md +25 -0
  149. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T006-audit-review-state.md +24 -0
  150. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T007-audit-review-ui.md +26 -0
  151. package/.savepoint/releases/v1/epics/_archived/E07-audit-pipeline/tasks/T008-audit-pipeline-integration.md +24 -0
  152. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/Design.md +103 -0
  153. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T001-acceptance-criteria-model.md +30 -0
  154. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T002-release-task-set-reader.md +33 -0
  155. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T003-board-data-and-plain-output.md +34 -0
  156. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T004-board-selection-state.md +33 -0
  157. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T005-ink-board-layout-cleanup.md +37 -0
  158. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T006-task-detail-popup.md +36 -0
  159. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T007-templates-acceptance-criteria.md +34 -0
  160. package/.savepoint/releases/v1/epics/_archived/E08-board-workflow-cleanup/tasks/T008-board-workflow-integration.md +41 -0
  161. package/.savepoint/releases/v1/epics/_archived/E09-doctor-command/Design.md +70 -0
  162. package/.savepoint/releases/v1/epics/_archived/E10-docs-and-packaging/Design.md +68 -0
  163. package/.savepoint/releases/v1/epics/_archived/E11-release-validation/Design.md +68 -0
  164. package/.savepoint/releases/v1.1/epics/E01-tui-optimisation/Design.md +26 -0
  165. package/.savepoint/releases/v1.1/epics/E01-tui-optimisation/tasks/T001-border-resize-fix.md +35 -0
  166. package/.savepoint/router.md +136 -0
  167. package/.savepoint/visual-identity.md +124 -0
  168. package/AGENTS.md +141 -0
  169. package/CLAUDE.md +1 -0
  170. package/GEMINI.md +1 -0
  171. package/LICENSE +21 -0
  172. package/Makefile +13 -0
  173. package/README.md +78 -0
  174. package/agent-skills/ink-tui-design/SKILL.md +309 -0
  175. package/agent-skills/ink-tui-design/references/component-patterns.md +371 -0
  176. package/agent-skills/ink-tui-design/references/hooks-guide.md +436 -0
  177. package/agent-skills/ink-tui-design/references/ink-gotchas.md +330 -0
  178. package/agent-skills/ink-tui-design/references/testing-patterns.md +384 -0
  179. package/agent-skills/savepoint-audit/SKILL.md +35 -0
  180. package/agent-skills/savepoint-build-task/SKILL.md +39 -0
  181. package/agent-skills/savepoint-create-plan/SKILL.md +28 -0
  182. package/agent-skills/savepoint-create-task/SKILL.md +31 -0
  183. package/agent-skills/savepoint-draft-prd/SKILL.md +32 -0
  184. package/agent-skills/savepoint-system-design/SKILL.md +33 -0
  185. package/agent-skills/superpowers/brainstorming/SKILL.md +165 -0
  186. package/agent-skills/superpowers/brainstorming/visual-companion.md +304 -0
  187. package/agent-skills/superpowers/dispatching-parallel-agents/SKILL.md +193 -0
  188. package/agent-skills/superpowers/executing-plans/SKILL.md +77 -0
  189. package/agent-skills/superpowers/finishing-a-development-branch/SKILL.md +213 -0
  190. package/agent-skills/superpowers/receiving-code-review/SKILL.md +226 -0
  191. package/agent-skills/superpowers/requesting-code-review/SKILL.md +115 -0
  192. package/agent-skills/superpowers/requesting-code-review/code-reviewer.md +160 -0
  193. package/agent-skills/superpowers/subagent-driven-development/SKILL.md +292 -0
  194. package/agent-skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +27 -0
  195. package/agent-skills/superpowers/subagent-driven-development/implementer-prompt.md +113 -0
  196. package/agent-skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  197. package/agent-skills/superpowers/systematic-debugging/SKILL.md +305 -0
  198. package/agent-skills/superpowers/systematic-debugging/condition-based-waiting.md +122 -0
  199. package/agent-skills/superpowers/systematic-debugging/defense-in-depth.md +130 -0
  200. package/agent-skills/superpowers/systematic-debugging/root-cause-tracing.md +183 -0
  201. package/agent-skills/superpowers/test-driven-development/SKILL.md +389 -0
  202. package/agent-skills/superpowers/test-driven-development/testing-anti-patterns.md +317 -0
  203. package/agent-skills/superpowers/verification-before-completion/SKILL.md +147 -0
  204. package/agent-skills/superpowers/writing-plans/SKILL.md +159 -0
  205. package/agent-skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
  206. package/assets/banner.png +0 -0
  207. package/assets/logo.png +0 -0
  208. package/assets/strawman.png +0 -0
  209. package/go.mod +33 -0
  210. package/go.sum +73 -0
  211. package/ink-cli-ui-design.zip +0 -0
  212. package/internal/board/board.go +121 -0
  213. package/internal/board/board_test.go +99 -0
  214. package/internal/board/card.go +72 -0
  215. package/internal/board/card_test.go +111 -0
  216. package/internal/board/column.go +61 -0
  217. package/internal/board/column_test.go +81 -0
  218. package/internal/board/detail.go +140 -0
  219. package/internal/board/detail_test.go +233 -0
  220. package/internal/board/epic_panel.go +69 -0
  221. package/internal/board/epic_panel_test.go +246 -0
  222. package/internal/board/help.go +40 -0
  223. package/internal/board/help_test.go +85 -0
  224. package/internal/board/layout.go +58 -0
  225. package/internal/board/layout_test.go +89 -0
  226. package/internal/board/model.go +151 -0
  227. package/internal/board/model_test.go +67 -0
  228. package/internal/board/release.go +42 -0
  229. package/internal/board/release_test.go +177 -0
  230. package/internal/board/transitions.go +88 -0
  231. package/internal/board/transitions_test.go +141 -0
  232. package/internal/board/update.go +155 -0
  233. package/internal/board/update_test.go +128 -0
  234. package/internal/board/view.go +190 -0
  235. package/internal/board/view_test.go +147 -0
  236. package/internal/data/config.go +87 -0
  237. package/internal/data/config_test.go +73 -0
  238. package/internal/data/discover.go +152 -0
  239. package/internal/data/discover_test.go +106 -0
  240. package/internal/data/errors.go +9 -0
  241. package/internal/data/lifecycle.go +37 -0
  242. package/internal/data/lifecycle_test.go +38 -0
  243. package/internal/data/parser.go +189 -0
  244. package/internal/data/parser_test.go +216 -0
  245. package/internal/data/router.go +52 -0
  246. package/internal/data/router_test.go +35 -0
  247. package/internal/data/task.go +46 -0
  248. package/internal/data/task_test.go +51 -0
  249. package/internal/data/write.go +144 -0
  250. package/internal/data/write_test.go +456 -0
  251. package/internal/styles/palette.go +47 -0
  252. package/internal/styles/styles.go +122 -0
  253. package/main.exe +0 -0
  254. package/main.go +11 -0
  255. package/package.json +25 -0
  256. package/savepoint +0 -0
  257. package/savepoint.exe +0 -0
  258. package/scripts/vitest-preload.cjs +95 -0
  259. package/templates/project/.savepoint/Design.md +47 -0
  260. package/templates/project/.savepoint/PRD.md +34 -0
  261. package/templates/project/.savepoint/config.yml +27 -0
  262. package/templates/project/.savepoint/router.md +152 -0
  263. package/templates/project/.savepoint/visual-identity.md +122 -0
  264. package/templates/project/AGENTS.md +130 -0
  265. package/templates/prompts/audit-reconciliation.prompt.md +67 -0
  266. package/templates/prompts/design.prompt.md +43 -0
  267. package/templates/prompts/epic-design.prompt.md +43 -0
  268. package/templates/prompts/magic-prompt.prompt.md +7 -0
  269. package/templates/prompts/prd.prompt.md +42 -0
  270. package/templates/prompts/task-breakdown.prompt.md +54 -0
  271. package/templates/prompts/task-building.prompt.md +38 -0
  272. package/templates/prompts/task-planning.prompt.md +53 -0
  273. package/templates/release/v1/PRD.md +37 -0
@@ -0,0 +1,68 @@
1
+ ---
2
+ type: epic-design
3
+ status: active
4
+ ---
5
+
6
+ # Epic E10: docs-and-packaging
7
+
8
+ ## Purpose
9
+
10
+ Prepare Savepoint as a public npm package with clear user-facing documentation, correct package metadata, and validated publish contents.
11
+
12
+ ## What this epic adds
13
+
14
+ - Public README suitable for npm and GitHub.
15
+ - MIT license finalized.
16
+ - Package metadata review for repository, keywords, files, bin, engines, and exports.
17
+ - `npm pack` validation.
18
+ - Local install smoke tests from the packed tarball.
19
+ - Documentation for install, init, board, audit, doctor, and the audit loop.
20
+ - Release checklist draft for `0.1.0`.
21
+
22
+ ## Components and files
23
+
24
+ Expected files introduced or extended by this epic:
25
+
26
+ | Path | Purpose |
27
+ | -------------------------------- | -------------------------------------------------- |
28
+ | `README.md` | Public product and usage documentation. |
29
+ | `LICENSE` | Final MIT license text. |
30
+ | `package.json` | Publish metadata and package allowlist. |
31
+ | `.npmignore` or `files` field | Publish contents control. |
32
+ | `docs/*.md` | Optional focused docs if README becomes too large. |
33
+ | `scripts/*.ts` or `scripts/*.js` | Optional pack/install smoke helpers. |
34
+ | `test/packaging/**/*.test.ts` | Packaging validation tests if scriptable. |
35
+
36
+ ## Architectural delta
37
+
38
+ Before this epic, the package can function locally. After this epic, the package is shaped for public consumption and can be validated as a packed npm artifact.
39
+
40
+ This epic does not publish the package; it makes publishing boring and inspectable.
41
+
42
+ ## Boundaries
43
+
44
+ In scope:
45
+
46
+ - Public docs and package metadata.
47
+ - Packed artifact validation.
48
+ - Local install smoke tests.
49
+ - Ensure generated `dist/cli.js` is the published binary.
50
+
51
+ Out of scope:
52
+
53
+ - Actual npm publish.
54
+ - Manual agent matrix.
55
+ - Broad marketing site work.
56
+ - Major feature changes discovered during docs writing unless they block package correctness.
57
+
58
+ ## Quality gates
59
+
60
+ - `npm pack --dry-run` or equivalent should show only intended files.
61
+ - Packed install smoke should verify `savepoint --help` and `savepoint --version`.
62
+ - README examples should match implemented command behavior.
63
+
64
+ ## Design constraints
65
+
66
+ - Keep docs plain and practical for vibe coders.
67
+ - Do not over-document deferred features.
68
+ - Treat package contents as a release contract.
@@ -0,0 +1,68 @@
1
+ ---
2
+ type: epic-design
3
+ status: active
4
+ ---
5
+
6
+ # Epic E11: release-validation
7
+
8
+ ## Purpose
9
+
10
+ Run the final validation matrix for `0.1.0`, resolve release-blocking issues, and prepare the public release cut.
11
+
12
+ ## What this epic adds
13
+
14
+ - Manual e2e test matrix across Claude, Cursor, Gemini, and Aider where available.
15
+ - Cross-platform checks for macOS, Linux, and Windows Terminal where available.
16
+ - Fresh-project `npx savepoint init` validation.
17
+ - Full command walkthrough: init, board, audit, and doctor.
18
+ - Final version check for `0.1.0`.
19
+ - Release notes.
20
+ - Publish-readiness checklist.
21
+
22
+ ## Components and files
23
+
24
+ Expected files introduced or extended by this epic:
25
+
26
+ | Path | Purpose |
27
+ | --------------------------- | ------------------------------------------------- |
28
+ | `docs/release-checklist.md` | Final release checklist and results. |
29
+ | `docs/e2e-matrix.md` | Manual agent/platform matrix results. |
30
+ | `CHANGELOG.md` | Initial release notes. |
31
+ | `package.json` | Final version metadata if needed. |
32
+ | `.savepoint/audit-log.md` | Audit history if audits were skipped or recorded. |
33
+
34
+ ## Architectural delta
35
+
36
+ Before this epic, the package should be feature-complete for v0.1.0. After this epic, the release has documented validation evidence and can be published with known residual risks.
37
+
38
+ This epic should prefer fixing release blockers in the smallest responsible place over broad refactors.
39
+
40
+ ## Boundaries
41
+
42
+ In scope:
43
+
44
+ - Manual matrix execution and recording.
45
+ - Cross-platform smoke validation.
46
+ - Final bug fixes required to pass release criteria.
47
+ - Release notes and version confirmation.
48
+
49
+ Out of scope:
50
+
51
+ - New features.
52
+ - v0.2.0 semantic review.
53
+ - File watching.
54
+ - Search.
55
+ - MCP server work.
56
+
57
+ ## Quality gates
58
+
59
+ - All automated tests pass.
60
+ - Packed install smoke passes.
61
+ - Manual e2e matrix passes against at least three of four target agents.
62
+ - Known limitations are documented.
63
+
64
+ ## Design constraints
65
+
66
+ - Keep late fixes narrow and auditable.
67
+ - Do not relax quality gates to ship.
68
+ - Record evidence, not vibes.
@@ -0,0 +1,26 @@
1
+ ---
2
+ type: epic-design
3
+ status: planned
4
+ ---
5
+
6
+ # Epic E01: TUI Optimisation
7
+
8
+ ## Purpose
9
+
10
+ Performance, layout robustness, and structural improvements for the board TUI. Focused on fixing rendering edge-cases (resize clipping, wasted space) and improving the codebase's architectural hygiene around file watching and data refresh.
11
+
12
+ ## Definition of Done
13
+
14
+ - Right-border clipping is eliminated at all terminal widths ≥ 40
15
+ - Resize handling is robust — no corruption, no artifacts when growing/shrinking
16
+ - The board auto-refreshes when task files change on disk via fsnotify
17
+
18
+ ## Components and files
19
+
20
+ | Path | Purpose |
21
+ |------|---------|
22
+ | `internal/board/layout.go` | Layout arithmetic and resize guards |
23
+ | `internal/board/view.go` | Minimum width clamping |
24
+ | `internal/board/watch.go` | File watcher and reload commands |
25
+ | `internal/board/model.go` | Watcher lifecycle |
26
+ | `internal/board/update.go` | Reload message handling |
@@ -0,0 +1,35 @@
1
+ ---
2
+ id: E01-tui-optimisation/T001-border-resize-fix
3
+ status: planned
4
+ objective: "Fix right-border clipping and ensure clean rendering on terminal resize"
5
+ depends_on: []
6
+ ---
7
+
8
+ # T001: Fix Right-Border Clipping and Resize Robustness
9
+
10
+ ## Acceptance Criteria
11
+
12
+ - The board frame right border (`│` or rounded corner) is always visible at any terminal width ≥ 40 chars
13
+ - Reducing terminal width below a breakpoint (120→119, 80→79) does not leave stray pixels or broken border artifacts
14
+ - Reducing to very narrow widths (< 50) degrades gracefully (no visual corruption)
15
+ - Expanding terminal width back renders cleanly with no leftover characters from previous dimensions
16
+ - All existing layout breakpoints (120/80) still function correctly
17
+
18
+ ## Implementation Plan
19
+
20
+ - [ ] Edit `internal/board/layout.go` — audit width arithmetic to ensure total content width exactly fills `width - boardFrameOverhead` at every breakpoint; use `totalWidth := cw*colCount + colOverhead*colCount` and pad any remainder so it matches `inner` exactly.
21
+ - [ ] Edit `internal/board/view.go` — add minimum terminal width clamping (e.g., floor to 40) in `View()` to prevent degenerate states.
22
+ - [ ] Edit `internal/board/layout.go` — add a `minBoardWidth` const and guard `CalculateLayout` inputs below it.
23
+ - [ ] Run `make build && make test` to verify no regressions.
24
+
25
+ ## Context Log
26
+
27
+ Files read:
28
+ - `internal/board/layout.go`
29
+ - `internal/board/view.go`
30
+ - `internal/board/update.go`
31
+
32
+ Estimated input tokens: 600
33
+
34
+ Notes:
35
+ - Moved from `E06-atari-noir-layout/T006-border-resize-fix` (release v1) to `E01-tui-optimisation` (release v1.1).
@@ -0,0 +1,136 @@
1
+ # Agent State Machine
2
+
3
+ This file routes the agent based on the project's current state. Read this whenever you start a session.
4
+
5
+ ## Read order on every session
6
+
7
+ 1. This file (you are here)
8
+ 2. The current state below to know what to do next
9
+ 3. The active epic Design
10
+ 4. The active task file, when a task is selected
11
+
12
+ Read `.savepoint/PRD.md` only for project vision changes. Read `.savepoint/Design.md` only for architecture changes or audit closeout. Read `.savepoint/releases/v1/PRD.md` only for release planning or epic-order questions.
13
+
14
+ **Conditional read (token discipline):** if your active task touches **TUI rendering, theme, or visual design**, also read `.savepoint/visual-identity.md` after Design.md. Otherwise skip it — it's ~1.8K tokens you don't need.
15
+
16
+ ## Current state
17
+
18
+ ```yaml
19
+ state: task-building
20
+ release: v1.1
21
+ epic: E01-tui-optimisation
22
+ task: E01-tui-optimisation/T001-border-resize-fix
23
+ next_action: Execute T001 — Fix right-border clipping and resize robustness.
24
+ ```
25
+
26
+ ## State → next action
27
+
28
+ <!-- AGENT: Read the state above. Find the matching block below. Follow it. -->
29
+
30
+ ### `state: pre-implementation`
31
+
32
+ The project has its PRD and Design locked but no epics defined yet.
33
+
34
+ **Next action:**
35
+
36
+ 1. Read `.savepoint/releases/v1/PRD.md` — the v1 release scope (epic list lives there).
37
+ 2. Help the user define the epics list and confirm priority.
38
+ 3. For each epic in order, create the directory `.savepoint/releases/v1/epics/E##-{epic-name}/` with a `Design.md` stub.
39
+ 4. When epic E01 (scaffolding) is created, transition to `state: epic-design` for that epic.
40
+
41
+ **Do not** start writing code. We are still in planning.
42
+
43
+ ### `state: epic-design`
44
+
45
+ An epic exists but its `Design.md` is empty or a stub.
46
+
47
+ **Next action:** Walk the user through filling out the epic's `Design.md`:
48
+
49
+ - What is this epic adding to the system?
50
+ - What components / files does it touch?
51
+ - What's the architectural delta vs the current state?
52
+
53
+ When complete, transition to `state: epic-task-breakdown` for this epic.
54
+
55
+ ### `state: epic-task-breakdown`
56
+
57
+ Epic Design exists but tasks are missing or not fully planned.
58
+
59
+ **Next action:**
60
+
61
+ 1. Re-read the epic Design.
62
+ 2. Create or update the full epic task list — each task **independently buildable**, **objective-led**, with declared `depends_on`.
63
+ 3. Each task file lives at `.savepoint/releases/v1/epics/{E##-epic}/tasks/TNNN-slug.md` with frontmatter:
64
+ ```yaml
65
+ ---
66
+ id: {E##-epic}/TNNN-slug
67
+ status: planned
68
+ objective: "<one sentence>"
69
+ depends_on: []
70
+ ---
71
+ ```
72
+ 4. In the same pass, write each task's `## Implementation Plan` as inline `- [ ]` checkboxes.
73
+ 5. When every task is planned, transition to `state: task-building` for the first unblocked task.
74
+
75
+ ### `state: task-planning`
76
+
77
+ Reserved for repair or late-added tasks. Normal epic planning happens during `state: epic-task-breakdown`.
78
+
79
+ **Next action:** Read the task's `objective`. Write the implementation plan as inline `- [ ]` checkboxes under a `## Implementation Plan` heading. Set `status: planned`. Stop.
80
+
81
+ ### `state: task-building`
82
+
83
+ Task is `in_progress`. All `depends_on` are `done`.
84
+
85
+ **Next action:** Execute the plan. Tick checkboxes as you complete them. Edit code per the **Code Style** rules in `AGENTS.md`. When all checkboxes tick, set `status: review` and stop.
86
+
87
+ ### `state: audit-pending`
88
+
89
+ The last task in an epic is `done`. Audit must run before the next epic starts.
90
+
91
+ **Next action:** Confirm `.savepoint/audit/{E##-epic}/snapshot.md` exists. If it is missing while the audit CLI is still unavailable, create one manual snapshot from the known epic scope once; do not search broadly for replacement inputs. Then read the snapshot, read the epic's `Design.md`, and read only the files listed as changed. Write one patch-shaped proposal bundle to `.savepoint/audit/{E##-epic}/proposals.md`:
92
+
93
+ - `Design.md` section — merge only the epic delta into project architecture.
94
+ - `AGENTS.md` section — refresh Codebase Map entries from changed-module metadata; preserve existing rows.
95
+ - `epic-Design.md` section — add "implemented as:" notes and deltas from the original plan.
96
+ - `Quality Review` section — semantic-review findings against the 10 Code Style rules (advisory only).
97
+
98
+ Prefer delta-only edits (`Insert After`, `Replace`, `Delete`) anchored to exact text. Do not quote and replace entire large sections unless the whole section genuinely changed.
99
+
100
+ Proposal format:
101
+
102
+ ```md
103
+ ## Target File
104
+
105
+ `path/to/file.md`
106
+
107
+ ## Replace
108
+
109
+ <exact old heading, marker, or section>
110
+
111
+ ## With
112
+
113
+ <new content>
114
+ ```
115
+
116
+ Quality review section format:
117
+
118
+ ```md
119
+ ## Must Fix Before Close
120
+
121
+ ## Carry Forward
122
+
123
+ ## Already Fixed
124
+ ```
125
+
126
+ After proposals are approved, apply approved proposals to live files, mark the epic `Design.md` as `status: audited`, update project `Design.md` `last_audited`, refresh `AGENTS.md` Codebase Map, and advance this router to the next epic state.
127
+
128
+ Stop. The user reviews proposals in the TUI before commit actions.
129
+
130
+ ## Capability check
131
+
132
+ If you are not Claude Opus / Gemini 2.5 Pro / GPT-5.5 / equivalent, surface a warning to the user:
133
+
134
+ > _"Heads up — I'm running on a lighter model. Savepoint's planning steps work best with top-tier models because the embedded prompts are detailed. I'll do my best, but consider switching the model for PRD/Design/Task-breakdown steps."_
135
+
136
+ Then proceed.
@@ -0,0 +1,124 @@
1
+ ---
2
+ type: visual-identity
3
+ status: active
4
+ last_audited: never
5
+ ---
6
+
7
+ # Visual Identity — Atari-Noir
8
+
9
+ > The brand identity and visual guardrails for savepoint. **Loaded conditionally** — only when working on TUI rendering, theme, or design-system tasks. Non-visual tasks must skip this file to honor the token budget.
10
+
11
+ For Ink/TUI implementation mechanics, use `agent-skills/ink-tui-design/SKILL.md`. This file only owns visual and product-design constraints.
12
+
13
+ ## Vibe
14
+
15
+ A serious digital system that loves old arcade hardware. Dark, cinematic, playful. Crisp, not noisy. Technical, not cold.
16
+
17
+ **Avoid:** neon cyberpunk chaos, SaaS minimalism, fake terminal gimmicks.
18
+
19
+ ## Palette
20
+
21
+ | Element | Hex | Role |
22
+ | ------------- | --------- | ----------------------------- |
23
+ | Background | `#121212` | Main screen background |
24
+ | Surface | `#0D0D0D` | Cards and panels |
25
+ | Surface 2 | `#0F0F0F` | Secondary panels / title bars |
26
+ | Border | `#1A1A1A` | Quiet structural edges |
27
+ | Border Subtle | `#222222` | Slightly stronger separators |
28
+ | Primary Text | `#F0E6DA` | Warm off-white terminal text |
29
+ | Atari Orange | `#FC6323` | Primary CTA, active highlight |
30
+ | NPP Green | `#A4C639` | Success, live systems |
31
+ | Vibe Purple | `#B1A1DF` | AI, reflection |
32
+
33
+ **Color rules:**
34
+
35
+ - **Intentional accents.** One accent color per major section/type. Use for labels, hover, glows, active text — never giant background fills.
36
+ - **Dark backgrounds.** Keep them dark so accents pop.
37
+ - **Visual encoding.** Color semantically encodes categories or states; reinforce with minimal text.
38
+
39
+ ## Typography
40
+
41
+ - **System heading font:** `Chakra Petch` (web only — terminal cannot control fonts)
42
+ - **System body/UI font:** `Space Mono` (web only — terminal cannot control fonts)
43
+ - **Accent retro fonts:** `Silkscreen` or `Press Start 2P`, used rarely for score counters or deliberately extreme moments
44
+
45
+ **Rules:**
46
+
47
+ - Headings uppercase, with deliberate letter-spacing where the medium allows.
48
+ - Body readable and restrained; abandon monospace for long text if readability suffers.
49
+ - Render magnitude/comparison numbers as proportional visuals (bars, circles), not raw values.
50
+
51
+ ## Spacing rhythm
52
+
53
+ - Sections breathe. Default spacing feels generous.
54
+ - Cards have enough internal padding to feel like panels, not chips.
55
+ - Whitespace creates hierarchy before borders or color do.
56
+
57
+ ## Signature UI patterns
58
+
59
+ - **Scanlines** — low-opacity CRT atmosphere; never obscure readability.
60
+ - **Glows** — radiate from perimeter ("lit from within"). Transparent section accent colors; no neon spam.
61
+ - **Panels** — flat, dark, structured with quiet borders. Depth from contrast/glow, not heavy shadows.
62
+ - **Search** — simple, single-line; integrated with section accent color.
63
+ - **MDX prose** — integrated using standard typography, palette, border logic.
64
+
65
+ ## Interaction principles ("The Playable Dashboard")
66
+
67
+ **Content is the interface.** Avoid traditional UI patterns (dropdowns, accordions) if content can express the information directly.
68
+
69
+ - **Show, don't explain.** Visuals (scaled circles, markers) before text.
70
+ - **Motion** — authored, not generic. Ease like a system booting up. No bouncy toy motion.
71
+ - **Hover & focus** — internal light (underglow/surface tint), not thick outlines or loud transforms.
72
+ - **Expansion** — breathe open, don't snap. Inline reveals, shared-element transitions.
73
+
74
+ ## Replication brief
75
+
76
+ If recreating this look-and-feel, preserve:
77
+
78
+ - dark charcoal background with warm off-white text
79
+ - three-color accent system (one per major section)
80
+ - `Chakra Petch` for headings, `Space Mono` for body/UI (where typography can be controlled)
81
+ - uppercase, tracked headings
82
+ - quiet borders, dark surfaces, selective glow
83
+ - one strong interactive hero element
84
+ - copy that sounds human, competent, intentionally non-corporate
85
+ - **Young Explorer Baseline:** all content and visuals understandable by a 7-year-old. Intuitive visual metaphors, no unexplained jargon, discoverable through play.
86
+
87
+ **Family resemblance, not exact duplication.** Preserve the underlying feel, hierarchy, restraint.
88
+
89
+ ## Flex & constraints
90
+
91
+ - **Layout & components:** can adapt to content needs, provided palette discipline and tonal restraint remain.
92
+ - **Fonts:** supporting fonts can vary if heading/body contrast remains.
93
+ - **Hero:** interaction can vary, but requires one strong, ownable interactive element.
94
+ - **Visual-first:** show relationships visually before explaining them in text (gradient bar > numbers). Text reinforces; visuals carry comprehension.
95
+ - **Cognitive accessibility:** anchor complex concepts to physical/visual analogies a 7-year-old can grasp.
96
+
97
+ ## What survives in the terminal
98
+
99
+ | Web rule | Terminal feasibility | Adaptation |
100
+ | ----------------------------------- | -------------------- | ---------------------------------------------------------------- |
101
+ | Dark bg + warm off-white text | ✓ | 24-bit color with 256/16-color fallbacks |
102
+ | 3-color accent system | ✓ | per status, per epic, per section |
103
+ | `Chakra Petch` / `Space Mono` fonts | ✗ | terminal owns the font; README discloses |
104
+ | Uppercase tracked headings | ⚠ | uppercase yes; letter-spacing no (fixed-width cells) |
105
+ | Scanlines | ✗ | flicker/ugly in text — skip |
106
+ | Glows / underglow | ⚠ | substitute with subtle bg tint on focused row + accent border |
107
+ | Quiet borders, dark surfaces | ✓ | box-drawing chars (`─ │ ┌ ┐`) in border-subtle gray |
108
+ | Inline reveal cards | ✓ | Ink state-driven expand/collapse |
109
+ | Visual encoding before text | ✓ | colored glyphs (`▣ ◇ ◆ ✓`) with text reinforcement |
110
+ | "System booting up" motion | ⚠ | 200ms init sequence on launch acceptable; running animation skip |
111
+
112
+ ## Terminal UI guardrails
113
+
114
+ - Keep UI state explicit and local to the smallest useful surface.
115
+ - Use project data files as the source of truth; do not invent hidden UI state.
116
+ - Keep layout compact and readable on narrow terminals first.
117
+ - Treat accidental line wrapping as a bug.
118
+ - Make selection, focus, and status changes obvious without relying on color alone.
119
+ - Make every keyboard action predictable and idempotent.
120
+ - Test branching input handling, navigation, state transitions, render output, and non-TTY fallbacks.
121
+
122
+ ## When `savepoint init` ships
123
+
124
+ This file is the canonical default that `savepoint init` writes into a user's `.savepoint/visual-identity.md`. Users replace it with their own design system. The file's existence (not its contents) is what `savepoint` cares about.
package/AGENTS.md ADDED
@@ -0,0 +1,141 @@
1
+ # Agents Guide
2
+
3
+ Welcome, AI agent. This project (`savepoint`) uses its own conventions to manage its own build. You are about to dogfood the workflow.
4
+
5
+ ## Workflow
6
+
7
+ Before doing anything, read `.savepoint/router.md`. That file routes you to the next file based on the project's current state.
8
+
9
+ **Available Custom Skills:**
10
+ Savepoint ships with skills that define your role at each stage.
11
+ - `draft-prd`: Acts as a strict Product Manager to interrogate the user and write the PRD.
12
+ - `system-design`: Acts as a Staff Engineer mapping the architecture.
13
+ - `create-plan` / `create-task`: Acts as a Technical PM breaking work into Epics and ACs.
14
+ - `build-task`: Acts as the disciplined execution engine writing code and logging drift.
15
+ - `audit`: Acts as the QA Lead reconciling code with documentation.
16
+
17
+ **Skill Activation (CRITICAL):**
18
+ When you read `.savepoint/router.md`, you MUST activate the corresponding agent skill for the current state before taking any action. Use the `activate_skill` tool (or equivalent) for the appropriate phase:
19
+ - `state: draft-prd` -> Activate the `draft-prd` skill.
20
+ - `state: design` -> Activate the `system-design` skill.
21
+ - `state: planning` -> Activate the `create-plan` skill.
22
+ - `state: task-breakdown` -> Activate the `create-task` skill.
23
+ - `state: in-progress` -> Activate the `build-task` skill.
24
+ - `state: audit-pending` -> Activate the `audit` skill.
25
+
26
+ When you are about to write code, you must first read, in order:
27
+
28
+ 1. `.savepoint/router.md` — current state and next action
29
+ 2. The active epic Design: `.savepoint/releases/v1/epics/{E##-epic}/Design.md`
30
+ 3. The active task file: `.savepoint/releases/v1/epics/{E##-epic}/tasks/{T###}-*.md`
31
+ 4. Directly touched source/test files
32
+
33
+ Read `.savepoint/PRD.md` only for project vision changes, major scope questions, or when the router explicitly asks for it.
34
+ Read `.savepoint/Design.md` only when the task changes architecture or audit state. Read `.savepoint/releases/v1/PRD.md` only when planning epics, changing release scope, or resolving epic order.
35
+
36
+ **Conditional read:** if the active task touches TUI implementation, also read `agent-skills/ink-tui-design/SKILL.md` as the execution guide. If it touches TUI rendering, theme, or visual design, also read `.savepoint/visual-identity.md` as the visual guardrails. Otherwise skip the extra files — they are tokens you do not need.
37
+
38
+ **Do not load files outside the current task scope** unless the task requires it. Token discipline is the wedge of this product; we honor it on ourselves.
39
+
40
+ Planning and implementation are separate handoffs:
41
+
42
+ - Epic task breakdown and detailed task planning happen together in one pass by one planning agent.
43
+ - Each task file must be independently buildable, objective-led, include explicit `depends_on` IDs, contain `## Acceptance Criteria` (observable outcomes) before `## Implementation Plan` (build checklist), and include a `## Context Log` for files read, estimated input tokens, and notes.
44
+ - Implementation happens one task at a time and may be handed to any agent. Clear context between tasks by default; rehydrate only from the router, active epic Design, active task file, and directly touched source/test files.
45
+ - During implementation, run focused tests for the touched behavior first; reserve the full quality-gate suite for task closeout.
46
+
47
+ - After all tasks in an epic are `done`, hand the epic back for audit.
48
+ - Any explicit audit request overrides the normal handoff timing for that epic. Persist the audit to `.savepoint/audit/{E##-epic}/snapshot.md` and `.savepoint/audit/{E##-epic}/proposals.md` before replying; do not stop at chat-only findings.
49
+
50
+ ## Task Status Canon
51
+
52
+ Task frontmatter `status` must be exactly one of `planned`, `in_progress`, or `done`.
53
+
54
+ Active task phase is represented separately with `phase: build`, `phase: test`, or `phase: audit`, and `phase` is only valid when `status: in_progress`.
55
+
56
+ Never write `todo`, `doing`, `blocked`, `review`, `audit`, or phase names into `status`. If a task is blocked, keep its canonical status and document the blocker in the body.
57
+
58
+ ## Task Completion Protocol
59
+
60
+ When a task reaches `status: done`, you MUST:
61
+
62
+ 1. Verify every `## Acceptance Criteria` line has a passing test or verified manual outcome. A task is not done until its acceptance criteria are satisfied, not merely its implementation checkboxes ticked.
63
+ 2. Tick all checkboxes in the `## Implementation Plan`.
64
+ 3. Fill the `## Context Log` (files read, estimated input tokens, notes).
65
+ 4. Run the full quality-gate suite (`make build && make test`). Record the result in the Context Log.
66
+ 5. If any gate fails, fix it or document the blocker in the task file before setting `status: done`.
67
+ 6. Set the task frontmatter to `status: done`.
68
+ 7. Update `router.md` with the next action (next unblocked task, or `audit-pending` if all tasks done).
69
+ 8. **Stop. Prompt the user:**
70
+ > "Task {id} is done. Quality gates: {pass/fail list}. Router updated to {next_action}. Review the changes, then tell me to continue."
71
+
72
+ **Do not start the next task. Do not advance past this point without user acknowledgment.**
73
+
74
+ ## Task Closeout Meta-Check
75
+
76
+ After marking a task `done` and before prompting the user, ask yourself:
77
+
78
+ - Did this task add new source files, modules, or exports not in the Codebase Map?
79
+ - Did this task change the architecture from what `.savepoint/Design.md` describes?
80
+
81
+ If yes, append a `## Drift Notes` section to the task file:
82
+ - `Drift: {file} added, not yet in Codebase Map.`
83
+ - `Drift: {section} in Design.md may need update.`
84
+
85
+ Drift notes are lightweight annotations. They do **not** replace the epic audit. They flag what the next audit should reconcile.
86
+
87
+ ## Audit Handoff Rule
88
+
89
+ The agent session that builds an epic **must not** run its audit. Audit requires fresh eyes.
90
+
91
+ When all tasks in an epic are `done`:
92
+ 1. Update `router.md` to `state: audit-pending` for that epic.
93
+ 2. Stop. Tell the user: "Epic {id} is complete. Start a new agent session for the audit."
94
+ 3. The user starts a fresh session. The new agent reads `router.md`, sees `audit-pending`, and follows the audit-reconciliation instructions.
95
+
96
+ **If you are in the same session that built the epic, you must not audit it.**
97
+
98
+ ## Build / Test / Run
99
+
100
+ ```bash
101
+ make build # go build -o savepoint main.go
102
+ make test # go test ./...
103
+ make run # go run main.go
104
+ make clean # rm -f savepoint
105
+ ```
106
+
107
+ ## Code Style
108
+
109
+ 1. **One job per file.** If a file does two things, split it.
110
+ 2. **One-sentence rule.** If you can't describe a function in one sentence, refactor.
111
+ 3. **Test what branches.** Logic with if/else/switch gets a test. Pure rendering: skip.
112
+ 4. **Types are documentation.** No `any`. Let the compiler help.
113
+ 5. **Build, don't speculate.** No code for hypothetical futures.
114
+ 6. **Errors at boundaries.** Handle failure where data enters or leaves the system.
115
+ 7. **One source of truth.** State lives in one place. No syncing copies.
116
+ 8. **Comments explain WHY,** not what. If removing the comment wouldn't confuse a future reader, delete it.
117
+ 9. **Content in data files.** Markdown/JSON/YAML, not strings in code.
118
+ 10. **Small diffs.** Each task touches as few files as possible.
119
+
120
+ ## Codebase Map
121
+
122
+ | Module | Purpose |
123
+ | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
124
+ | `main.go` | CLI Entrypoint and root command wiring |
125
+ | `internal/board/` | TUI board components, models, layouts, transitions, and rendering logic |
126
+ | `internal/data/` | Task data models, frontmatter parsing, project configuration, routing, and generic file readers |
127
+ | `internal/styles/` | Shared visual design system, TUI styling, and palettes |
128
+ | `cmd/` | Additional CLI subcommands (if any) |
129
+ | `templates/` | Default project scaffold markdown, YAML assets, and agent prompt templates |
130
+ | `agent-skills/` | Custom skill guides for different agent phases (`draft-prd`, `audit`, etc.) |
131
+
132
+ ## CLI rules for agents
133
+
134
+ **Never run `savepoint` commands.** The CLI is for the human. Edit files directly.
135
+
136
+ (For this repo specifically: `savepoint` doesn't exist yet — we're building it. Even once it exists, this rule stands.)
137
+
138
+ ## Recommended planning models
139
+
140
+ For PRD/Design/Task planning, this workflow assumes a top-tier model: Claude Opus, Gemini 2.5 Pro, GPT-5.5, or equivalent. Lighter models may not follow embedded prompt instructions reliably. If you are not one of those, advise the user before proceeding with planning steps.
141
+ instructions reliably. If you are not one of those, advise the user before proceeding with planning steps.
package/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ See `AGENTS.md` at the project root.
package/GEMINI.md ADDED
@@ -0,0 +1 @@
1
+ See `AGENTS.md` at the project root.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Savepoint
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Makefile ADDED
@@ -0,0 +1,13 @@
1
+ .PHONY: build test run clean
2
+
3
+ build:
4
+ go build -o savepoint main.go
5
+
6
+ test:
7
+ go test ./...
8
+
9
+ run:
10
+ go run main.go
11
+
12
+ clean:
13
+ rm -f savepoint