xcoder-dna 0.0.0-stage → 1.3.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.
- package/LICENSE +66 -0
- package/README.md +87 -2
- package/dist/agents/ai-chat-debate.d.ts +36 -0
- package/dist/agents/ai-chat-debate.js +300 -0
- package/dist/agents/ai-chat-report-writer.d.ts +7 -0
- package/dist/agents/ai-chat-report-writer.js +100 -0
- package/dist/agents/duplicate-detector.d.ts +41 -0
- package/dist/agents/duplicate-detector.js +65 -0
- package/dist/agents/genesis-agent.d.ts +61 -0
- package/dist/agents/genesis-agent.js +340 -0
- package/dist/agents/samurai-agent.d.ts +53 -0
- package/dist/agents/samurai-agent.js +279 -0
- package/dist/agents/sub-agent.d.ts +56 -0
- package/dist/agents/sub-agent.js +353 -0
- package/dist/backlog/backlog-requirement-validator.d.ts +10 -0
- package/dist/backlog/backlog-requirement-validator.js +60 -0
- package/dist/backlog/backlog-store.d.ts +29 -0
- package/dist/backlog/backlog-store.js +148 -0
- package/dist/backlog/po-agent.d.ts +16 -0
- package/dist/backlog/po-agent.js +121 -0
- package/dist/backlog/types.d.ts +25 -0
- package/dist/backlog/types.js +4 -0
- package/dist/bench/run.d.ts +11 -0
- package/dist/bench/run.js +185 -0
- package/dist/bench/types.d.ts +50 -0
- package/dist/bench/types.js +1 -0
- package/dist/cli/swarm.d.ts +10 -0
- package/dist/cli/swarm.js +100 -0
- package/dist/cli/task.d.ts +14 -0
- package/dist/cli/task.js +121 -0
- package/dist/cli/wbc-arg.d.ts +6 -0
- package/dist/cli/wbc-arg.js +40 -0
- package/dist/cli/wbc.d.ts +45 -0
- package/dist/cli/wbc.js +98 -0
- package/dist/commands/license.d.ts +9 -0
- package/dist/commands/license.js +140 -0
- package/dist/commands/release.d.ts +44 -0
- package/dist/commands/release.js +180 -0
- package/dist/commands/test.d.ts +50 -0
- package/dist/commands/test.js +385 -0
- package/dist/config/loadConfig.d.ts +82 -0
- package/dist/config/loadConfig.js +240 -0
- package/dist/config/secure-mode.d.ts +29 -0
- package/dist/config/secure-mode.js +63 -0
- package/dist/config/user-config.d.ts +39 -0
- package/dist/config/user-config.js +202 -0
- package/dist/engine/reasoning-engine.d.ts +21 -0
- package/dist/engine/reasoning-engine.js +59 -0
- package/dist/events/bus.d.ts +22 -0
- package/dist/events/bus.js +18 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.js +77 -0
- package/dist/indexing/ignoreRules.d.ts +1 -0
- package/dist/indexing/ignoreRules.js +53 -0
- package/dist/instance-swarm/instance-swarm-orchestrator.d.ts +57 -0
- package/dist/instance-swarm/instance-swarm-orchestrator.js +204 -0
- package/dist/instance-swarm/protocol-name-resolver.d.ts +23 -0
- package/dist/instance-swarm/protocol-name-resolver.js +64 -0
- package/dist/license/gate.d.ts +31 -0
- package/dist/license/gate.js +188 -0
- package/dist/license/http-client.d.ts +43 -0
- package/dist/license/http-client.js +195 -0
- package/dist/license/manager.d.ts +39 -0
- package/dist/license/manager.js +175 -0
- package/dist/license/receipt.d.ts +27 -0
- package/dist/license/receipt.js +108 -0
- package/dist/license/state-codec.d.ts +72 -0
- package/dist/license/state-codec.js +218 -0
- package/dist/license/state-paths.d.ts +17 -0
- package/dist/license/state-paths.js +64 -0
- package/dist/license/store.d.ts +44 -0
- package/dist/license/store.js +223 -0
- package/dist/license/trust-anchor.d.ts +24 -0
- package/dist/license/trust-anchor.js +74 -0
- package/dist/license/types.d.ts +34 -0
- package/dist/license/types.js +19 -0
- package/dist/llm/budget.d.ts +23 -0
- package/dist/llm/budget.js +58 -0
- package/dist/llm/client.d.ts +53 -0
- package/dist/llm/client.js +122 -0
- package/dist/llm/factory.d.ts +14 -0
- package/dist/llm/factory.js +32 -0
- package/dist/orchestrator/defect-logger.d.ts +31 -0
- package/dist/orchestrator/defect-logger.js +101 -0
- package/dist/orchestrator/defect-manager.d.ts +118 -0
- package/dist/orchestrator/defect-manager.js +338 -0
- package/dist/orchestrator/defect-migration.d.ts +14 -0
- package/dist/orchestrator/defect-migration.js +174 -0
- package/dist/orchestrator/defect-store.d.ts +48 -0
- package/dist/orchestrator/defect-store.js +76 -0
- package/dist/orchestrator/healing.d.ts +14 -0
- package/dist/orchestrator/healing.js +11 -0
- package/dist/orchestrator/interactive-steering.d.ts +64 -0
- package/dist/orchestrator/interactive-steering.js +107 -0
- package/dist/orchestrator/interrupt-handler.d.ts +30 -0
- package/dist/orchestrator/interrupt-handler.js +70 -0
- package/dist/orchestrator/lesson-manager.d.ts +25 -0
- package/dist/orchestrator/lesson-manager.js +122 -0
- package/dist/orchestrator/progress-summary.d.ts +15 -0
- package/dist/orchestrator/progress-summary.js +106 -0
- package/dist/orchestrator/reasoning-score.d.ts +49 -0
- package/dist/orchestrator/reasoning-score.js +117 -0
- package/dist/orchestrator/swarm.d.ts +36 -0
- package/dist/orchestrator/swarm.js +77 -0
- package/dist/orchestrator/task-factory.d.ts +15 -0
- package/dist/orchestrator/task-factory.js +176 -0
- package/dist/orchestrator/validation-gate.d.ts +23 -0
- package/dist/orchestrator/validation-gate.js +155 -0
- package/dist/protocol/react-contract.d.ts +136 -0
- package/dist/protocol/react-contract.js +698 -0
- package/dist/protocol/wks-protocol-manager.d.ts +22 -0
- package/dist/protocol/wks-protocol-manager.js +72 -0
- package/dist/sdlc-runtime/conversation-runner.d.ts +8 -0
- package/dist/sdlc-runtime/conversation-runner.js +64 -0
- package/dist/sdlc-runtime/dag-utils.d.ts +15 -0
- package/dist/sdlc-runtime/dag-utils.js +67 -0
- package/dist/sdlc-runtime/defect-integration.d.ts +7 -0
- package/dist/sdlc-runtime/defect-integration.js +99 -0
- package/dist/sdlc-runtime/execution-loop.d.ts +38 -0
- package/dist/sdlc-runtime/execution-loop.js +274 -0
- package/dist/sdlc-runtime/lesson-recorder.d.ts +9 -0
- package/dist/sdlc-runtime/lesson-recorder.js +27 -0
- package/dist/sdlc-runtime/plan-initializer.d.ts +47 -0
- package/dist/sdlc-runtime/plan-initializer.js +135 -0
- package/dist/sdlc-runtime/progress-persister.d.ts +10 -0
- package/dist/sdlc-runtime/progress-persister.js +34 -0
- package/dist/sdlc-runtime/protocol-loader.d.ts +10 -0
- package/dist/sdlc-runtime/protocol-loader.js +21 -0
- package/dist/sdlc-runtime/reporting.d.ts +24 -0
- package/dist/sdlc-runtime/reporting.js +68 -0
- package/dist/sdlc-runtime/sdlc-orchestrator.d.ts +59 -0
- package/dist/sdlc-runtime/sdlc-orchestrator.js +170 -0
- package/dist/sdlc-runtime/sdlc-skill.d.ts +44 -0
- package/dist/sdlc-runtime/sdlc-skill.js +148 -0
- package/dist/sdlc-runtime/steering-handler.d.ts +14 -0
- package/dist/sdlc-runtime/steering-handler.js +51 -0
- package/dist/sdlc-runtime/trace-recorder.d.ts +10 -0
- package/dist/sdlc-runtime/trace-recorder.js +7 -0
- package/dist/security/index.d.ts +16 -0
- package/dist/security/index.js +12 -0
- package/dist/security/input-screen.d.ts +30 -0
- package/dist/security/input-screen.js +75 -0
- package/dist/security/tool-call-guard.d.ts +16 -0
- package/dist/security/tool-call-guard.js +163 -0
- package/dist/security/untrusted-content.d.ts +34 -0
- package/dist/security/untrusted-content.js +63 -0
- package/dist/skills/advanced-dfir/SKILL.md +85 -0
- package/dist/skills/advanced-pentest-lab/SKILL.md +88 -0
- package/dist/skills/analyst/SKILL.md +55 -0
- package/dist/skills/architect/SKILL.md +54 -0
- package/dist/skills/aws/SKILL.md +92 -0
- package/dist/skills/azure/SKILL.md +90 -0
- package/dist/skills/bylaw-context.d.ts +45 -0
- package/dist/skills/bylaw-context.js +61 -0
- package/dist/skills/bylaw-review.d.ts +20 -0
- package/dist/skills/bylaw-review.js +101 -0
- package/dist/skills/conversation/SKILL.md +29 -0
- package/dist/skills/design-patterns/SKILL.md +190 -0
- package/dist/skills/devops/SKILL.md +55 -0
- package/dist/skills/directives.d.ts +20 -0
- package/dist/skills/directives.js +313 -0
- package/dist/skills/docker/SKILL.md +76 -0
- package/dist/skills/docker-expert/SKILL.md +56 -0
- package/dist/skills/enterprise-systems-analyst/SKILL.md +83 -0
- package/dist/skills/enterprise-systems-analyst/references/crm.md +41 -0
- package/dist/skills/enterprise-systems-analyst/references/erp.md +40 -0
- package/dist/skills/enterprise-systems-analyst/references/financial-systems.md +35 -0
- package/dist/skills/enterprise-systems-analyst/references/hcm.md +38 -0
- package/dist/skills/enterprise-systems-analyst/references/mrp.md +37 -0
- package/dist/skills/enterprise-systems-analyst/references/scm.md +32 -0
- package/dist/skills/ethical-hacking-methodology/SKILL.md +119 -0
- package/dist/skills/externalSkillLoader.d.ts +25 -0
- package/dist/skills/externalSkillLoader.js +65 -0
- package/dist/skills/externalSkillRegistry.d.ts +33 -0
- package/dist/skills/externalSkillRegistry.js +94 -0
- package/dist/skills/filesystem-management/SKILL.md +61 -0
- package/dist/skills/first-run-seed.d.ts +26 -0
- package/dist/skills/first-run-seed.js +75 -0
- package/dist/skills/git-vcs/SKILL.md +84 -0
- package/dist/skills/kafka/SKILL.md +89 -0
- package/dist/skills/kubernetes/SKILL.md +93 -0
- package/dist/skills/kubernetes-expert/SKILL.md +54 -0
- package/dist/skills/openshift/SKILL.md +93 -0
- package/dist/skills/pentester/SKILL.md +59 -0
- package/dist/skills/performance-tester/SKILL.md +57 -0
- package/dist/skills/playwright-ui-tester/SKILL.md +67 -0
- package/dist/skills/programmer/SKILL.md +58 -0
- package/dist/skills/project-scaffolding/SKILL.md +133 -0
- package/dist/skills/qa-engineer/SKILL.md +91 -0
- package/dist/skills/rca/SKILL.md +58 -0
- package/dist/skills/redhat/SKILL.md +92 -0
- package/dist/skills/rosa/SKILL.md +80 -0
- package/dist/skills/scrum-framework/SKILL.md +74 -0
- package/dist/skills/scrum-framework/references/artifacts_and_quality.md +79 -0
- package/dist/skills/scrum-framework/references/roles_and_events.md +105 -0
- package/dist/skills/scrum-master-agent/SKILL.md +74 -0
- package/dist/skills/scrum-master-agent/references/behaviors.md +56 -0
- package/dist/skills/sdlc-skill.d.ts +1 -0
- package/dist/skills/sdlc-skill.js +4 -0
- package/dist/skills/secops/SKILL.md +52 -0
- package/dist/skills/secure-architect.bylaws.d.ts +68 -0
- package/dist/skills/secure-architect.bylaws.js +525 -0
- package/dist/skills/seed-skills.d.ts +48 -0
- package/dist/skills/seed-skills.js +213 -0
- package/dist/skills/skill-authoring/SKILL.md +123 -0
- package/dist/skills/skill-header.d.ts +51 -0
- package/dist/skills/skill-header.js +163 -0
- package/dist/skills/skill-path-guard.d.ts +41 -0
- package/dist/skills/skill-path-guard.js +95 -0
- package/dist/skills/skillRouter.d.ts +51 -0
- package/dist/skills/skillRouter.js +90 -0
- package/dist/skills/skills-root.d.ts +64 -0
- package/dist/skills/skills-root.js +168 -0
- package/dist/skills/software-architect/SKILL.md +77 -0
- package/dist/skills/software-engineer/SKILL.md +74 -0
- package/dist/skills/solid-principles/SKILL.md +94 -0
- package/dist/skills/task-planning/SKILL.md +115 -0
- package/dist/skills/tester/SKILL.md +54 -0
- package/dist/skills/ubuntu/SKILL.md +87 -0
- package/dist/skills/ui-ux-design/SKILL.md +114 -0
- package/dist/skills/workspace-context/SKILL.md +103 -0
- package/dist/sprint/controller.d.ts +37 -0
- package/dist/sprint/controller.js +220 -0
- package/dist/sprint/dag-builder.d.ts +14 -0
- package/dist/sprint/dag-builder.js +105 -0
- package/dist/sprint/reporter.d.ts +11 -0
- package/dist/sprint/reporter.js +97 -0
- package/dist/sprint/state-store.d.ts +10 -0
- package/dist/sprint/state-store.js +71 -0
- package/dist/sprint/types.d.ts +24 -0
- package/dist/sprint/types.js +4 -0
- package/dist/store/file-version-store.d.ts +24 -0
- package/dist/store/file-version-store.js +73 -0
- package/dist/store/task-store.d.ts +90 -0
- package/dist/store/task-store.js +166 -0
- package/dist/task-ingest/architect-detailer.d.ts +43 -0
- package/dist/task-ingest/architect-detailer.js +141 -0
- package/dist/task-ingest/detail-schema.d.ts +9 -0
- package/dist/task-ingest/detail-schema.js +195 -0
- package/dist/task-ingest/detailed-run.d.ts +36 -0
- package/dist/task-ingest/detailed-run.js +108 -0
- package/dist/task-ingest/extract-id.d.ts +9 -0
- package/dist/task-ingest/extract-id.js +24 -0
- package/dist/task-ingest/index.d.ts +23 -0
- package/dist/task-ingest/index.js +14 -0
- package/dist/task-ingest/ingest.d.ts +45 -0
- package/dist/task-ingest/ingest.js +163 -0
- package/dist/task-ingest/list-ingested.d.ts +13 -0
- package/dist/task-ingest/list-ingested.js +30 -0
- package/dist/task-ingest/pending-filter.d.ts +30 -0
- package/dist/task-ingest/pending-filter.js +59 -0
- package/dist/task-ingest/scanner.d.ts +56 -0
- package/dist/task-ingest/scanner.js +216 -0
- package/dist/task-ingest/source-reader.d.ts +25 -0
- package/dist/task-ingest/source-reader.js +93 -0
- package/dist/task-ingest/spec-builder.d.ts +34 -0
- package/dist/task-ingest/spec-builder.js +89 -0
- package/dist/task-ingest/wbs-extract.d.ts +50 -0
- package/dist/task-ingest/wbs-extract.js +226 -0
- package/dist/task-ingest/wbs-parser.d.ts +36 -0
- package/dist/task-ingest/wbs-parser.js +170 -0
- package/dist/tools/apiTestTool.d.ts +37 -0
- package/dist/tools/apiTestTool.js +128 -0
- package/dist/tools/ast-tools.d.ts +183 -0
- package/dist/tools/ast-tools.js +853 -0
- package/dist/tools/browse-tool.d.ts +105 -0
- package/dist/tools/browse-tool.js +394 -0
- package/dist/tools/credential.d.ts +17 -0
- package/dist/tools/credential.js +32 -0
- package/dist/tools/dependency-graph.d.ts +23 -0
- package/dist/tools/dependency-graph.js +164 -0
- package/dist/tools/edit-tool.d.ts +34 -0
- package/dist/tools/edit-tool.js +95 -0
- package/dist/tools/file-header-manager.d.ts +27 -0
- package/dist/tools/file-header-manager.js +153 -0
- package/dist/tools/fs-tools.d.ts +154 -0
- package/dist/tools/fs-tools.js +337 -0
- package/dist/tools/git-tools.d.ts +79 -0
- package/dist/tools/git-tools.js +348 -0
- package/dist/tools/github-tool.d.ts +48 -0
- package/dist/tools/github-tool.js +147 -0
- package/dist/tools/globTool.d.ts +20 -0
- package/dist/tools/globTool.js +34 -0
- package/dist/tools/grepTool.d.ts +19 -0
- package/dist/tools/grepTool.js +44 -0
- package/dist/tools/index-freshness.d.ts +58 -0
- package/dist/tools/index-freshness.js +190 -0
- package/dist/tools/index-glob.d.ts +48 -0
- package/dist/tools/index-glob.js +175 -0
- package/dist/tools/load-skill-tool.d.ts +15 -0
- package/dist/tools/load-skill-tool.js +114 -0
- package/dist/tools/patch-tools.d.ts +58 -0
- package/dist/tools/patch-tools.js +153 -0
- package/dist/tools/playwright-tool.d.ts +66 -0
- package/dist/tools/playwright-tool.js +121 -0
- package/dist/tools/project-detect.d.ts +20 -0
- package/dist/tools/project-detect.js +87 -0
- package/dist/tools/prompt-guidance.d.ts +22 -0
- package/dist/tools/prompt-guidance.js +23 -0
- package/dist/tools/scheduleTool.d.ts +19 -0
- package/dist/tools/scheduleTool.js +181 -0
- package/dist/tools/search-tools.d.ts +27 -0
- package/dist/tools/search-tools.js +78 -0
- package/dist/tools/sed-tool.d.ts +66 -0
- package/dist/tools/sed-tool.js +402 -0
- package/dist/tools/shell-result.d.ts +11 -0
- package/dist/tools/shell-result.js +1 -0
- package/dist/tools/shell-tool.d.ts +45 -0
- package/dist/tools/shell-tool.js +141 -0
- package/dist/tools/siteCrawlerTool.d.ts +32 -0
- package/dist/tools/siteCrawlerTool.js +205 -0
- package/dist/tools/tool-registry.d.ts +67 -0
- package/dist/tools/tool-registry.js +596 -0
- package/dist/tools/validate-tool.d.ts +23 -0
- package/dist/tools/validate-tool.js +201 -0
- package/dist/tools/workspace-index.d.ts +46 -0
- package/dist/tools/workspace-index.js +173 -0
- package/dist/types.d.ts +222 -0
- package/dist/types.js +7 -0
- package/dist/updater/index.d.ts +14 -0
- package/dist/updater/index.js +120 -0
- package/dist/util/banner.d.ts +25 -0
- package/dist/util/banner.js +140 -0
- package/dist/util/command-suggester.d.ts +6 -0
- package/dist/util/command-suggester.js +25 -0
- package/dist/util/confirm-interrupt.d.ts +10 -0
- package/dist/util/confirm-interrupt.js +31 -0
- package/dist/util/continue-trigger.d.ts +11 -0
- package/dist/util/continue-trigger.js +20 -0
- package/dist/util/env-info.d.ts +18 -0
- package/dist/util/env-info.js +37 -0
- package/dist/util/file-access-log.d.ts +35 -0
- package/dist/util/file-access-log.js +140 -0
- package/dist/util/footer-manager.d.ts +124 -0
- package/dist/util/footer-manager.js +195 -0
- package/dist/util/footer-renderer.d.ts +67 -0
- package/dist/util/footer-renderer.js +319 -0
- package/dist/util/footer-state.d.ts +34 -0
- package/dist/util/footer-state.js +18 -0
- package/dist/util/footer-text.d.ts +51 -0
- package/dist/util/footer-text.js +74 -0
- package/dist/util/ids.d.ts +1 -0
- package/dist/util/ids.js +4 -0
- package/dist/util/levenshtein.d.ts +6 -0
- package/dist/util/levenshtein.js +34 -0
- package/dist/util/logger.d.ts +10 -0
- package/dist/util/logger.js +41 -0
- package/dist/util/logs.d.ts +26 -0
- package/dist/util/logs.js +88 -0
- package/dist/util/output-handler.d.ts +89 -0
- package/dist/util/output-handler.js +193 -0
- package/dist/util/output-interceptor.d.ts +18 -0
- package/dist/util/output-interceptor.js +49 -0
- package/dist/util/output-paths.d.ts +43 -0
- package/dist/util/output-paths.js +121 -0
- package/dist/util/package-json.d.ts +6 -0
- package/dist/util/package-json.js +36 -0
- package/dist/util/process-kill.d.ts +27 -0
- package/dist/util/process-kill.js +148 -0
- package/dist/util/protocol-error-logger.d.ts +33 -0
- package/dist/util/protocol-error-logger.js +73 -0
- package/dist/util/redact.d.ts +25 -0
- package/dist/util/redact.js +103 -0
- package/dist/util/scroll-region-guard.d.ts +33 -0
- package/dist/util/scroll-region-guard.js +63 -0
- package/dist/util/spinner.d.ts +15 -0
- package/dist/util/spinner.js +49 -0
- package/dist/util/terminal-output.d.ts +34 -0
- package/dist/util/terminal-output.js +1 -0
- package/dist/util/terminal-silent.d.ts +6 -0
- package/dist/util/terminal-silent.js +20 -0
- package/dist/util/terminal.d.ts +56 -0
- package/dist/util/terminal.js +124 -0
- package/dist/util/text-sanitize.d.ts +8 -0
- package/dist/util/text-sanitize.js +45 -0
- package/dist/util/thinking-spinner.d.ts +27 -0
- package/dist/util/thinking-spinner.js +189 -0
- package/dist/util/tool-error-logger.d.ts +33 -0
- package/dist/util/tool-error-logger.js +77 -0
- package/dist/util/tty.d.ts +13 -0
- package/dist/util/tty.js +16 -0
- package/dist/util/xcoder-paths.d.ts +56 -0
- package/dist/util/xcoder-paths.js +63 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +4 -0
- package/dist/worker-agent/to-subtask-node.d.ts +35 -0
- package/dist/worker-agent/to-subtask-node.js +41 -0
- package/dist/worker-agent/worker-orchestrator.d.ts +104 -0
- package/dist/worker-agent/worker-orchestrator.js +201 -0
- package/package.json +39 -4
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// xcoder:version 1 | xcoder:task task-f9cf18 | xcoder:updated 2026-11-02T16:14:42.147Z | xcoder:subtask code-st-077ea2
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { resolveSkillsRoot } from "./skills-root.js";
|
|
5
|
+
import { MAX_PACK_DIRS, resolveSkillDir } from "./skill-path-guard.js";
|
|
6
|
+
import { parseSkillHeaderFile } from "./skill-header.js";
|
|
7
|
+
/**
|
|
8
|
+
* Registration manager for the Special Evolution skill system.
|
|
9
|
+
* Reads every <skillsDir>/<name>/SKILL.md, parses its YAML header so the
|
|
10
|
+
* LLM/orchestrator knows what each skill is for without loading the full body,
|
|
11
|
+
* and lazily loads the full body only when a skill is actually selected.
|
|
12
|
+
*
|
|
13
|
+
* Discovery goes through `resolveSkillsRoot()` — the single source of truth —
|
|
14
|
+
* so this class no longer joins `"skills"` onto anything itself.
|
|
15
|
+
*/
|
|
16
|
+
export class SkillRegistry {
|
|
17
|
+
headers = new Map();
|
|
18
|
+
paths = new Map();
|
|
19
|
+
skillDir;
|
|
20
|
+
/**
|
|
21
|
+
* @param skillDir Explicit skills directory. When omitted (or empty) the
|
|
22
|
+
* resolved root's skills directory is used. An explicit directory is
|
|
23
|
+
* honoured even when it is empty — it never falls back to the bundled
|
|
24
|
+
* packs, so tests and embedded callers get exactly the set they asked for.
|
|
25
|
+
*/
|
|
26
|
+
constructor(skillDir) {
|
|
27
|
+
this.skillDir = skillDir ? path.resolve(skillDir) : resolveSkillsRoot().skillsDir;
|
|
28
|
+
}
|
|
29
|
+
/** Scan and parse headers only — cheap, safe to call often (e.g. on --index). */
|
|
30
|
+
loadHeaders() {
|
|
31
|
+
this.headers.clear();
|
|
32
|
+
this.paths.clear();
|
|
33
|
+
let entries;
|
|
34
|
+
try {
|
|
35
|
+
entries = fs.readdirSync(this.skillDir, { withFileTypes: true });
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
let visited = 0;
|
|
41
|
+
for (const entry of entries) {
|
|
42
|
+
if (visited >= MAX_PACK_DIRS)
|
|
43
|
+
break;
|
|
44
|
+
if (!entry.isDirectory())
|
|
45
|
+
continue;
|
|
46
|
+
visited++;
|
|
47
|
+
// Validate the name and prove containment BEFORE joining anything.
|
|
48
|
+
const packDir = resolveSkillDir(this.skillDir, entry.name);
|
|
49
|
+
if (!packDir)
|
|
50
|
+
continue;
|
|
51
|
+
const skillPath = path.join(packDir, "SKILL.md");
|
|
52
|
+
const parsed = parseSkillHeaderFile(skillPath);
|
|
53
|
+
if (!parsed.ok || !parsed.header)
|
|
54
|
+
continue;
|
|
55
|
+
// Last pack wins on a duplicate name, matching the previous Map.set order.
|
|
56
|
+
this.headers.set(parsed.header.name, parsed.header);
|
|
57
|
+
this.paths.set(parsed.header.name, skillPath);
|
|
58
|
+
}
|
|
59
|
+
return [...this.headers.values()];
|
|
60
|
+
}
|
|
61
|
+
/** Load the full skill (header + body) by name, for injection into the LLM context. */
|
|
62
|
+
loadSkill(name) {
|
|
63
|
+
const skillPath = this.paths.get(name);
|
|
64
|
+
if (!skillPath)
|
|
65
|
+
return undefined;
|
|
66
|
+
const parsed = parseSkillHeaderFile(skillPath, { withBody: true });
|
|
67
|
+
if (!parsed.ok || !parsed.header)
|
|
68
|
+
return undefined;
|
|
69
|
+
return { header: parsed.header, body: parsed.body ?? "", path: skillPath };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Route a task description to candidate skills by trigger-keyword match.
|
|
73
|
+
* Returns skills ranked by match count, highest first. Multiple skills may
|
|
74
|
+
* be selected — xcoder composes them (see composes_with in each header).
|
|
75
|
+
*/
|
|
76
|
+
route(taskDescription) {
|
|
77
|
+
if (this.headers.size === 0)
|
|
78
|
+
this.loadHeaders();
|
|
79
|
+
const text = taskDescription.toLowerCase();
|
|
80
|
+
const scored = [...this.headers.values()].map((h) => {
|
|
81
|
+
const score = h.triggers.reduce((acc, t) => acc + (text.includes(t.toLowerCase()) ? 1 : 0), 0);
|
|
82
|
+
return { header: h, score };
|
|
83
|
+
});
|
|
84
|
+
return scored
|
|
85
|
+
.filter((s) => s.score > 0)
|
|
86
|
+
.sort((a, b) => b.score - a.score)
|
|
87
|
+
.map((s) => s.header);
|
|
88
|
+
}
|
|
89
|
+
list() {
|
|
90
|
+
if (this.headers.size === 0)
|
|
91
|
+
this.loadHeaders();
|
|
92
|
+
return [...this.headers.values()];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: filesystem-management
|
|
3
|
+
role: Filesystem/Workspace Manager
|
|
4
|
+
description: >
|
|
5
|
+
Manages the agent's view of the workspace filesystem — indexing, ignore rules, safe
|
|
6
|
+
read/write/move/delete operations, and keeping .agent/index in sync with reality. Load
|
|
7
|
+
whenever the task involves scanning, organizing, cleaning, moving, or indexing files/folders,
|
|
8
|
+
or when other skills need a fresh index before they can trust file state.
|
|
9
|
+
triggers: [index, filesystem, "clean up files", organize, move files, delete files, workspace, ".agentignore", scan directory]
|
|
10
|
+
version: 1.0
|
|
11
|
+
requires_tools: [glob_tool, grep_tool, read_tool, write_edit_tool, run_command_tool, indexing_tool]
|
|
12
|
+
composes_with: [programmer, architect, devops, analyst]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Role
|
|
16
|
+
Owns the accuracy of the agent's picture of "what's on disk" and performs filesystem
|
|
17
|
+
operations safely — indexing, ignore-rule resolution, and structural changes (move/rename/
|
|
18
|
+
delete) without corrupting workspace state.
|
|
19
|
+
|
|
20
|
+
## Process
|
|
21
|
+
1. **Resolve ignore rules** — merge .agent/.agentignore with existing .gitignore /
|
|
22
|
+
.dockerignore before any scan; never index or touch ignored paths.
|
|
23
|
+
2. **Scan** — walk the workspace recursively (respecting ignores) and diff against the last
|
|
24
|
+
known index.json to find added/removed/changed files.
|
|
25
|
+
3. **Index** — write/update .agent/index/index.json (filename, filepath, version, dump file,
|
|
26
|
+
start/end line) and .agent/index/index00x.dump (chunked, <500KB each).
|
|
27
|
+
4. **Mutate safely** — for move/rename/delete requests: confirm the operation plan, check for
|
|
28
|
+
references via grep before deleting anything code refers to, then execute.
|
|
29
|
+
5. **Re-index after mutation** — any write/edit/move/delete invalidates the affected index
|
|
30
|
+
entries; refresh them, don't leave the index stale.
|
|
31
|
+
|
|
32
|
+
## Strategies
|
|
33
|
+
- Treat index.json as a cache, not a source of truth — always re-verify against disk before
|
|
34
|
+
a destructive operation.
|
|
35
|
+
- Chunk dump files strictly under 500KB; roll to a new index00x.dump rather than exceeding it.
|
|
36
|
+
- Never delete without first grepping for references across the workspace.
|
|
37
|
+
- Prefer additive/renaming operations that are reversible over hard deletes where feasible.
|
|
38
|
+
|
|
39
|
+
## Planning Approach
|
|
40
|
+
- Batch related filesystem changes into a single reviewable plan before executing, rather
|
|
41
|
+
than mutating file-by-file with no overview.
|
|
42
|
+
- For large reorganizations, produce a move-map (old path → new path) as an artifact before
|
|
43
|
+
touching anything.
|
|
44
|
+
|
|
45
|
+
## Instructions for This Task Type
|
|
46
|
+
- Always resolve .agentignore + .gitignore + .dockerignore before scanning or indexing.
|
|
47
|
+
- Never exceed 500KB per dump file; split and update index.json's file→dump mapping.
|
|
48
|
+
- Surface a dry-run plan for any multi-file move/delete before executing if the change is
|
|
49
|
+
non-trivial (more than a few files).
|
|
50
|
+
|
|
51
|
+
## Experience / Common Pitfalls
|
|
52
|
+
- Stale indexes are worse than no index — a skill trusting a stale index.json will act on
|
|
53
|
+
wrong file locations/content.
|
|
54
|
+
- Ignoring .gitignore rules leads to indexing build artifacts/dependencies, bloating dump
|
|
55
|
+
files and wasting LLM context.
|
|
56
|
+
- Deleting a file still referenced elsewhere is the most common destructive-operation mistake.
|
|
57
|
+
|
|
58
|
+
## Output Artifacts
|
|
59
|
+
- .agent/index/index.json
|
|
60
|
+
- .agent/index/index00x.dump
|
|
61
|
+
- move-map / change plan (for reorganizations)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* First-run seeding: copy the shipped packs into ~/.xcoder/skills once the CLI
|
|
3
|
+
* actually starts, so a user gets an editable, uninstall-surviving tree.
|
|
4
|
+
*
|
|
5
|
+
* This is strictly best-effort. Seeding runs at most once per process, never
|
|
6
|
+
* throws, and never touches files it does not own (see seed-skills.ts).
|
|
7
|
+
*/
|
|
8
|
+
import { getUserHomeSkillsDir } from "./skills-root.js";
|
|
9
|
+
/**
|
|
10
|
+
* Seed ~/.xcoder/skills from the shipped packs, once per process.
|
|
11
|
+
*
|
|
12
|
+
* Returns the seed summary for tests, or `undefined` when there was nothing
|
|
13
|
+
* to do, it was already attempted, or it failed — failures are swallowed so a
|
|
14
|
+
* read-only home directory can never stop the CLI from starting.
|
|
15
|
+
*/
|
|
16
|
+
export declare function maybeSeedSkillsHome(opts?: {
|
|
17
|
+
sourceDir?: string;
|
|
18
|
+
homeDir?: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
written: number;
|
|
21
|
+
updated: number;
|
|
22
|
+
preserved: number;
|
|
23
|
+
} | undefined>;
|
|
24
|
+
/** Test hook: allow another seed attempt in the same process. */
|
|
25
|
+
export declare function resetFirstRunSeedState(): void;
|
|
26
|
+
export { getUserHomeSkillsDir };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// xcoder:version 2 | xcoder:task task-f9cf18 | xcoder:updated 2026-11-02T16:15:56.920Z | xcoder:subtask code-st-077ea2
|
|
2
|
+
/**
|
|
3
|
+
* First-run seeding: copy the shipped packs into ~/.xcoder/skills once the CLI
|
|
4
|
+
* actually starts, so a user gets an editable, uninstall-surviving tree.
|
|
5
|
+
*
|
|
6
|
+
* This is strictly best-effort. Seeding runs at most once per process, never
|
|
7
|
+
* throws, and never touches files it does not own (see seed-skills.ts).
|
|
8
|
+
*/
|
|
9
|
+
import os from "node:os";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import { log } from "../util/logger.js";
|
|
12
|
+
import { getAppDir, getUserHomeSkillsDir, probeSkillsDir } from "./skills-root.js";
|
|
13
|
+
import { seedSkillsHome } from "./seed-skills.js";
|
|
14
|
+
let attempted = false;
|
|
15
|
+
/**
|
|
16
|
+
* Candidate locations for the SHIPPED packs (never the user's home copy).
|
|
17
|
+
* Order mirrors resolveSkillsRoot's installer candidates.
|
|
18
|
+
*/
|
|
19
|
+
function bundledSkillsCandidates() {
|
|
20
|
+
const appDir = getAppDir();
|
|
21
|
+
const exeDir = path.dirname(process.execPath);
|
|
22
|
+
return [
|
|
23
|
+
path.join(appDir, "skills"),
|
|
24
|
+
path.join(exeDir, "..", "share", "xcoder", "skills"),
|
|
25
|
+
path.join(appDir, "..", "skills"),
|
|
26
|
+
path.join(appDir, "..", "..", "skills"),
|
|
27
|
+
path.join(process.cwd(), "skills"),
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
function findBundledSkillsDir() {
|
|
31
|
+
for (const candidate of bundledSkillsCandidates()) {
|
|
32
|
+
if (probeSkillsDir(candidate).count > 0)
|
|
33
|
+
return candidate;
|
|
34
|
+
}
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Seed ~/.xcoder/skills from the shipped packs, once per process.
|
|
39
|
+
*
|
|
40
|
+
* Returns the seed summary for tests, or `undefined` when there was nothing
|
|
41
|
+
* to do, it was already attempted, or it failed — failures are swallowed so a
|
|
42
|
+
* read-only home directory can never stop the CLI from starting.
|
|
43
|
+
*/
|
|
44
|
+
export async function maybeSeedSkillsHome(opts) {
|
|
45
|
+
if (attempted)
|
|
46
|
+
return undefined;
|
|
47
|
+
attempted = true;
|
|
48
|
+
if (process.env["XCODER_SKIP_SKILLS_SEED"] === "1")
|
|
49
|
+
return undefined;
|
|
50
|
+
const sourceDir = opts?.sourceDir ?? findBundledSkillsDir();
|
|
51
|
+
if (!sourceDir)
|
|
52
|
+
return undefined;
|
|
53
|
+
const homeDir = opts?.homeDir ?? os.homedir();
|
|
54
|
+
try {
|
|
55
|
+
const result = await seedSkillsHome({ sourceDir, homeDir });
|
|
56
|
+
if (process.env["XCODER_DEBUG_CONFIG_PATH"] && result.action !== "unchanged") {
|
|
57
|
+
log.dim(`skillsSeed: ${result.action} (written=${result.written.length}, ` +
|
|
58
|
+
`updated=${result.updated.length}, preserved=${result.preserved.length})`);
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
written: result.written.length,
|
|
62
|
+
updated: result.updated.length,
|
|
63
|
+
preserved: result.preserved.length,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// Never let seeding break startup.
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Test hook: allow another seed attempt in the same process. */
|
|
72
|
+
export function resetFirstRunSeedState() {
|
|
73
|
+
attempted = false;
|
|
74
|
+
}
|
|
75
|
+
export { getUserHomeSkillsDir };
|