@mrpatronz/nexusflow 2.11.0 → 2.12.1

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 (209) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +154 -13
  3. package/dist/analyzers/detect-deps.js +1 -1
  4. package/dist/analyzers/detect-deps.js.map +1 -1
  5. package/dist/commands/commit.d.ts.map +1 -1
  6. package/dist/commands/commit.js +15 -0
  7. package/dist/commands/commit.js.map +1 -1
  8. package/dist/commands/create.d.ts +10 -1
  9. package/dist/commands/create.d.ts.map +1 -1
  10. package/dist/commands/create.js +44 -23
  11. package/dist/commands/create.js.map +1 -1
  12. package/dist/commands/finish.d.ts.map +1 -1
  13. package/dist/commands/finish.js +15 -0
  14. package/dist/commands/finish.js.map +1 -1
  15. package/dist/commands/flow.d.ts +13 -0
  16. package/dist/commands/flow.d.ts.map +1 -0
  17. package/dist/commands/flow.js +91 -0
  18. package/dist/commands/flow.js.map +1 -0
  19. package/dist/commands/skill.d.ts +28 -0
  20. package/dist/commands/skill.d.ts.map +1 -0
  21. package/dist/commands/skill.js +250 -0
  22. package/dist/commands/skill.js.map +1 -0
  23. package/dist/commands/status.d.ts.map +1 -1
  24. package/dist/commands/status.js +14 -0
  25. package/dist/commands/status.js.map +1 -1
  26. package/dist/commands/tag.d.ts +13 -0
  27. package/dist/commands/tag.d.ts.map +1 -0
  28. package/dist/commands/tag.js +179 -0
  29. package/dist/commands/tag.js.map +1 -0
  30. package/dist/commands/verify.d.ts +16 -0
  31. package/dist/commands/verify.d.ts.map +1 -0
  32. package/dist/commands/verify.js +91 -0
  33. package/dist/commands/verify.js.map +1 -0
  34. package/dist/core/adapters/local-storage.d.ts.map +1 -1
  35. package/dist/core/adapters/local-storage.js +2 -2
  36. package/dist/core/adapters/local-storage.js.map +1 -1
  37. package/dist/core/commit.d.ts +2 -0
  38. package/dist/core/commit.d.ts.map +1 -1
  39. package/dist/core/commit.js +15 -0
  40. package/dist/core/commit.js.map +1 -1
  41. package/dist/core/domain-catalog.d.ts +9 -0
  42. package/dist/core/domain-catalog.d.ts.map +1 -0
  43. package/dist/core/domain-catalog.js +47 -0
  44. package/dist/core/domain-catalog.js.map +1 -0
  45. package/dist/core/domain-packs.d.ts +81 -0
  46. package/dist/core/domain-packs.d.ts.map +1 -0
  47. package/dist/core/domain-packs.js +443 -0
  48. package/dist/core/domain-packs.js.map +1 -0
  49. package/dist/core/generation-lock.d.ts +1 -1
  50. package/dist/core/generation-lock.d.ts.map +1 -1
  51. package/dist/core/generation-lock.js +18 -11
  52. package/dist/core/generation-lock.js.map +1 -1
  53. package/dist/core/lifecycle.d.ts +28 -0
  54. package/dist/core/lifecycle.d.ts.map +1 -0
  55. package/dist/core/lifecycle.js +423 -0
  56. package/dist/core/lifecycle.js.map +1 -0
  57. package/dist/core/planning-notes.d.ts +11 -0
  58. package/dist/core/planning-notes.d.ts.map +1 -0
  59. package/dist/core/planning-notes.js +108 -0
  60. package/dist/core/planning-notes.js.map +1 -0
  61. package/dist/core/verify.d.ts +39 -0
  62. package/dist/core/verify.d.ts.map +1 -0
  63. package/dist/core/verify.js +397 -0
  64. package/dist/core/verify.js.map +1 -0
  65. package/dist/core/work-guidance.d.ts +202 -0
  66. package/dist/core/work-guidance.d.ts.map +1 -0
  67. package/dist/core/work-guidance.js +231 -0
  68. package/dist/core/work-guidance.js.map +1 -0
  69. package/dist/core/workspace-git.d.ts.map +1 -1
  70. package/dist/core/workspace-git.js +1 -0
  71. package/dist/core/workspace-git.js.map +1 -1
  72. package/dist/core/workspace-state.d.ts +24 -3
  73. package/dist/core/workspace-state.d.ts.map +1 -1
  74. package/dist/core/workspace-state.js +93 -31
  75. package/dist/core/workspace-state.js.map +1 -1
  76. package/dist/core/workspace-tools.d.ts +10 -0
  77. package/dist/core/workspace-tools.d.ts.map +1 -0
  78. package/dist/core/workspace-tools.js +123 -0
  79. package/dist/core/workspace-tools.js.map +1 -0
  80. package/dist/core/workspace.d.ts.map +1 -1
  81. package/dist/core/workspace.js +7 -17
  82. package/dist/core/workspace.js.map +1 -1
  83. package/dist/generators/base.d.ts.map +1 -1
  84. package/dist/generators/base.js +42 -5
  85. package/dist/generators/base.js.map +1 -1
  86. package/dist/generators/index.d.ts.map +1 -1
  87. package/dist/generators/index.js +11 -0
  88. package/dist/generators/index.js.map +1 -1
  89. package/dist/generators/plan-generator.d.ts.map +1 -1
  90. package/dist/generators/plan-generator.js +61 -58
  91. package/dist/generators/plan-generator.js.map +1 -1
  92. package/dist/generators/skills-generator.d.ts.map +1 -1
  93. package/dist/generators/skills-generator.js +36 -3
  94. package/dist/generators/skills-generator.js.map +1 -1
  95. package/dist/gui/assets/AgentsPage-C7Rh_dp7.js +3 -0
  96. package/dist/gui/assets/DashboardPage-YVONGtqS.js +1 -0
  97. package/dist/gui/assets/{GettingStartedPage-1MOTng3B.js → GettingStartedPage-C2Kbvz_N.js} +1 -1
  98. package/dist/gui/assets/ProjectsPage-DOpfV2Oj.js +1 -0
  99. package/dist/gui/assets/{ScaffoldRepoInline-CP0yn5mw.js → ScaffoldRepoInline-D91aitAi.js} +1 -1
  100. package/dist/gui/assets/{SettingsPage-DWmrLV8o.js → SettingsPage-BdaHN6fa.js} +1 -1
  101. package/dist/gui/assets/SkillsPage-DT9lRkCg.js +7 -0
  102. package/dist/gui/assets/StartWorkPage-D932lq9x.js +1 -0
  103. package/dist/gui/assets/{StrategiesPage-CdCbbIu-.js → StrategiesPage-DCfS-wdu.js} +2 -2
  104. package/dist/gui/assets/WorkroomsPage-BQU27nWS.js +4 -0
  105. package/dist/gui/assets/WorkspacesPage-D3TLVmq-.js +13 -0
  106. package/dist/gui/assets/{alert-dialog-u7qgb9Hq.js → alert-dialog-YynbGyj1.js} +1 -1
  107. package/dist/gui/assets/badge-DTBzXOWn.js +1 -0
  108. package/dist/gui/assets/index-er-mkc2S.css +2 -0
  109. package/dist/gui/assets/index-hTa55BQ6.js +57 -0
  110. package/dist/gui/assets/square-check-big-Bj8Rf_dH.js +1 -0
  111. package/dist/gui/assets/tabs-DfW7Akjs.js +1 -0
  112. package/dist/gui/assets/{useAriaLabelledBy-C4zV-1Ra.js → useAriaLabelledBy-BmJErI5a.js} +1 -1
  113. package/dist/gui/assets/vsc-BsVrJLSg.js +1 -0
  114. package/dist/gui/index.html +3 -5
  115. package/dist/http/work-guidance-routes.d.ts +4 -0
  116. package/dist/http/work-guidance-routes.d.ts.map +1 -0
  117. package/dist/http/work-guidance-routes.js +50 -0
  118. package/dist/http/work-guidance-routes.js.map +1 -0
  119. package/dist/index.js +169 -1
  120. package/dist/index.js.map +1 -1
  121. package/dist/mcp/tools.d.ts +0 -7
  122. package/dist/mcp/tools.d.ts.map +1 -1
  123. package/dist/mcp/tools.js +207 -0
  124. package/dist/mcp/tools.js.map +1 -1
  125. package/dist/resources/contracts.d.ts.map +1 -1
  126. package/dist/resources/contracts.js +2 -1
  127. package/dist/resources/contracts.js.map +1 -1
  128. package/dist/resources/fs-safety.d.ts.map +1 -1
  129. package/dist/resources/fs-safety.js +2 -1
  130. package/dist/resources/fs-safety.js.map +1 -1
  131. package/dist/resources/materializer.d.ts +3 -0
  132. package/dist/resources/materializer.d.ts.map +1 -1
  133. package/dist/resources/materializer.js +45 -19
  134. package/dist/resources/materializer.js.map +1 -1
  135. package/dist/resources/service.d.ts +1 -1
  136. package/dist/resources/service.d.ts.map +1 -1
  137. package/dist/resources/service.js +3 -2
  138. package/dist/resources/service.js.map +1 -1
  139. package/dist/server.d.ts.map +1 -1
  140. package/dist/server.js +333 -8
  141. package/dist/server.js.map +1 -1
  142. package/dist/static-resources/skills/contextspace-verify-release/SKILL.md +51 -0
  143. package/dist/static-resources/skills/contextspace-verify-release/references/evidence.md +21 -0
  144. package/dist/static-resources/skills/nexusflow-dev/SKILL.md +49 -0
  145. package/dist/static-resources/skills/nexusflow-dev/references/cli-conventions.md +15 -0
  146. package/dist/static-resources/skills/nexusflow-dev/references/verification-checklist.md +28 -0
  147. package/dist/static-resources/skills/nexusflow-lifecycle/SKILL.md +66 -0
  148. package/dist/static-resources/skills/nexusflow-lifecycle/references/epic-deliverables.md +36 -0
  149. package/dist/static-resources/skills/nexusflow-lifecycle/references/flow-selection-matrix.md +21 -0
  150. package/dist/static-resources/skills/nexusflow-lifecycle/references/stage-outcomes.md +23 -0
  151. package/dist/static-resources/workflows/epic-multi-slice.md +21 -0
  152. package/dist/static-resources/workflows/plan-implement-review.md +17 -6
  153. package/dist/static-resources/workflows/research-verify.md +15 -4
  154. package/dist/static-resources/workflows/solo-developer.md +11 -2
  155. package/dist/test-setup.d.ts +2 -0
  156. package/dist/test-setup.d.ts.map +1 -0
  157. package/dist/test-setup.js +8 -0
  158. package/dist/test-setup.js.map +1 -0
  159. package/dist/types.d.ts +178 -0
  160. package/dist/types.d.ts.map +1 -1
  161. package/dist/utils/resolve-workspace.d.ts.map +1 -1
  162. package/dist/utils/resolve-workspace.js +15 -8
  163. package/dist/utils/resolve-workspace.js.map +1 -1
  164. package/dist/utils/skills-catalog.d.ts +18 -9
  165. package/dist/utils/skills-catalog.d.ts.map +1 -1
  166. package/dist/utils/skills-catalog.js +248 -344
  167. package/dist/utils/skills-catalog.js.map +1 -1
  168. package/dist/utils/workflow-advisor.d.ts +1 -1
  169. package/dist/utils/workflow-advisor.d.ts.map +1 -1
  170. package/dist/utils/workflow-advisor.js +16 -4
  171. package/dist/utils/workflow-advisor.js.map +1 -1
  172. package/dist/utils/workflows.d.ts.map +1 -1
  173. package/dist/utils/workflows.js +5 -2
  174. package/dist/utils/workflows.js.map +1 -1
  175. package/dist/workrooms/contracts.d.ts +3 -3
  176. package/dist/workrooms/local-resources.d.ts +4 -1
  177. package/dist/workrooms/local-resources.d.ts.map +1 -1
  178. package/dist/workrooms/manager.d.ts +5 -2
  179. package/dist/workrooms/manager.d.ts.map +1 -1
  180. package/dist/workrooms/store.d.ts +2 -2
  181. package/package.json +3 -2
  182. package/resources/skills/contextspace-verify-release/SKILL.md +51 -0
  183. package/resources/skills/contextspace-verify-release/references/evidence.md +21 -0
  184. package/resources/skills/nexusflow-dev/SKILL.md +49 -0
  185. package/resources/skills/nexusflow-dev/references/cli-conventions.md +15 -0
  186. package/resources/skills/nexusflow-dev/references/verification-checklist.md +28 -0
  187. package/resources/skills/nexusflow-lifecycle/SKILL.md +66 -0
  188. package/resources/skills/nexusflow-lifecycle/references/epic-deliverables.md +36 -0
  189. package/resources/skills/nexusflow-lifecycle/references/flow-selection-matrix.md +21 -0
  190. package/resources/skills/nexusflow-lifecycle/references/stage-outcomes.md +23 -0
  191. package/resources/workflows/epic-multi-slice.md +21 -0
  192. package/resources/workflows/plan-implement-review.md +17 -6
  193. package/resources/workflows/research-verify.md +15 -4
  194. package/resources/workflows/solo-developer.md +11 -2
  195. package/dist/gui/assets/AgentsPage-DbivhmK0.js +0 -3
  196. package/dist/gui/assets/DashboardPage-D50Qrm3e.js +0 -1
  197. package/dist/gui/assets/NullStore-tdPen1kp.js +0 -1
  198. package/dist/gui/assets/ProjectsPage-srKgf7VN.js +0 -1
  199. package/dist/gui/assets/SkillsPage-CKjTXdrd.js +0 -6
  200. package/dist/gui/assets/StartWorkPage-BCUnJ9k8.js +0 -1
  201. package/dist/gui/assets/WorkroomsPage-BcT-mGtT.js +0 -4
  202. package/dist/gui/assets/WorkspacesPage-CYFCm-7_.js +0 -2
  203. package/dist/gui/assets/badge-DwXvB44H.js +0 -1
  204. package/dist/gui/assets/chunk-BV7QT456-DfUBKG-z.js +0 -3
  205. package/dist/gui/assets/index-3tD_IeyQ.js +0 -55
  206. package/dist/gui/assets/index-CK5YRfPV.css +0 -2
  207. package/dist/gui/assets/square-check-big-BSIiYXPI.js +0 -1
  208. package/dist/gui/assets/tabs-BrHKp5bD.js +0 -1
  209. package/dist/gui/assets/vsc-D80c4gBT.js +0 -1
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: contextspace-verify-release
3
+ description: Verify a ContextSpace-managed change, assess PR readiness, or execute an explicitly requested push, merge, or release using evidence tied to the current code revision. Use when verification or delivery is the task, not for every edit.
4
+ metadata:
5
+ contextspace:
6
+ title: ContextSpace Verification and Release
7
+ category: workflows
8
+ tags: [contextspace, verification, review, release]
9
+ ---
10
+
11
+ # Establish readiness from current evidence
12
+
13
+ Resolve the requested workspace, branch, PR, assignment, and acceptance criteria.
14
+ Inspect the current diff and repository-required checks. Select additional evidence
15
+ according to the affected behavior and impact; use [verification evidence](references/evidence.md).
16
+ Do not impose ContextSpace's own npm commands on unrelated projects.
17
+
18
+ ## Review and verify
19
+
20
+ Check intended behavior, regressions, compatibility, and consequential failure paths.
21
+ For interface changes, assess the actual user's journey and recovery behavior with
22
+ browser evidence. Report concrete findings by severity, with trigger, impact,
23
+ location, and expected behavior. Distinguish inspected behavior from assumptions.
24
+
25
+ Record commands, results, tested commit, and any uncommitted changes included in a
26
+ local test. An unavailable check is not a pass. Reuse applicable evidence while
27
+ the tested input is unchanged; rerun affected checks after fixes.
28
+
29
+ ## Push or assess merge readiness
30
+
31
+ Before a requested push, inspect pending changes and the remote branch; stage only
32
+ the intended paths. Preserve unrelated work. Follow the repository's commit convention.
33
+ After pushing, confirm the PR's head SHA matches the intended commit and watch its
34
+ checks. Inspect failures and fix issues within the user's authorized scope.
35
+
36
+ Before declaring readiness, read the current PR head, relevant diff/review findings,
37
+ required checks, draft status, and mergeability. Compare the head with the reviewed
38
+ and verified revision. If it changed, inspect the added changes and verify the new
39
+ head. Green checks on an earlier commit do not establish readiness for a newer one.
40
+ Pending checks, unresolved blocking findings, and missing required approvals must be
41
+ reported as outstanding. No review submitted is different from an approved review.
42
+
43
+ An assessment or push request does not itself authorize merging or publishing.
44
+ When those actions are requested, perform the applicable checks first and verify
45
+ the resulting remote state. For deployments or migrations, include the relevant
46
+ rollout and recovery plan. Do not deploy to a test or production service merely
47
+ to produce evidence unless that action is within the assignment.
48
+
49
+ Conclude with the exact revision, verification outcome, unresolved blockers or
50
+ limits, and which requested external actions actually completed. Link to CI/PR
51
+ evidence. Avoid an unconditional merge-ready claim from tests alone.
@@ -0,0 +1,21 @@
1
+ # Evidence proportional to the change
2
+
3
+ | Change | Establish |
4
+ | --- | --- |
5
+ | Localized bug | Original failing behavior, corrected behavior, relevant regression coverage |
6
+ | Performance | Representative workload and baseline, comparable result, correctness preserved |
7
+ | Public contract | Existing consumers remain compatible or a coordinated migration is defined |
8
+ | Persistent data | Representative old inputs, retry/failure behavior, recovery feasibility |
9
+ | UI flow | Discoverability, understandable defaults, keyboard access, loading/empty/error/retry behavior |
10
+ | State/storage | Adapter routing, concurrent updates, interrupted writes and stale-save recovery |
11
+ | Generated instructions | Correct source, reproducible output, valid references and runnable documented commands |
12
+
13
+ Separate local evidence from remote evidence. For local tests, record the commit and
14
+ whether the worktree contained edits; the commit alone does not identify those edits.
15
+ For PR checks, record the head SHA and run links. When CI tests a synthetic merge
16
+ commit, confirm the run corresponds to the current PR head and base.
17
+
18
+ For existing repositories, discover required commands from repository instructions,
19
+ package/build scripts, and CI. Run applicable gates, not unrelated tools merely
20
+ because they appear in a generic checklist. A successful build cannot demonstrate
21
+ an accessible interface, a safe migration, or satisfied product requirements.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: nexusflow-dev
3
+ description: Maintain ContextSpace/NexusFlow implementation, CLI, storage, generated resources, and tests. Use for changes to this codebase; projects merely using ContextSpace follow their own repository engineering standards.
4
+ metadata:
5
+ contextspace:
6
+ title: ContextSpace Maintainer
7
+ category: dev-standards
8
+ tags: [contextspace, nexusflow, architecture, testing]
9
+ ---
10
+
11
+ # Maintain ContextSpace
12
+
13
+ Read the current repository instructions and assignment before editing. Keep changes
14
+ in the supplied worktree. The CLI in `src/index.ts` wires thin handlers; workspace
15
+ behavior belongs in `src/core/`, document persistence uses `src/core/storage.ts`,
16
+ and generated assistant views belong in `src/generators/`.
17
+
18
+ ## Preserve implementation contracts
19
+
20
+ - Resolve brand aliases and durable paths through `src/core/constants.ts` and the
21
+ brand configuration. Preserve primary/legacy fallback behavior.
22
+ - Use the storage port for adapter-owned documents. A local lock or cache does not
23
+ make filesystem writes an acceptable substitute for configured storage.
24
+ - Mutate shared state through the relevant catalog or workspace API. Keep locked
25
+ sections short; do slow verification outside them and revalidate the affected
26
+ revision before committing its result. Read fresh state under the lock.
27
+ - Use atomic persistence at the owning storage layer. For portable resource paths,
28
+ enforce containment and reject symlinks with the filesystem safety helpers.
29
+ - Change the source of generated views, then regenerate. Keep volatile progress
30
+ in live state, and invalidate verification evidence when the tested input changes.
31
+ - Knowledge entries retain the 300-character body limit; preserve adapter routing,
32
+ searchability, and recovery when Git persistence fails.
33
+
34
+ Read [CLI conventions](references/cli-conventions.md) for command changes and
35
+ [verification checks](references/verification-checklist.md) to select checks for
36
+ the affected subsystem. Follow repository-required gates before submission; use
37
+ targeted checks during iteration and repeat only when changes or failures justify it.
38
+
39
+ ## Maintain the guidance too
40
+
41
+ Versioned skill sources live in `resources/skills/`; workflow templates live in
42
+ `resources/workflows/`. Installed catalog packages and generated workspace copies
43
+ are derived from those sources. See `docs/maintaining-skills.md` for validation,
44
+ scenario evaluation, installation, and regeneration. Do not hand-edit a generated
45
+ `SKILL.md` and expect refresh to preserve it.
46
+
47
+ After changing structures or resources, build the backend before running
48
+ `node dist/index.js refresh`. Distinguish successful generation from a later Git
49
+ staging failure. Report the actual state instead of claiming the entire refresh passed.
@@ -0,0 +1,15 @@
1
+ # CLI contracts
2
+
3
+ Declare positional arguments once: either in `.command('name <id>')` or with
4
+ `.command('name').argument('<id>')`. Wrap action handlers with `runAction(...)`.
5
+
6
+ Use the repository's workspace resolver appropriate to the operation: interactive
7
+ selection when requested, quiet resolution for headless/read-only commands. Do not
8
+ introduce a prompt when a supplied workspace or current context resolves the task.
9
+
10
+ `--json` must produce parseable JSON without banners or ANSI escapes. Errors should
11
+ have a meaningful nonzero exit status; test failure paths as well as successful output.
12
+ Exercise documented subcommands and options against the built CLI's `--help`.
13
+
14
+ Tests should check observable argument behavior, JSON parsing, missing/invalid inputs,
15
+ and exit status where relevant. Use disposable fixtures for mutating commands.
@@ -0,0 +1,28 @@
1
+ # Repository verification
2
+
3
+ Follow the current `AGENTS.md` and package scripts. Before submitting code changes,
4
+ run `npm run build:backend` and `npm test`; GUI changes also require
5
+ `npm run build --prefix gui`. Do not embed expected test counts in this guide.
6
+
7
+ During implementation, select checks by affected behavior:
8
+
9
+ | Change | Useful evidence |
10
+ | --- | --- |
11
+ | CLI/API | Real command/request behavior, validation failures, clean JSON and exit status |
12
+ | Storage | Configured adapter exercised, original content retained, failed writes recoverable |
13
+ | Shared state | Concurrent edits do not lose unrelated data; stale revisions rejected |
14
+ | Generated resources | Regeneration from source, repeatability, provenance and source-file preservation |
15
+ | GUI | Actual user journey, loading/empty/error states, draft preservation, keyboard and label behavior |
16
+ | Verification engine | Gate uses the tested input, failed/stale/unreadable snapshots cannot permit progress |
17
+ | Compatibility/migration | Old and new persisted inputs, supported aliases, failure/recovery paths |
18
+
19
+ Run the relevant existing suites and add regressions for concrete failures. Do not
20
+ write tests that merely restate implementation or assert arbitrary prose. Browser
21
+ tests should wait for observable navigation/request completion, not fixed sleeps.
22
+ Passing mocked UI tests does not prove the backend integration; pair them with API
23
+ tests where the change crosses that boundary.
24
+
25
+ Use environment-specific workarounds only after establishing why they are needed.
26
+ For example, `npm test -- --configLoader native` can avoid Vite writing beside a
27
+ read-only configuration cache; it is not a universal substitute for repository scripts.
28
+ Missing permissions or dependencies are unavailable evidence, not a passing test.
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: nexusflow-lifecycle
3
+ description: Choose and carry out an appropriately sized development workflow in a ContextSpace workspace, using its current assignment, source documents, and milestones. Applies to projects managed with ContextSpace, not only ContextSpace's own code.
4
+ metadata:
5
+ contextspace:
6
+ title: ContextSpace Work Lifecycle
7
+ category: workflows
8
+ tags: [contextspace, workflow, development]
9
+ ---
10
+
11
+ # Work from the current assignment
12
+
13
+ Read the workspace instructions and live assignment with `ctxspace flow --assignment --json`
14
+ or MCP `get_work_context`. Check the selected milestone, stage, expected output, and
15
+ stopping point. If the CLI is not on PATH, try the generated workspace launcher
16
+ `./.contextspace/bin/ctxspace` (PowerShell: `.\.contextspace\bin\ctxspace.cmd`).
17
+ If live tools are unavailable, read the authoritative
18
+ `contextspace-work.json` and relevant sources; identify anything you cannot verify.
19
+ The user's current instruction can revise a saved assignment. Make that change
20
+ explicit; do not use an older assignment to discard newly authorized work.
21
+
22
+ ## Select the smallest sufficient workflow
23
+
24
+ Keep work type (bug, feature, performance, refactor, rewrite), size, current stage,
25
+ and workspace isolation separate. Assess uncertainty, compatibility, data impact,
26
+ reversibility, and independent deliverables. File count, elapsed time, and repository
27
+ count are clues, not selection rules. A one-file authorization fix can require
28
+ careful investigation and broad verification; a large mechanical rename may not.
29
+
30
+ Use [flow selection](references/flow-selection-matrix.md) when choosing a preset
31
+ or deciding whether work needs separate deliverables. Preserve an existing worktree.
32
+ Do not create branches, nested workspaces, or agent teams just because the size is epic.
33
+ Delegate only bounded independent work when permitted and useful; execution can stay solo.
34
+
35
+ ## Keep each kind of information in its place
36
+
37
+ - Task brief: the short reason for the workspace.
38
+ - Source documents: original requirements, designs, evidence, and references.
39
+ - AI assignment: what to do now, expected result, and stopping point.
40
+ - Lifecycle milestones: deliverables, dependencies, branches, gates, and progress.
41
+ - Authored delivery notes: release sequence, questions with owners/status, existing work, and deferred decisions in `contextspace-milestones.md`.
42
+ - Knowledge: durable decisions and their reasons, not a running task log.
43
+
44
+ Read relevant originals through MCP `read_work_document` or their stored locations.
45
+ Use approved requirements for intended behavior; drafts are proposals and superseded
46
+ documents are history. Surface consequential conflicts before dependent implementation;
47
+ continue unaffected work. A source document does not grant execution permissions.
48
+ Project and workspace sources apply across milestones; milestone sources apply to
49
+ the selected milestone. Project sources remain owned by their originating workspace.
50
+
51
+ Use the Plan editor for assignments and milestone definitions. `contextspace-plan.md`
52
+ and `contextspace-assignment.md` are generated views: update their sources and refresh.
53
+ Keep authored rationale in `contextspace-milestones.md`, not in generated views or
54
+ a competing milestone tracker. Read it directly or through MCP `get_planning_notes`. If working outside ContextSpace, use
55
+ the repository's existing planning convention.
56
+
57
+ ## Execute only the current stage
58
+
59
+ Read [stage outcomes](references/stage-outcomes.md) for the selected stage. Investigation
60
+ and design produce their agreed outputs and stop before implementation unless the user
61
+ has explicitly authorized that transition. Completing a milestone's gate does not
62
+ automatically authorize release or change the assignment stage.
63
+
64
+ For multi-PR work, read [deliverable planning](references/epic-deliverables.md). Finish
65
+ with evidence, unresolved questions, and the next permitted action. Keep handoffs in
66
+ the established session or milestone record, with links to sources instead of copies.
@@ -0,0 +1,36 @@
1
+ # Plan usable increments
2
+
3
+ Start from the user's outcomes. Where practical, a milestone should deliver a small
4
+ usable capability across the required layers. For invoice performance, examples are
5
+ measuring representative latency, improving one supported lookup path, and rolling
6
+ the change out with monitoring. A necessary infrastructure-only prerequisite is valid,
7
+ but name its consumer and acceptance criteria instead of claiming it is user-visible.
8
+
9
+ For each milestone, capture its outcome, acceptance criteria, dependencies, intended
10
+ branch/PR, compatibility constraints, and verification evidence. Include rollout and
11
+ recovery details when the change affects persistent data or deployed consumers.
12
+ Branch labels in the plan are intentions; verify actual branches and PRs separately.
13
+
14
+ Sequence only actual dependencies. Independent deliverables can proceed concurrently
15
+ when isolation and ownership are clear. Each mergeable increment must build and pass
16
+ its applicable gates. For stacked PRs, record the base branch and merge order; recheck
17
+ dependent PRs after their base changes.
18
+
19
+ Preserve milestone IDs referenced by documents and assignments. The current editor
20
+ can add/edit milestones but does not delete existing ones. Record canceled outcomes
21
+ explicitly rather than marking unimplemented behavior as delivered; if restructuring
22
+ requires unsupported operations, explain the limitation and agree a supported plan.
23
+
24
+ Before replanning, inventory existing work with repo, branch/PR/commit, status
25
+ (merged, on branch, or no change needed), and evidence. Record the remaining work
26
+ in `contextspace-milestones.md`. Keep questions with their owner, blocking impact,
27
+ open/resolved status, and resolution; distinguish flag-only findings from authorized
28
+ implementation. Use applicable enabled skill templates for explicitly requested
29
+ PBI/spec drafts, save them as source documents, and link them to milestone IDs.
30
+ Enabling a skill does not generate or approve those documents automatically.
31
+
32
+ Circular package dependencies can be valid service relationships. Record an authored
33
+ release sequence: build the changed producer against compatible published clients,
34
+ publish the package, then bump and verify consumers. Plan a compatible transition
35
+ for breaking contracts. Package topology alone cannot determine that sequence;
36
+ lifecycle milestone dependencies must still form an executable, acyclic plan.
@@ -0,0 +1,21 @@
1
+ # Choose by uncertainty and impact
2
+
3
+ | Situation | Starting workflow | Evidence or planning needed |
4
+ | --- | --- | --- |
5
+ | Understood, localized, reversible change | Small task | Reproduction or observable acceptance check; relevant regression gate |
6
+ | One cohesive capability with some unknowns | Standard change | Resolve important unknowns; define acceptance criteria and failure behavior |
7
+ | Multiple independently reviewable deliverables | Epic | Outcomes, dependency graph, compatibility boundaries, handoffs |
8
+ | Authentication, data migration, public contract, or hard-to-reverse change | Any size, deeper verification | Failure analysis, compatibility and recovery evidence appropriate to the impact |
9
+ | Performance investigation | Investigate stage, any size | Representative workload, baseline, measurement method; no speculative rewrite |
10
+
11
+ Choose isolation separately. `ctxspace quick` creates an in-place workspace;
12
+ `ctxspace create` creates a standard workspace and supports mode selection.
13
+ `ctxspace create --flow epic` selects an epic preset. Check the installed CLI's
14
+ `--help` for its available flags; presets do not create a stack of PRs automatically.
15
+ A small task may use a worktree for isolation. Existing workspaces can change their
16
+ assignment size and milestone definitions without resetting progress.
17
+
18
+ Increase workflow depth when investigation uncovers data loss risk, cross-service
19
+ compatibility constraints, or separately releasable outcomes. Explain the finding and
20
+ adapt the existing plan. Reduce unnecessary ceremony when evidence resolves uncertainty.
21
+ Do not require a research document, new test file, approval, or agent team for every tweak.
@@ -0,0 +1,23 @@
1
+ # Expected results by stage
2
+
3
+ | Stage | Produce | Stop or transition |
4
+ | --- | --- | --- |
5
+ | Investigate | Reproduction or measurements, evidence for likely causes, remaining unknowns | Return the agreed findings; implementation requires an authorized assignment |
6
+ | Design | Intended behavior, acceptance criteria, relevant alternatives and compatibility constraints | Return a reviewable proposal; do not silently start coding |
7
+ | Implement | Working behavior for the assigned milestone, with relevant tests and documentation | Verify within authorized scope; do not infer release permission |
8
+ | Verify | Results against acceptance criteria, commands, tested revision, failure and recovery evidence | Report pass, failure, or missing evidence; fix within existing authorization |
9
+ | Review | Prioritized findings with trigger, impact, location, and expected behavior; usability evidence where relevant | State unresolved blockers and assessment scope; review alone does not authorize edits |
10
+ | Release | Current commit checks, review status, compatibility and recovery details when needed | Perform only the requested external actions; verify their results |
11
+
12
+ For performance work, establish a repeatable baseline before optimizing and compare
13
+ the same workload afterward. Report environmental differences and noisy measurements.
14
+ For rewrites or migrations, define behavior to preserve and test coexistence or rollback
15
+ where applicable. Test a rollback procedure only in an appropriate test environment.
16
+
17
+ For GUI work, acceptance includes the user's path to the feature, understandable
18
+ labels, defaults, and loading, empty, error, and recovery behavior. Use browser evidence
19
+ for interaction or visual claims; a successful build proves neither usability nor accessibility.
20
+
21
+ A concise handoff contains the current stage/milestone, relevant source IDs, decisions,
22
+ tested revision and commands, unresolved issues, and the next permitted action. It should
23
+ not introduce another authoritative plan or copy entire source documents.
@@ -0,0 +1,21 @@
1
+ # Team Strategy: Epic & Multi-PR Slices
2
+
3
+ Deliver large changes as independently reviewable outcomes with explicit dependencies.
4
+
5
+ 1. Read the current assignment and approved project/workspace/milestone sources.
6
+ Name usable increments where practical, rather than automatically splitting
7
+ schema, API, and UI into separate PRs. For a required infrastructure prerequisite,
8
+ identify its consumer and acceptance criteria.
9
+ 2. In the existing lifecycle plan, record each outcome, acceptance criteria,
10
+ dependencies, intended branch/PR, compatibility requirements, and verification.
11
+ Edit the source through the Plan editor; `contextspace-plan.md` is generated.
12
+ Branch labels do not create branches or PRs automatically.
13
+ 3. Sequence actual dependencies. Independent increments may proceed concurrently
14
+ with clear ownership and isolation. Each mergeable increment must build and pass
15
+ applicable gates; recheck dependent PRs when their base changes.
16
+ 4. Keep original contracts in source documents, durable decisions with reasons in
17
+ knowledge, and progress in milestones. Handoffs link those records and include
18
+ the tested revision, outstanding issues, and next permitted action.
19
+ 5. Respect the current stage and stopping point. Add migration, rollout, and recovery
20
+ evidence when the change affects stored data or deployed consumers. Verify the
21
+ current PR head and checks before reporting readiness; release requires authorization.
@@ -1,8 +1,19 @@
1
- # Team Cooperation Guidelines
1
+ # Team Strategy: Plan, Implement, Review
2
2
 
