@xulthekl/team-flow 0.22.4

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 (405) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.agents/skills +1 -0
  3. package/.claude/always/phase-guard.md +3 -0
  4. package/.claude-plugin/marketplace.json +20 -0
  5. package/.claude-plugin/plugin.json +31 -0
  6. package/.codex-plugin/plugin.json +45 -0
  7. package/.codexignore +6 -0
  8. package/.cursor-plugin/marketplace.json +17 -0
  9. package/.cursor-plugin/plugin.json +31 -0
  10. package/.github/copilot-instructions.md +15 -0
  11. package/.github/dependabot.yml +10 -0
  12. package/.github/plugin/marketplace.json +42 -0
  13. package/.github/workflows/ci.yml +98 -0
  14. package/.github/workflows/hol-plugin-scanner.yml +17 -0
  15. package/.opencode/INSTALL.md +61 -0
  16. package/.opencode/plugins/team-flow.js +70 -0
  17. package/AGENTS.md +280 -0
  18. package/CHANGELOG.md +635 -0
  19. package/CONTRIBUTING.md +115 -0
  20. package/GEMINI.md +14 -0
  21. package/HANDOFF.md +219 -0
  22. package/INSTALL.md +810 -0
  23. package/LICENSE +21 -0
  24. package/README.md +185 -0
  25. package/SECURITY.md +37 -0
  26. package/agents/bug-investigator.md +180 -0
  27. package/agents/change-split-auditor.md +257 -0
  28. package/agents/code-reviewer.md +171 -0
  29. package/agents/cross-change-consistency-checker.md +215 -0
  30. package/agents/prd-completeness-reviewer.md +197 -0
  31. package/agents/prototype-builder.md +230 -0
  32. package/agents/prototype-env-scout.md +156 -0
  33. package/agents/prototype-reviewer.md +226 -0
  34. package/assets/icon.svg +6 -0
  35. package/dist/index.d.ts +13 -0
  36. package/dist/index.js +5 -0
  37. package/dist/parsing/change-parser.d.ts +12 -0
  38. package/dist/parsing/change-parser.js +54 -0
  39. package/dist/parsing/requirement-blocks.d.ts +31 -0
  40. package/dist/parsing/requirement-blocks.js +192 -0
  41. package/dist/schema/base.d.ts +7 -0
  42. package/dist/schema/base.js +1 -0
  43. package/dist/schema/change.d.ts +25 -0
  44. package/dist/schema/change.js +1 -0
  45. package/dist/schema/index.d.ts +3 -0
  46. package/dist/schema/index.js +1 -0
  47. package/dist/schema/spec.d.ts +11 -0
  48. package/dist/schema/spec.js +1 -0
  49. package/dist/validation/constants.d.ts +42 -0
  50. package/dist/validation/constants.js +42 -0
  51. package/dist/validation/tokenizer.d.ts +17 -0
  52. package/dist/validation/tokenizer.js +173 -0
  53. package/dist/validation/types.d.ts +40 -0
  54. package/dist/validation/types.js +1 -0
  55. package/dist/validation/validator.d.ts +21 -0
  56. package/dist/validation/validator.js +489 -0
  57. package/docs/README_en.md +358 -0
  58. package/docs/artifact-contract.md +96 -0
  59. package/docs/decision-points.md +88 -0
  60. package/docs/e2e-integration-design.md +207 -0
  61. package/docs/examples/README.md +25 -0
  62. package/docs/examples/add-dark-mode/README.md +13 -0
  63. package/docs/examples/add-dark-mode/design.md +49 -0
  64. package/docs/examples/add-dark-mode/execution-contract.md +56 -0
  65. package/docs/examples/add-dark-mode/proposal.md +46 -0
  66. package/docs/examples/add-dark-mode/specs/ui-theme/spec.md +35 -0
  67. package/docs/examples/add-dark-mode/tasks.md +26 -0
  68. package/docs/examples/refactor-auth-boundary/README.md +15 -0
  69. package/docs/examples/refactor-auth-boundary/design.md +41 -0
  70. package/docs/examples/refactor-auth-boundary/execution-contract.md +61 -0
  71. package/docs/examples/refactor-auth-boundary/proposal.md +47 -0
  72. package/docs/examples/refactor-auth-boundary/specs/auth-boundary/spec.md +45 -0
  73. package/docs/examples/refactor-auth-boundary/tasks.md +25 -0
  74. package/docs/plans/2026-07-07-fix-batch-design.md +68 -0
  75. package/docs/plans/2026-07-20-001-refactor-skill-collaboration-protocol-plan.md +128 -0
  76. package/docs/platform-matrix.md +45 -0
  77. package/docs/prototype-design-research.md +206 -0
  78. package/docs/release-checklist.md +96 -0
  79. package/docs/showcase.html +699 -0
  80. package/docs/skill-rename-v0.8.0.md +49 -0
  81. package/docs/state-machine.md +162 -0
  82. package/gemini-extension.json +6 -0
  83. package/hooks/hooks-cursor.json +8 -0
  84. package/hooks/hooks.json +26 -0
  85. package/hooks/pre-tool-use-guard +116 -0
  86. package/hooks/session-start +14 -0
  87. package/llms.txt +51 -0
  88. package/package.json +48 -0
  89. package/plugin.json +27 -0
  90. package/prd/v1/plan.md +443 -0
  91. package/prd/v1/prd.md +580 -0
  92. package/scripts/check-update.mjs +91 -0
  93. package/scripts/check-version-consistency.mjs +345 -0
  94. package/scripts/ensure-branch.mjs +71 -0
  95. package/scripts/get-config +31 -0
  96. package/scripts/guard/checks/artifacts-exist.mjs +36 -0
  97. package/scripts/guard/checks/contract-current.mjs +33 -0
  98. package/scripts/guard/checks/contract-fresh.mjs +17 -0
  99. package/scripts/guard/checks/dp-gate-passed.mjs +35 -0
  100. package/scripts/guard/checks/dp3-approved.mjs +22 -0
  101. package/scripts/guard/checks/execution-plan-ready.mjs +40 -0
  102. package/scripts/guard/checks/execution-reviews-passed.mjs +36 -0
  103. package/scripts/guard/checks/schema-valid.mjs +63 -0
  104. package/scripts/guard/checks/specs-merged.mjs +51 -0
  105. package/scripts/guard/checks/tasks-complete.mjs +31 -0
  106. package/scripts/guard/checks/tests-passing.mjs +31 -0
  107. package/scripts/guard/design-token-guard.mjs +237 -0
  108. package/scripts/guard/guard.mjs +205 -0
  109. package/scripts/infer-workflow.mjs +136 -0
  110. package/scripts/install-amazon-q.mjs +9 -0
  111. package/scripts/install-cline.mjs +9 -0
  112. package/scripts/install-continue.mjs +9 -0
  113. package/scripts/install-cursor.mjs +265 -0
  114. package/scripts/install-git-hooks.mjs +82 -0
  115. package/scripts/install-kiro.mjs +9 -0
  116. package/scripts/install-pi.mjs +9 -0
  117. package/scripts/install-qoder.mjs +9 -0
  118. package/scripts/install-qwen.mjs +9 -0
  119. package/scripts/install-roocode.mjs +9 -0
  120. package/scripts/install-windsurf.mjs +9 -0
  121. package/scripts/install-zcode.mjs +265 -0
  122. package/scripts/lib/cmd-audit.mjs +127 -0
  123. package/scripts/lib/cmd-checkpoint.mjs +118 -0
  124. package/scripts/lib/cmd-config.mjs +88 -0
  125. package/scripts/lib/cmd-doctor.mjs +267 -0
  126. package/scripts/lib/cmd-execution.mjs +206 -0
  127. package/scripts/lib/cmd-handoff.mjs +94 -0
  128. package/scripts/lib/cmd-inject.mjs +310 -0
  129. package/scripts/lib/cmd-install-amazon-q.mjs +11 -0
  130. package/scripts/lib/cmd-install-cline.mjs +11 -0
  131. package/scripts/lib/cmd-install-continue.mjs +11 -0
  132. package/scripts/lib/cmd-install-cursor.mjs +14 -0
  133. package/scripts/lib/cmd-install-kiro.mjs +11 -0
  134. package/scripts/lib/cmd-install-pi.mjs +11 -0
  135. package/scripts/lib/cmd-install-qoder.mjs +11 -0
  136. package/scripts/lib/cmd-install-qwen.mjs +11 -0
  137. package/scripts/lib/cmd-install-roocode.mjs +11 -0
  138. package/scripts/lib/cmd-install-windsurf.mjs +11 -0
  139. package/scripts/lib/cmd-install-workbuddy.mjs +359 -0
  140. package/scripts/lib/cmd-install-zcode.mjs +14 -0
  141. package/scripts/lib/cmd-isolate.mjs +37 -0
  142. package/scripts/lib/cmd-list.mjs +71 -0
  143. package/scripts/lib/cmd-runtime.mjs +85 -0
  144. package/scripts/lib/cmd-solutions.mjs +71 -0
  145. package/scripts/lib/cmd-state.mjs +231 -0
  146. package/scripts/lib/cmd-sync.mjs +102 -0
  147. package/scripts/lib/cmd-validate.mjs +105 -0
  148. package/scripts/lib/cmd-version.mjs +148 -0
  149. package/scripts/lib/config-loader.mjs +107 -0
  150. package/scripts/lib/execution-plan.mjs +492 -0
  151. package/scripts/lib/execution-recommendation.mjs +221 -0
  152. package/scripts/lib/hash.mjs +74 -0
  153. package/scripts/lib/install.mjs +267 -0
  154. package/scripts/lib/platform-runtime-inventory.mjs +27 -0
  155. package/scripts/lib/platforms.mjs +165 -0
  156. package/scripts/lib/prototype-sync.mjs +192 -0
  157. package/scripts/lib/sdd-overlay.mjs +262 -0
  158. package/scripts/lib/shell-quote.mjs +4 -0
  159. package/scripts/lib/solutions-capture.mjs +102 -0
  160. package/scripts/lib/solutions-index-gen.mjs +112 -0
  161. package/scripts/lib/solutions-inject.mjs +77 -0
  162. package/scripts/lib/solutions-promote.mjs +145 -0
  163. package/scripts/lib/spec-paths.mjs +85 -0
  164. package/scripts/lib/state-loader.mjs +154 -0
  165. package/scripts/lint/lint-skills.mjs +149 -0
  166. package/scripts/lint/rules/behavior-consistency.mjs +56 -0
  167. package/scripts/lint/rules/dp-trigger-points.mjs +60 -0
  168. package/scripts/lint/rules/exception-handling.mjs +59 -0
  169. package/scripts/lint/rules/no-contradictory-instructions.mjs +67 -0
  170. package/scripts/lint/rules/no-redundant-checks.mjs +50 -0
  171. package/scripts/lint/rules/token-rules.mjs +122 -0
  172. package/scripts/review-package +44 -0
  173. package/scripts/task-brief +40 -0
  174. package/scripts/team-flow.mjs +164 -0
  175. package/scripts/token-baseline.mjs +158 -0
  176. package/scripts/validate-artifacts +96 -0
  177. package/scripts/verify-marketplace-release.mjs +59 -0
  178. package/skills/architecture-design/SKILL.md +140 -0
  179. package/skills/architecture-design/chapters/ch01-4a-domains.md +27 -0
  180. package/skills/architecture-design/chapters/ch02-change-cascade.md +27 -0
  181. package/skills/architecture-design/chapters/ch03-architecture-outputs.md +25 -0
  182. package/skills/architecture-design/chapters/ch04-entity-to-aggregate.md +27 -0
  183. package/skills/architecture-design/chapters/ch05-cqrs.md +32 -0
  184. package/skills/architecture-design/chapters/ch06-integration.md +54 -0
  185. package/skills/architecture-design/cheatsheet.md +51 -0
  186. package/skills/architecture-design/glossary.md +23 -0
  187. package/skills/architecture-design/patterns.md +32 -0
  188. package/skills/bug-investigator/SKILL.md +77 -0
  189. package/skills/build-executor/SKILL.md +163 -0
  190. package/skills/build-executor/implementer-prompt.md +162 -0
  191. package/skills/build-executor/references/execution-modes.md +86 -0
  192. package/skills/build-executor/task-reviewer-prompt.md +195 -0
  193. package/skills/ce-brainstorm/SKILL.md +415 -0
  194. package/skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
  195. package/skills/ce-brainstorm/references/blindspot-pass.md +70 -0
  196. package/skills/ce-brainstorm/references/brainstorm-sections.md +285 -0
  197. package/skills/ce-brainstorm/references/handoff.md +168 -0
  198. package/skills/ce-brainstorm/references/html-rendering.md +634 -0
  199. package/skills/ce-brainstorm/references/markdown-rendering.md +241 -0
  200. package/skills/ce-brainstorm/references/model-tiers.md +9 -0
  201. package/skills/ce-brainstorm/references/prd-mapping.md +71 -0
  202. package/skills/ce-brainstorm/references/product-pressure-test.md +42 -0
  203. package/skills/ce-brainstorm/references/reasoning-elevation.md +63 -0
  204. package/skills/ce-brainstorm/references/settled-decisions.md +45 -0
  205. package/skills/ce-brainstorm/references/synthesis-summary.md +282 -0
  206. package/skills/ce-brainstorm/references/universal-brainstorming.md +73 -0
  207. package/skills/ce-brainstorm/references/verdict-routing.md +26 -0
  208. package/skills/ce-brainstorm/references/visual-probes.md +158 -0
  209. package/skills/ce-brainstorm/scripts/visual-probe-server.js +418 -0
  210. package/skills/ce-compound/SKILL.md +114 -0
  211. package/skills/ce-compound/assets/resolution-template.md +94 -0
  212. package/skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
  213. package/skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
  214. package/skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
  215. package/skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
  216. package/skills/ce-compound/references/agents/performance-oracle.md +108 -0
  217. package/skills/ce-compound/references/agents/security-sentinel.md +91 -0
  218. package/skills/ce-compound/references/agents/session-historian.md +83 -0
  219. package/skills/ce-compound/references/concepts-vocabulary.md +78 -0
  220. package/skills/ce-compound/references/full-mode-workflow.md +413 -0
  221. package/skills/ce-compound/references/grounding-validation.md +84 -0
  222. package/skills/ce-compound/references/lightweight-mode.md +53 -0
  223. package/skills/ce-compound/references/output-standards.md +182 -0
  224. package/skills/ce-compound/references/promotion-rules.md +38 -0
  225. package/skills/ce-compound/references/schema.yaml +231 -0
  226. package/skills/ce-compound/references/three-tier-index.md +55 -0
  227. package/skills/ce-compound/references/v0.5-upgrade.md +32 -0
  228. package/skills/ce-compound/references/write-flow.md +36 -0
  229. package/skills/ce-compound/references/yaml-schema.md +118 -0
  230. package/skills/ce-compound/scripts/session-history/discover-sessions.sh +130 -0
  231. package/skills/ce-compound/scripts/session-history/extract-errors.py +254 -0
  232. package/skills/ce-compound/scripts/session-history/extract-metadata.py +456 -0
  233. package/skills/ce-compound/scripts/session-history/extract-skeleton.py +575 -0
  234. package/skills/ce-compound/scripts/validate-doc-claims.py +346 -0
  235. package/skills/ce-compound/scripts/validate-frontmatter.py +137 -0
  236. package/skills/ce-ideate/SKILL.md +402 -0
  237. package/skills/ce-ideate/references/agents/issue-intelligence-analyst.md +200 -0
  238. package/skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
  239. package/skills/ce-ideate/references/agents/slack-researcher.md +127 -0
  240. package/skills/ce-ideate/references/agents/web-researcher.md +121 -0
  241. package/skills/ce-ideate/references/divergent-ideation.md +89 -0
  242. package/skills/ce-ideate/references/html-rendering.md +634 -0
  243. package/skills/ce-ideate/references/ideation-sections.md +191 -0
  244. package/skills/ce-ideate/references/markdown-rendering.md +238 -0
  245. package/skills/ce-ideate/references/post-ideation-workflow.md +167 -0
  246. package/skills/ce-ideate/references/universal-ideation.md +107 -0
  247. package/skills/ce-ideate/references/web-research-cache.md +56 -0
  248. package/skills/ce-plan/SKILL.md +137 -0
  249. package/skills/ce-plan/references/agents/agent-native-planning-strategist.md +62 -0
  250. package/skills/ce-plan/references/agents/architecture-strategist.md +46 -0
  251. package/skills/ce-plan/references/agents/best-practices-researcher.md +114 -0
  252. package/skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
  253. package/skills/ce-plan/references/agents/data-migration-reviewer.md +103 -0
  254. package/skills/ce-plan/references/agents/deployment-verification-agent.md +157 -0
  255. package/skills/ce-plan/references/agents/framework-docs-researcher.md +93 -0
  256. package/skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
  257. package/skills/ce-plan/references/agents/learnings-researcher.md +247 -0
  258. package/skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
  259. package/skills/ce-plan/references/agents/performance-oracle.md +108 -0
  260. package/skills/ce-plan/references/agents/repo-research-analyst.md +258 -0
  261. package/skills/ce-plan/references/agents/security-sentinel.md +91 -0
  262. package/skills/ce-plan/references/agents/slack-researcher.md +127 -0
  263. package/skills/ce-plan/references/agents/spec-flow-analyzer.md +80 -0
  264. package/skills/ce-plan/references/agents/web-researcher.md +121 -0
  265. package/skills/ce-plan/references/approach-altitude.md +55 -0
  266. package/skills/ce-plan/references/change-splitting.md +65 -0
  267. package/skills/ce-plan/references/completion-contract.md +33 -0
  268. package/skills/ce-plan/references/core-principles.md +40 -0
  269. package/skills/ce-plan/references/deepening-workflow.md +263 -0
  270. package/skills/ce-plan/references/dependency-graph.md +36 -0
  271. package/skills/ce-plan/references/html-rendering.md +634 -0
  272. package/skills/ce-plan/references/intake-routing.md +189 -0
  273. package/skills/ce-plan/references/markdown-rendering.md +238 -0
  274. package/skills/ce-plan/references/plan-handoff.md +150 -0
  275. package/skills/ce-plan/references/plan-sections.md +427 -0
  276. package/skills/ce-plan/references/plan-structure.md +120 -0
  277. package/skills/ce-plan/references/planning-modes.md +69 -0
  278. package/skills/ce-plan/references/reasoning-elevation.md +63 -0
  279. package/skills/ce-plan/references/research-workflow.md +165 -0
  280. package/skills/ce-plan/references/review-and-write.md +127 -0
  281. package/skills/ce-plan/references/settled-decisions.md +45 -0
  282. package/skills/ce-plan/references/synthesis-summary.md +418 -0
  283. package/skills/ce-plan/references/universal-planning.md +168 -0
  284. package/skills/ce-proof/SKILL.md +346 -0
  285. package/skills/ce-strategy/SKILL.md +97 -0
  286. package/skills/ce-strategy/references/interview.md +143 -0
  287. package/skills/ce-strategy/references/strategy-template.md +89 -0
  288. package/skills/code-reviewer/SKILL.md +84 -0
  289. package/skills/code-reviewer/code-reviewer-prompt.md +195 -0
  290. package/skills/contract-builder/SKILL.md +72 -0
  291. package/skills/design-system/SKILL.md +75 -0
  292. package/skills/design-system/references/agents/design-system-architect.md +138 -0
  293. package/skills/design-system/references/creation-flow.md +170 -0
  294. package/skills/design-system/references/preview-template.html +319 -0
  295. package/skills/design-system/references/token-derivation.md +115 -0
  296. package/skills/design-system/references/variant-schema.md +60 -0
  297. package/skills/e2e/SKILL.md +56 -0
  298. package/skills/e2e/references/test-verifier.md +40 -0
  299. package/skills/need-explorer/SKILL.md +79 -0
  300. package/skills/prototype/SKILL.md +98 -0
  301. package/skills/prototype/references/agents/design-system-architect.md +122 -0
  302. package/skills/prototype/references/checklist.md +82 -0
  303. package/skills/prototype/references/craft/accessibility-baseline.md +71 -0
  304. package/skills/prototype/references/craft/anti-ai-slop.md +87 -0
  305. package/skills/prototype/references/craft/laws-of-ux.md +60 -0
  306. package/skills/prototype/references/craft/state-coverage.md +81 -0
  307. package/skills/prototype/references/craft/typography-hierarchy.md +50 -0
  308. package/skills/prototype/references/layouts.md +223 -0
  309. package/skills/prototype/references/orchestration-flow.md +101 -0
  310. package/skills/prototype/references/prototype-scaffold/assets/design-tokens.css +19 -0
  311. package/skills/prototype/references/prototype-scaffold/components/button.html +3 -0
  312. package/skills/prototype/references/prototype-scaffold/design-system.md +7 -0
  313. package/skills/prototype/references/prototype-scaffold/flow.md +11 -0
  314. package/skills/prototype/references/prototype-scaffold/index.html +20 -0
  315. package/skills/prototype/references/prototype-scaffold/pages/index.html +11 -0
  316. package/skills/prototype/references/template.html +396 -0
  317. package/skills/release-archivist/SKILL.md +166 -0
  318. package/skills/release-archivist/references/closing-procedures.md +81 -0
  319. package/skills/session-handoff/SKILL.md +110 -0
  320. package/skills/session-handoff/references/context-extraction.md +70 -0
  321. package/skills/session-handoff/references/handoff-template.md +90 -0
  322. package/skills/session-handoff/references/skill-recommendation.md +43 -0
  323. package/skills/spec-merger/SKILL.md +66 -0
  324. package/skills/spec-writer/SKILL.md +149 -0
  325. package/skills/workflow-bootstrap/SKILL.md +148 -0
  326. package/skills/workflow-bootstrap/references/agents/codebase-recon-analyst.md +121 -0
  327. package/skills/workflow-bootstrap/references/b1-reconnaissance.md +80 -0
  328. package/skills/workflow-bootstrap/scripts/recon-probe.sh +328 -0
  329. package/skills/workflow-feedback/SKILL.md +120 -0
  330. package/skills/workflow-feedback/references/category-guide.md +121 -0
  331. package/skills/workflow-feedback/references/feedback-template.md +73 -0
  332. package/skills/workflow-feedback/references/review-mode.md +92 -0
  333. package/skills/workflow-orchestrator/SKILL.md +94 -0
  334. package/skills/workflow-orchestrator/references/feedback-loops.md +56 -0
  335. package/skills/workflow-orchestrator/references/s1-path-router.md +81 -0
  336. package/skills/workflow-orchestrator/references/s2-prd-prototype-loop.md +96 -0
  337. package/skills/workflow-orchestrator/references/s3-plan-pipeline.md +50 -0
  338. package/skills/workflow-orchestrator/references/s4-split-validate.md +108 -0
  339. package/skills/workflow-orchestrator/references/s5-monitoring.md +61 -0
  340. package/skills/workflow-orchestrator/references/state-model.md +185 -0
  341. package/skills/workflow-start/SKILL.md +147 -0
  342. package/skills/workflow-start/references/routing-rules.md +155 -0
  343. package/src/index.ts +16 -0
  344. package/src/parsing/change-parser.ts +79 -0
  345. package/src/parsing/requirement-blocks.ts +244 -0
  346. package/src/schema/base.ts +8 -0
  347. package/src/schema/change.ts +29 -0
  348. package/src/schema/index.ts +3 -0
  349. package/src/schema/spec.ts +12 -0
  350. package/src/validation/constants.ts +53 -0
  351. package/src/validation/tokenizer.ts +180 -0
  352. package/src/validation/types.ts +47 -0
  353. package/src/validation/validator.ts +552 -0
  354. package/templates/abandonment-summary.md +29 -0
  355. package/templates/design.md +37 -0
  356. package/templates/execution-contract.md +99 -0
  357. package/templates/plan.md +86 -0
  358. package/templates/prd.md +468 -0
  359. package/templates/proposal.md +37 -0
  360. package/templates/spec.md +31 -0
  361. package/templates/tasks.md +47 -0
  362. package/tests/e2e.test.mjs +266 -0
  363. package/tests/lib/cmd-audit.test.mjs +202 -0
  364. package/tests/lib/cmd-checkpoint.test.mjs +98 -0
  365. package/tests/lib/cmd-config.test.mjs +101 -0
  366. package/tests/lib/cmd-doctor.test.mjs +450 -0
  367. package/tests/lib/cmd-execution.test.mjs +647 -0
  368. package/tests/lib/cmd-handoff.test.mjs +137 -0
  369. package/tests/lib/cmd-inject.test.mjs +218 -0
  370. package/tests/lib/cmd-install-workbuddy.test.mjs +113 -0
  371. package/tests/lib/cmd-install-zcode.test.mjs +42 -0
  372. package/tests/lib/cmd-isolate.test.mjs +68 -0
  373. package/tests/lib/cmd-list.test.mjs +127 -0
  374. package/tests/lib/cmd-runtime.test.mjs +83 -0
  375. package/tests/lib/cmd-state-missing.test.mjs +65 -0
  376. package/tests/lib/cmd-state.test.mjs +365 -0
  377. package/tests/lib/cmd-sync-paths.test.mjs +84 -0
  378. package/tests/lib/cmd-validate-paths.test.mjs +90 -0
  379. package/tests/lib/config-loader.test.mjs +175 -0
  380. package/tests/lib/ensure-branch.test.mjs +59 -0
  381. package/tests/lib/execution-control-plane.test.mjs +168 -0
  382. package/tests/lib/execution-plan.test.mjs +474 -0
  383. package/tests/lib/guard-specs-merged.test.mjs +108 -0
  384. package/tests/lib/guard-tests-passing.test.mjs +112 -0
  385. package/tests/lib/guard-transitions.test.mjs +262 -0
  386. package/tests/lib/guard.test.mjs +611 -0
  387. package/tests/lib/hash.test.mjs +138 -0
  388. package/tests/lib/infer-workflow.test.mjs +161 -0
  389. package/tests/lib/install-git-hooks.test.mjs +20 -0
  390. package/tests/lib/marketplace-release-docs.test.mjs +31 -0
  391. package/tests/lib/minimality-discipline.test.mjs +37 -0
  392. package/tests/lib/model-profiles-docs.test.mjs +33 -0
  393. package/tests/lib/node20-compatibility.test.mjs +73 -0
  394. package/tests/lib/node20-test-entry.test.mjs +17 -0
  395. package/tests/lib/platform-runtime-distribution.test.mjs +150 -0
  396. package/tests/lib/raw-mode-smoke.test.mjs +42 -0
  397. package/tests/lib/sdd-overlay.test.mjs +118 -0
  398. package/tests/lib/spec-paths.test.mjs +80 -0
  399. package/tests/lib/state-loader.test.mjs +251 -0
  400. package/tests/lib/token-baseline.test.mjs +72 -0
  401. package/tests/lib/token-rules.test.mjs +94 -0
  402. package/tests/lib/verify-marketplace-release.test.mjs +128 -0
  403. package/tests/tsconfig.json +12 -0
  404. package/token-baseline.json +95 -0
  405. package/tsconfig.json +14 -0
