xcoder-dna 0.0.0-stage → 1.3.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 (390) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +87 -2
  3. package/dist/agents/ai-chat-debate.d.ts +36 -0
  4. package/dist/agents/ai-chat-debate.js +300 -0
  5. package/dist/agents/ai-chat-report-writer.d.ts +7 -0
  6. package/dist/agents/ai-chat-report-writer.js +100 -0
  7. package/dist/agents/duplicate-detector.d.ts +41 -0
  8. package/dist/agents/duplicate-detector.js +65 -0
  9. package/dist/agents/genesis-agent.d.ts +61 -0
  10. package/dist/agents/genesis-agent.js +340 -0
  11. package/dist/agents/samurai-agent.d.ts +53 -0
  12. package/dist/agents/samurai-agent.js +279 -0
  13. package/dist/agents/sub-agent.d.ts +56 -0
  14. package/dist/agents/sub-agent.js +353 -0
  15. package/dist/backlog/backlog-requirement-validator.d.ts +10 -0
  16. package/dist/backlog/backlog-requirement-validator.js +60 -0
  17. package/dist/backlog/backlog-store.d.ts +29 -0
  18. package/dist/backlog/backlog-store.js +148 -0
  19. package/dist/backlog/po-agent.d.ts +16 -0
  20. package/dist/backlog/po-agent.js +121 -0
  21. package/dist/backlog/types.d.ts +25 -0
  22. package/dist/backlog/types.js +4 -0
  23. package/dist/bench/run.d.ts +11 -0
  24. package/dist/bench/run.js +185 -0
  25. package/dist/bench/types.d.ts +50 -0
  26. package/dist/bench/types.js +1 -0
  27. package/dist/cli/swarm.d.ts +10 -0
  28. package/dist/cli/swarm.js +100 -0
  29. package/dist/cli/task.d.ts +14 -0
  30. package/dist/cli/task.js +121 -0
  31. package/dist/cli/wbc-arg.d.ts +6 -0
  32. package/dist/cli/wbc-arg.js +40 -0
  33. package/dist/cli/wbc.d.ts +45 -0
  34. package/dist/cli/wbc.js +98 -0
  35. package/dist/commands/license.d.ts +9 -0
  36. package/dist/commands/license.js +140 -0
  37. package/dist/commands/release.d.ts +44 -0
  38. package/dist/commands/release.js +180 -0
  39. package/dist/commands/test.d.ts +50 -0
  40. package/dist/commands/test.js +385 -0
  41. package/dist/config/loadConfig.d.ts +82 -0
  42. package/dist/config/loadConfig.js +240 -0
  43. package/dist/config/secure-mode.d.ts +29 -0
  44. package/dist/config/secure-mode.js +63 -0
  45. package/dist/config/user-config.d.ts +39 -0
  46. package/dist/config/user-config.js +202 -0
  47. package/dist/engine/reasoning-engine.d.ts +21 -0
  48. package/dist/engine/reasoning-engine.js +59 -0
  49. package/dist/events/bus.d.ts +22 -0
  50. package/dist/events/bus.js +18 -0
  51. package/dist/index.d.ts +79 -0
  52. package/dist/index.js +77 -0
  53. package/dist/indexing/ignoreRules.d.ts +1 -0
  54. package/dist/indexing/ignoreRules.js +53 -0
  55. package/dist/instance-swarm/instance-swarm-orchestrator.d.ts +57 -0
  56. package/dist/instance-swarm/instance-swarm-orchestrator.js +204 -0
  57. package/dist/instance-swarm/protocol-name-resolver.d.ts +23 -0
  58. package/dist/instance-swarm/protocol-name-resolver.js +64 -0
  59. package/dist/license/gate.d.ts +31 -0
  60. package/dist/license/gate.js +188 -0
  61. package/dist/license/http-client.d.ts +43 -0
  62. package/dist/license/http-client.js +195 -0
  63. package/dist/license/manager.d.ts +39 -0
  64. package/dist/license/manager.js +175 -0
  65. package/dist/license/receipt.d.ts +27 -0
  66. package/dist/license/receipt.js +108 -0
  67. package/dist/license/state-codec.d.ts +72 -0
  68. package/dist/license/state-codec.js +218 -0
  69. package/dist/license/state-paths.d.ts +17 -0
  70. package/dist/license/state-paths.js +64 -0
  71. package/dist/license/store.d.ts +44 -0
  72. package/dist/license/store.js +223 -0
  73. package/dist/license/trust-anchor.d.ts +24 -0
  74. package/dist/license/trust-anchor.js +74 -0
  75. package/dist/license/types.d.ts +34 -0
  76. package/dist/license/types.js +19 -0
  77. package/dist/llm/budget.d.ts +23 -0
  78. package/dist/llm/budget.js +58 -0
  79. package/dist/llm/client.d.ts +53 -0
  80. package/dist/llm/client.js +122 -0
  81. package/dist/llm/factory.d.ts +14 -0
  82. package/dist/llm/factory.js +32 -0
  83. package/dist/orchestrator/defect-logger.d.ts +31 -0
  84. package/dist/orchestrator/defect-logger.js +101 -0
  85. package/dist/orchestrator/defect-manager.d.ts +118 -0
  86. package/dist/orchestrator/defect-manager.js +338 -0
  87. package/dist/orchestrator/defect-migration.d.ts +14 -0
  88. package/dist/orchestrator/defect-migration.js +174 -0
  89. package/dist/orchestrator/defect-store.d.ts +48 -0
  90. package/dist/orchestrator/defect-store.js +76 -0
  91. package/dist/orchestrator/healing.d.ts +14 -0
  92. package/dist/orchestrator/healing.js +11 -0
  93. package/dist/orchestrator/interactive-steering.d.ts +64 -0
  94. package/dist/orchestrator/interactive-steering.js +107 -0
  95. package/dist/orchestrator/interrupt-handler.d.ts +30 -0
  96. package/dist/orchestrator/interrupt-handler.js +70 -0
  97. package/dist/orchestrator/lesson-manager.d.ts +25 -0
  98. package/dist/orchestrator/lesson-manager.js +122 -0
  99. package/dist/orchestrator/progress-summary.d.ts +15 -0
  100. package/dist/orchestrator/progress-summary.js +106 -0
  101. package/dist/orchestrator/reasoning-score.d.ts +49 -0
  102. package/dist/orchestrator/reasoning-score.js +117 -0
  103. package/dist/orchestrator/swarm.d.ts +36 -0
  104. package/dist/orchestrator/swarm.js +77 -0
  105. package/dist/orchestrator/task-factory.d.ts +15 -0
  106. package/dist/orchestrator/task-factory.js +176 -0
  107. package/dist/orchestrator/validation-gate.d.ts +23 -0
  108. package/dist/orchestrator/validation-gate.js +155 -0
  109. package/dist/protocol/react-contract.d.ts +136 -0
  110. package/dist/protocol/react-contract.js +698 -0
  111. package/dist/protocol/wks-protocol-manager.d.ts +22 -0
  112. package/dist/protocol/wks-protocol-manager.js +72 -0
  113. package/dist/sdlc-runtime/conversation-runner.d.ts +8 -0
  114. package/dist/sdlc-runtime/conversation-runner.js +64 -0
  115. package/dist/sdlc-runtime/dag-utils.d.ts +15 -0
  116. package/dist/sdlc-runtime/dag-utils.js +67 -0
  117. package/dist/sdlc-runtime/defect-integration.d.ts +7 -0
  118. package/dist/sdlc-runtime/defect-integration.js +99 -0
  119. package/dist/sdlc-runtime/execution-loop.d.ts +38 -0
  120. package/dist/sdlc-runtime/execution-loop.js +274 -0
  121. package/dist/sdlc-runtime/lesson-recorder.d.ts +9 -0
  122. package/dist/sdlc-runtime/lesson-recorder.js +27 -0
  123. package/dist/sdlc-runtime/plan-initializer.d.ts +47 -0
  124. package/dist/sdlc-runtime/plan-initializer.js +135 -0
  125. package/dist/sdlc-runtime/progress-persister.d.ts +10 -0
  126. package/dist/sdlc-runtime/progress-persister.js +34 -0
  127. package/dist/sdlc-runtime/protocol-loader.d.ts +10 -0
  128. package/dist/sdlc-runtime/protocol-loader.js +21 -0
  129. package/dist/sdlc-runtime/reporting.d.ts +24 -0
  130. package/dist/sdlc-runtime/reporting.js +68 -0
  131. package/dist/sdlc-runtime/sdlc-orchestrator.d.ts +59 -0
  132. package/dist/sdlc-runtime/sdlc-orchestrator.js +170 -0
  133. package/dist/sdlc-runtime/sdlc-skill.d.ts +44 -0
  134. package/dist/sdlc-runtime/sdlc-skill.js +148 -0
  135. package/dist/sdlc-runtime/steering-handler.d.ts +14 -0
  136. package/dist/sdlc-runtime/steering-handler.js +51 -0
  137. package/dist/sdlc-runtime/trace-recorder.d.ts +10 -0
  138. package/dist/sdlc-runtime/trace-recorder.js +7 -0
  139. package/dist/security/index.d.ts +16 -0
  140. package/dist/security/index.js +12 -0
  141. package/dist/security/input-screen.d.ts +30 -0
  142. package/dist/security/input-screen.js +75 -0
  143. package/dist/security/tool-call-guard.d.ts +16 -0
  144. package/dist/security/tool-call-guard.js +163 -0
  145. package/dist/security/untrusted-content.d.ts +34 -0
  146. package/dist/security/untrusted-content.js +63 -0
  147. package/dist/skills/advanced-dfir/SKILL.md +85 -0
  148. package/dist/skills/advanced-pentest-lab/SKILL.md +88 -0
  149. package/dist/skills/analyst/SKILL.md +55 -0
  150. package/dist/skills/architect/SKILL.md +54 -0
  151. package/dist/skills/aws/SKILL.md +92 -0
  152. package/dist/skills/azure/SKILL.md +90 -0
  153. package/dist/skills/bylaw-context.d.ts +45 -0
  154. package/dist/skills/bylaw-context.js +61 -0
  155. package/dist/skills/bylaw-review.d.ts +20 -0
  156. package/dist/skills/bylaw-review.js +101 -0
  157. package/dist/skills/conversation/SKILL.md +29 -0
  158. package/dist/skills/design-patterns/SKILL.md +190 -0
  159. package/dist/skills/devops/SKILL.md +55 -0
  160. package/dist/skills/directives.d.ts +20 -0
  161. package/dist/skills/directives.js +313 -0
  162. package/dist/skills/docker/SKILL.md +76 -0
  163. package/dist/skills/docker-expert/SKILL.md +56 -0
  164. package/dist/skills/enterprise-systems-analyst/SKILL.md +83 -0
  165. package/dist/skills/enterprise-systems-analyst/references/crm.md +41 -0
  166. package/dist/skills/enterprise-systems-analyst/references/erp.md +40 -0
  167. package/dist/skills/enterprise-systems-analyst/references/financial-systems.md +35 -0
  168. package/dist/skills/enterprise-systems-analyst/references/hcm.md +38 -0
  169. package/dist/skills/enterprise-systems-analyst/references/mrp.md +37 -0
  170. package/dist/skills/enterprise-systems-analyst/references/scm.md +32 -0
  171. package/dist/skills/ethical-hacking-methodology/SKILL.md +119 -0
  172. package/dist/skills/externalSkillLoader.d.ts +25 -0
  173. package/dist/skills/externalSkillLoader.js +65 -0
  174. package/dist/skills/externalSkillRegistry.d.ts +33 -0
  175. package/dist/skills/externalSkillRegistry.js +94 -0
  176. package/dist/skills/filesystem-management/SKILL.md +61 -0
  177. package/dist/skills/first-run-seed.d.ts +26 -0
  178. package/dist/skills/first-run-seed.js +75 -0
  179. package/dist/skills/git-vcs/SKILL.md +84 -0
  180. package/dist/skills/kafka/SKILL.md +89 -0
  181. package/dist/skills/kubernetes/SKILL.md +93 -0
  182. package/dist/skills/kubernetes-expert/SKILL.md +54 -0
  183. package/dist/skills/openshift/SKILL.md +93 -0
  184. package/dist/skills/pentester/SKILL.md +59 -0
  185. package/dist/skills/performance-tester/SKILL.md +57 -0
  186. package/dist/skills/playwright-ui-tester/SKILL.md +67 -0
  187. package/dist/skills/programmer/SKILL.md +58 -0
  188. package/dist/skills/project-scaffolding/SKILL.md +133 -0
  189. package/dist/skills/qa-engineer/SKILL.md +91 -0
  190. package/dist/skills/rca/SKILL.md +58 -0
  191. package/dist/skills/redhat/SKILL.md +92 -0
  192. package/dist/skills/rosa/SKILL.md +80 -0
  193. package/dist/skills/scrum-framework/SKILL.md +74 -0
  194. package/dist/skills/scrum-framework/references/artifacts_and_quality.md +79 -0
  195. package/dist/skills/scrum-framework/references/roles_and_events.md +105 -0
  196. package/dist/skills/scrum-master-agent/SKILL.md +74 -0
  197. package/dist/skills/scrum-master-agent/references/behaviors.md +56 -0
  198. package/dist/skills/sdlc-skill.d.ts +1 -0
  199. package/dist/skills/sdlc-skill.js +4 -0
  200. package/dist/skills/secops/SKILL.md +52 -0
  201. package/dist/skills/secure-architect.bylaws.d.ts +68 -0
  202. package/dist/skills/secure-architect.bylaws.js +525 -0
  203. package/dist/skills/seed-skills.d.ts +48 -0
  204. package/dist/skills/seed-skills.js +213 -0
  205. package/dist/skills/skill-authoring/SKILL.md +123 -0
  206. package/dist/skills/skill-header.d.ts +51 -0
  207. package/dist/skills/skill-header.js +163 -0
  208. package/dist/skills/skill-path-guard.d.ts +41 -0
  209. package/dist/skills/skill-path-guard.js +95 -0
  210. package/dist/skills/skillRouter.d.ts +51 -0
  211. package/dist/skills/skillRouter.js +90 -0
  212. package/dist/skills/skills-root.d.ts +64 -0
  213. package/dist/skills/skills-root.js +168 -0
  214. package/dist/skills/software-architect/SKILL.md +77 -0
  215. package/dist/skills/software-engineer/SKILL.md +74 -0
  216. package/dist/skills/solid-principles/SKILL.md +94 -0
  217. package/dist/skills/task-planning/SKILL.md +115 -0
  218. package/dist/skills/tester/SKILL.md +54 -0
  219. package/dist/skills/ubuntu/SKILL.md +87 -0
  220. package/dist/skills/ui-ux-design/SKILL.md +114 -0
  221. package/dist/skills/workspace-context/SKILL.md +103 -0
  222. package/dist/sprint/controller.d.ts +37 -0
  223. package/dist/sprint/controller.js +220 -0
  224. package/dist/sprint/dag-builder.d.ts +14 -0
  225. package/dist/sprint/dag-builder.js +105 -0
  226. package/dist/sprint/reporter.d.ts +11 -0
  227. package/dist/sprint/reporter.js +97 -0
  228. package/dist/sprint/state-store.d.ts +10 -0
  229. package/dist/sprint/state-store.js +71 -0
  230. package/dist/sprint/types.d.ts +24 -0
  231. package/dist/sprint/types.js +4 -0
  232. package/dist/store/file-version-store.d.ts +24 -0
  233. package/dist/store/file-version-store.js +73 -0
  234. package/dist/store/task-store.d.ts +90 -0
  235. package/dist/store/task-store.js +166 -0
  236. package/dist/task-ingest/architect-detailer.d.ts +43 -0
  237. package/dist/task-ingest/architect-detailer.js +141 -0
  238. package/dist/task-ingest/detail-schema.d.ts +9 -0
  239. package/dist/task-ingest/detail-schema.js +195 -0
  240. package/dist/task-ingest/detailed-run.d.ts +36 -0
  241. package/dist/task-ingest/detailed-run.js +108 -0
  242. package/dist/task-ingest/extract-id.d.ts +9 -0
  243. package/dist/task-ingest/extract-id.js +24 -0
  244. package/dist/task-ingest/index.d.ts +23 -0
  245. package/dist/task-ingest/index.js +14 -0
  246. package/dist/task-ingest/ingest.d.ts +45 -0
  247. package/dist/task-ingest/ingest.js +163 -0
  248. package/dist/task-ingest/list-ingested.d.ts +13 -0
  249. package/dist/task-ingest/list-ingested.js +30 -0
  250. package/dist/task-ingest/pending-filter.d.ts +30 -0
  251. package/dist/task-ingest/pending-filter.js +59 -0
  252. package/dist/task-ingest/scanner.d.ts +56 -0
  253. package/dist/task-ingest/scanner.js +216 -0
  254. package/dist/task-ingest/source-reader.d.ts +25 -0
  255. package/dist/task-ingest/source-reader.js +93 -0
  256. package/dist/task-ingest/spec-builder.d.ts +34 -0
  257. package/dist/task-ingest/spec-builder.js +89 -0
  258. package/dist/task-ingest/wbs-extract.d.ts +50 -0
  259. package/dist/task-ingest/wbs-extract.js +226 -0
  260. package/dist/task-ingest/wbs-parser.d.ts +36 -0
  261. package/dist/task-ingest/wbs-parser.js +170 -0
  262. package/dist/tools/apiTestTool.d.ts +37 -0
  263. package/dist/tools/apiTestTool.js +128 -0
  264. package/dist/tools/ast-tools.d.ts +183 -0
  265. package/dist/tools/ast-tools.js +853 -0
  266. package/dist/tools/browse-tool.d.ts +105 -0
  267. package/dist/tools/browse-tool.js +394 -0
  268. package/dist/tools/credential.d.ts +17 -0
  269. package/dist/tools/credential.js +32 -0
  270. package/dist/tools/dependency-graph.d.ts +23 -0
  271. package/dist/tools/dependency-graph.js +164 -0
  272. package/dist/tools/edit-tool.d.ts +34 -0
  273. package/dist/tools/edit-tool.js +95 -0
  274. package/dist/tools/file-header-manager.d.ts +27 -0
  275. package/dist/tools/file-header-manager.js +153 -0
  276. package/dist/tools/fs-tools.d.ts +154 -0
  277. package/dist/tools/fs-tools.js +337 -0
  278. package/dist/tools/git-tools.d.ts +79 -0
  279. package/dist/tools/git-tools.js +348 -0
  280. package/dist/tools/github-tool.d.ts +48 -0
  281. package/dist/tools/github-tool.js +147 -0
  282. package/dist/tools/globTool.d.ts +20 -0
  283. package/dist/tools/globTool.js +34 -0
  284. package/dist/tools/grepTool.d.ts +19 -0
  285. package/dist/tools/grepTool.js +44 -0
  286. package/dist/tools/index-freshness.d.ts +58 -0
  287. package/dist/tools/index-freshness.js +190 -0
  288. package/dist/tools/index-glob.d.ts +48 -0
  289. package/dist/tools/index-glob.js +175 -0
  290. package/dist/tools/load-skill-tool.d.ts +15 -0
  291. package/dist/tools/load-skill-tool.js +114 -0
  292. package/dist/tools/patch-tools.d.ts +58 -0
  293. package/dist/tools/patch-tools.js +153 -0
  294. package/dist/tools/playwright-tool.d.ts +66 -0
  295. package/dist/tools/playwright-tool.js +121 -0
  296. package/dist/tools/project-detect.d.ts +20 -0
  297. package/dist/tools/project-detect.js +87 -0
  298. package/dist/tools/prompt-guidance.d.ts +22 -0
  299. package/dist/tools/prompt-guidance.js +23 -0
  300. package/dist/tools/scheduleTool.d.ts +19 -0
  301. package/dist/tools/scheduleTool.js +181 -0
  302. package/dist/tools/search-tools.d.ts +27 -0
  303. package/dist/tools/search-tools.js +78 -0
  304. package/dist/tools/sed-tool.d.ts +66 -0
  305. package/dist/tools/sed-tool.js +402 -0
  306. package/dist/tools/shell-result.d.ts +11 -0
  307. package/dist/tools/shell-result.js +1 -0
  308. package/dist/tools/shell-tool.d.ts +45 -0
  309. package/dist/tools/shell-tool.js +141 -0
  310. package/dist/tools/siteCrawlerTool.d.ts +32 -0
  311. package/dist/tools/siteCrawlerTool.js +205 -0
  312. package/dist/tools/tool-registry.d.ts +67 -0
  313. package/dist/tools/tool-registry.js +596 -0
  314. package/dist/tools/validate-tool.d.ts +23 -0
  315. package/dist/tools/validate-tool.js +201 -0
  316. package/dist/tools/workspace-index.d.ts +46 -0
  317. package/dist/tools/workspace-index.js +173 -0
  318. package/dist/types.d.ts +222 -0
  319. package/dist/types.js +7 -0
  320. package/dist/updater/index.d.ts +14 -0
  321. package/dist/updater/index.js +120 -0
  322. package/dist/util/banner.d.ts +25 -0
  323. package/dist/util/banner.js +140 -0
  324. package/dist/util/command-suggester.d.ts +6 -0
  325. package/dist/util/command-suggester.js +25 -0
  326. package/dist/util/confirm-interrupt.d.ts +10 -0
  327. package/dist/util/confirm-interrupt.js +31 -0
  328. package/dist/util/continue-trigger.d.ts +11 -0
  329. package/dist/util/continue-trigger.js +20 -0
  330. package/dist/util/env-info.d.ts +18 -0
  331. package/dist/util/env-info.js +37 -0
  332. package/dist/util/file-access-log.d.ts +35 -0
  333. package/dist/util/file-access-log.js +140 -0
  334. package/dist/util/footer-manager.d.ts +124 -0
  335. package/dist/util/footer-manager.js +195 -0
  336. package/dist/util/footer-renderer.d.ts +67 -0
  337. package/dist/util/footer-renderer.js +319 -0
  338. package/dist/util/footer-state.d.ts +34 -0
  339. package/dist/util/footer-state.js +18 -0
  340. package/dist/util/footer-text.d.ts +51 -0
  341. package/dist/util/footer-text.js +74 -0
  342. package/dist/util/ids.d.ts +1 -0
  343. package/dist/util/ids.js +4 -0
  344. package/dist/util/levenshtein.d.ts +6 -0
  345. package/dist/util/levenshtein.js +34 -0
  346. package/dist/util/logger.d.ts +10 -0
  347. package/dist/util/logger.js +41 -0
  348. package/dist/util/logs.d.ts +26 -0
  349. package/dist/util/logs.js +88 -0
  350. package/dist/util/output-handler.d.ts +89 -0
  351. package/dist/util/output-handler.js +193 -0
  352. package/dist/util/output-interceptor.d.ts +18 -0
  353. package/dist/util/output-interceptor.js +49 -0
  354. package/dist/util/output-paths.d.ts +43 -0
  355. package/dist/util/output-paths.js +121 -0
  356. package/dist/util/package-json.d.ts +6 -0
  357. package/dist/util/package-json.js +36 -0
  358. package/dist/util/process-kill.d.ts +27 -0
  359. package/dist/util/process-kill.js +148 -0
  360. package/dist/util/protocol-error-logger.d.ts +33 -0
  361. package/dist/util/protocol-error-logger.js +73 -0
  362. package/dist/util/redact.d.ts +25 -0
  363. package/dist/util/redact.js +103 -0
  364. package/dist/util/scroll-region-guard.d.ts +33 -0
  365. package/dist/util/scroll-region-guard.js +63 -0
  366. package/dist/util/spinner.d.ts +15 -0
  367. package/dist/util/spinner.js +49 -0
  368. package/dist/util/terminal-output.d.ts +34 -0
  369. package/dist/util/terminal-output.js +1 -0
  370. package/dist/util/terminal-silent.d.ts +6 -0
  371. package/dist/util/terminal-silent.js +20 -0
  372. package/dist/util/terminal.d.ts +56 -0
  373. package/dist/util/terminal.js +124 -0
  374. package/dist/util/text-sanitize.d.ts +8 -0
  375. package/dist/util/text-sanitize.js +45 -0
  376. package/dist/util/thinking-spinner.d.ts +27 -0
  377. package/dist/util/thinking-spinner.js +189 -0
  378. package/dist/util/tool-error-logger.d.ts +33 -0
  379. package/dist/util/tool-error-logger.js +77 -0
  380. package/dist/util/tty.d.ts +13 -0
  381. package/dist/util/tty.js +16 -0
  382. package/dist/util/xcoder-paths.d.ts +56 -0
  383. package/dist/util/xcoder-paths.js +63 -0
  384. package/dist/version.d.ts +2 -0
  385. package/dist/version.js +4 -0
  386. package/dist/worker-agent/to-subtask-node.d.ts +35 -0
  387. package/dist/worker-agent/to-subtask-node.js +41 -0
  388. package/dist/worker-agent/worker-orchestrator.d.ts +104 -0
  389. package/dist/worker-agent/worker-orchestrator.js +201 -0
  390. package/package.json +38 -3
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: task-planning
3
+ role: planning
4
+ description: Plan and sequence multi-step tasks to maximize xcoder's own health score (src/core/stepScorer.ts) — avoid the two things it penalizes heavily (tool errors, repeated no-op actions) and lean into what it rewards (verified, decisive, forward-moving actions), while using Plan Mode/phase structure correctly.
5
+ triggers:
6
+ - "make a plan"
7
+ - "plan the"
8
+ - "plan for"
9
+ - "project plan"
10
+ - "planning"
11
+ - "todo"
12
+ - "break down"
13
+ - "break this down"
14
+ - "phases"
15
+ - "wbs"
16
+ - "work breakdown"
17
+ - "approach this"
18
+ - "strategy for"
19
+ - "how should i tackle"
20
+ version: "1.0.0"
21
+ requires_tools:
22
+ - read_tool
23
+ - grep_tool
24
+ - glob_tool
25
+ - add_plan_task_tool
26
+ - save_plan_tool
27
+ - update_task_status_tool
28
+ - subagent_tool
29
+ composes_with:
30
+ - skill-authoring
31
+ - ui-ux-design
32
+ ---
33
+
34
+ ## Purpose
35
+
36
+ xcoder scores every completed tool step 0–100 (`scoreStep` in `src/core/stepScorer.ts`) and tracks
37
+ a rolling average over the last 5 scored steps (`rollingHealth`). This isn't a quality judgment on
38
+ cleverness — it's a cheap, deterministic proxy for "did this step move the task forward." Planning
39
+ well means structuring work so it naturally produces high-scoring steps, not gaming the number.
40
+
41
+ ## The exact scoring rule (know this precisely, don't approximate it)
42
+
43
+ Every step starts at a neutral baseline of **70**, then:
44
+
45
+ - **No error: +10.** **Error: −45.** This is the single biggest lever — errors are nearly 5x more
46
+ costly than a clean step is rewarding. Verify before acting rather than acting and fixing errors
47
+ after the fact: read a file before editing a specific line, check a variable/API actually exists
48
+ before calling it, confirm a path exists before writing to it.
49
+ - **Exact duplicate action: −35.** This fires only when the *same tool with the same arguments*
50
+ produces the *exact same observation* as an earlier call — i.e., genuinely nothing new was
51
+ learned. It does **not** fire on legitimate re-runs where state changed in between (e.g. running
52
+ a test suite again after fixing the code it tests — different observation, no penalty; running
53
+ it again with nothing changed — penalized). The lesson for planning: after any action that
54
+ fails or returns unclear results, change something (the approach, the inputs, what you inspect
55
+ next) before repeating a similar action rather than retrying the identical call hoping for a
56
+ different result.
57
+ - **`write_edit_tool` or `run_command_tool` succeeding: +10 bonus.** These represent concrete
58
+ forward progress on a coding task (an actual change made, an actual command executed
59
+ successfully) as opposed to read-only investigation, which is necessary but scores neutrally.
60
+ - If the rolling average drops **below 40** (with at least 2 scored steps and a cooldown since the
61
+ last warning), xcoder injects a self-check nudge telling itself to re-read state, verify its last
62
+ assumption, and try a genuinely different approach — a sign the plan itself, not just the last
63
+ action, needs to change.
64
+
65
+ ## Process — plan so the scoring rewards line up with real progress
66
+
67
+ 1. **Investigate before committing to a plan.** Read the relevant files/config/schema first
68
+ (`read_tool`/`grep_tool`/`glob_tool`) so the plan's first `write_edit_tool`/`run_command_tool`
69
+ call is likely to succeed on the first try, instead of planning from assumption and discovering
70
+ errors mid-execution.
71
+ 2. **Sequence steps so each one is independently verifiable.** Prefer "make change → run the
72
+ specific test/command that proves it → move on" over batching several unverified changes
73
+ together — batching hides which change caused a later error, which invites repeated,
74
+ undifferentiated retries (the exact pattern the duplicate-action penalty targets).
75
+ 3. **Use Plan Mode's actual artifacts, not an ad-hoc list.** Write the plan to `tasks/todo.md`
76
+ (via `save_plan_tool`/`add_plan_task_tool`), and update task status as you go
77
+ (`update_task_status_tool`) — this keeps the plan and the actual execution state in sync, so a
78
+ restart or a subagent picking up the work isn't re-deriving what's already done.
79
+ 4. **For genuinely large tasks, prefer phase decomposition over one long flat loop.** Phases run as
80
+ isolated sub-orchestrators with their own health tracking and iteration budget — a bad early
81
+ assumption in phase 2 doesn't poison phase 4's context, and each phase's rolling average resets
82
+ instead of compounding one long streak of penalized retries into a death spiral for the whole run.
83
+ 5. **When a step fails, diagnose before retrying.** Read the actual error, form a specific
84
+ hypothesis for why, and let the next action test that hypothesis. A retry that isn't informed by
85
+ the failure is likely to reproduce it (error again, −45) or repeat it exactly (duplicate, −35) —
86
+ either way it's the two worst outcomes in the scoring model, back to back.
87
+
88
+ ## Strategies
89
+
90
+ - Order steps cheapest-to-verify first: a `read_tool`/`grep_tool` check that rules out a wrong
91
+ assumption costs little and prevents a downstream `run_command_tool` failure.
92
+ - When genuinely uncertain between two approaches, do the minimum-cost investigation to
93
+ disambiguate (read one more file, check one more config) rather than picking one and discovering
94
+ via a failed `run_command_tool` call that it was wrong.
95
+ - If a task naturally has independent sub-parts (e.g. "fix the backend bug and update the UI for
96
+ it"), consider `subagent_tool` for the more self-contained piece — isolates its context and its
97
+ health tracking from the main task.
98
+ - Don't over-correct into excessive verification either — re-reading a file you just wrote
99
+ unchanged, or re-running a command with literally nothing different, is itself heading toward the
100
+ duplicate-action penalty. The goal is "verify before acting when there's real uncertainty," not
101
+ "verify everything twice."
102
+
103
+ ## Experience — failure patterns this scoring model specifically punishes
104
+
105
+ - **The retry loop**: an action fails, the same action is retried unchanged hoping for a different
106
+ result. This is the worst pattern possible under this scoring model — likely to hit both the
107
+ error penalty again and then the duplicate-action penalty once the identical failure repeats.
108
+ Break out of it by changing at least one concrete thing (different tool, different args, or a
109
+ preceding investigation step) before repeating anything similar.
110
+ - **Premature action**: writing/running before reading enough to know the change is correct. Shows
111
+ up as a string of `write_edit_tool`/`run_command_tool` errors early in a run. Front-load
112
+ read-only investigation instead.
113
+ - **Batched, unverified changes**: several edits before any verification, so when something breaks
114
+ it's unclear which edit did it — the natural next move is broad, undifferentiated re-checking,
115
+ which tends to reproduce duplicate or erroring calls rather than resolve the issue efficiently.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: tester
3
+ role: QA / Test Engineer
4
+ description: >
5
+ Writes and runs test suites, designs test cases, and drives the Validation phase of the
6
+ ReAct loop. Load whenever the task involves writing tests, verifying a fix, generating
7
+ test cases, or the Validation phase needs to decide pass/fail.
8
+ triggers: [test, "unit test", "test case", qa, verify, validate, coverage, regression, "test suite"]
9
+ version: 1.0
10
+ requires_tools: [read_tool, glob_tool, grep_tool, run_command_tool]
11
+ composes_with: [programmer, performance-tester, pentester, rca]
12
+ ---
13
+
14
+ ## Role
15
+ Owns correctness proof. Designs test cases from requirements, writes automated tests, runs
16
+ the suite, and reports pass/fail with enough detail for the loop to decide "done" or "fix".
17
+
18
+ ## Process
19
+ 1. **Derive cases from spec/bug report** — happy path, edge cases, boundary values, invalid
20
+ input, concurrency/race cases where relevant.
21
+ 2. **Check existing coverage** — grep for existing tests before writing duplicates.
22
+ 3. **Write tests** — one assertion focus per test; name tests by behavior, not implementation.
23
+ 4. **Run and read output** — this is the ReAct Validation phase Action/Observation.
24
+ 5. **Report** — pass/fail, which cases failed, and the exact failure output for the loop to
25
+ act on.
26
+
27
+ ## Strategies
28
+ - Regression-proof every bug fix: a failing test that reproduces the bug before the fix, and
29
+ passes after.
30
+ - Prefer fast, isolated unit tests; reserve integration/e2e tests for cross-component
31
+ behavior.
32
+ - Test behavior/contract, not internal implementation details, so refactors don't break tests
33
+ needlessly.
34
+
35
+ ## Planning Approach
36
+ - Produce test-cases.md mapping requirements → test cases before/alongside implementation.
37
+ - Track coverage gaps explicitly rather than assuming "tests exist" is "tests are sufficient".
38
+
39
+ ## Instructions for This Task Type
40
+ - Always execute the test suite (Action) and report the literal Observation (pass/fail output)
41
+ rather than assuming success.
42
+ - On failure, hand the exact error/stack trace back into the loop as new context — don't
43
+ paraphrase away details.
44
+
45
+ ## Experience / Common Pitfalls
46
+ - Tests that mirror implementation logic instead of the contract become brittle and add no
47
+ real safety.
48
+ - Skipping the "run and read output" step and just trusting the diff is the "guess and hope"
49
+ failure mode this skill exists to prevent.
50
+
51
+ ## Output Artifacts
52
+ - test-cases.md
53
+ - Test files
54
+ - Pass/fail report with failure detail
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: ubuntu
3
+ role: devops
4
+ description: Administer Ubuntu/Debian-based servers — apt package management, systemd service management, user/permission setup, and the standard diagnostic sequence for a service that won't start or a host that's unreachable.
5
+ triggers:
6
+ - "ubuntu"
7
+ - "debian"
8
+ - "apt-get"
9
+ - "apt install"
10
+ - "systemctl"
11
+ - "systemd service"
12
+ - "linux server"
13
+ version: "1.0.0"
14
+ requires_tools:
15
+ - run_command_tool
16
+ - ssh_tool
17
+ - ssh_copy_tool
18
+ composes_with:
19
+ - workspace-context
20
+ - docker
21
+ - aws
22
+ - azure
23
+ ---
24
+
25
+ ## Process
26
+
27
+ 1. Always `apt-get update` before `install` on a host that hasn't been touched recently — installing
28
+ against a stale package index is a common source of "package not found" or installing an older
29
+ version than intended.
30
+ 2. Pin package versions explicitly (`apt-get install pkg=1.2.3`) for anything going into a
31
+ reproducible build/deploy process; unpinned installs make "works on one box, not another" bugs
32
+ common.
33
+ 3. For any long-running process, run it as a systemd service (with a proper unit file:
34
+ `Restart=on-failure`, a dedicated non-root user, explicit `WorkingDirectory`) rather than a
35
+ detached shell process (`nohup ... &`) — the latter doesn't survive reboot, doesn't restart on
36
+ crash, and isn't visible to standard monitoring/log tooling.
37
+ 4. Follow least-privilege for users: create a dedicated service user per application rather than
38
+ running everything as root or a single shared user; grant `sudo` access scoped to specific
39
+ commands (via `/etc/sudoers.d/`) rather than blanket `sudo` where possible.
40
+ 5. Check `ufw status` (or `iptables`, depending on what's configured) and confirm required ports are
41
+ actually open before assuming an application-level cause for connectivity failures.
42
+
43
+ ## Instructions — non-negotiable
44
+
45
+ - Never run `apt-get upgrade`/`dist-upgrade` on a production host without a maintenance
46
+ window/rollback plan — package upgrades can change behavior or break dependencies unexpectedly.
47
+ - Never disable a firewall entirely to "fix" a connectivity issue — open the specific port/rule
48
+ actually needed; leaving the host fully exposed is a much larger risk than diagnosing the real
49
+ rule correctly.
50
+ - Never store or transmit credentials in plaintext in scripts/cron jobs on the host — use env
51
+ files with restricted permissions (`chmod 600`) or a proper secrets mechanism.
52
+ - Always check disk space (`df -h`) before deep-diagnosing a service failure — "disk full" produces
53
+ confusing, seemingly-unrelated application errors far more often than it's obviously the cause.
54
+
55
+ ## Strategies
56
+
57
+ - Prefer systemd timers over cron for anything that needs logging/status visibility consistent
58
+ with the rest of the system's services; cron remains fine for simple, well-understood jobs.
59
+ - Prefer `journalctl -u <service>` over grepping raw log files when the service is running under
60
+ systemd — structured, filterable, and includes stdout/stderr the process itself may not have
61
+ written to a file.
62
+ - When provisioning multiple similar hosts, script the setup (or use configuration management)
63
+ rather than repeating manual steps — manual setup on host #2 already differs from host #1 in
64
+ ways nobody remembers by host #5.
65
+
66
+ ## Diagnostic sequence for "service won't start" / "host unreachable"
67
+
68
+ 1. `systemctl status <service>` — active/failed/inactive, and the last few log lines inline.
69
+ 2. `journalctl -u <service> -n 100 --no-pager` — fuller error context than `status` alone shows.
70
+ 3. If it's a startup/config error: verify the config file syntax and paths referenced in it
71
+ actually exist and are readable by the service's configured user (not just root).
72
+ 4. For "host unreachable": check `systemctl status ssh`/network interface status
73
+ (`ip addr`) first if you have any other access path; if fully locked out, check the
74
+ cloud/hypervisor console for boot-time errors before assuming it's purely a network config issue.
75
+ 5. Check disk space and memory (`df -h`, `free -h`) — many "mysterious" service failures are
76
+ resource exhaustion, not application logic.
77
+
78
+ ## Experience
79
+
80
+ - A service that starts fine manually (`sudo -u appuser /path/to/binary`) but fails under systemd
81
+ is almost always an environment difference — systemd units don't inherit the interactive shell's
82
+ environment variables/PATH by default; set them explicitly in the unit file (`Environment=`,
83
+ `EnvironmentFile=`).
84
+ - "Permission denied" errors after a fresh `apt install` of something expecting specific ownership
85
+ (e.g. a data directory) usually mean the package's default user/group doesn't match an existing
86
+ directory's ownership — check `ls -la` on the relevant path rather than assuming the software
87
+ itself is broken.
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: ui-ux-design
3
+ role: design
4
+ description: Design and build professional, user-friendly interfaces — applies concrete visual-design heuristics (hierarchy, spacing, contrast, responsive behavior) instead of generic taste statements, and reuses an existing design-token system rather than inventing one-off styles per component.
5
+ triggers:
6
+ - "ui design"
7
+ - "ux design"
8
+ - "ui/ux"
9
+ - "user interface"
10
+ - "user experience"
11
+ - "design a"
12
+ - "redesign"
13
+ - "mockup"
14
+ - "wireframe"
15
+ - "page layout"
16
+ - "responsive design"
17
+ - "look professional"
18
+ - "look and feel"
19
+ - "polish the ui"
20
+ - "component library"
21
+ - "design system"
22
+ version: "1.0.0"
23
+ requires_tools:
24
+ - read_tool
25
+ - write_edit_tool
26
+ - glob_tool
27
+ - grep_tool
28
+ - playwright_run_tool
29
+ composes_with:
30
+ - task-planning
31
+ ---
32
+
33
+ ## Process
34
+
35
+ 1. **Before writing a single style, find the existing design system.** `grep_tool` for a tokens
36
+ file (`index.css`, `theme.ts`/`themes.ts`, `tailwind.config.*`, `tokens.*`) and for any shared
37
+ component directory (commonly `components/ui/`). Reusing existing `--color-*`/`--space-*`
38
+ tokens and primitives (`Card`, `Button`, `Badge`, etc.) is almost always correct; inventing a
39
+ parallel set of ad-hoc inline styles is the single most common way UI work in an existing
40
+ codebase ends up inconsistent. If no token system exists and the task is more than a one-off
41
+ tweak, propose adding a minimal one (a handful of CSS custom properties for color/spacing/
42
+ radius/typography) before styling individual components against it.
43
+ 2. Identify the actual user and their primary task before laying out anything — a settings page
44
+ optimized for "find the one toggle I need" looks different from a dashboard optimized for "scan
45
+ everything at a glance". State this assumption explicitly if it isn't given.
46
+ 3. Sketch the information hierarchy in words first (what's the single most important thing on this
47
+ screen, what's secondary, what's tertiary/hidden-until-needed) — then map hierarchy to visual
48
+ weight (size, color, position), not the other way around.
49
+ 4. Build with the smallest reusable primitives first (buttons, cards, form fields, badges), then
50
+ compose pages from them. A page-specific one-off style is a sign a primitive is missing.
51
+ 5. Check responsive behavior and basic accessibility before calling it done (see checklists below).
52
+
53
+ ## Instructions — non-negotiable
54
+
55
+ - **Never ship a broken asset reference.** If a component imports an image/logo/icon file, verify
56
+ it exists on disk before referencing it (`glob_tool`/`read_tool`) — a missing asset silently
57
+ renders as a broken image in production with no build error, and is one of the most common real
58
+ defects in agent-generated UI work.
59
+ - **Use a real type scale and spacing scale, not arbitrary pixel values per component.** Pick (or
60
+ reuse) a small fixed set — e.g. 4/8/12/16/24/32px spacing, 12/13/15/16/18/22/28px type — and use
61
+ only those values. Arbitrary one-off values (`17px`, `23px`, `margin-top: 11px`) are a strong
62
+ signal of an unplanned, inconsistent UI.
63
+ - **Never rely on color alone to convey state.** Error/success/warning states need an icon, label,
64
+ or shape change in addition to color, for colorblind users and low-contrast displays.
65
+ - **Maintain WCAG AA contrast** (4.5:1 body text, 3:1 large text/UI components) for text against
66
+ its background — this is checkable, not a matter of taste. When choosing an accent/brand color
67
+ on a colored background, verify contrast rather than eyeballing it.
68
+ - **Design the empty, loading, and error states, not just the happy path.** A UI that only renders
69
+ correctly with a full dataset present is unfinished. This is the single most common gap between
70
+ demo-quality and production-quality UI work.
71
+ - **Test at least one narrow-viewport breakpoint** (≈375px) for anything that will be viewed on
72
+ mobile, or explicitly scope the task to desktop-only if that's the actual constraint.
73
+
74
+ ## Strategies — judgment calls
75
+
76
+ - Prefer subtraction over addition when a screen feels unpolished: remove borders/shadows/colors
77
+ that aren't carrying hierarchy information before adding more visual elements to "fix" it.
78
+ - Motion should communicate state change (something opened, something loaded, something was
79
+ confirmed), not decorate. A hover transition on an interactive element is worth it; a bouncing
80
+ animation on page load usually isn't.
81
+ - Default to the platform's native form controls and interaction patterns unless there's a
82
+ specific reason to customize — reinventing a `<select>` or checkbox as a custom component adds
83
+ accessibility and cross-browser risk for little visual gain.
84
+ - When a design decision is genuinely subjective (exact accent hue, illustration style), make a
85
+ reasonable choice and move forward rather than presenting the user with an open-ended menu of
86
+ options — but do surface the assumption ("I picked a blue-based palette for X reason") so it's
87
+ cheap to override.
88
+ - For dashboards/data-heavy screens: group related numbers into cards with a clear label and unit,
89
+ avoid more than ~3 distinct accent colors on one screen, and default to showing trend/comparison
90
+ (vs. yesterday, vs. target) rather than a bare number where that context is available.
91
+
92
+ ## Verification checklist before calling UI work done
93
+
94
+ 1. No hardcoded one-off colors/spacing that duplicate an existing token — search for the raw hex
95
+ values or pixel numbers you just wrote and confirm they don't already exist as a token.
96
+ 2. Every image/icon/font reference resolves to a real file or a real, reachable URL.
97
+ 3. Loading, empty, and error states exist for anything that fetches data.
98
+ 4. Keyboard navigation reaches every interactive element in a sensible order; nothing is
99
+ mouse-hover-only for critical information.
100
+ 5. If a build step exists (`vite build`, `npm run build`, etc.), run it — a UI change that doesn't
101
+ build is not done, regardless of how it looks in a dev server.
102
+
103
+ ## Experience — failure patterns worth naming
104
+
105
+ - Agent-authored UI frequently over-uses emoji as icons and gradient backgrounds as a substitute
106
+ for actual visual hierarchy — both read as unpolished/template-like rather than professional.
107
+ Prefer a small, consistent icon set (or none) and a restrained, mostly-neutral palette with one
108
+ clear accent color.
109
+ - "Looks fine in isolation, inconsistent across pages" is the most common failure — it comes from
110
+ styling each page independently instead of against shared tokens/primitives. Always check at
111
+ least one other page in the app for whether the same visual decision was already made differently.
112
+ - Placeholder/gimmick copy and branding left over from a template or an earlier draft (mismatched
113
+ product names, joke text, "Lorem ipsum") ships far more often than it should — grep for the
114
+ product/brand name across UI source before finishing to make sure it's consistent everywhere.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: workspace-context
3
+ role: context
4
+ description: How to use the automatically-refreshed workspace snapshot (file tree, tech stack, git status, package manifest) that's already in context at the start of every task, and when to explicitly re-trigger a refresh mid-task via workspace_info_tool. Relevant to essentially every engineering task, not just ones that mention "workspace" by name.
5
+ triggers:
6
+ - "unfamiliar codebase"
7
+ - "explore the codebase"
8
+ - "understand this codebase"
9
+ - "understand this repo"
10
+ - "workspace structure"
11
+ - "project structure"
12
+ - "codebase overview"
13
+ - "what does this repo"
14
+ - "what tech stack"
15
+ - "refresh workspace"
16
+ - "workspace snapshot"
17
+ version: "1.0.0"
18
+ requires_tools:
19
+ - workspace_info_tool
20
+ - glob_tool
21
+ - grep_tool
22
+ - read_tool
23
+ composes_with:
24
+ - software-engineer
25
+ - software-architect
26
+ - qa-engineer
27
+ - docker
28
+ - kubernetes
29
+ - git-vcs
30
+ - kafka
31
+ - aws
32
+ - azure
33
+ - ubuntu
34
+ - redhat
35
+ - rosa
36
+ - openshift
37
+ ---
38
+
39
+ ## What this actually is
40
+
41
+ A `### Workspace context` block is injected into your system prompt automatically, once, at the
42
+ start of every top-level task (see `refreshWorkspaceInfo`/`buildSystemPrompt` in
43
+ `src/core/orchestrator.ts`) — file tree (capped at 400 entries), detected languages, package
44
+ manager(s), frameworks, whether the project is containerized/has CI configured, git branch/remote/
45
+ dirty-state, and `package.json` name/version/scripts/dependencies if present. **You do not need
46
+ to call any tool to see this** — it's already in front of you before your first action. This
47
+ skill is about knowing what's already there and when the one thing that *isn't* automatic
48
+ (re-checking after you change something) is actually needed.
49
+
50
+ ## Process
51
+
52
+ 1. Before exploring with `glob_tool`/`grep_tool`/`read_tool`, check what's already in the
53
+ `### Workspace context` block — it usually answers "what language/framework is this," "is
54
+ there a Dockerfile," "what's the current git branch," and "what are the build/test scripts"
55
+ without spending a tool call on any of them.
56
+ 2. Use the workspace context to choose which skill(s)/approach apply — e.g. `containerized: yes`
57
+ and a language match are a strong signal to also consult the relevant DevOps skill (`docker`,
58
+ `kubernetes`, etc.); a detected framework should shape how you search for relevant code
59
+ (React project → look for `.tsx`/`.jsx` component files; Django → look for `models.py`/`views.py`).
60
+ 3. Only call `workspace_info_tool(refresh=true)` when you've done something the automatic
61
+ snapshot can't know about **yet**, specifically:
62
+ - Installed or removed a dependency (`npm install`, `pip install`, etc.)
63
+ - Created, deleted, or moved files/directories
64
+ - Switched git branches or made a commit you need reflected (e.g. checking "is this now clean")
65
+ - The task is long-running/multi-phase and significant time has passed since the initial snapshot
66
+ 4. Don't call `workspace_info_tool` speculatively "just to check" with no state change since the
67
+ last read — that's the exact duplicate/no-new-information pattern the health-scoring system
68
+ penalizes (see `task-planning` skill) if the result comes back identical.
69
+
70
+ ## Instructions — non-negotiable
71
+
72
+ - Never assume the initial snapshot is still accurate after you've made changes that could affect
73
+ it (new files, new deps, branch switch) — re-check with `refresh=true` before making a
74
+ decision that depends on current state (e.g. "is the working tree clean," "does this dependency
75
+ exist yet").
76
+ - The file tree is capped (400 entries) and will say so when truncated — for a specific
77
+ subdirectory's full contents, use `glob_tool` with a scoped pattern rather than assuming the
78
+ capped tree is exhaustive for a large repo.
79
+ - The snapshot is structural/metadata only — it does not include file contents. For actual code
80
+ content, use `read_tool`/`grep_tool`/`indexing_tool`, not `workspace_info_tool`.
81
+
82
+ ## Strategies
83
+
84
+ - For a "get familiar with this codebase" style task, start from the workspace context's detected
85
+ frameworks/package manager to decide where to look first, rather than a blind top-down `glob_tool`
86
+ scan of the whole tree.
87
+ - When a task spans multiple phases (see `task-planning`), the workspace snapshot is refreshed
88
+ once at the top level and shared by every phase/subagent via the same cache — you don't need to
89
+ (and shouldn't) refresh it again at the start of each phase unless that specific phase changed
90
+ workspace state itself.
91
+ - If `git.dirty` is true at task start and the task involves committing, decide explicitly whether
92
+ those pre-existing uncommitted changes are in-scope for your commit or should be left alone —
93
+ don't silently sweep unrelated changes into your commit.
94
+
95
+ ## Experience
96
+
97
+ - The most common miss is not the automatic snapshot being wrong — it's forgetting to refresh
98
+ after a dependency install and then reasoning ("this package isn't in dependencies") from stale
99
+ data. If you just ran an install command, refresh before making any claim about what's installed.
100
+ - `frameworks`/`packageManagers` detection is heuristic (based on `package.json` deps and marker
101
+ files), not exhaustive — treat an empty or surprising result as "not detected," not
102
+ authoritative proof the framework isn't in use, and confirm with a targeted `read_tool`/`grep_tool`
103
+ check if it matters for the task.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Sprint Controller — coordinates the full sprint lifecycle.
3
+ *
4
+ * Design contract: `.xcoder/design/sprint-framework-design.md` §4.1
5
+ */
6
+ import { LlmClient } from "../llm/client.js";
7
+ import type { GateResult } from "./types.js";
8
+ export interface SprintControllerOptions {
9
+ workspaceRoot: string;
10
+ llm: LlmClient;
11
+ concurrency: number;
12
+ }
13
+ export interface SprintStartResult {
14
+ sprintRunId: string;
15
+ backlogItemId: string;
16
+ taskId: string;
17
+ outcome: "done" | "blocked";
18
+ gateFailures: GateResult[];
19
+ }
20
+ export interface SprintStatusResult {
21
+ active: boolean;
22
+ sprintRunId?: string;
23
+ backlogItemId?: string;
24
+ currentStage?: string;
25
+ taskStatus?: string;
26
+ gateResults?: GateResult[];
27
+ }
28
+ export interface SprintRetroResult {
29
+ reportPath: string;
30
+ contents: string;
31
+ }
32
+ export declare function sprintStart(opts: SprintControllerOptions): Promise<SprintStartResult>;
33
+ export declare function sprintStatus(root: string): Promise<SprintStatusResult>;
34
+ export declare function sprintRetro(root: string, sprintRunId?: string): Promise<SprintRetroResult>;
35
+ export declare function sprintAbort(root: string): Promise<{
36
+ revertedItemId: string;
37
+ }>;