3
- You are the lead developer. You must coordinate a Plan-Implement-Review loop to complete the task:
3
+ Deliver one cohesive change through a bounded plan, implementation, and review.
4
4
 
5
- 1. **Research & Plan**: Research the requirements and codebase first. Create a plan (`implementation_plan.md`) describing the proposed changes.
6
- 2. **Implement**: Define a `Code_Implementer` subagent equipped with code editing and terminal tools. Send them the plan and instruct them to write the changes.
7
- 3. **Review**: Once implemented, define a `Code_Reviewer` subagent to run verification tests and review the changes for correctness.
8
- 4. **Loop**: If the reviewer finds bugs or test failures, send the feedback back to the implementer and repeat the cycle until the changes are approved.
5
+ 1. Read the current assignment and relevant approved sources. Resolve important
6
+ unknowns and define observable acceptance criteria in the existing milestone
7
+ plan. In ContextSpace, edit the lifecycle source through the Plan editor;
8
+ `contextspace-plan.md` is its generated view. Do not create a second plan.
9
+ 2. If the assignment is investigation or design, return that stage's output and
10
+ stop. Proceed to implementation only when the current user authorization covers it.
11
+ 3. Implement the assigned outcome and test relevant behavior, including concrete
12
+ failure and recovery paths. Preserve compatibility with existing consumers.
13
+ 4. Review correctness, scope, usability where relevant, and verification evidence.
14
+ Fix in-scope findings, rerun affected checks, and report remaining limitations.
15
+
16
+ One developer or agent can perform this loop. Use independent review or bounded
17
+ parallel work when available, authorized, and useful; a fixed agent topology is
18
+ not required. Reuse the same sources and milestone state across handoffs.
19
+ Read the current PR head and checks before declaring merge readiness.
@@ -1,6 +1,17 @@
1
- # Team Cooperation Guidelines
1
+ # Team Strategy: Research & Verify
2
2
 