@@ -0,0 +1,396 @@
1
+ <!-- 种子模板(v0.18.0):builder 从此模板组合,不从零写 CSS。token 由 design-system.md 渲染覆盖。 -->
2
+ <!-- 零外部依赖、可离线:CSS 进 <style>、JS 进 <script>,无 CDN / 外部字体 / 外部脚本。 -->
3
+ <!doctype html>
4
+ <html lang="zh-CN" data-theme="light" data-density="comfortable">
5
+ <head>
6
+ <meta charset="utf-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <title>team-flow prototype · seed template</title>
9
+ <style>
10
+ /* ============================================================
11
+ TOKENS — 由 design-system.md 渲染覆盖,禁止在此硬编码新值。
12
+ 占位默认值为「中性陶土」基调(非 indigo),保证模板离线可渲染。
13
+ ============================================================ */
14
+ :root{
15
+ /* —— 品牌/中性色(design-system.md 覆盖位)—— */
16
+ --color-primary: #c96442; /* 由 design-system.md 渲染覆盖 */
17
+ --color-neutral-900: #1a1916; /* 由 design-system.md 渲染覆盖 */
18
+
19
+ /* —— 单一 accent:每屏 ≤2 处 —— */
20
+ --accent: #c96442; /* 由 design-system.md 渲染覆盖(terracotta 中性暖色占位) */
21
+ --accent-hover: color-mix(in oklab, var(--accent), black 8%);
22
+ --accent-active: color-mix(in oklab, var(--accent), black 14%);
23
+ --accent-soft: color-mix(in oklab, var(--accent), transparent 86%);
24
+ --focus-ring: 0 0 0 3px color-mix(in oklab, var(--accent), transparent 70%);
25
+ --elev-raised: 0 2px 8px color-mix(in oklab, var(--fg), transparent 92%);
26
+
27
+ /* —— 表面/语义色 —— */
28
+ --bg: #fafaf7;
29
+ --surface: #ffffff;
30
+ --fg: #1a1916;
31
+ --muted: #6b6964;
32
+ --border: #e8e5df;
33
+
34
+ /* —— 字体(系统栈,零外部字体)—— */
35
+ --font-display: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 design-system.md 渲染覆盖 */
36
+ --font-body: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 design-system.md 渲染覆盖 */
37
+ --font-mono: ui-monospace, 'JetBrains Mono', monospace;
38
+
39
+ /* —— 字号阶梯(type scale)—— */
40
+ --text-xs: 12px;
41
+ --text-sm: 13px;
42
+ --text-base: 15px;
43
+ --text-lg: 18px;
44
+ --text-xl: 22px;
45
+ --text-2xl: 28px;
46
+ --text-3xl: 36px;
47
+ --text-4xl: 48px;
48
+
49
+ /* —— 间距(4px base)—— */
50
+ --space-1: 4px;
51
+ --space-2: 8px;
52
+ --space-3: 12px;
53
+ --space-4: 16px;
54
+ --space-5: 20px;
55
+ --space-6: 24px;
56
+ --space-7: 32px;
57
+ --space-8: 40px;
58
+ --space-9: 48px;
59
+ --space-10: 64px;
60
+ --space-11: 80px;
61
+ --space-12: 96px;
62
+
63
+ /* —— 圆角 —— */
64
+ --radius-sm: 6px;
65
+ --radius-md: 10px;
66
+ --radius-lg: 16px;
67
+ --radius-pill: 999px;
68
+
69
+ /* —— 布局 —— */
70
+ --container: 1120px;
71
+ --gutter: 32px;
72
+
73
+ /* —— 动效 —— */
74
+ --motion-fast: 150ms;
75
+ --motion-base: 200ms;
76
+ --ease-standard: cubic-bezier(0.2, 0, 0, 1);
77
+
78
+ /* —— 密度(由 data-density 驱动,见下覆盖块)—— */
79
+ --section-pad: var(--space-10);
80
+ --field-pad: var(--space-3);
81
+ }
82
+
83
+ /* 主题:dark(CSS 变量覆盖,无类切换) */
84
+ [data-theme="dark"]{
85
+ --bg: #171614;
86
+ --surface: #211f1c;
87
+ --fg: #f2efe9;
88
+ --muted: #a39e95;
89
+ --border: #35322d;
90
+ --color-neutral-900: #f2efe9;
91
+ }
92
+
93
+ /* 密度:compact(B 端高信息密度) */
94
+ [data-density="compact"]{
95
+ --section-pad: var(--space-8);
96
+ --field-pad: var(--space-2);
97
+ --text-base: 14px;
98
+ }
99
+
100
+ /* ============================================================
101
+ RESET + BASE
102
+ ============================================================ */
103
+ *{ box-sizing: border-box; }
104
+ html,body{ margin: 0; padding: 0; }
105
+ body{
106
+ background: var(--bg);
107
+ color: var(--fg);
108
+ font-family: var(--font-body);
109
+ font-size: var(--text-base);
110
+ line-height: 1.6;
111
+ -webkit-font-smoothing: antialiased;
112
+ }
113
+ h1,h2,h3,h4{ font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
114
+ p{ margin: 0; }
115
+ a{ color: inherit; text-decoration: none; }
116
+ a:hover{ color: var(--accent); }
117
+ :focus-visible{ outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
118
+ img,svg{ display: block; max-width: 100%; }
119
+ code{ font-family: var(--font-mono); font-size: 0.9em; }
120
+
121
+ /* ============================================================
122
+ LAYOUT PRIMITIVES
123
+ ============================================================ */
124
+ .section{ padding: var(--section-pad) 0; }
125
+ .container{ max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
126
+ .stack{ display: flex; flex-direction: column; gap: var(--space-4); }
127
+ .row{ display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
128
+ .row-between{ display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
129
+ .rule{ border: 0; border-top: 1px solid var(--border); margin: var(--space-6) 0; }
130
+
131
+ .grid-2{ display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
132
+ .grid-3{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
133
+ .grid-4{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
134
+ .grid-2-1{ display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-6); align-items: start; }
135
+ .grid-1-2{ display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-6); align-items: start; }
136
+
137
+ /* ============================================================
138
+ TYPOGRAPHY HELPERS
139
+ ============================================================ */
140
+ .eyebrow{
141
+ font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em;
142
+ text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-3);
143
+ }
144
+ .lead{ font-size: var(--text-lg); color: var(--muted); max-width: 60ch; }
145
+ .num{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
146
+ .meta{ font-size: var(--text-sm); color: var(--muted); }
147
+
148
+ /* ============================================================
149
+ HERO
150
+ ============================================================ */
151
+ .hero{ padding: var(--section-pad) 0; }
152
+ .hero-center{ text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
153
+ .hero-center h1{ font-size: var(--text-4xl); max-width: 18ch; }
154
+ .hero-center .lead{ margin: 0 auto; }
155
+ .hero-split{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-9); align-items: center; }
156
+ .hero-split h1{ font-size: var(--text-3xl); }
157
+ .hero-cta{ display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
158
+ .hero-center .hero-cta{ justify-content: center; }
159
+
160
+ /* ============================================================
161
+ BUTTONS
162
+ ============================================================ */
163
+ .btn{
164
+ display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
165
+ font: inherit; font-weight: 600; font-size: var(--text-sm);
166
+ padding: var(--space-3) var(--space-5); border-radius: var(--radius-md);
167
+ border: 1px solid transparent; cursor: pointer;
168
+ transition: background var(--motion-fast) var(--ease-standard),
169
+ border-color var(--motion-fast) var(--ease-standard),
170
+ color var(--motion-fast) var(--ease-standard);
171
+ }
172
+ .btn-primary{ background: var(--accent); color: #fff; }
173
+ .btn-primary:hover{ background: var(--accent-hover); color: #fff; }
174
+ .btn-primary:active{ background: var(--accent-active); }
175
+ .btn-secondary{ background: var(--surface); color: var(--fg); border-color: var(--border); }
176
+ .btn-secondary:hover{ border-color: var(--accent); color: var(--accent); }
177
+ .btn-ghost{ background: transparent; color: var(--muted); }
178
+ .btn-ghost:hover{ color: var(--fg); background: var(--accent-soft); }
179
+
180
+ /* ============================================================
181
+ CARDS / FEATURES / STATS
182
+ ============================================================ */
183
+ .card{
184
+ background: var(--surface); border: 1px solid var(--border);
185
+ border-radius: var(--radius-lg); padding: var(--space-6);
186
+ box-shadow: var(--elev-raised);
187
+ }
188
+ .card-flat{ background: transparent; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); }
189
+ .feature{ display: flex; flex-direction: column; gap: var(--space-3); }
190
+ .feature-mark{
191
+ width: 40px; height: 40px; display: grid; place-items: center;
192
+ color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-md);
193
+ }
194
+ .feature-mark svg{ width: 22px; height: 22px; }
195
+ .feature h3{ font-size: var(--text-lg); }
196
+ .feature p{ color: var(--muted); font-size: var(--text-sm); }
197
+
198
+ .stat{ display: flex; flex-direction: column; gap: var(--space-1); }
199
+ .stat-num{ font-family: var(--font-mono); font-size: var(--text-3xl); font-weight: 600; letter-spacing: -0.02em; }
200
+ .stat-label{ font-size: var(--text-sm); color: var(--muted); }
201
+
202
+ /* ============================================================
203
+ QUOTE / PULL
204
+ ============================================================ */
205
+ .quote{ position: relative; padding: var(--space-7); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
206
+ .quote-mark{ font-family: var(--font-display); font-size: var(--text-4xl); line-height: 0.6; color: var(--accent); }
207
+ .quote p{ font-size: var(--text-xl); font-family: var(--font-display); margin: var(--space-3) 0; }
208
+ .quote-author{ font-size: var(--text-sm); color: var(--muted); }
209
+ .pull{ font-size: var(--text-2xl); font-family: var(--font-display); border-left: 3px solid var(--accent); padding-left: var(--space-5); }
210
+
211
+ /* ============================================================
212
+ PILLS / TAGS
213
+ ============================================================ */
214
+ .pill{
215
+ display: inline-flex; align-items: center; gap: var(--space-1);
216
+ font-size: var(--text-xs); font-weight: 600;
217
+ padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
218
+ background: var(--accent-soft); color: var(--accent);
219
+ }
220
+ .tag{
221
+ display: inline-flex; align-items: center;
222
+ font-size: var(--text-xs); font-weight: 500;
223
+ padding: 2px var(--space-2); border-radius: var(--radius-sm);
224
+ border: 1px solid var(--border); color: var(--muted); background: var(--surface);
225
+ }
226
+
227
+ /* ============================================================
228
+ FORMS
229
+ ============================================================ */
230
+ .field{ display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
231
+ .field > label{ font-size: var(--text-sm); font-weight: 600; }
232
+ .input, .textarea{
233
+ font: inherit; font-size: var(--text-base); color: var(--fg);
234
+ background: var(--surface); border: 1px solid var(--border);
235
+ border-radius: var(--radius-md); padding: var(--field-pad) var(--space-3);
236
+ transition: border-color var(--motion-fast) var(--ease-standard);
237
+ }
238
+ .input:focus, .textarea:focus{ outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
239
+ .textarea{ min-height: 120px; resize: vertical; }
240
+
241
+ /* ============================================================
242
+ TABLE
243
+ ============================================================ */
244
+ .ds-table{ width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
245
+ .ds-table th, .ds-table td{ text-align: left; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); }
246
+ .ds-table thead th{ color: var(--muted); font-weight: 600; border-top: 0; border-bottom: 1px solid var(--border); }
247
+ .ds-table tbody tr:hover{ background: var(--accent-soft); }
248
+ .num-col{ text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
249
+
250
+ /* ============================================================
251
+ PLACEHOLDER IMAGE / LOG
252
+ ============================================================ */
253
+ .ph-img{
254
+ width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
255
+ background:
256
+ linear-gradient(135deg, var(--accent-soft), transparent),
257
+ repeating-linear-gradient(45deg, var(--border) 0 1px, transparent 1px 12px);
258
+ border: 1px solid var(--border); display: grid; place-items: center;
259
+ color: var(--muted); font-size: var(--text-sm);
260
+ }
261
+ .log-row{ display: flex; gap: var(--space-4); align-items: baseline; padding: var(--space-4) 0; border-top: 1px solid var(--border); }
262
+ .log-row:first-child{ border-top: 0; }
263
+ .log-row .num{ color: var(--muted); flex: 0 0 96px; }
264
+ .log-row .body{ flex: 1; }
265
+
266
+ /* ============================================================
267
+ CHROME: topnav / pagefoot
268
+ ============================================================ */
269
+ .topnav{ position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
270
+ .topnav .container{ display: flex; align-items: center; justify-content: space-between; height: 56px; }
271
+ .topnav .brand{ font-family: var(--font-display); font-weight: 700; }
272
+ .topnav nav{ display: flex; gap: var(--space-5); }
273
+ .topnav nav a{ color: var(--muted); font-size: var(--text-sm); }
274
+ .topnav nav a:hover{ color: var(--fg); }
275
+ .pagefoot{ border-top: 1px solid var(--border); padding: var(--space-8) 0; color: var(--muted); font-size: var(--text-sm); }
276
+
277
+ /* ============================================================
278
+ TWEAKS(页内控件,替代云端工具栏;零依赖 + localStorage)
279
+ ============================================================ */
280
+ #tweaks{
281
+ position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 50;
282
+ display: flex; gap: var(--space-2); align-items: center;
283
+ background: var(--surface); border: 1px solid var(--border);
284
+ border-radius: var(--radius-pill); padding: var(--space-2) var(--space-3);
285
+ box-shadow: var(--elev-raised); font-size: var(--text-xs);
286
+ }
287
+ #tweaks button{
288
+ font: inherit; font-weight: 600; cursor: pointer; color: var(--muted);
289
+ background: transparent; border: 0; border-radius: var(--radius-pill);
290
+ padding: var(--space-1) var(--space-3);
291
+ }
292
+ #tweaks button[aria-pressed="true"]{ background: var(--accent-soft); color: var(--accent); }
293
+
294
+ /* ============================================================
295
+ RESPONSIVE: ≤920px 全部栅格塌缩为单列
296
+ ============================================================ */
297
+ @media (max-width: 920px){
298
+ :root{ --gutter: 20px; }
299
+ .grid-2, .grid-3, .grid-4, .grid-2-1, .grid-1-2{ grid-template-columns: 1fr; }
300
+ .hero-split{ grid-template-columns: 1fr; gap: var(--space-6); }
301
+ .hero-center h1{ font-size: var(--text-3xl); }
302
+ .hero-split h1{ font-size: var(--text-2xl); }
303
+ .topnav nav{ display: none; }
304
+ .row-between{ flex-direction: column; align-items: flex-start; }
305
+ }
306
+ </style>
307
+ </head>
308
+ <body>
309
+
310
+ <!-- 页内主题/密度控件(零依赖,localStorage 持久化) -->
311
+ <div id="tweaks" data-testid="P-00-tweaks" role="group" aria-label="主题与密度">
312
+ <button type="button" data-tweak="theme" data-value="light" aria-pressed="true">Light</button>
313
+ <button type="button" data-tweak="theme" data-value="dark" aria-pressed="false">Dark</button>
314
+ <button type="button" data-tweak="density" data-value="comfortable" aria-pressed="true">宽松</button>
315
+ <button type="button" data-tweak="density" data-value="compact" aria-pressed="false">紧凑</button>
316
+ </div>
317
+
318
+ <!-- CHROME: 顶部导航 -->
319
+ <header class="topnav" data-testid="P-00-topnav">
320
+ <div class="container">
321
+ <span class="brand">team-flow</span>
322
+ <nav aria-label="主导航">
323
+ <a href="#content">概览</a>
324
+ <a href="#content">页面</a>
325
+ <a href="#content">组件</a>
326
+ <a href="#content">流程</a>
327
+ </nav>
328
+ <a class="btn btn-secondary" href="#content">登录</a>
329
+ </div>
330
+ </header>
331
+
332
+ <!-- 内容区:layouts.md 的 section 全部落入此处 -->
333
+ <main id="content">
334
+
335
+ <!-- 示例:居中 hero(具体 section 见 layouts.md) -->
336
+ <section class="hero section" data-testid="P-01-hero">
337
+ <div class="container hero-center">
338
+ <p class="eyebrow">team-flow · seed template</p>
339
+ <h1>从种子模板组合页面,不从零写 CSS</h1>
340
+ <p class="lead">所有 section 直接落入 main,token 由 design-system.md 渲染覆盖,零外部依赖、可离线。</p>
341
+ <div class="hero-cta">
342
+ <a class="btn btn-primary" href="#content">主操作</a>
343
+ <a class="btn btn-secondary" href="#content">次要操作</a>
344
+ </div>
345
+ </div>
346
+ </section>
347
+
348
+ </main>
349
+
350
+ <!-- CHROME: 页脚 -->
351
+ <footer class="pagefoot" data-testid="P-00-pagefoot">
352
+ <div class="container row-between">
353
+ <span>© team-flow prototype</span>
354
+ <span class="meta">由 seed template (v0.18.0) 组合 · token 由 design-system.md 渲染</span>
355
+ </div>
356
+ </footer>
357
+
358
+ <script>
359
+ /* 主题 + 密度控件:纯原生 JS + localStorage,无任何外部依赖。
360
+ - 状态写在 <html> 的 data-theme / data-density,CSS 通过属性选择器覆盖变量。
361
+ - 首次加载从 localStorage 恢复;缺省 light / comfortable。 */
362
+ (function(){
363
+ var KEY = 'tf-proto-tweaks';
364
+ var root = document.documentElement;
365
+ var state = { theme: 'light', density: 'comfortable' };
366
+ try {
367
+ var saved = JSON.parse(localStorage.getItem(KEY) || '{}');
368
+ if (saved.theme) state.theme = saved.theme;
369
+ if (saved.density) state.density = saved.density;
370
+ } catch (e) { /* localStorage 不可用时静默降级 */ }
371
+
372
+ function apply(){
373
+ root.setAttribute('data-theme', state.theme);
374
+ root.setAttribute('data-density', state.density);
375
+ var btns = document.querySelectorAll('#tweaks [data-tweak]');
376
+ for (var i = 0; i < btns.length; i++){
377
+ var b = btns[i];
378
+ b.setAttribute('aria-pressed', String(state[b.getAttribute('data-tweak')] === b.getAttribute('data-value')));
379
+ }
380
+ try { localStorage.setItem(KEY, JSON.stringify(state)); } catch (e) {}
381
+ }
382
+
383
+ var wrap = document.getElementById('tweaks');
384
+ if (wrap){
385
+ wrap.addEventListener('click', function(ev){
386
+ var btn = ev.target.closest('[data-tweak]');
387
+ if (!btn) return;
388
+ state[btn.getAttribute('data-tweak')] = btn.getAttribute('data-value');
389
+ apply();
390
+ });
391
+ }
392
+ apply();
393
+ })();
394
+ </script>
395
+ </body>
396
+ </html>
@@ -0,0 +1,166 @@
1
+ ---
2
+ name: release-archivist
3
+ description: Close out a team-flow change with verification, summary, and archive readiness. Invoke when implementation is complete, verification is underway, or the user asks for a final wrap-up.
4
+ ---
5
+
6
+ # Release Archivist
7
+
8
+ Finish a team-flow change cleanly with verification evidence.
9
+
10
+ ## The Iron Law: Verification Before Completion
11
+
12
+ Claiming work is complete without verification is dishonesty, not efficiency. Before claiming any status:
13
+ 1. IDENTIFY the command that proves the claim
14
+ 2. RUN the full command fresh
15
+ 3. READ output, check exit code
16
+ 4. VERIFY output confirms the claim
17
+ 5. Only THEN make the claim
18
+
19
+ **Forbidden before evidence**: "should", "probably", "seems to", expressions of satisfaction without output.
20
+
21
+ | Claim | Requires | Not Sufficient |
22
+ |-------|----------|----------------|
23
+ | Tests pass | Test output: 0 failures | Previous run, "should pass" |
24
+ | Linter clean | Linter output: 0 errors | Partial check |
25
+ | Build succeeds | Build exit 0 | Linter passing |
26
+ | Bug fixed | Original symptom passes | Code changed |
27
+ | Requirements met | Line-by-line checklist | Tests passing |
28
+
29
+ ## Verification Steps
30
+
31
+ ### Step 1: Test Suite
32
+ Run full test suite. Record total/passed/failed/skipped. Zero failures = PASS.
33
+
34
+ ### Step 2: Completeness
35
+ Compare contract batches against actual diff. Every SHALL/MUST must have implementation evidence. Missing = Critical severity.
36
+
37
+ ### Step 3: Coherence
38
+ Compare design decisions against code. Check naming consistency. Inconsistencies = IMPORTANT.
39
+
40
+ ### Step 4: Unintended Scope
41
+ Check for files modified outside scope fence, new dependencies not in design. Unplanned = WARN.
42
+
43
+ ### Step 5: Report
44
+
45
+ | Dimension | Status | Findings |
46
+ |-----------|--------|----------|
47
+ | Completeness | PASS/FAIL/WARN | [list] |
48
+ | Correctness | PASS/FAIL/WARN | [list] |
49
+ | Coherence | PASS/FAIL/WARN | [list] |
50
+
51
+ - **Prototype sync**: <synced N pages / N components / design-system updated | no UX delta | conflicts: N>
52
+ - **Compound promotion**: <promoted N learnings / updated N confirmed patterns | no learnings>
53
+
54
+ **Verdict**: PASS (all PASS) / CONDITIONAL (WARN only) / FAIL (any FAIL).
55
+ - FAIL → fix issues or route back to build-executor
56
+ - CONDITIONAL → present WARNs, proceed only with user acceptance
57
+ - PASS → proceed to final checks
58
+
59
+ ### Step 5b: E2E Verification (optional, v0.4)
60
+ If an `e2e/` suite exists for the change, fold its report into verification (see design spec ch.16):
61
+ - Read `docs/statistics/YYYY-MM-DD-e2e-report.md`: AC coverage / four-dimension coverage (EX/ST/BND) / type distribution / uncovered list / failure root-cause (test issue vs implementation issue).
62
+ - **4-level artifact verification** (L1 existence / L2 substance / L3 wiring / L4 dataflow → VERIFIED/HOLLOW/ORPHANED/STUB/MISSING): compare `architecture-design` outputs (API/DB design docs) against actual code; STUB/MISSING = BLOCKER, HOLLOW/ORPHANED = WARNING.
63
+ - **Graded gate**: prototype-phase AC≥80% (HP required, EX/ST/BND non-blocking if absent); integration-phase AC≥95% / EX≥80% / ST≥90% / BND≥75% (AC/EX = BLOCKER, ST/BND = WARNING).
64
+ - Add a report row: `| E2E | PASS/FAIL/WARN | [coverage summary] |`.
65
+ - Note: `ce-proof` is the Proof markdown editor — unrelated to verification; do NOT route E2E there.
66
+
67
+ ## Final Checks
68
+
69
+ - Tests passing? (cite command and output)
70
+ - All batches complete? (cite batch status)
71
+ - Scope added without artifact updates?
72
+ - Unresolved blockers or known risks?
73
+ - Delta specs exist that need merging?
74
+ - Run `npx --yes --package @xulthekl/team-flow@0.22.4 tf audit <change-dir>` — include `decision-point-audit.md` in archive
75
+
76
+ ### DP-6 (Verification Outcome)
77
+ ```bash
78
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_6_result "<pass|conditional|fail>: <summary>"
79
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_6_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
80
+ ```
81
+ If FAIL, do NOT proceed to DP-7. Route back or ask about abandonment.
82
+
83
+ After recording a PASS outcome, also record it as the verification gate so the
84
+ `executing → closing` transition is allowed (the guard accepts either
85
+ `test_result: pass` or a `dp_6_result` starting with `pass`):
86
+ ```bash
87
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> test_result pass
88
+ ```
89
+
90
+ ### DP-7 (Archive Confirmation)
91
+ ```bash
92
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_7_result "confirmed: <archive summary>"
93
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_7_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
94
+ ```
95
+ Verify DP-0 through DP-6 are recorded before DP-7.
96
+
97
+ ## Archive Rule
98
+
99
+ If implementation diverged from the contract, return to `bridging` before closure.
100
+
101
+ ## Post-Verification
102
+
103
+ Run `npx --yes --package @xulthekl/team-flow@0.22.4 tf state transition <change-dir> closing`. If delta specs exist, route to `spec-merger`.
104
+
105
+ ### Prototype Sync (v0.5)
106
+
107
+ After `arch-merge` completes, run prototype-sync to merge UX deltas back to the global prototype:
108
+
109
+ ```bash
110
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf prototype-sync <change-dir>
111
+ ```
112
+
113
+ **Write-back order (mandatory)**: `arch-merge` → `prototype-sync` must be executed **sequentially** within the same change closing. Do not run them in parallel — the global `docs/architecture/` and `prototype/` must not be in a half-updated state when the next change grounds on them.
114
+
115
+ If `prototype-sync` reports conflicts, list them in the closing summary and flag for manual resolution. Do not block closing on prototype-sync conflicts (advisory level).
116
+
117
+ ### Compound Promotion (v0.5)
118
+
119
+ During closing, promote change-level learnings to the global solutions library:
120
+
121
+ ```bash
122
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf solutions promote <change-dir>
123
+ ```
124
+
125
+ This checks `specs/<cap>/learnings.md` for entries meeting promotion criteria:
126
+ - severity ≥ medium AND type = pitfall/pattern → promote to global `docs/solutions/`
127
+ - domain+type matches existing global entry → mark as "confirmed pattern", upgrade severity
128
+
129
+ Report promotion results in the closing summary. Promotion is advisory — failures do not block closing.
130
+
131
+ ### Compound Capture Check (v0.5)
132
+
133
+ Before finalizing the closing, check if this change produced any learnable moments:
134
+
135
+ - Did the change trigger any mandatory rewind (re-specify, re-bridge)?
136
+ - Did bug-investigator find a recurring issue (same root cause as a prior change)?
137
+ - Did scope expand beyond the original proposal?
138
+ - Did execution-contract drift from proposal?
139
+
140
+ If any of the above occurred, capture the learning:
141
+ ```bash
142
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf solutions capture \
143
+ --phase cross-phase --domain <domain> --type pitfall \
144
+ --severity medium --summary "<what happened and how to prevent it>"
145
+ ```
146
+
147
+ This check is advisory — skip silently if no learnable moments are detected.
148
+
149
+ ### Workflow Feedback Check (v0.16.0)
150
+
151
+ Before finalizing the closing, ask the user if they encountered any workflow issues during this change:
152
+
153
+ > "本次 change 过程中有遇到工作流问题吗?(skill 触发不准、流程不顺、产物质量等)如果有,可以用 `/workflow-feedback` 记录。"
154
+
155
+ This check is advisory — skip if the user declines. If the user reports issues, invoke the `workflow-feedback` skill to create structured records in `.team-flow/feedback/`.
156
+
157
+ ## Lightweight Closure (hotfix/tweak)
158
+
159
+ Verify files exist and are non-empty, run `node --check` on code files, skip 5-step verification. Still record DP-6 and DP-7.
160
+
161
+ ## Exception Handling
162
+
163
+ - **Parse failures**: Report exact file and section
164
+ - **Missing files**: If audit can't generate, run `npx --yes --package @xulthekl/team-flow@0.22.4 tf audit` manually
165
+ - **User interruption**: Re-run verification from the beginning on resume
166
+ - **DP gaps**: Flag missing DPs during DP-6; ask user whether to proceed or return
@@ -0,0 +1,81 @@
1
+ # Closing Procedures Reference
2
+
3
+ > 从 release-archivist SKILL.md 提取的详细收尾流程。
4
+
5
+ ## Prototype Sync (v0.5)
6
+
7
+ After `arch-merge` completes, run prototype-sync to merge UX deltas back to the global prototype:
8
+
9
+ ```bash
10
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf prototype-sync <change-dir>
11
+ ```
12
+
13
+ **Write-back order (mandatory)**: `arch-merge` → `prototype-sync` must be executed **sequentially** within the same change closing. Do not run them in parallel.
14
+
15
+ If `prototype-sync` reports conflicts, list them in the closing summary and flag for manual resolution. Do not block closing on prototype-sync conflicts (advisory level).
16
+
17
+ ## Compound Promotion (v0.5)
18
+
19
+ During closing, promote change-level learnings to the global solutions library:
20
+
21
+ ```bash
22
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf solutions promote <change-dir>
23
+ ```
24
+
25
+ Promotion criteria:
26
+ - severity ≥ medium AND type = pitfall/pattern → promote to global `docs/solutions/`
27
+ - domain+type matches existing global entry → mark as "confirmed pattern", upgrade severity
28
+
29
+ Report promotion results in the closing summary. Promotion is advisory — failures do not block closing.
30
+
31
+ ## Compound Capture Check (v0.5)
32
+
33
+ Before finalizing the closing, check if this change produced any learnable moments:
34
+
35
+ - Did the change trigger any mandatory rewind (re-specify, re-bridge)?
36
+ - Did bug-investigator find a recurring issue (same root cause as a prior change)?
37
+ - Did scope expand beyond the original proposal?
38
+ - Did execution-contract drift from proposal?
39
+
40
+ If any occurred, capture the learning:
41
+ ```bash
42
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf solutions capture \
43
+ --phase cross-phase --domain <domain> --type pitfall \
44
+ --severity medium --summary "<what happened and how to prevent it>"
45
+ ```
46
+
47
+ Advisory — skip silently if no learnable moments detected.
48
+
49
+ ## DP-6 (Verification Outcome)
50
+
51
+ ```bash
52
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_6_result "<pass|conditional|fail>: <summary>"
53
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_6_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
54
+ ```
55
+
56
+ If FAIL, do NOT proceed to DP-7. Route back or ask about abandonment.
57
+
58
+ After PASS, also record the verification gate:
59
+ ```bash
60
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> test_result pass
61
+ ```
62
+
63
+ ## DP-7 (Archive Confirmation)
64
+
65
+ ```bash
66
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_7_result "confirmed: <archive summary>"
67
+ npx --yes --package @xulthekl/team-flow@0.22.4 tf state set <change-dir> dp_7_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
68
+ ```
69
+
70
+ Verify DP-0 through DP-6 are recorded before DP-7.
71
+
72
+ ## E2E Verification (optional, v0.4)
73
+
74
+ If an `e2e/` suite exists for the change:
75
+ - Read `docs/statistics/YYYY-MM-DD-e2e-report.md`: AC coverage / four-dimension coverage / type distribution / uncovered list / failure root-cause
76
+ - **4-level artifact verification** (L1-L4): compare architecture-design outputs against actual code
77
+ - **Graded gate**: prototype-phase AC≥80%; integration-phase AC≥95% / EX≥80% / ST≥90% / BND≥75%
78
+
79
+ ## Lightweight Closure (hotfix/tweak)
80
+
81
+ Verify files exist and are non-empty, run `node --check` on code files, skip 5-step verification. Still record DP-6 and DP-7.