@neural-node-labs/xcoder-dna 0.0.0-stage → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +132 -2
  3. package/dist/agents/agent-catalog.d.ts +87 -0
  4. package/dist/agents/agent-catalog.js +159 -0
  5. package/dist/agents/agent-registry.d.ts +76 -0
  6. package/dist/agents/agent-registry.js +189 -0
  7. package/dist/agents/ai-chat-debate.d.ts +36 -0
  8. package/dist/agents/ai-chat-debate.js +300 -0
  9. package/dist/agents/ai-chat-report-writer.d.ts +7 -0
  10. package/dist/agents/ai-chat-report-writer.js +100 -0
  11. package/dist/agents/duplicate-detector.d.ts +41 -0
  12. package/dist/agents/duplicate-detector.js +65 -0
  13. package/dist/agents/genesis-agent.d.ts +61 -0
  14. package/dist/agents/genesis-agent.js +340 -0
  15. package/dist/agents/samurai-agent.d.ts +53 -0
  16. package/dist/agents/samurai-agent.js +279 -0
  17. package/dist/agents/sub-agent.d.ts +56 -0
  18. package/dist/agents/sub-agent.js +353 -0
  19. package/dist/backlog/backlog-requirement-validator.d.ts +10 -0
  20. package/dist/backlog/backlog-requirement-validator.js +60 -0
  21. package/dist/backlog/backlog-store.d.ts +29 -0
  22. package/dist/backlog/backlog-store.js +148 -0
  23. package/dist/backlog/po-agent.d.ts +16 -0
  24. package/dist/backlog/po-agent.js +121 -0
  25. package/dist/backlog/types.d.ts +25 -0
  26. package/dist/backlog/types.js +4 -0
  27. package/dist/bench/run.d.ts +11 -0
  28. package/dist/bench/run.js +185 -0
  29. package/dist/bench/types.d.ts +50 -0
  30. package/dist/bench/types.js +1 -0
  31. package/dist/cli/delegate.d.ts +90 -0
  32. package/dist/cli/delegate.js +220 -0
  33. package/dist/cli/swarm.d.ts +10 -0
  34. package/dist/cli/swarm.js +100 -0
  35. package/dist/cli/task.d.ts +14 -0
  36. package/dist/cli/task.js +121 -0
  37. package/dist/cli/wbc-arg.d.ts +6 -0
  38. package/dist/cli/wbc-arg.js +40 -0
  39. package/dist/cli/wbc.d.ts +45 -0
  40. package/dist/cli/wbc.js +98 -0
  41. package/dist/commands/license.d.ts +9 -0
  42. package/dist/commands/license.js +140 -0
  43. package/dist/commands/release.d.ts +44 -0
  44. package/dist/commands/release.js +180 -0
  45. package/dist/commands/test.d.ts +50 -0
  46. package/dist/commands/test.js +385 -0
  47. package/dist/config/env-guard.d.ts +35 -0
  48. package/dist/config/env-guard.js +100 -0
  49. package/dist/config/env-snapshot.d.ts +18 -0
  50. package/dist/config/env-snapshot.js +30 -0
  51. package/dist/config/loadConfig.d.ts +82 -0
  52. package/dist/config/loadConfig.js +249 -0
  53. package/dist/config/secure-mode.d.ts +29 -0
  54. package/dist/config/secure-mode.js +63 -0
  55. package/dist/config/user-config.d.ts +39 -0
  56. package/dist/config/user-config.js +202 -0
  57. package/dist/engine/reasoning-engine.d.ts +21 -0
  58. package/dist/engine/reasoning-engine.js +59 -0
  59. package/dist/events/bus.d.ts +22 -0
  60. package/dist/events/bus.js +18 -0
  61. package/dist/index.d.ts +87 -0
  62. package/dist/index.js +88 -0
  63. package/dist/indexing/ignoreRules.d.ts +1 -0
  64. package/dist/indexing/ignoreRules.js +53 -0
  65. package/dist/instance-swarm/instance-swarm-orchestrator.d.ts +57 -0
  66. package/dist/instance-swarm/instance-swarm-orchestrator.js +204 -0
  67. package/dist/instance-swarm/protocol-name-resolver.d.ts +23 -0
  68. package/dist/instance-swarm/protocol-name-resolver.js +64 -0
  69. package/dist/license/gate.d.ts +31 -0
  70. package/dist/license/gate.js +188 -0
  71. package/dist/license/http-client.d.ts +43 -0
  72. package/dist/license/http-client.js +195 -0
  73. package/dist/license/manager.d.ts +39 -0
  74. package/dist/license/manager.js +175 -0
  75. package/dist/license/receipt.d.ts +27 -0
  76. package/dist/license/receipt.js +108 -0
  77. package/dist/license/state-codec.d.ts +72 -0
  78. package/dist/license/state-codec.js +218 -0
  79. package/dist/license/state-paths.d.ts +17 -0
  80. package/dist/license/state-paths.js +64 -0
  81. package/dist/license/store.d.ts +44 -0
  82. package/dist/license/store.js +223 -0
  83. package/dist/license/trust-anchor.d.ts +24 -0
  84. package/dist/license/trust-anchor.js +74 -0
  85. package/dist/license/types.d.ts +34 -0
  86. package/dist/license/types.js +19 -0
  87. package/dist/llm/budget.d.ts +23 -0
  88. package/dist/llm/budget.js +58 -0
  89. package/dist/llm/client.d.ts +53 -0
  90. package/dist/llm/client.js +122 -0
  91. package/dist/llm/factory.d.ts +14 -0
  92. package/dist/llm/factory.js +32 -0
  93. package/dist/orchestrator/defect-logger.d.ts +31 -0
  94. package/dist/orchestrator/defect-logger.js +101 -0
  95. package/dist/orchestrator/defect-manager.d.ts +118 -0
  96. package/dist/orchestrator/defect-manager.js +338 -0
  97. package/dist/orchestrator/defect-migration.d.ts +14 -0
  98. package/dist/orchestrator/defect-migration.js +174 -0
  99. package/dist/orchestrator/defect-store.d.ts +48 -0
  100. package/dist/orchestrator/defect-store.js +76 -0
  101. package/dist/orchestrator/healing.d.ts +14 -0
  102. package/dist/orchestrator/healing.js +11 -0
  103. package/dist/orchestrator/interactive-steering.d.ts +64 -0
  104. package/dist/orchestrator/interactive-steering.js +107 -0
  105. package/dist/orchestrator/interrupt-handler.d.ts +30 -0
  106. package/dist/orchestrator/interrupt-handler.js +70 -0
  107. package/dist/orchestrator/lesson-manager.d.ts +25 -0
  108. package/dist/orchestrator/lesson-manager.js +122 -0
  109. package/dist/orchestrator/progress-summary.d.ts +15 -0
  110. package/dist/orchestrator/progress-summary.js +106 -0
  111. package/dist/orchestrator/reasoning-score.d.ts +49 -0
  112. package/dist/orchestrator/reasoning-score.js +117 -0
  113. package/dist/orchestrator/swarm.d.ts +36 -0
  114. package/dist/orchestrator/swarm.js +77 -0
  115. package/dist/orchestrator/task-factory.d.ts +15 -0
  116. package/dist/orchestrator/task-factory.js +176 -0
  117. package/dist/orchestrator/validation-gate.d.ts +23 -0
  118. package/dist/orchestrator/validation-gate.js +155 -0
  119. package/dist/protocol/react-contract.d.ts +136 -0
  120. package/dist/protocol/react-contract.js +698 -0
  121. package/dist/protocol/wks-protocol-manager.d.ts +22 -0
  122. package/dist/protocol/wks-protocol-manager.js +72 -0
  123. package/dist/sdlc-runtime/conversation-runner.d.ts +8 -0
  124. package/dist/sdlc-runtime/conversation-runner.js +64 -0
  125. package/dist/sdlc-runtime/dag-utils.d.ts +15 -0
  126. package/dist/sdlc-runtime/dag-utils.js +67 -0
  127. package/dist/sdlc-runtime/defect-integration.d.ts +7 -0
  128. package/dist/sdlc-runtime/defect-integration.js +99 -0
  129. package/dist/sdlc-runtime/execution-loop.d.ts +38 -0
  130. package/dist/sdlc-runtime/execution-loop.js +274 -0
  131. package/dist/sdlc-runtime/lesson-recorder.d.ts +9 -0
  132. package/dist/sdlc-runtime/lesson-recorder.js +27 -0
  133. package/dist/sdlc-runtime/plan-initializer.d.ts +47 -0
  134. package/dist/sdlc-runtime/plan-initializer.js +135 -0
  135. package/dist/sdlc-runtime/progress-persister.d.ts +10 -0
  136. package/dist/sdlc-runtime/progress-persister.js +34 -0
  137. package/dist/sdlc-runtime/protocol-loader.d.ts +10 -0
  138. package/dist/sdlc-runtime/protocol-loader.js +21 -0
  139. package/dist/sdlc-runtime/reporting.d.ts +24 -0
  140. package/dist/sdlc-runtime/reporting.js +68 -0
  141. package/dist/sdlc-runtime/run-task.d.ts +81 -0
  142. package/dist/sdlc-runtime/run-task.js +210 -0
  143. package/dist/sdlc-runtime/sdlc-orchestrator.d.ts +59 -0
  144. package/dist/sdlc-runtime/sdlc-orchestrator.js +170 -0
  145. package/dist/sdlc-runtime/sdlc-skill.d.ts +44 -0
  146. package/dist/sdlc-runtime/sdlc-skill.js +148 -0
  147. package/dist/sdlc-runtime/steering-handler.d.ts +14 -0
  148. package/dist/sdlc-runtime/steering-handler.js +51 -0
  149. package/dist/sdlc-runtime/trace-recorder.d.ts +10 -0
  150. package/dist/sdlc-runtime/trace-recorder.js +7 -0
  151. package/dist/security/index.d.ts +16 -0
  152. package/dist/security/index.js +12 -0
  153. package/dist/security/input-screen.d.ts +30 -0
  154. package/dist/security/input-screen.js +75 -0
  155. package/dist/security/tool-call-guard.d.ts +16 -0
  156. package/dist/security/tool-call-guard.js +174 -0
  157. package/dist/security/untrusted-content.d.ts +34 -0
  158. package/dist/security/untrusted-content.js +63 -0
  159. package/dist/skills/advanced-dfir/SKILL.md +85 -0
  160. package/dist/skills/advanced-pentest-lab/SKILL.md +88 -0
  161. package/dist/skills/analyst/SKILL.md +55 -0
  162. package/dist/skills/architect/SKILL.md +54 -0
  163. package/dist/skills/aws/SKILL.md +92 -0
  164. package/dist/skills/azure/SKILL.md +90 -0
  165. package/dist/skills/bylaw-context.d.ts +45 -0
  166. package/dist/skills/bylaw-context.js +61 -0
  167. package/dist/skills/bylaw-review.d.ts +20 -0
  168. package/dist/skills/bylaw-review.js +101 -0
  169. package/dist/skills/conversation/SKILL.md +29 -0
  170. package/dist/skills/design-patterns/SKILL.md +190 -0
  171. package/dist/skills/devops/SKILL.md +55 -0
  172. package/dist/skills/directives.d.ts +20 -0
  173. package/dist/skills/directives.js +313 -0
  174. package/dist/skills/docker/SKILL.md +76 -0
  175. package/dist/skills/docker-expert/SKILL.md +56 -0
  176. package/dist/skills/enterprise-systems-analyst/SKILL.md +83 -0
  177. package/dist/skills/enterprise-systems-analyst/references/crm.md +41 -0
  178. package/dist/skills/enterprise-systems-analyst/references/erp.md +40 -0
  179. package/dist/skills/enterprise-systems-analyst/references/financial-systems.md +35 -0
  180. package/dist/skills/enterprise-systems-analyst/references/hcm.md +38 -0
  181. package/dist/skills/enterprise-systems-analyst/references/mrp.md +37 -0
  182. package/dist/skills/enterprise-systems-analyst/references/scm.md +32 -0
  183. package/dist/skills/ethical-hacking-methodology/SKILL.md +119 -0
  184. package/dist/skills/externalSkillLoader.d.ts +25 -0
  185. package/dist/skills/externalSkillLoader.js +65 -0
  186. package/dist/skills/externalSkillRegistry.d.ts +33 -0
  187. package/dist/skills/externalSkillRegistry.js +94 -0
  188. package/dist/skills/filesystem-management/SKILL.md +61 -0
  189. package/dist/skills/first-run-seed.d.ts +26 -0
  190. package/dist/skills/first-run-seed.js +75 -0
  191. package/dist/skills/git-vcs/SKILL.md +84 -0
  192. package/dist/skills/kafka/SKILL.md +89 -0
  193. package/dist/skills/kubernetes/SKILL.md +93 -0
  194. package/dist/skills/kubernetes-expert/SKILL.md +54 -0
  195. package/dist/skills/openshift/SKILL.md +93 -0
  196. package/dist/skills/pentester/SKILL.md +59 -0
  197. package/dist/skills/performance-tester/SKILL.md +57 -0
  198. package/dist/skills/playwright-ui-tester/SKILL.md +67 -0
  199. package/dist/skills/programmer/SKILL.md +58 -0
  200. package/dist/skills/project-scaffolding/SKILL.md +133 -0
  201. package/dist/skills/qa-engineer/SKILL.md +91 -0
  202. package/dist/skills/rca/SKILL.md +58 -0
  203. package/dist/skills/redhat/SKILL.md +92 -0
  204. package/dist/skills/rosa/SKILL.md +80 -0
  205. package/dist/skills/scrum-framework/SKILL.md +74 -0
  206. package/dist/skills/scrum-framework/references/artifacts_and_quality.md +79 -0
  207. package/dist/skills/scrum-framework/references/roles_and_events.md +105 -0
  208. package/dist/skills/scrum-master-agent/SKILL.md +74 -0
  209. package/dist/skills/scrum-master-agent/references/behaviors.md +56 -0
  210. package/dist/skills/sdlc-skill.d.ts +1 -0
  211. package/dist/skills/sdlc-skill.js +4 -0
  212. package/dist/skills/secops/SKILL.md +52 -0
  213. package/dist/skills/secure-architect.bylaws.d.ts +68 -0
  214. package/dist/skills/secure-architect.bylaws.js +525 -0
  215. package/dist/skills/seed-skills.d.ts +48 -0
  216. package/dist/skills/seed-skills.js +213 -0
  217. package/dist/skills/skill-authoring/SKILL.md +123 -0
  218. package/dist/skills/skill-header.d.ts +51 -0
  219. package/dist/skills/skill-header.js +163 -0
  220. package/dist/skills/skill-path-guard.d.ts +41 -0
  221. package/dist/skills/skill-path-guard.js +95 -0
  222. package/dist/skills/skillRouter.d.ts +51 -0
  223. package/dist/skills/skillRouter.js +90 -0
  224. package/dist/skills/skills-root.d.ts +64 -0
  225. package/dist/skills/skills-root.js +168 -0
  226. package/dist/skills/software-architect/SKILL.md +77 -0
  227. package/dist/skills/software-engineer/SKILL.md +74 -0
  228. package/dist/skills/solid-principles/SKILL.md +94 -0
  229. package/dist/skills/task-planning/SKILL.md +115 -0
  230. package/dist/skills/tester/SKILL.md +54 -0
  231. package/dist/skills/ubuntu/SKILL.md +87 -0
  232. package/dist/skills/ui-ux-design/SKILL.md +114 -0
  233. package/dist/skills/workspace-context/SKILL.md +103 -0
  234. package/dist/sprint/controller.d.ts +37 -0
  235. package/dist/sprint/controller.js +220 -0
  236. package/dist/sprint/dag-builder.d.ts +14 -0
  237. package/dist/sprint/dag-builder.js +105 -0
  238. package/dist/sprint/reporter.d.ts +11 -0
  239. package/dist/sprint/reporter.js +97 -0
  240. package/dist/sprint/state-store.d.ts +10 -0
  241. package/dist/sprint/state-store.js +71 -0
  242. package/dist/sprint/types.d.ts +24 -0
  243. package/dist/sprint/types.js +4 -0
  244. package/dist/store/file-version-store.d.ts +24 -0
  245. package/dist/store/file-version-store.js +73 -0
  246. package/dist/store/task-store.d.ts +90 -0
  247. package/dist/store/task-store.js +166 -0
  248. package/dist/task-ingest/architect-detailer.d.ts +43 -0
  249. package/dist/task-ingest/architect-detailer.js +141 -0
  250. package/dist/task-ingest/detail-schema.d.ts +9 -0
  251. package/dist/task-ingest/detail-schema.js +195 -0
  252. package/dist/task-ingest/detailed-run.d.ts +36 -0
  253. package/dist/task-ingest/detailed-run.js +108 -0
  254. package/dist/task-ingest/extract-id.d.ts +9 -0
  255. package/dist/task-ingest/extract-id.js +24 -0
  256. package/dist/task-ingest/index.d.ts +23 -0
  257. package/dist/task-ingest/index.js +14 -0
  258. package/dist/task-ingest/ingest.d.ts +45 -0
  259. package/dist/task-ingest/ingest.js +163 -0
  260. package/dist/task-ingest/list-ingested.d.ts +13 -0
  261. package/dist/task-ingest/list-ingested.js +30 -0
  262. package/dist/task-ingest/pending-filter.d.ts +30 -0
  263. package/dist/task-ingest/pending-filter.js +59 -0
  264. package/dist/task-ingest/scanner.d.ts +56 -0
  265. package/dist/task-ingest/scanner.js +216 -0
  266. package/dist/task-ingest/source-reader.d.ts +25 -0
  267. package/dist/task-ingest/source-reader.js +93 -0
  268. package/dist/task-ingest/spec-builder.d.ts +34 -0
  269. package/dist/task-ingest/spec-builder.js +89 -0
  270. package/dist/task-ingest/wbs-extract.d.ts +50 -0
  271. package/dist/task-ingest/wbs-extract.js +226 -0
  272. package/dist/task-ingest/wbs-parser.d.ts +36 -0
  273. package/dist/task-ingest/wbs-parser.js +170 -0
  274. package/dist/tools/apiTestTool.d.ts +37 -0
  275. package/dist/tools/apiTestTool.js +128 -0
  276. package/dist/tools/ast-tools.d.ts +183 -0
  277. package/dist/tools/ast-tools.js +853 -0
  278. package/dist/tools/browse-tool.d.ts +105 -0
  279. package/dist/tools/browse-tool.js +394 -0
  280. package/dist/tools/credential.d.ts +17 -0
  281. package/dist/tools/credential.js +32 -0
  282. package/dist/tools/dependency-graph.d.ts +23 -0
  283. package/dist/tools/dependency-graph.js +164 -0
  284. package/dist/tools/edit-tool.d.ts +34 -0
  285. package/dist/tools/edit-tool.js +95 -0
  286. package/dist/tools/file-header-manager.d.ts +27 -0
  287. package/dist/tools/file-header-manager.js +153 -0
  288. package/dist/tools/fs-tools.d.ts +154 -0
  289. package/dist/tools/fs-tools.js +337 -0
  290. package/dist/tools/git-tools.d.ts +79 -0
  291. package/dist/tools/git-tools.js +348 -0
  292. package/dist/tools/github-tool.d.ts +48 -0
  293. package/dist/tools/github-tool.js +147 -0
  294. package/dist/tools/globTool.d.ts +20 -0
  295. package/dist/tools/globTool.js +34 -0
  296. package/dist/tools/grepTool.d.ts +19 -0
  297. package/dist/tools/grepTool.js +44 -0
  298. package/dist/tools/index-freshness.d.ts +58 -0
  299. package/dist/tools/index-freshness.js +196 -0
  300. package/dist/tools/index-glob.d.ts +48 -0
  301. package/dist/tools/index-glob.js +175 -0
  302. package/dist/tools/load-skill-tool.d.ts +15 -0
  303. package/dist/tools/load-skill-tool.js +114 -0
  304. package/dist/tools/patch-tools.d.ts +58 -0
  305. package/dist/tools/patch-tools.js +153 -0
  306. package/dist/tools/playwright-tool.d.ts +66 -0
  307. package/dist/tools/playwright-tool.js +121 -0
  308. package/dist/tools/project-detect.d.ts +20 -0
  309. package/dist/tools/project-detect.js +87 -0
  310. package/dist/tools/prompt-guidance.d.ts +22 -0
  311. package/dist/tools/prompt-guidance.js +23 -0
  312. package/dist/tools/schedule-audit.d.ts +50 -0
  313. package/dist/tools/schedule-audit.js +124 -0
  314. package/dist/tools/schedule-validation.d.ts +67 -0
  315. package/dist/tools/schedule-validation.js +210 -0
  316. package/dist/tools/scheduleTool.d.ts +62 -0
  317. package/dist/tools/scheduleTool.js +313 -0
  318. package/dist/tools/search-tools.d.ts +27 -0
  319. package/dist/tools/search-tools.js +78 -0
  320. package/dist/tools/sed-tool.d.ts +66 -0
  321. package/dist/tools/sed-tool.js +402 -0
  322. package/dist/tools/shell-result.d.ts +11 -0
  323. package/dist/tools/shell-result.js +1 -0
  324. package/dist/tools/shell-tool.d.ts +45 -0
  325. package/dist/tools/shell-tool.js +141 -0
  326. package/dist/tools/siteCrawlerTool.d.ts +32 -0
  327. package/dist/tools/siteCrawlerTool.js +205 -0
  328. package/dist/tools/tool-registry.d.ts +67 -0
  329. package/dist/tools/tool-registry.js +606 -0
  330. package/dist/tools/validate-tool.d.ts +23 -0
  331. package/dist/tools/validate-tool.js +201 -0
  332. package/dist/tools/workspace-index.d.ts +46 -0
  333. package/dist/tools/workspace-index.js +173 -0
  334. package/dist/types.d.ts +222 -0
  335. package/dist/types.js +7 -0
  336. package/dist/updater/index.d.ts +14 -0
  337. package/dist/updater/index.js +120 -0
  338. package/dist/util/banner.d.ts +25 -0
  339. package/dist/util/banner.js +140 -0
  340. package/dist/util/command-suggester.d.ts +6 -0
  341. package/dist/util/command-suggester.js +25 -0
  342. package/dist/util/confirm-interrupt.d.ts +10 -0
  343. package/dist/util/confirm-interrupt.js +31 -0
  344. package/dist/util/continue-trigger.d.ts +11 -0
  345. package/dist/util/continue-trigger.js +20 -0
  346. package/dist/util/env-info.d.ts +18 -0
  347. package/dist/util/env-info.js +37 -0
  348. package/dist/util/file-access-log.d.ts +35 -0
  349. package/dist/util/file-access-log.js +140 -0
  350. package/dist/util/footer-manager.d.ts +124 -0
  351. package/dist/util/footer-manager.js +195 -0
  352. package/dist/util/footer-renderer.d.ts +67 -0
  353. package/dist/util/footer-renderer.js +319 -0
  354. package/dist/util/footer-state.d.ts +34 -0
  355. package/dist/util/footer-state.js +18 -0
  356. package/dist/util/footer-text.d.ts +51 -0
  357. package/dist/util/footer-text.js +74 -0
  358. package/dist/util/ids.d.ts +1 -0
  359. package/dist/util/ids.js +4 -0
  360. package/dist/util/levenshtein.d.ts +6 -0
  361. package/dist/util/levenshtein.js +34 -0
  362. package/dist/util/logger.d.ts +10 -0
  363. package/dist/util/logger.js +41 -0
  364. package/dist/util/logs.d.ts +80 -0
  365. package/dist/util/logs.js +135 -0
  366. package/dist/util/output-handler.d.ts +89 -0
  367. package/dist/util/output-handler.js +193 -0
  368. package/dist/util/output-interceptor.d.ts +18 -0
  369. package/dist/util/output-interceptor.js +49 -0
  370. package/dist/util/output-paths.d.ts +43 -0
  371. package/dist/util/output-paths.js +121 -0
  372. package/dist/util/package-json.d.ts +6 -0
  373. package/dist/util/package-json.js +36 -0
  374. package/dist/util/process-kill.d.ts +27 -0
  375. package/dist/util/process-kill.js +148 -0
  376. package/dist/util/protocol-error-logger.d.ts +33 -0
  377. package/dist/util/protocol-error-logger.js +73 -0
  378. package/dist/util/redact.d.ts +25 -0
  379. package/dist/util/redact.js +119 -0
  380. package/dist/util/scroll-region-guard.d.ts +33 -0
  381. package/dist/util/scroll-region-guard.js +63 -0
  382. package/dist/util/spinner.d.ts +15 -0
  383. package/dist/util/spinner.js +49 -0
  384. package/dist/util/terminal-output.d.ts +34 -0
  385. package/dist/util/terminal-output.js +1 -0
  386. package/dist/util/terminal-silent.d.ts +6 -0
  387. package/dist/util/terminal-silent.js +20 -0
  388. package/dist/util/terminal.d.ts +56 -0
  389. package/dist/util/terminal.js +124 -0
  390. package/dist/util/text-sanitize.d.ts +8 -0
  391. package/dist/util/text-sanitize.js +45 -0
  392. package/dist/util/thinking-spinner.d.ts +27 -0
  393. package/dist/util/thinking-spinner.js +189 -0
  394. package/dist/util/tool-error-logger.d.ts +33 -0
  395. package/dist/util/tool-error-logger.js +77 -0
  396. package/dist/util/tty.d.ts +13 -0
  397. package/dist/util/tty.js +16 -0
  398. package/dist/util/xcoder-paths.d.ts +56 -0
  399. package/dist/util/xcoder-paths.js +63 -0
  400. package/dist/version.d.ts +2 -0
  401. package/dist/version.js +5 -0
  402. package/dist/worker-agent/to-subtask-node.d.ts +35 -0
  403. package/dist/worker-agent/to-subtask-node.js +41 -0
  404. package/dist/worker-agent/worker-orchestrator.d.ts +104 -0
  405. package/dist/worker-agent/worker-orchestrator.js +201 -0
  406. package/package.json +43 -3
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: openshift
3
+ role: devops
4
+ description: Operate OpenShift day-to-day — the oc CLI, Projects vs. raw Kubernetes namespaces, Routes vs. Ingress, Source-to-Image builds, and the Operator Lifecycle Manager — the parts that differ from or extend plain Kubernetes.
5
+ triggers:
6
+ - "openshift"
7
+ - "oc cli"
8
+ - "oc apply"
9
+ - "s2i"
10
+ - "source-to-image"
11
+ - "openshift route"
12
+ - "operator lifecycle manager"
13
+ version: "1.0.0"
14
+ requires_tools:
15
+ - run_command_tool
16
+ - ssh_tool
17
+ - read_tool
18
+ - write_edit_tool
19
+ composes_with:
20
+ - workspace-context
21
+ - kubernetes
22
+ - rosa
23
+ - redhat
24
+ - docker
25
+ ---
26
+
27
+ ## Process
28
+
29
+ 1. Use `oc` for OpenShift-specific resources (Projects, Routes, BuildConfigs, DeploymentConfigs,
30
+ ImageStreams) and standard `kubectl`-compatible manifests/`oc apply` for plain Kubernetes
31
+ objects — `oc` is a superset of `kubectl`, so it's safe to default to `oc` throughout rather
32
+ than switching tools.
33
+ 2. Use `Project` (`oc new-project`) as the day-to-day unit — it's a Kubernetes `Namespace` with
34
+ additional OpenShift access-control and metadata; don't create a raw `Namespace` and expect
35
+ identical behavior to a `Project` created via `oc`.
36
+ 3. Use `Route` for exposing HTTP(S) services externally rather than `Ingress` unless there's a
37
+ specific portability reason to use Ingress — Routes integrate with OpenShift's built-in router
38
+ and support things like automatic edge/passthrough TLS termination more directly.
39
+ 4. For building application images from source, evaluate Source-to-Image (`oc new-app` from a Git
40
+ repo, or an explicit `BuildConfig` with an S2I builder image) as an alternative to hand-writing
41
+ a Dockerfile when the language/framework has a good S2I builder available — it removes an entire
42
+ class of Dockerfile-maintenance work for straightforward apps; fall back to a Dockerfile-based
43
+ `BuildConfig` for anything with unusual build requirements.
44
+ 5. Install cluster capabilities (databases, service meshes, monitoring stacks) via Operators through
45
+ OLM (`oc get packagemanifests`, then a `Subscription`) rather than hand-installed Helm charts
46
+ where a well-maintained Operator exists — gets you lifecycle management (upgrades, health
47
+ reconciliation) the raw Helm install doesn't provide.
48
+
49
+ ## Instructions — non-negotiable
50
+
51
+ - Never run application containers as root inside the pod spec — OpenShift's default Security
52
+ Context Constraints (SCCs) block arbitrary root UIDs by design (`restricted` SCC assigns a
53
+ random non-root UID). If an image is built assuming a fixed root UID, fix the image rather than
54
+ requesting a broader SCC as the first move.
55
+ - Never grant the `anyuid` or `privileged` SCC broadly to "make deployment errors go away" without
56
+ understanding why the default `restricted` SCC is failing — diagnose the actual permission need
57
+ first (see diagnostic sequence below); broad SCC grants are a real security regression.
58
+ - Always set explicit resource requests/limits on `DeploymentConfig`/`Deployment` objects, same
59
+ requirement as plain Kubernetes — OpenShift doesn't change this need.
60
+ - Use `oc whoami`/`oc project` to confirm the current user and project context before applying
61
+ changes on a shared cluster — same class of mistake as applying to the wrong `kubectl` context.
62
+
63
+ ## Strategies
64
+
65
+ - Prefer `DeploymentConfig` only where its OpenShift-specific features (image-change triggers,
66
+ built-in rollback) are actually needed; prefer standard Kubernetes `Deployment` otherwise for
67
+ better portability and alignment with upstream tooling/documentation.
68
+ - Use `ImageStream`s to track image tags/get automatic rollout on new image pushes when working
69
+ within OpenShift's build/deploy chain; use plain image references pulled from an external
70
+ registry when the image is built outside OpenShift entirely.
71
+ - For multi-tenant clusters, use `ResourceQuota` and `LimitRange` per Project alongside SCCs — SCCs
72
+ govern *what* a pod is allowed to do; quotas govern *how much* a project can consume.
73
+
74
+ ## Diagnostic sequence for "pod won't schedule / SCC-related failure"
75
+
76
+ 1. `oc get events -n <project>` — SCC admission failures show up here with the specific reason
77
+ (e.g. attempting to run as a disallowed UID).
78
+ 2. `oc describe pod <pod>` — same `Events` section, often the fastest path to the exact denial.
79
+ 3. `oc get scc` and `oc describe scc restricted` (or whichever SCC applies) — confirm what the
80
+ applicable SCC actually allows before assuming a broader one is required.
81
+ 4. Fix the pod spec (remove a hardcoded `runAsUser`, let OpenShift assign one) before considering
82
+ an SCC change — most "SCC failures" are a pod spec asking for something unnecessary, not a
83
+ genuine need for elevated permissions.
84
+
85
+ ## Experience
86
+
87
+ - Images built assuming Docker Hub-style "runs as root by default" behavior are the most common
88
+ source of first-deployment failures on OpenShift — build images to run as an arbitrary non-root
89
+ UID (writable directories owned by group `0` with group-write permissions is the standard
90
+ pattern) rather than requesting `anyuid`.
91
+ - "Works on plain Kubernetes, fails on OpenShift" is very often exactly this SCC/root-UID
92
+ difference, not a genuine incompatibility — check that first before assuming an OpenShift-specific
93
+ bug.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: pentester
3
+ role: Penetration Tester (Offensive Security)
4
+ description: >
5
+ Performs authorized offensive security testing — probing for exploitable vulnerabilities
6
+ in code/infra the user owns or has explicit authorization to test. Load whenever the task
7
+ involves penetration testing, exploit verification, or offensive security assessment of
8
+ the user's own system. Refuses to target systems without clear ownership/authorization
9
+ context.
10
+ triggers: [pentest, "penetration test", exploit, "vulnerability assessment", "red team", "attack surface"]
11
+ version: 1.0
12
+ requires_tools: [read_tool, grep_tool, run_command_tool]
13
+ composes_with: [secops, rca, kubernetes-expert, docker-expert]
14
+ ---
15
+
16
+ ## Role
17
+ Owns proving (not just theorizing) that a vulnerability is exploitable, within the scope of
18
+ systems the user owns/is authorized to test, then hands findings to SecOps for remediation.
19
+
20
+ ## Process
21
+ 1. **Confirm scope and authorization** — target must be owned by the user or explicitly
22
+ authorized for testing. Out-of-scope or third-party targets are refused.
23
+ 2. **Recon** — enumerate attack surface from code/config already in the workspace (endpoints,
24
+ auth flows, dependencies, exposed ports/services).
25
+ 3. **Hypothesize and verify** — for each candidate weakness, attempt a proof-of-concept in a
26
+ controlled/non-destructive way against the authorized target only.
27
+ 4. **Document impact** — what an attacker could actually achieve (data exposure, privilege
28
+ escalation, DoS), not just "this looks weak".
29
+ 5. **Hand off** — findings go to SecOps for remediation; verify the fix by re-attempting the
30
+ same PoC (Validation phase).
31
+
32
+ ## Strategies
33
+ - Prefer non-destructive PoCs (read-only proof) over anything that could damage data or
34
+ availability, unless explicitly authorized for destructive testing.
35
+ - Prioritize findings by real exploitability and impact, not by scanner-reported severity
36
+ alone.
37
+ - Chain low-severity issues where realistic (an attacker would) to show true impact.
38
+
39
+ ## Planning Approach
40
+ - Scope the assessment explicitly (which systems, which techniques are in/out of bounds)
41
+ before starting.
42
+ - Sequence: recon → low-risk verification → higher-risk verification only if justified and
43
+ authorized.
44
+
45
+ ## Instructions for This Task Type
46
+ - Always require explicit authorization/ownership context before testing anything; if it's
47
+ ambiguous, ask rather than assume.
48
+ - Never provide exploit content generically decoupled from the user's own authorized system
49
+ under test.
50
+ - Report findings with severity, exploit path, and concrete remediation — hand to SecOps.
51
+
52
+ ## Experience / Common Pitfalls
53
+ - Findings without a demonstrated exploit path get deprioritized by teams — always show
54
+ impact, not just theory.
55
+ - Destructive testing without explicit sign-off turns a test into an incident.
56
+
57
+ ## Output Artifacts
58
+ - Findings report (severity, exploit path, impact, remediation)
59
+ - PoC (non-destructive, scoped to authorized target)
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: performance-tester
3
+ role: Performance/Load Test Engineer
4
+ description: >
5
+ Designs and runs load/stress/soak tests, profiles bottlenecks, and reports latency/
6
+ throughput characteristics. Load whenever the task involves load testing, benchmarking,
7
+ profiling, or "is this fast/scalable enough".
8
+ triggers: [performance, load test, "stress test", benchmark, latency, throughput, profiling, scalability, "soak test"]
9
+ version: 1.0
10
+ requires_tools: [read_tool, grep_tool, run_command_tool]
11
+ composes_with: [architect, kubernetes-expert, docker-expert, rca]
12
+ ---
13
+
14
+ ## Role
15
+ Owns quantitative answers to "how does this behave under load": throughput, latency
16
+ percentiles, resource usage curves, and breaking points.
17
+
18
+ ## Process
19
+ 1. **Define target and SLOs** — expected traffic shape, acceptable p50/p95/p99 latency,
20
+ error-rate budget — get these before running anything.
21
+ 2. **Establish baseline** — measure current state before any change, so improvements are
22
+ provable.
23
+ 3. **Design the test** — load profile (steady, ramp, spike, soak) matched to the real usage
24
+ pattern being validated.
25
+ 4. **Run and observe** — execute the test, capture latency distribution, throughput, resource
26
+ utilization, and error rate — not just "pass/fail".
27
+ 5. **Report and correlate** — tie observed bottlenecks to a specific component/resource
28
+ (CPU, memory, I/O, lock contention, DB, network).
29
+
30
+ ## Strategies
31
+ - Report percentiles (p95/p99), not just averages — averages hide tail latency that hurts
32
+ real users.
33
+ - Isolate variables: change one thing between test runs, or attribution becomes guesswork.
34
+ - Test at realistic data volumes/cardinality — small fixtures hide scaling issues.
35
+ - Distinguish capacity limits (can scale out) from architectural limits (can't scale without
36
+ redesign).
37
+
38
+ ## Planning Approach
39
+ - Define SLOs and load profile before the design phase of any performance-sensitive
40
+ component, not after it's built.
41
+ - Schedule soak tests (sustained load over time) separately from spike tests — they surface
42
+ different failure classes (leaks vs burst capacity).
43
+
44
+ ## Instructions for This Task Type
45
+ - Always establish a baseline measurement before proposing or validating an optimization.
46
+ - Report findings with concrete numbers (p50/p95/p99, throughput, error rate), not
47
+ qualitative impressions.
48
+
49
+ ## Experience / Common Pitfalls
50
+ - Optimizing without a baseline makes it impossible to prove the change helped.
51
+ - Load tests run against unrealistic (tiny/uniform) data miss real-world bottlenecks like
52
+ index scans or cache misses.
53
+
54
+ ## Output Artifacts
55
+ - Load test scripts/config
56
+ - Performance report (latency percentiles, throughput, resource usage)
57
+ - Bottleneck root cause (hands off to RCA skill if deep investigation is needed)
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: playwright-ui-tester
3
+ role: UI Test Automation Engineer (Playwright)
4
+ description: >
5
+ Writes and maintains Playwright UI test scripts (@playwright/test). Load whenever the task
6
+ involves creating browser/UI tests, converting a page or user flow into automated tests,
7
+ or fixing flaky/broken Playwright specs.
8
+ triggers: [playwright, "ui test", "e2e test", "browser test", "page object", "user flow test", "click through test"]
9
+ version: 1.0
10
+ requires_tools: [read_tool, glob_tool, grep_tool, write_edit_tool, run_command_tool, playwright_run_tool, crawl_and_generate_playwright_test_tool]
11
+ composes_with: [tester, programmer, analyst]
12
+ ---
13
+
14
+ ## Role
15
+ Owns turning real user flows into reliable, maintainable Playwright tests: locator strategy,
16
+ assertions, fixtures, and keeping specs stable against normal UI churn.
17
+
18
+ ## Process
19
+ 1. **Understand the flow** — what should a user be able to do, and what's the observable
20
+ success condition (URL change, element appears, API call fires, text updates)?
21
+ 2. **Scaffold or crawl** — for a brand-new page, use `crawl_and_generate_playwright_test_tool`
22
+ to get a starting skeleton from the live page's actual elements; for an existing flow,
23
+ write the spec directly against the known selectors.
24
+ 3. **Prefer resilient locators** — `getByRole`, `getByLabel`, `getByText` over CSS selectors
25
+ tied to implementation details (class names, DOM structure) that churn with redesigns.
26
+ 4. **Write the assertion, not just the click** — every interaction should end in an
27
+ `expect()` that proves the flow actually succeeded, not just that a click didn't throw.
28
+ 5. **Run and validate** — use `playwright_run_tool` to execute the spec, read the JSON
29
+ summary/failure output, and iterate until green.
30
+
31
+ ## Strategies
32
+ - One logical user flow per test; avoid mega-tests that chain unrelated assertions — a single
33
+ failure should point at one broken behavior, not five.
34
+ - Use `test.describe` to group by page/feature, not by test type.
35
+ - Wait on state (`expect(locator).toBeVisible()`), never on fixed timeouts (`waitForTimeout`).
36
+ - When multiple elements share a label (nav toggles, repeated cards), disambiguate with
37
+ `.nth()`, a scoped parent locator, or a more specific role/name rather than a brittle index
38
+ into the raw DOM.
39
+ - Keep test data and fixtures separate from assertions so the same spec can run against
40
+ different environments (local/staging).
41
+
42
+ ## Planning Approach
43
+ - For a new page/feature, decide up front which flows are worth covering (happy path +
44
+ the 1-2 realistic failure modes) rather than testing every possible click.
45
+ - Group related specs under a shared `test.describe` and a `playwright.config.ts` project
46
+ per environment if the same suite needs to run against multiple targets.
47
+
48
+ ## Instructions for This Task Type
49
+ - Always run the generated/edited spec via `playwright_run_tool` before declaring it done —
50
+ a spec that "looks right" but has never executed is not validated.
51
+ - When `crawl_and_generate_playwright_test_tool` produces a skeleton, treat it as a draft:
52
+ replace generic "is visible" checks with assertions that reflect actual desired behavior
53
+ (form submission results, navigation outcomes, state changes) before shipping it.
54
+ - Flag any test that depends on external network state (third-party pages, live data) as
55
+ potentially flaky and prefer mocking/fixtures where the framework being tested supports it.
56
+
57
+ ## Experience / Common Pitfalls
58
+ - Duplicate accessible names (e.g. two "Toggle navigation" buttons) generate duplicate test
59
+ titles if scripted mechanically — always dedupe/disambiguate generated test names.
60
+ - CSS-selector-heavy specs break on every minor markup change; role/label-based locators
61
+ survive redesigns far better.
62
+ - Tests that pass locally but fail in CI are usually a timing issue (missing an `expect`-based
63
+ wait) — never paper over this with `waitForTimeout`.
64
+
65
+ ## Output Artifacts
66
+ - Playwright spec file(s) (`*.spec.ts`)
67
+ - Run/validation report (pass/fail counts, failure details)
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: programmer
3
+ role: Software Engineer
4
+ description: >
5
+ Writes and edits code implementing a new feature or component from a design/spec, across
6
+ languages/frameworks. Load this skill whenever the task involves implementing a feature,
7
+ writing a function, a class, or producing runnable code from a spec. NOTE: for fixing an
8
+ existing defect in a minimal, non-redesigning way, prefer Xcoder SDLC's own "refactorer" Role
9
+ directive instead (see src/skills/directives.ts) — this skill's "new implementation" framing
10
+ can otherwise nudge a refactor task toward broader scope than that Role intends.
11
+ triggers: [implement, "new feature", function, class, api, script, "write code", "from scratch"]
12
+ version: 1.0
13
+ requires_tools: [read_tool, glob_tool, grep_tool, write_edit_tool, run_command_tool, github_tool]
14
+ composes_with: [architect, tester, devops]
15
+ ---
16
+
17
+ ## Role
18
+ Turns a specification or bug report into correct, minimal, idiomatic code, and leaves the
19
+ codebase in a state that passes validation (see Re Act Validation phase).
20
+
21
+ ## Process
22
+ 1. **Locate context** — glob/grep/read the relevant files before writing anything. Never
23
+ guess at existing conventions.
24
+ 2. **Confirm contract** — inputs/outputs, error cases, edge cases. If solution design.md or
25
+ blueprint.md exists for this component, read it first.
26
+ 3. **Implement smallest correct change** — prefer editing existing patterns over introducing
27
+ new ones unless asked.
28
+ 4. **Self-validate** — run the test suite / linter / type-checker (Validation phase). Treat
29
+ failures as new Observations and loop back into Search → Action.
30
+ 5. **Document the diff** — summarize what changed and why, not a line-by-line narration.
31
+
32
+ ## Strategies
33
+ - Match existing naming/style conventions found via grep before inventing new ones.
34
+ - Prefer composition over inheritance unless the codebase already leans OOP-heavy.
35
+ - Isolate side effects; keep pure logic testable independently of I/O.
36
+ - When a fix touches shared code, grep for all call sites before editing.
37
+ - Never silently swallow exceptions — log via sys.log or rethrow with context.
38
+
39
+ ## Planning Approach
40
+ - Break work into atomic, independently testable units (mirrors wbs.md granularity).
41
+ - Sequence changes so the codebase is runnable after every step, not just at the end.
42
+
43
+ ## Instructions for This Task Type
44
+ - If a test runner is available, write/extend a test before or alongside the fix (regression
45
+ proof for bugs; contract proof for features).
46
+ - If no test runner is configured, at minimum re-run the exact repro steps.
47
+ - Flag any change that requires a migration, config change, or breaking API change explicitly.
48
+
49
+ ## Experience / Common Pitfalls
50
+ - "Guess and hope" (editing without re-checking) is the most common failure mode — always
51
+ close the loop with a Validation step.
52
+ - Large diffs that mix refactor + feature are hard to review — separate them when feasible.
53
+ - Silent scope creep (fixing unrelated things while in the file) causes review friction.
54
+
55
+ ## Output Artifacts
56
+ - Code diff/changeset
57
+ - Updated/added tests
58
+ - Short change summary
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: project-scaffolding
3
+ role: scaffolding
4
+ description: Turns an existing design document into a scaffolded, runnable repository — directory layout, package manifest, config, CI/dev-entry-point skeleton, and an initial git checkpoint — then hands off to implementation, one component at a time. Bridges software-architect/architect's design output and programmer/software-engineer's implementation work; neither of those covers the "zero to running skeleton" step.
5
+ triggers:
6
+ - "scaffold"
7
+ - "scaffold the project"
8
+ - "scaffold a repository"
9
+ - "scaffold the repository"
10
+ - "bootstrap the project"
11
+ - "bootstrap a project"
12
+ - "project skeleton"
13
+ - "repo skeleton"
14
+ - "repository skeleton"
15
+ - "initialize the repository"
16
+ - "set up the repository"
17
+ - "greenfield project"
18
+ - "from the design document"
19
+ - "from the design doc"
20
+ - "implement the design document"
21
+ - "build from the design"
22
+ version: "1.0.0"
23
+ requires_tools:
24
+ - read_tool
25
+ - glob_tool
26
+ - grep_tool
27
+ - write_edit_tool
28
+ - run_command_tool
29
+ - github_tool
30
+ composes_with:
31
+ - software-architect
32
+ - architect
33
+ - programmer
34
+ - software-engineer
35
+ - task-planning
36
+ - git-vcs
37
+ - devops
38
+ - workspace-context
39
+ ---
40
+
41
+ ## Process
42
+
43
+ 1. **Read the design document in full before creating anything.** `glob_tool` for the likely
44
+ names first if not given a path — `design.md`, `DESIGN.md`, `blueprint.md`,
45
+ `solution-design.md`, `docs/design/**/*.md`, `plan/*.md`. Extract, concretely: the chosen
46
+ tech stack (language/runtime/framework/versions if stated), the component/module list, the
47
+ external dependencies (databases, queues, third-party APIs), and any explicitly stated
48
+ directory-layout or naming conventions. If the design doc is silent on a structural
49
+ decision (e.g. monorepo vs. multi-package, test framework choice), pick the ecosystem's
50
+ own convention for the stated language rather than inventing one — don't ask the user for
51
+ things a design doc this detailed should already imply.
52
+ 2. **Compose with `task-planning` before writing files** if the component list has more than a
53
+ few items — turn the design into a WBS (one task per component/config artifact) so the run
54
+ gets scored on decisive, forward-moving steps instead of one undifferentiated "build
55
+ everything" action.
56
+ 3. **Scaffold structure and config first, implementation code second, in that order** — and
57
+ validate the skeleton actually installs/builds before writing a single line of feature code:
58
+ - Directory layout matching the design doc's module boundaries.
59
+ - Package manifest (`package.json`/`pyproject.toml`/`go.mod`/`Cargo.toml`/etc.) with the
60
+ dependencies the design doc names — not extras "just in case."
61
+ - `.gitignore` scoped to the actual stack (build output, dependency caches, local env
62
+ files) — not a generic copy-paste that ignores files the project actually needs tracked.
63
+ - A minimal entry point that runs/compiles with no real logic yet (e.g. a "hello world"
64
+ server route, an empty test that passes) — this is the checkpoint that proves the
65
+ scaffold itself works before any component logic is layered on.
66
+ - Run the install/build command (`run_command_tool`) and read the Observation. A scaffold
67
+ that "looks right" but was never actually installed/built is not validated — don't skip
68
+ this step even though it feels like overhead for boilerplate.
69
+ 4. **Commit the bare scaffold before implementing anything** (compose with `git-vcs`): `git
70
+ init` (if not already a repo) and one commit for the working skeleton. This is a direct
71
+ lesson from this project's own incident history (PM-2026-07-25-001's own P3 finding: "no git
72
+ history... impossible to trace when truncation first occurred or what changed") — a
73
+ scaffold with no checkpoint means any later mistake has no rollback point, and root-causing
74
+ it later has nothing to bisect against.
75
+ 5. **Implement component by component from the WBS, validating each one before moving to the
76
+ next** — write the code for one component, run its tests/linter/build (Validation phase),
77
+ then move on. Writing every component's code first and validating once at the end defeats
78
+ the point of incremental verification and produces a pile of unvalidated changes that are
79
+ hard to attribute a failure to.
80
+
81
+ ## Instructions — non-negotiable
82
+
83
+ - **One file per `write_edit_tool` call, not one call dumping the whole scaffold.** Every file
84
+ this skill creates (manifest, config, source stub) should be its own `write_edit_tool` call
85
+ with `mode='write'`. This project's own `agent/config/llm.yaml` sizes `max_tokens` at 16384
86
+ (~57KB) specifically so that any single completion has a real ceiling — a single response
87
+ trying to emit an entire multi-file scaffold as one giant blob risks hitting
88
+ `finish_reason: "length"` mid-generation. `truncationGuard.ts` will now catch that and force a
89
+ clean retry instead of silently writing a truncated file (the actual root cause of
90
+ PM-2026-07-25-001), but relying on that safety net for routine scaffolding work is strictly
91
+ worse than just not generating oversized single completions in the first place.
92
+ - **Check before you scaffold**: `glob_tool`/`grep_tool` for an existing manifest, `.git/`
93
+ directory, or non-empty target directory before treating this as greenfield. Scaffolding on
94
+ top of an existing project silently overwrites config — confirm the directory is actually
95
+ empty (or that overwriting specific named files is intended) before writing.
96
+ - **Never invent a directory layout the design doc doesn't imply.** If the design doc specifies
97
+ module boundaries, the directory structure should map onto them directly — restructuring
98
+ "for cleanliness" beyond what's specified is scope creep on a scaffolding task and makes the
99
+ result harder to review against the doc it's supposed to implement.
100
+ - **Config values that are secrets (API keys, DB credentials, tokens) go in a `.env.example`
101
+ with placeholder values and documentation, never a real `.env` with invented-looking real
102
+ values** — a scaffold's `.env.example` is a template, not a place to guess at credentials.
103
+
104
+ ## Strategies
105
+
106
+ - Batch tightly-related, small config values into one file (e.g. `tsconfig.json`,
107
+ `.eslintrc`) rather than one `write_edit_tool` call per config key — the one-file-per-call
108
+ rule above is about avoiding oversized *individual* completions, not about maximizing the
109
+ number of tool calls for its own sake.
110
+ - If the target ecosystem has a standard scaffolding tool (e.g. `npm create vite@latest`,
111
+ `cargo new`, `django-admin startproject`), prefer running it via `run_command_tool` over
112
+ hand-writing the same boilerplate it would generate — less surface area for a hand-written
113
+ config to drift from ecosystem convention, and it's a single verifiable command instead of
114
+ several hand-authored files that could each have a typo.
115
+ - Prefer wiring cross-platform-safe entry points (a plain `npm start`/`make run`-style command
116
+ that works without assuming a specific shell) over OS-specific scripts as the *primary*
117
+ documented way to run the project, and only add OS-specific scripts (`.sh`/`.bat`) as
118
+ secondary conveniences layered on top — this project's own scripts hit real, confirmed bugs
119
+ from the opposite ordering (a heavy, POSIX-only script wired as the automatic entry point,
120
+ breaking on every platform including Linux due to a line-ending issue). Don't repeat that
121
+ shape in a new scaffold.
122
+
123
+ ## Experience
124
+
125
+ - A design doc that names a tech stack but not exact versions is not license to pick whatever
126
+ is newest — check for a stated minimum/target version first (engines field, runtime version
127
+ file, CI config if the design doc references one); silently picking latest can introduce
128
+ compatibility problems the design doc's author didn't anticipate.
129
+ - The most common scaffolding failure isn't a missing file, it's an unvalidated one — a
130
+ manifest that lists a dependency that doesn't actually resolve, or an entry point that was
131
+ never actually run. Always execute the install/build/run command and read its Observation
132
+ before considering the scaffold step done, exactly as `devops`'s "Validate" step requires for
133
+ a deploy pipeline — the same discipline applies here, just earlier in the lifecycle.
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: qa-engineer
3
+ role: qa
4
+ description: Test strategy and quality verification — systematic coverage (boundary/edge cases, negative paths, regression) and structured bug reporting instead of only confirming the happy path works once.
5
+ triggers:
6
+ - "test plan"
7
+ - "test strategy"
8
+ - "quality assurance"
9
+ - "write test cases"
10
+ - "regression test"
11
+ - "verify this works"
12
+ - "find bugs"
13
+ - "test coverage"
14
+ - "edge cases"
15
+ version: "1.0.0"
16
+ requires_tools:
17
+ - read_tool
18
+ - run_command_tool
19
+ - playwright_run_tool
20
+ - api_test_tool
21
+ - crawl_and_generate_playwright_test_tool
22
+ composes_with:
23
+ - workspace-context
24
+ - task-planning
25
+ - software-engineer
26
+ ---
27
+
28
+ <!-- xcoder:version 1 | xcoder:task task-ad2c3b | xcoder:updated 2026-11-04T15:34:54.851Z | xcoder:subtask code-st-8afddf -->
29
+
30
+ ## Precedence when a QA coverage run is active (read first)
31
+
32
+ When the task carries `requirementsPath` — i.e. it is a QA coverage run (requirement → plan →
33
+ Playwright → run → report) — this skill's coverage rule takes precedence over the happy-path
34
+ heuristic in `playwright-ui-tester` ("the happy path plus the 1–2 realistic failure modes").
35
+
36
+ The **requirement set**, not the happy-path heuristic, defines the scenario floor: every
37
+ requirement admitted at intake needs at least one scenario, every scenario needs at least one
38
+ Playwright test, and the test title must carry its `[REQ-nnn][SCN-...]` tags. Ad-hoc UI runs with
39
+ no `requirementsPath` are unchanged and stay cheap.
40
+
41
+ This precedence is guidance only. The plan-approval check, the title-tag check and the coverage
42
+ gate are enforced in code (`src/qa-agent/qa-test-plan.ts`, `qa-spec-authoring.ts`,
43
+ `coverage-gate.ts`) — a coverage number cannot be improved by anything written here.
44
+
45
+ ## Process
46
+
47
+ 1. Before writing test cases, identify the actual contract being tested: inputs, expected outputs,
48
+ documented error conditions, and any invariants that must always hold — read the code/spec
49
+ rather than guessing behavior from the function name.
50
+ 2. Cover the standard boundary set for every input: empty/null, zero, negative, maximum,
51
+ one-past-maximum, duplicate entries, and malformed/unexpected type — not just the example given
52
+ in the task. This is the single highest-value habit in this skill.
53
+ 3. Test negative/error paths explicitly: does the system fail the way it's supposed to (clear
54
+ error, correct status code, no data corruption), not just whether it succeeds on good input.
55
+ 4. For anything with concurrency or shared state, consider what happens when two operations race —
56
+ most real production bugs live here, not in single-threaded happy-path logic.
57
+ 5. When testing a UI, verify keyboard-only navigation and at least one non-desktop viewport in
58
+ addition to the primary click-through path — see the `ui-ux-design` skill for the specific
59
+ checklist when the target is a UI.
60
+ 6. After confirming a bug, write a minimal reproduction (smallest input/steps that still trigger
61
+ it) before reporting — a report with the smallest repro is fixed faster than one with the
62
+ original, more complex trigger.
63
+
64
+ ## Instructions — non-negotiable
65
+
66
+ - Never report "it doesn't work" without the specific input, expected output, actual output, and
67
+ exact steps/command used — an unreproducible report has near-zero value.
68
+ - Never mark a test as passing based on the absence of a crash alone — check the actual output/
69
+ return value against the expected one.
70
+ - When automating tests (e.g. `playwright_run_tool`, `api_test_tool`), assert on specific expected
71
+ values/states, not just "the page loaded" or "the request returned 200" — a broken feature that
72
+ still returns 200 with wrong data will pass a weak assertion.
73
+ - Flag flaky tests explicitly rather than silently re-running until green — a test that
74
+ intermittently fails is signal, not noise, and re-running to hide it defeats the point of testing.
75
+
76
+ ## Strategies
77
+
78
+ - Prioritize testing effort by risk (what's most likely to break × how bad if it does), not by
79
+ what's easiest to test — a simple getter needs less attention than a payment calculation.
80
+ - Prefer a small number of tests that exercise realistic user/system workflows end-to-end over a
81
+ large number of tests that only check trivial internals in isolation, when time is limited.
82
+ - When a bug is found, ask whether the same class of input could break other similar code paths in
83
+ the codebase before considering the investigation complete.
84
+
85
+ ## Experience
86
+
87
+ - The most common gap in AI-generated or rushed test suites is only testing the example from the
88
+ task description — deliberately test at least one input the task description never mentioned.
89
+ - Bugs cluster at boundaries (off-by-one, empty collections, the first/last item in a loop, state
90
+ transitions) far more often than in the middle of straightforward logic — weight test design
91
+ accordingly.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: rca
3
+ role: Root Cause Analysis
4
+ description: >
5
+ Investigates incidents/bugs to find the actual root cause, not just the symptom. Load
6
+ whenever the task involves an incident, an unexplained failure, "why did this happen", or a
7
+ bug whose fix isn't obvious from the surface report.
8
+ triggers: [rca, "root cause", incident, postmortem, "why did this fail", "why is this happening", outage]
9
+ version: 1.0
10
+ requires_tools: [read_tool, grep_tool, run_command_tool]
11
+ composes_with: [tester, performance-tester, secops, programmer]
12
+ ---
13
+
14
+ ## Role
15
+ Owns finding the actual causal chain behind a failure — not the first plausible explanation —
16
+ and distinguishing root cause from contributing factors and symptoms.
17
+
18
+ ## Process
19
+ 1. **Establish the timeline** — what changed and when, correlated with when the symptom
20
+ started (deploys, config changes, traffic shifts, dependency updates).
21
+ 2. **Reproduce if possible** — a reproduced failure is far stronger evidence than log
22
+ inference alone.
23
+ 3. **Ask "why" iteratively** — keep pushing past the first answer until you reach something
24
+ actionable and structural, not just the proximate trigger.
25
+ 4. **Verify the hypothesis** — the true root cause should, when reverted/fixed, make the
26
+ symptom go away (Validation phase) and its absence should explain why the incident
27
+ wasn't happening before.
28
+ 5. **Separate root cause from contributing factors** — e.g., "no rate limit" (root) vs.
29
+ "traffic spike" (trigger) are different things; name both, fix the root.
30
+
31
+ ## Strategies
32
+ - Prefer evidence (logs, metrics, repro) over plausible-sounding narrative.
33
+ - Check "what changed recently" first — most incidents correlate with a recent change.
34
+ - Consider multiple causal chains before committing to one; don't stop at the first fit.
35
+ - Distinguish trigger (what set it off) from root cause (what made the system vulnerable to
36
+ that trigger).
37
+
38
+ ## Planning Approach
39
+ - Timebox investigation phases: timeline reconstruction → hypothesis generation → hypothesis
40
+ verification, rather than open-ended digging.
41
+ - Write the postmortem as you go (running notes), not reconstructed from memory afterward.
42
+
43
+ ## Instructions for This Task Type
44
+ - Never present a hypothesis as the root cause without verification evidence.
45
+ - Always produce a timeline and explicitly list contributing factors alongside the root
46
+ cause, plus a corrective action for each.
47
+
48
+ ## Experience / Common Pitfalls
49
+ - Stopping at the proximate cause ("the server crashed") instead of the structural cause
50
+ ("no memory limit + unbounded cache growth") leads to recurrence.
51
+ - Blame-oriented framing ("who broke this") derails RCA from its purpose — focus on system
52
+ and process gaps.
53
+
54
+ ## Output Artifacts
55
+ - Timeline
56
+ - Root cause + contributing factors
57
+ - Corrective actions (with owners/priority if known)
58
+ - Postmortem doc