3
- You are the lead investigator. You must coordinate a research-heavy cycle:
3
+ Investigate uncertainty and produce evidence for the current assignment.
4
4
 
5
- 1. **Deep Research**: Define a `Research_Specialist` subagent to scan the codebase, find dependencies, and write a thorough context guide outlining how the system works.
6
- 2. **Test-Driven Implement**: Write test suites first based on the research findings, then spawn a developer subagent to code until all tests pass successfully.
5
+ Read the live assignment, relevant original sources, and the code paths needed to
6
+ answer it. Use reproducible experiments, focused tests, or measurements to test
7
+ hypotheses. For performance work, establish a representative baseline before
8
+ proposing optimization. Distinguish observations from inference.
9
+
10
+ Return the agreed findings, evidence, remaining questions, and options for the next
11
+ stage. Investigation does not automatically authorize implementation. If the user
12
+ has authorized the next stage, update the current assignment and existing milestone
13
+ plan and proceed within that scope. Otherwise stop at the agreed output.
14
+
15
+ Work directly by default. An independent specialist can investigate a bounded
16
+ question when delegation is permitted and materially helps; a research agent team
17
+ and a long context report are not prerequisites.
@@ -1,3 +1,12 @@
1
- # Direct Execution Guidelines
1
+ # Team Strategy: Solo Developer
2
2
 
