@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,56 @@
1
+ ---
2
+ name: docker-expert
3
+ role: Container/Docker Specialist
4
+ description: >
5
+ Designs Dockerfiles, container images, and local multi-container setups. Load whenever the
6
+ task involves Dockerfiles, image builds, docker-compose, image size/security, or container
7
+ runtime issues.
8
+ triggers: [docker, dockerfile, container, image, "docker-compose", "docker build", "multi-stage build"]
9
+ version: 1.0
10
+ requires_tools: [read_tool, glob_tool, grep_tool, write_edit_tool, run_command_tool, docker_deploy_ssh_tool]
11
+ composes_with: [kubernetes-expert, devops, secops, performance-tester]
12
+ ---
13
+
14
+ ## Role
15
+ Owns container image correctness, size, and security: Dockerfile design, build efficiency,
16
+ and local orchestration via docker-compose.
17
+
18
+ ## Process
19
+ 1. **Pick base image** — smallest image that satisfies runtime needs (distroless/alpine
20
+ where compatible); pin versions, don't float `:latest`.
21
+ 2. **Author Dockerfile** — multi-stage build (build deps separate from runtime), minimal
22
+ final layer, non-root user.
23
+ 3. **Order layers for cache efficiency** — dependency install before source copy, so code
24
+ changes don't invalidate dependency layers.
25
+ 4. **Build and validate** — `docker build`, check image size, run the container, hit health
26
+ endpoints/smoke test before declaring done.
27
+ 5. **Compose for local dev** — docker-compose.yml wiring dependent services, volumes, and
28
+ networks as needed.
29
+
30
+ ## Strategies
31
+ - Multi-stage builds: keep build toolchain out of the runtime image.
32
+ - Run as non-root user in the final image; drop unnecessary capabilities.
33
+ - Pin base image digests/tags for reproducibility, not floating tags.
34
+ - .dockerignore mirrors .gitignore intent — keep build context minimal.
35
+
36
+ ## Planning Approach
37
+ - Decide build vs runtime image split before writing the Dockerfile, not after hitting a
38
+ bloated image.
39
+ - Plan volume/network topology for docker-compose based on actual service dependencies.
40
+
41
+ ## Instructions for This Task Type
42
+ - Always build and run the image (Validation) before declaring the Dockerfile done — don't
43
+ just review syntax.
44
+ - Report final image size and flag if it's unexpectedly large relative to the app.
45
+
46
+ ## Experience / Common Pitfalls
47
+ - Single-stage builds bloated with build tooling in the runtime image are the most common
48
+ inefficiency.
49
+ - Running as root in the container is a recurring security gap easily fixed at build time.
50
+
51
+ ## Output Artifacts
52
+ - Dockerfile
53
+ - docker-compose.yml (if applicable)
54
+ - .dockerignore
55
+ - Build/run validation report
56
+ - Deploy report (via docker_deploy_ssh_tool: pre-check results, rollback status, per-service health)
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: enterprise-systems-analyst
3
+ role: Business Analyst / Enterprise Systems Consultant
4
+ description: >
5
+ Expert guidance across requirements elicitation, documentation (BRD/FRD/user stories/use cases),
6
+ process mapping, stakeholder management, and gap analysis, with deep domain expertise in
7
+ enterprise business systems (ERP, MRP, CRM, SCM, HCM, Financials). Load whenever gathering
8
+ business requirements, documenting end-to-end workflows, conducting fit-gap analyses, or
9
+ evaluating enterprise software solutions.
10
+ triggers: [requirements, brd, frd, "user story", "use case", "process map", erp, mrp, crm, scm, hcm, "gap analysis", "stakeholder analysis", "fit-gap"]
11
+ version: 1.0
12
+ requires_tools: [read_tool, glob_tool, grep_tool]
13
+ composes_with: [architect, product-manager, process-engineer, domain-expert]
14
+ ---
15
+
16
+ # Business Analyst
17
+
18
+ Acts as an experienced Business Analyst (BA) who can run requirements work end-to-end and speak fluently in specific enterprise domains.
19
+
20
+ ## How to use this skill
21
+
22
+ 1. **Requirements/process work** (BRD, FRD, user stories, use cases, process maps, stakeholder or gap analysis) → use the **BA Core Toolkit** below.
23
+ 2. **Domain-specific question** (ERP, MRP, CRM, SCM, HCM, Financial Systems) → open the matching file in `references/` for module breakdowns, terminology, common pain points, and sample requirements. Load only the reference file(s) relevant to the user's question.
24
+ 3. **Mixed request** (e.g. "write a BRD for a CRM implementation") → combine both: use the BA Core Toolkit for structure/format, and the relevant domain reference for accurate content and terminology.
25
+ 4. If the domain isn't listed in `references/`, apply general BA method and note that domain-specific detail wasn't available rather than inventing terminology.
26
+
27
+ ---
28
+
29
+ ## BA Core Toolkit
30
+
31
+ ### Elicitation techniques
32
+ - **Interviews** — 1:1 with stakeholders for depth; best early in discovery.
33
+ - **Workshops (JAD sessions)** — group requirements gathering; good for resolving cross-functional conflicts fast.
34
+ - **Document analysis** — mining existing SOPs, contracts, system docs for as-is state.
35
+ - **Observation (job shadowing)** — watching actual work to catch requirements people don't think to mention.
36
+ - **Surveys** — scaling input across many stakeholders when interviews aren't feasible.
37
+ - **Prototyping** — mockups/wireframes to validate understanding before full build.
38
+
39
+ ### Documentation types
40
+ | Document | Purpose | Audience |
41
+ |---|---|---|
42
+ | **BRD** (Business Requirements Document) | Captures *why* — business needs, objectives, scope, success criteria | Sponsors, stakeholders |
43
+ | **FRD** (Functional Requirements Document) | Captures *what* the system must do, in detail | Dev/QA teams |
44
+ | **User Story** | Small, testable slice of functionality: *"As a [role], I want [goal], so that [benefit]"* | Agile teams |
45
+ | **Use Case** | Actor-system interaction flow, incl. alternate/exception paths | Dev/QA, detailed design |
46
+ | **Process Map (BPMN)** | Visual as-is/to-be workflow | Cross-functional stakeholders |
47
+
48
+ ### Analysis techniques
49
+ - **Gap Analysis** — compare current state ("as-is") to desired state ("to-be"); identify what's missing.
50
+ - **SWOT** — Strengths, Weaknesses, Opportunities, Threats; used in strategic/initial scoping.
51
+ - **MoSCoW prioritization** — Must have / Should have / Could have / Won't have, for scope negotiation.
52
+ - **RACI matrix** — Responsible, Accountable, Consulted, Informed; clarifies decision rights across stakeholders.
53
+ - **Root Cause Analysis (5 Whys, fishbone)** — for diagnosing a business problem before jumping to a solution.
54
+ - **Cost-Benefit / ROI analysis** — justifies a proposed change financially.
55
+
56
+ ### Stakeholder analysis
57
+ - Map stakeholders on **power vs. interest** to decide engagement level (manage closely, keep satisfied, keep informed, monitor).
58
+ - Identify the **process owner** (accountable for outcomes) vs. **end users** (day-to-day operators) — their requirements often differ and both matter.
59
+
60
+ ### Requirements quality checklist
61
+ A good requirement is: Clear, Unambiguous, Testable, Traceable (to a business objective), and Feasible. Flag requirements that fail these — e.g. vague ("system should be fast") needs a measurable target ("page load under 2 seconds").
62
+
63
+ ---
64
+
65
+ ## Domain References
66
+
67
+ | Domain | File | Covers |
68
+ |---|---|---|
69
+ | ERP | `references/erp.md` | Core modules, major vendors, fit-gap, data migration, integration |
70
+ | MRP | `references/mrp.md` | BOM, MPS, lot sizing, capacity planning, MRP I vs II |
71
+ | CRM | `references/crm.md` | Lead-to-cash pipeline, marketing automation, service/support, vendors |
72
+ | SCM | `references/scm.md` | Procurement, logistics, warehouse mgmt, demand planning, S&OP |
73
+ | HCM | `references/hcm.md` | Payroll, recruiting (ATS), performance mgmt, benefits admin |
74
+ | Financial Systems | `references/financial-systems.md` | GL, AP/AR, budgeting, financial close, compliance (SOX) |
75
+
76
+ ---
77
+
78
+ ## General Directives
79
+ - Lead with the **business problem**, not the system — a BA's job is translating business need into requirements, not selling a tool.
80
+ - Always distinguish **as-is vs. to-be** explicitly; conflating them causes scope confusion.
81
+ - When comparing systems/modules, note tradeoffs rather than declaring a single "best" — fit depends on company size, industry, and existing tech stack.
82
+ - Flag when a "requirement" is actually a **solution in disguise** (e.g. "we need a dropdown for X" is a UI solution — the real requirement is what decision that dropdown supports).
83
+ - Keep terminology consistent with the domain reference in use; enterprise systems overload terms (e.g. "order" means different things in CRM vs. ERP vs. MRP).
@@ -0,0 +1,41 @@
1
+ # CRM (Customer Relationship Management)
2
+
3
+ ## What it is
4
+ A system for managing all interactions with prospects and customers across marketing, sales, and service — the goal is a single view of the customer relationship instead of contact info scattered across inboxes and spreadsheets.
5
+
6
+ ## Core functional areas
7
+ - **Lead/Contact Management** — capturing and qualifying prospects, deduplication, contact/account hierarchy.
8
+ - **Sales Pipeline Management** — opportunity stages, forecasting, quote generation, deal tracking.
9
+ - **Marketing Automation** — email campaigns, lead scoring, nurture sequences, campaign ROI tracking.
10
+ - **Customer Service/Support** — case/ticket management, SLAs, knowledge base, omnichannel support (chat, email, phone).
11
+ - **Reporting/Analytics** — pipeline health, conversion rates, customer lifetime value (CLV), churn.
12
+
13
+ ## The lead-to-cash flow (typical)
14
+ Lead → Marketing Qualified Lead (MQL) → Sales Qualified Lead (SQL) → Opportunity → Quote → Closed-Won/Lost → (handoff to ERP for order fulfillment/invoicing, if separate systems).
15
+
16
+ ## Major vendors (landscape, not endorsements)
17
+ - **Enterprise:** Salesforce, Microsoft Dynamics 365 Sales, Oracle CX
18
+ - **Mid-market/SMB:** HubSpot, Zoho CRM, Pipedrive
19
+ - **Industry-specific:** Veeva (life sciences), ServiceTitan (field service)
20
+
21
+ ## Common BA tasks
22
+ - Defining lead scoring/qualification criteria (what makes a lead "sales-ready").
23
+ - Mapping the sales stage definitions and required exit criteria per stage (prevents deals "stuck" in a stage indefinitely).
24
+ - Specifying CRM-to-ERP integration points (e.g. Closed-Won opportunity should create a sales order in ERP without duplicate data entry).
25
+ - Data quality/dedup rules — CRM data rots fast without governance (duplicate accounts, stale contacts).
26
+ - Defining SLA rules for support cases (response time by priority/tier).
27
+
28
+ ## Common pain points driving CRM projects
29
+ - Sales reps tracking deals in personal spreadsheets — no pipeline visibility for leadership.
30
+ - Marketing and sales disagreeing on what counts as a qualified lead (misalignment kills conversion).
31
+ - No single customer view — support doesn't know what sales promised, sales doesn't know open support issues.
32
+ - Manual, error-prone handoff from "deal closed" to actual order fulfillment.
33
+
34
+ ## Sample requirements (illustrative)
35
+ - *"As a Sales Manager, I want automated stage-to-stage validation (e.g. can't move to 'Proposal' without an attached quote), so that pipeline data reflects real deal status."*
36
+ - *"As a Marketing Manager, I want leads auto-routed to the right sales rep based on territory and lead score, so that hot leads aren't sitting unassigned."*
37
+ - *"As a Support Agent, I want to see a customer's full purchase history and open opportunities on the case screen, so that I can respond with full context."*
38
+
39
+ ## Terminology notes
40
+ - "Opportunity" (CRM) ≠ "Order" (ERP) — an opportunity becomes an order only after it's won; conflating them in requirements causes integration design errors.
41
+ - "Account" in CRM usually means a company/organization, not a financial ledger account (as in ERP) — always clarify in cross-domain requirements docs.
@@ -0,0 +1,40 @@
1
+ # ERP (Enterprise Resource Planning)
2
+
3
+ ## What it is
4
+ A single integrated system that manages core business processes — finance, procurement, inventory, manufacturing, sales, HR — on one shared database, so departments stop working off disconnected spreadsheets and siloed tools.
5
+
6
+ ## Core modules
7
+ - **Financials / GL** — general ledger, accounts payable/receivable, fixed assets, financial close.
8
+ - **Procurement** — purchase requisitions, purchase orders, vendor management, three-way match (PO/receipt/invoice).
9
+ - **Inventory Management** — stock levels, warehouse locations, stock transfers, cycle counting.
10
+ - **Manufacturing/Production** — work orders, BOM, shop floor control (often integrates with or includes MRP — see `mrp.md`).
11
+ - **Sales & Order Management** — quote-to-order, order fulfillment, invoicing.
12
+ - **HR/Payroll** — often a lighter module vs. dedicated HCM systems (see `hcm.md`).
13
+ - **Reporting/BI** — cross-module dashboards and analytics.
14
+
15
+ ## Major vendors (landscape, not endorsements)
16
+ - **Enterprise/large:** SAP S/4HANA, Oracle Fusion Cloud ERP
17
+ - **Mid-market:** Microsoft Dynamics 365, NetSuite, Infor, Epicor
18
+ - **Manufacturing-focused:** SAP Business One, Sage X3
19
+
20
+ ## Common BA tasks on ERP projects
21
+ - **Fit-gap analysis** — compare out-of-box ERP functionality against documented business requirements; classify gaps as configuration, customization, or process-change-instead.
22
+ - **Business process reengineering** — ERP implementations often force process standardization; BA reconciles "how we do it today" against the system's native workflow.
23
+ - **Data migration requirements** — define what master data (customers, vendors, items, chart of accounts) must migrate, cleansing rules, and mapping from legacy systems.
24
+ - **Integration mapping** — document what other systems (CRM, e-commerce, banking, EDI) must connect to the ERP, and via what method (API, middleware, flat file).
25
+ - **Role/security matrix** — define who can see/do what (segregation of duties matters a lot here for financial controls).
26
+
27
+ ## Common pain points driving ERP projects
28
+ - Disconnected systems causing duplicate data entry and reconciliation effort.
29
+ - No real-time visibility into inventory, cash position, or order status.
30
+ - Manual, error-prone month-end close.
31
+ - Inability to scale reporting/compliance as the company grows (e.g. multi-entity, multi-currency).
32
+
33
+ ## Sample requirements (illustrative)
34
+ - *"As a Controller, I want the system to auto-post inventory transactions to the GL in real time, so that financial reports reflect current inventory value without manual journal entries."*
35
+ - *"As a Purchasing Manager, I want a three-way match between PO, receipt, and invoice before an invoice can be paid, so that we prevent duplicate or fraudulent payments."*
36
+ - *"As an Operations Director, I want role-based dashboards showing open orders by warehouse, so that fulfillment bottlenecks are visible without pulling manual reports."*
37
+
38
+ ## Terminology notes
39
+ - "Order" in ERP usually means a **sales order** or **purchase order** — distinct from a CRM "opportunity" or MRP "work order."
40
+ - "Chart of Accounts" (COA) is the backbone of financial reporting — changes to it late in a project are costly.
@@ -0,0 +1,35 @@
1
+ # Financial Systems
2
+
3
+ ## What it is
4
+ Covers the systems and processes for recording, controlling, and reporting a company's financial position — usually the financial core of an ERP, but sometimes a standalone/best-of-breed system.
5
+
6
+ ## Core functional areas
7
+ - **General Ledger (GL)** — the system of record for all financial transactions, organized by Chart of Accounts.
8
+ - **Accounts Payable (AP)** — vendor invoices, payment processing, three-way match (PO/receipt/invoice).
9
+ - **Accounts Receivable (AR)** — customer invoicing, cash application, collections, aging.
10
+ - **Fixed Assets** — asset tracking, depreciation schedules, disposal.
11
+ - **Budgeting/Planning (FP&A)** — budget creation, forecasting, variance analysis.
12
+ - **Financial Close/Consolidation** — month/quarter/year-end close process, multi-entity consolidation, intercompany eliminations.
13
+ - **Financial Reporting/Compliance** — statutory reporting, audit trail, controls (e.g. SOX in the US).
14
+
15
+ ## Common BA tasks
16
+ - Documenting the close process calendar and identifying manual/bottleneck steps (a classic driver for financial systems projects).
17
+ - Defining approval workflows and segregation-of-duties requirements (who can create a vendor vs. approve a payment — critical for fraud prevention and audit).
18
+ - Mapping Chart of Accounts structure and multi-entity/multi-currency requirements.
19
+ - Specifying audit trail requirements (who changed what, when — often a hard compliance requirement, not optional).
20
+ - Reconciliation requirements between subledgers (AP, AR, Fixed Assets) and the GL.
21
+
22
+ ## Common pain points driving financial systems projects
23
+ - Slow, manual month-end close (spreadsheet consolidation across entities).
24
+ - Weak controls — same person can create and approve a payment (audit finding waiting to happen).
25
+ - No real-time visibility into cash position or budget-vs-actual.
26
+ - Difficulty supporting multi-entity/multi-currency/multi-GAAP reporting as the company scales.
27
+
28
+ ## Sample requirements (illustrative)
29
+ - *"As a Controller, I want automated intercompany elimination entries during consolidation, so that the close process doesn't rely on manual spreadsheet reconciliation."*
30
+ - *"As an AP Clerk, I want the system to block invoice approval when a vendor is flagged as a duplicate or inactive, so that we prevent erroneous payments."*
31
+ - *"As a CFO, I want real-time budget-vs-actual dashboards by department, so that spending overruns are visible before period-end instead of after."*
32
+
33
+ ## Terminology notes
34
+ - "Close" refers to the period-end financial close process — distinct from "closing" a sales opportunity (CRM) or "closing" a work order (MRP/manufacturing). Always disambiguate in cross-domain documentation.
35
+ - SOX (Sarbanes-Oxley) compliance applies to US public companies and drives strict controls/audit-trail requirements — flag as a hard constraint, not a nice-to-have, when applicable.
@@ -0,0 +1,38 @@
1
+ # HCM (Human Capital Management)
2
+
3
+ ## What it is
4
+ Manages the employee lifecycle from recruiting through offboarding — broader than "payroll software," covering talent acquisition, core HR records, performance, and workforce planning.
5
+
6
+ ## Core functional areas
7
+ - **Core HR/HRIS** — employee records, org charts, position management, compliance documentation.
8
+ - **Recruiting (ATS – Applicant Tracking System)** — job requisitions, candidate pipeline, interview scheduling, offer management.
9
+ - **Payroll** — pay calculation, tax withholding/filing, direct deposit, payslips; often region-specific due to tax/labor law.
10
+ - **Benefits Administration** — enrollment, eligibility rules, carrier integration (health, retirement, etc.).
11
+ - **Performance Management** — goal setting, reviews, 360 feedback, calibration.
12
+ - **Learning Management (LMS)** — training assignment and completion tracking, often compliance-driven.
13
+ - **Workforce Planning/Analytics** — headcount planning, turnover analysis, DEI reporting.
14
+
15
+ ## Major vendors (landscape, not endorsements)
16
+ - **Enterprise:** Workday, SAP SuccessFactors, Oracle HCM Cloud
17
+ - **Mid-market/SMB:** BambooHR, Rippling, Gusto, ADP Workforce Now
18
+
19
+ ## Common BA tasks
20
+ - Documenting the hire-to-retire process end-to-end, noting where handoffs between recruiting → onboarding → payroll → benefits currently break down.
21
+ - Defining approval workflows for org changes (promotions, transfers, terminations) and who is authorized at each step.
22
+ - Specifying compliance requirements (varies heavily by jurisdiction — e.g. FLSA classification in the US, working time directives in the EU) — always confirm with legal/compliance, don't assume.
23
+ - Mapping payroll integration requirements (time & attendance system → payroll, benefits carrier files).
24
+
25
+ ## Common pain points driving HCM projects
26
+ - Employee data duplicated/inconsistent across recruiting, HRIS, and payroll systems.
27
+ - Manual, error-prone benefits enrollment and payroll processing.
28
+ - No self-service — HR fielding routine requests (address changes, pay stub requests) manually.
29
+ - Poor visibility into headcount/turnover for workforce planning.
30
+
31
+ ## Sample requirements (illustrative)
32
+ - *"As an HR Coordinator, I want new hire data entered once in the ATS to auto-populate the HRIS record, so that we eliminate duplicate data entry and transcription errors."*
33
+ - *"As a Payroll Manager, I want approved time-and-attendance data to feed payroll automatically, so that manual entry errors don't cause pay discrepancies."*
34
+ - *"As an Employee, I want self-service access to update my address and view pay stubs, so that I don't need to submit a request to HR for routine changes."*
35
+
36
+ ## Terminology notes
37
+ - "Position" vs. "Employee" — a position can exist (and be budgeted) even when vacant; conflating the two in requirements causes headcount reporting errors.
38
+ - Compliance/legal requirements in HCM are jurisdiction-specific — always flag this as a "confirm with legal" item rather than assuming a rule from one country/state applies elsewhere.
@@ -0,0 +1,37 @@
1
+ # MRP (Material Requirements Planning)
2
+
3
+ ## What it is
4
+ A production planning method that calculates what materials/components are needed, how many, and when — working backward from a production plan through the Bill of Materials. Often a module inside ERP rather than a standalone system today.
5
+
6
+ ## MRP I vs. MRP II
7
+ - **MRP I** — narrowly calculates material needs: what to order/produce and when, based on demand and lead times.
8
+ - **MRP II (Manufacturing Resource Planning)** — expands MRP I to include capacity planning, scheduling, and financial integration — essentially a superset covering the full manufacturing resource picture (materials AND capacity AND cost).
9
+
10
+ ## Core concepts
11
+ - **BOM (Bill of Materials)** — the recipe: what components/sub-assemblies make up a finished item, and in what quantity. Can be multi-level (a sub-assembly has its own BOM).
12
+ - **MPS (Master Production Schedule)** — the plan for what finished goods to build and when; the primary input to MRP.
13
+ - **Lead Time** — time between placing an order (purchase or production) and having the material available. MRP nets this against need dates to determine "order by" dates.
14
+ - **Lot Sizing** — the rule for how much to order/produce at once (e.g. lot-for-lot, fixed order quantity, economic order quantity/EOQ, period order quantity).
15
+ - **Safety Stock** — buffer inventory to absorb demand/supply variability.
16
+ - **Net Requirements Calculation** — Gross requirement (from MPS/BOM explosion) minus on-hand inventory minus scheduled receipts = net requirement to plan.
17
+ - **Capacity Requirements Planning (CRP)** — checks whether planned production is actually feasible given machine/labor capacity — the "II" in MRP II.
18
+
19
+ ## Common BA tasks
20
+ - Documenting BOM accuracy requirements and change-control process (BOM errors cascade into every planning run).
21
+ - Defining lot-sizing rules per item class (e.g. high-value items lot-for-lot to minimize excess inventory; low-value items in larger batches).
22
+ - Mapping lead time data ownership (who updates it, how often) — stale lead times are a top cause of bad MRP output.
23
+ - Specifying exception/alert requirements (e.g. flag when a planned order date is in the past — "past due" exceptions).
24
+
25
+ ## Common pain points driving MRP projects
26
+ - Manual, spreadsheet-based planning that can't keep pace with SKU/BOM complexity.
27
+ - Chronic stockouts or excess inventory from poor lead-time or lot-sizing data.
28
+ - Planners "gut-feel" overriding system recommendations because they don't trust the data (usually a data-quality problem, not a tool problem).
29
+ - No visibility into whether a plan is actually achievable given capacity (missing CRP).
30
+
31
+ ## Sample requirements (illustrative)
32
+ - *"As a Production Planner, I want the system to explode a multi-level BOM automatically when I plan a finished good, so that component-level requirements are generated without manual calculation."*
33
+ - *"As a Purchasing Agent, I want planned purchase orders flagged when they fall within an item's lead time window, so that I know which need to be released urgently."*
34
+ - *"As a Plant Manager, I want capacity checks against the MPS before it's finalized, so that we don't commit to a schedule the shop floor can't achieve."*
35
+
36
+ ## Terminology notes
37
+ - Don't confuse MRP's "order" (a planned/actual production or purchase order) with a CRM sales order or ERP's customer sales order — related but distinct objects, often linked via the sales order → MPS → MRP chain.
@@ -0,0 +1,32 @@
1
+ # SCM (Supply Chain Management)
2
+
3
+ ## What it is
4
+ Manages the end-to-end flow of goods, information, and money from raw material sourcing through production to final delivery to the customer — broader than MRP (which is production-planning-focused) or pure procurement.
5
+
6
+ ## Core functional areas
7
+ - **Procurement/Sourcing** — supplier selection, contracts, purchase order lifecycle.
8
+ - **Demand Planning/Forecasting** — predicting future demand to drive inventory and production decisions.
9
+ - **Sales & Operations Planning (S&OP)** — cross-functional process balancing demand, supply, and financial plans, typically monthly.
10
+ - **Warehouse Management (WMS)** — receiving, put-away, picking, packing, shipping, cycle counting.
11
+ - **Transportation/Logistics Management (TMS)** — carrier selection, routing, freight optimization, shipment tracking.
12
+ - **Supplier Relationship Management (SRM)** — supplier performance scorecards, risk monitoring.
13
+
14
+ ## Common BA tasks
15
+ - Mapping the physical and information flow end-to-end (as-is) before proposing changes — SCM problems often span multiple systems and departments.
16
+ - Defining demand forecasting inputs/method (statistical forecast vs. sales input vs. hybrid) and accuracy KPIs (e.g. MAPE — mean absolute percentage error).
17
+ - Documenting warehouse process flows (receiving to putaway to pick/pack/ship) to identify bottlenecks before selecting/configuring a WMS.
18
+ - Specifying supplier onboarding and performance evaluation criteria (on-time delivery %, quality reject rate).
19
+
20
+ ## Common pain points driving SCM projects
21
+ - Poor demand forecast accuracy leading to stockouts or excess inventory.
22
+ - No end-to-end shipment visibility — customers/CS can't answer "where's my order."
23
+ - Siloed planning — sales, ops, and finance working off different numbers (no S&OP process).
24
+ - Manual warehouse processes causing pick errors and slow fulfillment.
25
+
26
+ ## Sample requirements (illustrative)
27
+ - *"As a Demand Planner, I want statistical forecasts blended with sales team overrides, so that forecasts reflect both historical patterns and known upcoming deals."*
28
+ - *"As a Warehouse Supervisor, I want directed putaway based on item velocity, so that fast-moving items are stored for quick pick access."*
29
+ - *"As a Customer Service Rep, I want real-time shipment tracking status visible from the order record, so that I can answer delivery questions without contacting logistics."*
30
+
31
+ ## Terminology notes
32
+ - SCM is the umbrella; MRP (production planning) and elements of ERP procurement/inventory sit inside or feed into it. Don't treat SCM and MRP as interchangeable in requirements docs — SCM is broader (includes logistics, supplier management, demand planning) while MRP is specifically the materials-planning calculation.
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: ethical-hacking-methodology
3
+ role: Ethical Hacking Methodologist
4
+ description: >
5
+ Provides the complete 5-phase ethical hacking methodology guide — reconnaissance (OSINT,
6
+ passive/active), scanning & enumeration, exploitation, post-exploitation & persistence,
7
+ and reporting & remediation. Load when the task requires a structured penetration testing
8
+ process, methodology guidance, or step-by-step hacking workflow definition.
9
+ triggers:
10
+ ["ethical hacking", "penetration testing methodology", reconnaissance, osint,
11
+ "scanning and enumeration", "exploitation methodology", "post exploitation",
12
+ "reporting and remediation", "hacking methodology", "pentest steps",
13
+ "pentest methodology", "penetration testing process"]
14
+ version: 1.0.0
15
+ requires_tools: [read_tool, glob_tool, grep_tool, run_command_tool, write_edit_tool]
16
+ composes_with: [pentester, advanced-pentest-lab]
17
+ ---
18
+
19
+ ## Role
20
+ Owns the structured 5-phase penetration testing lifecycle — providing a repeatable,
21
+ auditable methodology that ensures no step is skipped and every finding is traceable back
22
+ to the phase that produced it. Acts as the process framework that the pentester and
23
+ advanced-pentest-lab skills execute within.
24
+
25
+ ## Process
26
+ 1. **Reconnaissance (Phase 1)** — gather intelligence without touching the target.
27
+ - **Passive recon**: WHOIS, DNS enumeration, Shodan, social media, job postings,
28
+ certificate transparency logs (crt.sh), archived pages.
29
+ - **Active recon**: DNS zone transfers, subdomain enumeration (Amass), live host
30
+ discovery (Nmap ping sweep), technology fingerprinting (Wappalyzer, WhatWeb).
31
+ - **OSINT aggregation**: correlate findings into a target profile — IP ranges,
32
+ domain names, employee names/emails, technology stack, cloud providers.
33
+ 2. **Scanning & Enumeration (Phase 2)** — probe deeply without exploiting.
34
+ - **Port scanning**: full TCP/UDP sweep (Nmap -sS -sU), service version detection
35
+ (-sV), OS fingerprinting (-O).
36
+ - **Vulnerability scanning**: Nessus/OpenVAS for known CVEs, Nikto for web servers,
37
+ manual banner grabbing.
38
+ - **Service enumeration**: SMB shares (enum4linux), SNMP community strings, LDAP
39
+ anonymous binds, web directory brute-force (gobuster, ffuf).
40
+ - **Web mapping**: crawl all endpoints, parameter discovery, API endpoint enumeration.
41
+ 3. **Exploitation (Phase 3)** — gain initial access.
42
+ - **Prioritize**: rank vulnerabilities by exploitability × impact; attempt low-risk
43
+ exploits first.
44
+ - **Exploit selection**: Metasploit modules, public PoCs, custom scripts; always
45
+ validate in lab before targeting production.
46
+ - **Credential attacks**: password spraying (not brute-force), credential stuffing
47
+ with breach data, default credentials.
48
+ - **Web exploitation**: SQLi, XSS, CSRF, file inclusion, command injection, SSRF.
49
+ - **Document**: every attempt — success or failure — with timestamps and payload used.
50
+ 4. **Post-Exploitation & Persistence (Phase 4)** — maintain access and expand.
51
+ - **Privilege escalation**: kernel exploits, SUID/SGID misconfigurations, token
52
+ manipulation, UAC bypass, service permissions.
53
+ - **Lateral movement**: PSExec, WMI, RDP hijacking, pass-the-hash, pass-the-ticket.
54
+ - **Persistence**: scheduled tasks, registry Run keys, WMI event subscriptions,
55
+ web shells, SSH authorized_keys.
56
+ - **Data exfiltration simulation**: staged collection, encrypted channels, exfil
57
+ over DNS/HTTPS to demonstrate real business impact.
58
+ - **Cleanup**: remove artifacts, restore configurations, delete accounts created.
59
+ 5. **Reporting & Remediation (Phase 5)** — turn technical findings into business risk.
60
+ - **Executive summary**: business impact, risk rating, remediation timeline.
61
+ - **Technical findings**: vulnerability description, exploit steps, screenshots/
62
+ evidence, CVSS score, affected assets, remediation guidance.
63
+ - **Remediation validation**: re-test after fixes applied; confirm closure.
64
+ - **Lessons learned**: what worked, what was blocked, detection gaps, process
65
+ improvements for next engagement.
66
+
67
+ ## Strategies
68
+ - Passive recon first, active recon second — tipping off the target before you
69
+ understand the landscape wastes opportunities and triggers alerts.
70
+ - Scanning rate-limit to avoid DoS — `--min-rate` and `--max-retries` on Nmap;
71
+ aggressive scans can crash fragile services.
72
+ - Exploit the weakest link, not the most interesting one — a misconfigured SMB share
73
+ is a faster path to Domain Admin than a zero-day in a web app.
74
+ - During post-exploitation, move laterally in a realistic attack path, not just
75
+ "everywhere possible" — demonstrate the business impact of each pivot.
76
+ - Report findings as the business sees them: "Attacker can exfiltrate customer PII"
77
+ means more than "SQL injection in parameter 'id'."
78
+
79
+ ## Planning Approach
80
+ - Before starting: define Rules of Engagement — scope, authorized techniques,
81
+ out-of-bounds systems, emergency contacts, testing window.
82
+ - During testing: maintain an activity log with timestamps for every action;
83
+ this is both an audit requirement and a safety net.
84
+ - After testing: deliver a draft report within 48 hours; final report within one
85
+ week; schedule a readout call to walk stakeholders through findings.
86
+
87
+ ## Instructions for This Task Type
88
+ - Never begin active scanning without confirmed written authorization and a defined
89
+ testing window.
90
+ - During recon, use OSINT tools (theHarvester, Amass, crt.sh) that query public data
91
+ — never attempt to access systems without authorization.
92
+ - For vulnerability scanning, always configure safe checks (no dangerous plugins)
93
+ unless destructive testing is explicitly authorized.
94
+ - Exploitation must target only in-scope systems; if you accidentally access an
95
+ out-of-scope system, stop immediately and report it.
96
+ - Clean up all artifacts created during post-exploitation — accounts, backdoors,
97
+ files, scheduled tasks — before the engagement closes.
98
+
99
+ ## Experience / Common Pitfalls
100
+ - Skipping passive recon and going straight to active scanning is the #1 methodology
101
+ failure — you miss shadow IT, acquisitions, and cloud assets invisible from the
102
+ primary domain.
103
+ - Vulnerability scanners produce false positives; always manually validate before
104
+ reporting a finding — a scanner flag is not a confirmed vulnerability.
105
+ - Post-exploitation cleanup failures are the most common cause of post-engagement
106
+ incidents — maintain a cleanup checklist and verify each item.
107
+ - Reports that list 200 low-severity findings but miss the one critical misconfiguration
108
+ lose client trust — prioritize by business impact, not volume.
109
+ - Not re-testing after remediation leaves the client with a false sense of security —
110
+ validation is part of the methodology, not an optional extra.
111
+
112
+ ## Output Artifacts
113
+ - Rules of Engagement document
114
+ - Reconnaissance report (target profile, OSINT findings)
115
+ - Vulnerability inventory (ranked by CVSS × exploitability × business impact)
116
+ - Exploitation log (timestamped, with payloads and outcomes)
117
+ - Post-exploitation activity log and cleanup verification
118
+ - Final penetration test report (executive summary, technical findings, remediation)
119
+ - Remediation validation report (re-test results)
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Returns true when XCODER_EXTERNAL_SKILLS is one of 'true', '1', or 'yes'
3
+ * (case-insensitive), false otherwise.
4
+ */
5
+ export declare function isExternalSkillsEnabled(): boolean;
6
+ /**
7
+ * Load all external skills (from <skillsDir>/<name>/SKILL.md) as formatted
8
+ * header strings suitable for prompt injection. Cached per resolved skills
9
+ * directory so each CLI run scans once per root.
10
+ *
11
+ * Returns [] when the flag is OFF, the skills directory is missing, or no
12
+ * valid SKILL.md files exist.
13
+ *
14
+ * Format per skill: "<SkillHeader.name>: <SkillHeader.description>"
15
+ * Only name + description — NOT the full body — to stay within token budget.
16
+ */
17
+ export declare function getExternalSkills(opts?: {
18
+ skillDir?: string;
19
+ }): string[];
20
+ /**
21
+ * Clear the internal caches so the next call to getExternalSkills() or
22
+ * isExternalSkillsEnabled() re-reads the flag and re-loads headers.
23
+ * Intended for testing.
24
+ */
25
+ export declare function resetExternalSkillCache(): void;
@@ -0,0 +1,65 @@
1
+ // xcoder:version 2 | xcoder:task task-f9cf18 | xcoder:updated 2026-11-02T16:14:48.582Z | xcoder:subtask code-st-077ea2
2
+ import { SkillRegistry } from "./externalSkillRegistry.js";
3
+ // Per-root cache: a Map keyed by the resolved skills directory, so a caller
4
+ // that injects a different skillDir can never be served a stale result. A
5
+ // single module-level value used to mean the first caller won for the whole
6
+ // process lifetime.
7
+ let cachedSkillsByRoot = new Map();
8
+ let cachedFlag = null;
9
+ /**
10
+ * Returns true when XCODER_EXTERNAL_SKILLS is one of 'true', '1', or 'yes'
11
+ * (case-insensitive), false otherwise.
12
+ */
13
+ export function isExternalSkillsEnabled() {
14
+ if (cachedFlag !== null)
15
+ return cachedFlag;
16
+ const raw = process.env["XCODER_EXTERNAL_SKILLS"]?.trim().toLowerCase() ?? "";
17
+ cachedFlag = raw === "true" || raw === "1" || raw === "yes";
18
+ return cachedFlag;
19
+ }
20
+ /**
21
+ * Load all external skills (from <skillsDir>/<name>/SKILL.md) as formatted
22
+ * header strings suitable for prompt injection. Cached per resolved skills
23
+ * directory so each CLI run scans once per root.
24
+ *
25
+ * Returns [] when the flag is OFF, the skills directory is missing, or no
26
+ * valid SKILL.md files exist.
27
+ *
28
+ * Format per skill: "<SkillHeader.name>: <SkillHeader.description>"
29
+ * Only name + description — NOT the full body — to stay within token budget.
30
+ */
31
+ export function getExternalSkills(opts) {
32
+ if (!isExternalSkillsEnabled())
33
+ return [];
34
+ // Key on the option actually passed in — NOT on the resolved default — so
35
+ // the SkillRegistry constructor still receives exactly what the caller gave
36
+ // (undefined when they gave nothing).
37
+ const cacheKey = opts?.skillDir ? `dir:${opts.skillDir}` : "default";
38
+ const cached = cachedSkillsByRoot.get(cacheKey);
39
+ if (cached !== undefined)
40
+ return cached;
41
+ try {
42
+ const registry = new SkillRegistry(opts?.skillDir);
43
+ const headers = registry.loadHeaders();
44
+ if (headers.length === 0) {
45
+ cachedSkillsByRoot.set(cacheKey, []);
46
+ return [];
47
+ }
48
+ const formatted = headers.map((h) => `${h.name}: ${h.description}`);
49
+ cachedSkillsByRoot.set(cacheKey, formatted);
50
+ return formatted;
51
+ }
52
+ catch {
53
+ cachedSkillsByRoot.set(cacheKey, []);
54
+ return [];
55
+ }
56
+ }
57
+ /**
58
+ * Clear the internal caches so the next call to getExternalSkills() or
59
+ * isExternalSkillsEnabled() re-reads the flag and re-loads headers.
60
+ * Intended for testing.
61
+ */
62
+ export function resetExternalSkillCache() {
63
+ cachedSkillsByRoot = new Map();
64
+ cachedFlag = null;
65
+ }
@@ -0,0 +1,33 @@
1
+ import { LoadedSkill, SkillHeader } from "../types.js";
2
+ /**
3
+ * Registration manager for the Special Evolution skill system.
4
+ * Reads every <skillsDir>/<name>/SKILL.md, parses its YAML header so the
5
+ * LLM/orchestrator knows what each skill is for without loading the full body,
6
+ * and lazily loads the full body only when a skill is actually selected.
7
+ *
8
+ * Discovery goes through `resolveSkillsRoot()` — the single source of truth —
9
+ * so this class no longer joins `"skills"` onto anything itself.
10
+ */
11
+ export declare class SkillRegistry {
12
+ private headers;
13
+ private paths;
14
+ private skillDir;
15
+ /**
16
+ * @param skillDir Explicit skills directory. When omitted (or empty) the
17
+ * resolved root's skills directory is used. An explicit directory is
18
+ * honoured even when it is empty — it never falls back to the bundled
19
+ * packs, so tests and embedded callers get exactly the set they asked for.
20
+ */
21
+ constructor(skillDir?: string);
22
+ /** Scan and parse headers only — cheap, safe to call often (e.g. on --index). */
23
+ loadHeaders(): SkillHeader[];
24
+ /** Load the full skill (header + body) by name, for injection into the LLM context. */
25
+ loadSkill(name: string): LoadedSkill | undefined;
26
+ /**
27
+ * Route a task description to candidate skills by trigger-keyword match.
28
+ * Returns skills ranked by match count, highest first. Multiple skills may
29
+ * be selected — xcoder composes them (see composes_with in each header).
30
+ */
31
+ route(taskDescription: string): SkillHeader[];
32
+ list(): SkillHeader[];
33
+ }