3
- You are a solo developer. Do not spawn subagents. Research, plan, edit, and verify all code changes yourself. Focus on delivering direct, simple edits to target files.
3
+ Complete a bounded assignment directly, with verification appropriate to its impact.
4
+
5
+ Read the live assignment with `ctxspace flow --assignment` or MCP `get_work_context`.
6
+ Preserve its stage and stopping point unless the user revises them. Use the existing
7
+ workspace and plan; do not create an additional planning document or agent team.
8
+
9
+ Investigate only the unknowns needed for the assignment. For a bug, reproduce the
10
+ failure; for a small reversible edit, use an observable acceptance check. Implement
11
+ when authorized, keep the change focused, and run relevant checks plus the
12
+ repository-required gates before submission. Return the result and evidence.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { beforeAll } from 'vitest';
2
+ // Load samples after test-module mocks are registered. Domain administration now
3
+ // depends on filesystem helpers, which must not be cached ahead of vi.mock().
4
+ beforeAll(async () => {
5
+ const { registerSampleDomainPacks } = await import('./core/domain-packs.js');
6
+ registerSampleDomainPacks();
7
+ });
8
+ //# sourceMappingURL=test-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,iFAAiF;AACjF,8EAA8E;AAC9E,SAAS,CAAC,KAAK,IAAI,EAAE;IACnB,MAAM,EAAE,yBAAyB,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAC7E,yBAAyB,EAAE,CAAC;AAC9B,CAAC,CAAC,CAAC"}