oh-my-customcodex 0.1.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 +21 -0
- package/README.md +327 -0
- package/dist/cli/index.js +32054 -0
- package/dist/index.js +5469 -0
- package/package.json +89 -0
- package/templates/.claude/agents/arch-documenter.md +38 -0
- package/templates/.claude/agents/arch-speckit-agent.md +66 -0
- package/templates/.claude/agents/be-django-expert.md +47 -0
- package/templates/.claude/agents/be-express-expert.md +31 -0
- package/templates/.claude/agents/be-fastapi-expert.md +45 -0
- package/templates/.claude/agents/be-go-backend-expert.md +45 -0
- package/templates/.claude/agents/be-nestjs-expert.md +29 -0
- package/templates/.claude/agents/be-springboot-expert.md +42 -0
- package/templates/.claude/agents/db-alembic-expert.md +73 -0
- package/templates/.claude/agents/db-postgres-expert.md +38 -0
- package/templates/.claude/agents/db-redis-expert.md +38 -0
- package/templates/.claude/agents/db-supabase-expert.md +37 -0
- package/templates/.claude/agents/de-airflow-expert.md +48 -0
- package/templates/.claude/agents/de-dbt-expert.md +36 -0
- package/templates/.claude/agents/de-kafka-expert.md +83 -0
- package/templates/.claude/agents/de-pipeline-expert.md +34 -0
- package/templates/.claude/agents/de-snowflake-expert.md +38 -0
- package/templates/.claude/agents/de-spark-expert.md +38 -0
- package/templates/.claude/agents/fe-design-expert.md +120 -0
- package/templates/.claude/agents/fe-flutter-agent.md +48 -0
- package/templates/.claude/agents/fe-svelte-agent.md +33 -0
- package/templates/.claude/agents/fe-vercel-agent.md +40 -0
- package/templates/.claude/agents/fe-vuejs-agent.md +34 -0
- package/templates/.claude/agents/infra-aws-expert.md +49 -0
- package/templates/.claude/agents/infra-docker-expert.md +49 -0
- package/templates/.claude/agents/lang-golang-expert.md +46 -0
- package/templates/.claude/agents/lang-java21-expert.md +42 -0
- package/templates/.claude/agents/lang-kotlin-expert.md +45 -0
- package/templates/.claude/agents/lang-python-expert.md +45 -0
- package/templates/.claude/agents/lang-rust-expert.md +45 -0
- package/templates/.claude/agents/lang-typescript-expert.md +45 -0
- package/templates/.claude/agents/mgr-claude-code-bible.md +62 -0
- package/templates/.claude/agents/mgr-creator.md +57 -0
- package/templates/.claude/agents/mgr-gitnerd.md +50 -0
- package/templates/.claude/agents/mgr-sauron.md +163 -0
- package/templates/.claude/agents/mgr-supplier.md +39 -0
- package/templates/.claude/agents/mgr-updater.md +40 -0
- package/templates/.claude/agents/qa-engineer.md +36 -0
- package/templates/.claude/agents/qa-planner.md +78 -0
- package/templates/.claude/agents/qa-writer.md +32 -0
- package/templates/.claude/agents/sec-codeql-expert.md +56 -0
- package/templates/.claude/agents/slack-cli-expert.md +98 -0
- package/templates/.claude/agents/souls/lang-golang-expert.soul.md +21 -0
- package/templates/.claude/agents/sys-memory-keeper.md +123 -0
- package/templates/.claude/agents/sys-naggy.md +76 -0
- package/templates/.claude/agents/tool-bun-expert.md +26 -0
- package/templates/.claude/agents/tool-npm-expert.md +31 -0
- package/templates/.claude/agents/tool-optimizer.md +37 -0
- package/templates/.claude/agents/wiki-curator.md +72 -0
- package/templates/.claude/config/required-plugins.json +30 -0
- package/templates/.claude/contexts/dev.md +20 -0
- package/templates/.claude/contexts/ecomode.md +110 -0
- package/templates/.claude/contexts/index.yaml +41 -0
- package/templates/.claude/contexts/research.md +28 -0
- package/templates/.claude/contexts/review.md +23 -0
- package/templates/.claude/hooks/hooks.json +533 -0
- package/templates/.claude/hooks/scripts/adaptive-harness-scan.sh +45 -0
- package/templates/.claude/hooks/scripts/agent-start-recorder.sh +40 -0
- package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +76 -0
- package/templates/.claude/hooks/scripts/audit-log.sh +64 -0
- package/templates/.claude/hooks/scripts/auto-continue-guard.sh +33 -0
- package/templates/.claude/hooks/scripts/content-hash-validator.sh +75 -0
- package/templates/.claude/hooks/scripts/context-budget-advisor.sh +107 -0
- package/templates/.claude/hooks/scripts/cost-cap-advisor.sh +71 -0
- package/templates/.claude/hooks/scripts/cwd-change-detector.sh +36 -0
- package/templates/.claude/hooks/scripts/eval-core-batch-save.sh +46 -0
- package/templates/.claude/hooks/scripts/feedback-collector.sh +92 -0
- package/templates/.claude/hooks/scripts/file-change-validator.sh +26 -0
- package/templates/.claude/hooks/scripts/git-delegation-guard.sh +57 -0
- package/templates/.claude/hooks/scripts/model-escalation-advisor.sh +106 -0
- package/templates/.claude/hooks/scripts/omcodex-auto-update.sh +4 -0
- package/templates/.claude/hooks/scripts/omcustom-auto-update.sh +177 -0
- package/templates/.claude/hooks/scripts/rtk-intercept.sh +77 -0
- package/templates/.claude/hooks/scripts/rule-deletion-guard.sh +60 -0
- package/templates/.claude/hooks/scripts/schema-validator.sh +106 -0
- package/templates/.claude/hooks/scripts/secret-filter.sh +100 -0
- package/templates/.claude/hooks/scripts/session-autofix-prompt.sh +34 -0
- package/templates/.claude/hooks/scripts/session-autofix.sh +146 -0
- package/templates/.claude/hooks/scripts/session-env-check.sh +254 -0
- package/templates/.claude/hooks/scripts/skill-extractor-analyzer.sh +49 -0
- package/templates/.claude/hooks/scripts/stage-blocker.sh +16 -0
- package/templates/.claude/hooks/scripts/stale-todo-scanner.sh +91 -0
- package/templates/.claude/hooks/scripts/stall-detection-advisor.sh +112 -0
- package/templates/.claude/hooks/scripts/stop-console-audit.sh +46 -0
- package/templates/.claude/hooks/scripts/stuck-detector.sh +199 -0
- package/templates/.claude/hooks/scripts/task-outcome-recorder.sh +119 -0
- package/templates/.claude/hooks/scripts/task-state-precompact.sh +58 -0
- package/templates/.claude/hooks/scripts/user-prompt-preprocessor.sh +32 -0
- package/templates/.claude/hooks/skill-count-reminder.sh +34 -0
- package/templates/.claude/install-hooks.sh +100 -0
- package/templates/.claude/ontology/agents.yaml +546 -0
- package/templates/.claude/ontology/graphs/agent-skill.json +102 -0
- package/templates/.claude/ontology/graphs/full-graph.json +629 -0
- package/templates/.claude/ontology/graphs/routing.json +112 -0
- package/templates/.claude/ontology/graphs/skill-rule.json +78 -0
- package/templates/.claude/ontology/rules.yaml +251 -0
- package/templates/.claude/ontology/schema.yaml +144 -0
- package/templates/.claude/ontology/skills.yaml +575 -0
- package/templates/.claude/rules/MAY-optimization.md +42 -0
- package/templates/.claude/rules/MUST-agent-design.md +340 -0
- package/templates/.claude/rules/MUST-agent-identification.md +77 -0
- package/templates/.claude/rules/MUST-agent-teams.md +293 -0
- package/templates/.claude/rules/MUST-completion-verification.md +112 -0
- package/templates/.claude/rules/MUST-continuous-improvement.md +69 -0
- package/templates/.claude/rules/MUST-enforcement-policy.md +50 -0
- package/templates/.claude/rules/MUST-intent-transparency.md +74 -0
- package/templates/.claude/rules/MUST-language-policy.md +28 -0
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +399 -0
- package/templates/.claude/rules/MUST-parallel-execution.md +184 -0
- package/templates/.claude/rules/MUST-permissions.md +32 -0
- package/templates/.claude/rules/MUST-safety.md +23 -0
- package/templates/.claude/rules/MUST-sync-verification.md +145 -0
- package/templates/.claude/rules/MUST-tool-identification.md +97 -0
- package/templates/.claude/rules/SHOULD-ecomode.md +123 -0
- package/templates/.claude/rules/SHOULD-error-handling.md +33 -0
- package/templates/.claude/rules/SHOULD-hud-statusline.md +51 -0
- package/templates/.claude/rules/SHOULD-interaction.md +77 -0
- package/templates/.claude/rules/SHOULD-memory-integration.md +371 -0
- package/templates/.claude/rules/SHOULD-ontology-rag-routing.md +49 -0
- package/templates/.claude/rules/SHOULD-wiki-sync.md +73 -0
- package/templates/.claude/rules/index.yaml +141 -0
- package/templates/.claude/schemas/tool-inputs.json +62 -0
- package/templates/.claude/skills/action-validator/SKILL.md +89 -0
- package/templates/.claude/skills/adaptive-harness/SKILL.md +335 -0
- package/templates/.claude/skills/adversarial-review/SKILL.md +80 -0
- package/templates/.claude/skills/agora/SKILL.md +194 -0
- package/templates/.claude/skills/airflow-best-practices/SKILL.md +94 -0
- package/templates/.claude/skills/alembic-best-practices/SKILL.md +295 -0
- package/templates/.claude/skills/ambiguity-gate/SKILL.md +94 -0
- package/templates/.claude/skills/analysis/SKILL.md +223 -0
- package/templates/.claude/skills/audit-agents/SKILL.md +118 -0
- package/templates/.claude/skills/aws-best-practices/SKILL.md +281 -0
- package/templates/.claude/skills/claude-code-bible/SKILL.md +93 -0
- package/templates/.claude/skills/claude-code-bible/scripts/fetch-docs.js +244 -0
- package/templates/.claude/skills/claude-native/SKILL.md +215 -0
- package/templates/.claude/skills/codex-exec/SKILL.md +206 -0
- package/templates/.claude/skills/codex-exec/scripts/codex-wrapper.cjs +430 -0
- package/templates/.claude/skills/create-agent/SKILL.md +94 -0
- package/templates/.claude/skills/cve-triage/SKILL.md +91 -0
- package/templates/.claude/skills/dag-orchestration/SKILL.md +201 -0
- package/templates/.claude/skills/dbt-best-practices/SKILL.md +55 -0
- package/templates/.claude/skills/de-lead-routing/SKILL.md +230 -0
- package/templates/.claude/skills/deep-plan/SKILL.md +344 -0
- package/templates/.claude/skills/deep-verify/SKILL.md +111 -0
- package/templates/.claude/skills/dev-lead-routing/SKILL.md +161 -0
- package/templates/.claude/skills/dev-refactor/SKILL.md +234 -0
- package/templates/.claude/skills/dev-review/SKILL.md +172 -0
- package/templates/.claude/skills/django-best-practices/SKILL.md +334 -0
- package/templates/.claude/skills/docker-best-practices/SKILL.md +276 -0
- package/templates/.claude/skills/evaluator-optimizer/SKILL.md +421 -0
- package/templates/.claude/skills/fastapi-best-practices/SKILL.md +271 -0
- package/templates/.claude/skills/fix-refs/SKILL.md +109 -0
- package/templates/.claude/skills/flutter-best-practices/SKILL.md +325 -0
- package/templates/.claude/skills/gemini-exec/SKILL.md +215 -0
- package/templates/.claude/skills/gemini-exec/scripts/gemini-wrapper.cjs +485 -0
- package/templates/.claude/skills/go-backend-best-practices/SKILL.md +135 -0
- package/templates/.claude/skills/go-best-practices/SKILL.md +204 -0
- package/templates/.claude/skills/hada-scout/SKILL.md +92 -0
- package/templates/.claude/skills/harness-eval/SKILL.md +95 -0
- package/templates/.claude/skills/harness-synthesizer/SKILL.md +145 -0
- package/templates/.claude/skills/help/SKILL.md +127 -0
- package/templates/.claude/skills/idea/SKILL.md +88 -0
- package/templates/.claude/skills/impeccable-design/SKILL.md +173 -0
- package/templates/.claude/skills/intent-detection/SKILL.md +293 -0
- package/templates/.claude/skills/intent-detection/patterns/agent-triggers.yaml +438 -0
- package/templates/.claude/skills/java21-best-practices/SKILL.md +190 -0
- package/templates/.claude/skills/jinja2-prompts/SKILL.md +86 -0
- package/templates/.claude/skills/kafka-best-practices/SKILL.md +53 -0
- package/templates/.claude/skills/kotlin-best-practices/SKILL.md +257 -0
- package/templates/.claude/skills/lists/SKILL.md +80 -0
- package/templates/.claude/skills/memory-management/SKILL.md +196 -0
- package/templates/.claude/skills/memory-recall/SKILL.md +172 -0
- package/templates/.claude/skills/memory-save/SKILL.md +128 -0
- package/templates/.claude/skills/model-escalation/SKILL.md +62 -0
- package/templates/.claude/skills/monitoring-setup/SKILL.md +215 -0
- package/templates/.claude/skills/multi-model-verification/SKILL.md +130 -0
- package/templates/.claude/skills/npm-audit/SKILL.md +74 -0
- package/templates/.claude/skills/npm-publish/SKILL.md +65 -0
- package/templates/.claude/skills/npm-version/SKILL.md +104 -0
- package/templates/.claude/skills/omcodex-auto-improve/SKILL.md +136 -0
- package/templates/.claude/skills/omcodex-feedback/SKILL.md +205 -0
- package/templates/.claude/skills/omcodex-improve-report/SKILL.md +65 -0
- package/templates/.claude/skills/omcodex-loop/SKILL.md +45 -0
- package/templates/.claude/skills/omcodex-release-notes/SKILL.md +117 -0
- package/templates/.claude/skills/omcodex-takeover/SKILL.md +115 -0
- package/templates/.claude/skills/omcodex-web/SKILL.md +95 -0
- package/templates/.claude/skills/optimize-analyze/SKILL.md +57 -0
- package/templates/.claude/skills/optimize-bundle/SKILL.md +69 -0
- package/templates/.claude/skills/optimize-report/SKILL.md +76 -0
- package/templates/.claude/skills/peer-messaging/SKILL.md +59 -0
- package/templates/.claude/skills/pipeline/SKILL.md +103 -0
- package/templates/.claude/skills/pipeline-architecture-patterns/SKILL.md +84 -0
- package/templates/.claude/skills/pipeline-guards/SKILL.md +173 -0
- package/templates/.claude/skills/post-release-followup/SKILL.md +134 -0
- package/templates/.claude/skills/postgres-best-practices/SKILL.md +67 -0
- package/templates/.claude/skills/pr-auto-improve/SKILL.md +129 -0
- package/templates/.claude/skills/professor-triage/SKILL.md +321 -0
- package/templates/.claude/skills/python-best-practices/SKILL.md +223 -0
- package/templates/.claude/skills/qa-lead-routing/SKILL.md +104 -0
- package/templates/.claude/skills/react-best-practices/SKILL.md +102 -0
- package/templates/.claude/skills/reasoning-sandwich/SKILL.md +64 -0
- package/templates/.claude/skills/redis-best-practices/SKILL.md +84 -0
- package/templates/.claude/skills/release-plan/SKILL.md +207 -0
- package/templates/.claude/skills/research/SKILL.md +493 -0
- package/templates/.claude/skills/result-aggregation/SKILL.md +165 -0
- package/templates/.claude/skills/rtk-exec/SKILL.md +199 -0
- package/templates/.claude/skills/rtk-exec/scripts/rtk-wrapper.cjs +377 -0
- package/templates/.claude/skills/rust-best-practices/SKILL.md +268 -0
- package/templates/.claude/skills/sauron-watch/SKILL.md +239 -0
- package/templates/.claude/skills/scout/SKILL.md +250 -0
- package/templates/.claude/skills/sdd/SKILL.md +24 -0
- package/templates/.claude/skills/sdd-dev/SKILL.md +257 -0
- package/templates/.claude/skills/sdd-development/SKILL.md +24 -0
- package/templates/.claude/skills/secretary-routing/SKILL.md +132 -0
- package/templates/.claude/skills/skill-extractor/SKILL.md +155 -0
- package/templates/.claude/skills/skills-sh-search/SKILL.md +210 -0
- package/templates/.claude/skills/snowflake-best-practices/SKILL.md +66 -0
- package/templates/.claude/skills/spark-best-practices/SKILL.md +53 -0
- package/templates/.claude/skills/springboot-best-practices/SKILL.md +74 -0
- package/templates/.claude/skills/springboot-best-practices/examples/config-properties-example.java +22 -0
- package/templates/.claude/skills/springboot-best-practices/examples/controller-example.java +28 -0
- package/templates/.claude/skills/springboot-best-practices/examples/controller-test-example.java +33 -0
- package/templates/.claude/skills/springboot-best-practices/examples/entity-example.java +22 -0
- package/templates/.claude/skills/springboot-best-practices/examples/exception-handler-example.java +30 -0
- package/templates/.claude/skills/springboot-best-practices/examples/repository-example.java +17 -0
- package/templates/.claude/skills/springboot-best-practices/examples/repository-test-example.java +23 -0
- package/templates/.claude/skills/springboot-best-practices/examples/security-config-example.java +27 -0
- package/templates/.claude/skills/springboot-best-practices/examples/service-example.java +33 -0
- package/templates/.claude/skills/status/SKILL.md +155 -0
- package/templates/.claude/skills/structured-dev-cycle/SKILL.md +200 -0
- package/templates/.claude/skills/stuck-recovery/SKILL.md +80 -0
- package/templates/.claude/skills/supabase-postgres-best-practices/SKILL.md +100 -0
- package/templates/.claude/skills/systematic-debugging/SKILL.md +288 -0
- package/templates/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +278 -0
- package/templates/.claude/skills/systematic-debugging/condition-based-waiting.md +240 -0
- package/templates/.claude/skills/systematic-debugging/defense-in-depth.md +252 -0
- package/templates/.claude/skills/systematic-debugging/find-polluter.sh +147 -0
- package/templates/.claude/skills/systematic-debugging/root-cause-tracing.md +87 -0
- package/templates/.claude/skills/task-decomposition/SKILL.md +197 -0
- package/templates/.claude/skills/typescript-best-practices/SKILL.md +322 -0
- package/templates/.claude/skills/update-docs/SKILL.md +142 -0
- package/templates/.claude/skills/update-external/SKILL.md +169 -0
- package/templates/.claude/skills/vercel-deploy/SKILL.md +75 -0
- package/templates/.claude/skills/web-design-guidelines/SKILL.md +119 -0
- package/templates/.claude/skills/wiki/SKILL.md +426 -0
- package/templates/.claude/skills/wiki-rag/SKILL.md +154 -0
- package/templates/.claude/skills/worker-reviewer-pipeline/SKILL.md +165 -0
- package/templates/.claude/skills/writing-clearly-and-concisely/SKILL.md +66 -0
- package/templates/.claude/statusline.sh +380 -0
- package/templates/.claude/uninstall-hooks.sh +52 -0
- package/templates/.github/workflows/wiki-sync.yml +132 -0
- package/templates/AGENTS.md.en +255 -0
- package/templates/AGENTS.md.ko +255 -0
- package/templates/CLAUDE.md +263 -0
- package/templates/CLAUDE.md.en +256 -0
- package/templates/CLAUDE.md.ko +256 -0
- package/templates/deprecated-files.json +10 -0
- package/templates/guides/agents-md-quality/README.md +110 -0
- package/templates/guides/airflow/README.md +47 -0
- package/templates/guides/alembic/README.md +438 -0
- package/templates/guides/aws/common-patterns.md +169 -0
- package/templates/guides/aws/index.yaml +26 -0
- package/templates/guides/aws/well-architected.md +143 -0
- package/templates/guides/cc-token-saver/README.md +97 -0
- package/templates/guides/claude-code/01-overview.md +42 -0
- package/templates/guides/claude-code/03-tools.md +107 -0
- package/templates/guides/claude-code/04-agent-skills.md +90 -0
- package/templates/guides/claude-code/05-agent-sdk.md +129 -0
- package/templates/guides/claude-code/06-mcp.md +165 -0
- package/templates/guides/claude-code/07-prompt-engineering.md +100 -0
- package/templates/guides/claude-code/08-testing.md +56 -0
- package/templates/guides/claude-code/09-guardrails.md +78 -0
- package/templates/guides/claude-code/10-monitoring.md +87 -0
- package/templates/guides/claude-code/11-sub-agents.md +159 -0
- package/templates/guides/claude-code/12-workflow-patterns.md +182 -0
- package/templates/guides/claude-code/13-cli-flags.md +151 -0
- package/templates/guides/claude-code/index.yaml +61 -0
- package/templates/guides/dbt/README.md +32 -0
- package/templates/guides/django-best-practices/README.md +476 -0
- package/templates/guides/docker/compose-best-practices.md +284 -0
- package/templates/guides/docker/dockerfile-best-practices.md +262 -0
- package/templates/guides/docker/index.yaml +26 -0
- package/templates/guides/drizzle-orm/README.md +69 -0
- package/templates/guides/elements-of-style/elements-of-style.html +2609 -0
- package/templates/guides/fastapi/best-practices.md +232 -0
- package/templates/guides/fastapi/index.yaml +21 -0
- package/templates/guides/flutter/architecture.md +141 -0
- package/templates/guides/flutter/fundamentals.md +119 -0
- package/templates/guides/flutter/index.yaml +44 -0
- package/templates/guides/flutter/performance.md +119 -0
- package/templates/guides/flutter/security.md +120 -0
- package/templates/guides/flutter/state-management.md +144 -0
- package/templates/guides/flutter/testing.md +155 -0
- package/templates/guides/git-worktree-workflow/README.md +138 -0
- package/templates/guides/go-backend/index.yaml +26 -0
- package/templates/guides/go-backend/project-layout.md +243 -0
- package/templates/guides/go-backend/uber-style.md +212 -0
- package/templates/guides/golang/concurrency.md +282 -0
- package/templates/guides/golang/effective-go.md +309 -0
- package/templates/guides/golang/error-handling.md +250 -0
- package/templates/guides/golang/index.yaml +27 -0
- package/templates/guides/hook-data-flow/README.md +135 -0
- package/templates/guides/iceberg/README.md +49 -0
- package/templates/guides/impeccable-design/color-and-contrast.md +278 -0
- package/templates/guides/impeccable-design/index.yaml +12 -0
- package/templates/guides/impeccable-design/motion-design.md +390 -0
- package/templates/guides/impeccable-design/typography.md +386 -0
- package/templates/guides/impeccable-design/ux-writing.md +400 -0
- package/templates/guides/index.yaml +265 -0
- package/templates/guides/java21/index.yaml +29 -0
- package/templates/guides/java21/java-style-guide.md +248 -0
- package/templates/guides/java21/modern-java21.md +303 -0
- package/templates/guides/kafka/README.md +32 -0
- package/templates/guides/kotlin/coding-conventions.md +247 -0
- package/templates/guides/kotlin/idioms.md +234 -0
- package/templates/guides/kotlin/index.yaml +26 -0
- package/templates/guides/multi-model-routing/README.md +101 -0
- package/templates/guides/multi-provider-exec/README.md +83 -0
- package/templates/guides/postgres/README.md +58 -0
- package/templates/guides/python/index.yaml +26 -0
- package/templates/guides/python/pep8-style-guide.md +202 -0
- package/templates/guides/python/zen-of-python.md +79 -0
- package/templates/guides/redis/README.md +50 -0
- package/templates/guides/rust/error-handling.md +262 -0
- package/templates/guides/rust/index.yaml +26 -0
- package/templates/guides/rust/ownership.md +180 -0
- package/templates/guides/skill-bundle-design/README.md +106 -0
- package/templates/guides/slack-cli/README.md +145 -0
- package/templates/guides/snowflake/README.md +32 -0
- package/templates/guides/spark/README.md +32 -0
- package/templates/guides/springboot/best-practices.md +361 -0
- package/templates/guides/springboot/index.yaml +22 -0
- package/templates/guides/supabase-postgres/README.md +32 -0
- package/templates/guides/supabase-postgres/index.yaml +19 -0
- package/templates/guides/typescript/advanced-types.md +225 -0
- package/templates/guides/typescript/index.yaml +26 -0
- package/templates/guides/typescript/type-system.md +219 -0
- package/templates/guides/web-design/accessibility.md +66 -0
- package/templates/guides/web-design/index.yaml +20 -0
- package/templates/guides/web-design/performance.md +102 -0
- package/templates/guides/web-scraping/README.md +926 -0
- package/templates/guides/web-scraping/index.yaml +19 -0
- package/templates/guides/worktree-lifecycle/README.md +104 -0
- package/templates/index.yaml +18 -0
- package/templates/manifest.json +49 -0
- package/templates/workflows/auto-dev.yaml +46 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* codex-wrapper.js
|
|
5
|
+
*
|
|
6
|
+
* Node.js wrapper for OpenAI Codex CLI (non-interactive execution).
|
|
7
|
+
* Executes codex in ephemeral mode with structured JSON output.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* node codex-wrapper.js --prompt "your prompt" [options]
|
|
11
|
+
*
|
|
12
|
+
* Options:
|
|
13
|
+
* --prompt <text> Required: prompt to execute
|
|
14
|
+
* --json Enable JSON Lines output from codex
|
|
15
|
+
* --output <path> Save final message to file
|
|
16
|
+
* --model <name> Specify model (default: o3)
|
|
17
|
+
* --timeout <ms> Execution timeout in milliseconds (default: 120000, max: 600000)
|
|
18
|
+
* --full-auto Use full-auto approval mode (default: -a never)
|
|
19
|
+
* --working-dir <dir> Set working directory for execution
|
|
20
|
+
*
|
|
21
|
+
* Output (JSON to stdout):
|
|
22
|
+
* Success: { "success": true, "output": "...", "duration_ms": 1234, ... }
|
|
23
|
+
* Failure: { "success": false, "error": "...", "stderr": "...", ... }
|
|
24
|
+
*
|
|
25
|
+
* Exit codes:
|
|
26
|
+
* 0 = success
|
|
27
|
+
* 1 = execution error
|
|
28
|
+
* 2 = validation error (missing binary/auth)
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
const { spawn, execFileSync } = require('child_process');
|
|
32
|
+
const fs = require('fs');
|
|
33
|
+
const path = require('path');
|
|
34
|
+
const os = require('os');
|
|
35
|
+
|
|
36
|
+
// Configuration
|
|
37
|
+
const DEFAULT_TIMEOUT_MS = 120000; // 2 minutes
|
|
38
|
+
const MAX_TIMEOUT_MS = 600000; // 10 minutes
|
|
39
|
+
const KILL_GRACE_PERIOD_MS = 5000; // 5 seconds for graceful shutdown
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Parse command line arguments
|
|
43
|
+
* @returns {Object} Parsed arguments
|
|
44
|
+
*/
|
|
45
|
+
function parseArgs() {
|
|
46
|
+
const args = {
|
|
47
|
+
prompt: null,
|
|
48
|
+
json: false,
|
|
49
|
+
output: null,
|
|
50
|
+
model: null,
|
|
51
|
+
timeout: DEFAULT_TIMEOUT_MS,
|
|
52
|
+
fullAuto: false,
|
|
53
|
+
workingDir: null,
|
|
54
|
+
effort: null,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
for (let i = 2; i < process.argv.length; i++) {
|
|
58
|
+
const arg = process.argv[i];
|
|
59
|
+
|
|
60
|
+
switch (arg) {
|
|
61
|
+
case '--prompt':
|
|
62
|
+
if (i + 1 < process.argv.length) {
|
|
63
|
+
args.prompt = process.argv[++i];
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case '--json':
|
|
67
|
+
args.json = true;
|
|
68
|
+
break;
|
|
69
|
+
case '--output':
|
|
70
|
+
if (i + 1 < process.argv.length) {
|
|
71
|
+
args.output = process.argv[++i];
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case '--model':
|
|
75
|
+
if (i + 1 < process.argv.length) {
|
|
76
|
+
args.model = process.argv[++i];
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case '--timeout':
|
|
80
|
+
if (i + 1 < process.argv.length) {
|
|
81
|
+
const timeoutValue = parseInt(process.argv[++i], 10);
|
|
82
|
+
if (!isNaN(timeoutValue)) {
|
|
83
|
+
args.timeout = Math.min(timeoutValue, MAX_TIMEOUT_MS);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
case '--full-auto':
|
|
88
|
+
args.fullAuto = true;
|
|
89
|
+
break;
|
|
90
|
+
case '--working-dir':
|
|
91
|
+
if (i + 1 < process.argv.length) {
|
|
92
|
+
args.workingDir = process.argv[++i];
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case '--effort':
|
|
96
|
+
case '--reasoning-effort':
|
|
97
|
+
if (i + 1 < process.argv.length) {
|
|
98
|
+
args.effort = process.argv[++i];
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return args;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Validate environment for codex execution
|
|
109
|
+
* @returns {Object} Validation result { valid: boolean, errors: string[] }
|
|
110
|
+
*/
|
|
111
|
+
function validateEnvironment() {
|
|
112
|
+
const errors = [];
|
|
113
|
+
|
|
114
|
+
// Check for codex binary
|
|
115
|
+
try {
|
|
116
|
+
execFileSync('which', ['codex'], { stdio: 'pipe' });
|
|
117
|
+
} catch (error) {
|
|
118
|
+
// Try common installation paths
|
|
119
|
+
const commonPaths = [
|
|
120
|
+
'/usr/local/bin/codex',
|
|
121
|
+
path.join(os.homedir(), '.local', 'bin', 'codex'),
|
|
122
|
+
path.join(os.homedir(), 'bin', 'codex'),
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
const codexExists = commonPaths.some(p => fs.existsSync(p));
|
|
126
|
+
if (!codexExists) {
|
|
127
|
+
errors.push('codex binary not found in PATH or common locations');
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Note: OPENAI_API_KEY is optional if codex has its own stored auth (via `codex auth`)
|
|
132
|
+
if (!process.env.OPENAI_API_KEY) {
|
|
133
|
+
console.error('[codex-wrapper] Note: OPENAI_API_KEY not set, relying on codex built-in auth');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
valid: errors.length === 0,
|
|
138
|
+
errors,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Build codex command array
|
|
144
|
+
* @param {Object} options - Command options
|
|
145
|
+
* @returns {Object} Command structure { binary: string, args: string[] }
|
|
146
|
+
*/
|
|
147
|
+
function buildCommand(options) {
|
|
148
|
+
const args = ['exec', '--ephemeral'];
|
|
149
|
+
|
|
150
|
+
// Approval mode (default: normal, --full-auto: automatic execution)
|
|
151
|
+
if (options.fullAuto) {
|
|
152
|
+
args.push('--full-auto');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// JSON output
|
|
156
|
+
if (options.json) {
|
|
157
|
+
args.push('--json');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Model selection
|
|
161
|
+
if (options.model) {
|
|
162
|
+
args.push('--model', options.model);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Working directory
|
|
166
|
+
if (options.workingDir) {
|
|
167
|
+
args.push('-C', options.workingDir);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Reasoning effort (maps to -c model_reasoning_effort="value")
|
|
171
|
+
if (options.effort) {
|
|
172
|
+
const validEfforts = ['minimal', 'low', 'medium', 'high', 'xhigh'];
|
|
173
|
+
if (validEfforts.includes(options.effort)) {
|
|
174
|
+
args.push('-c', `model_reasoning_effort="${options.effort}"`);
|
|
175
|
+
} else {
|
|
176
|
+
process.stderr.write(`Warning: Invalid effort level "${options.effort}". Valid: ${validEfforts.join(', ')}\n`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Add prompt as last argument
|
|
181
|
+
args.push(options.prompt);
|
|
182
|
+
|
|
183
|
+
return {
|
|
184
|
+
binary: 'codex',
|
|
185
|
+
args,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Execute codex command
|
|
191
|
+
* @param {string} binary - Binary to execute
|
|
192
|
+
* @param {string[]} args - Command arguments
|
|
193
|
+
* @param {number} timeout - Timeout in milliseconds
|
|
194
|
+
* @param {string|null} workingDir - Working directory
|
|
195
|
+
* @returns {Promise<Object>} Execution result
|
|
196
|
+
*/
|
|
197
|
+
function executeCodex(binary, args, timeout, workingDir = null) {
|
|
198
|
+
return new Promise((resolve) => {
|
|
199
|
+
const startTime = Date.now();
|
|
200
|
+
let stdout = '';
|
|
201
|
+
let stderr = '';
|
|
202
|
+
let timedOut = false;
|
|
203
|
+
|
|
204
|
+
const spawnOptions = {
|
|
205
|
+
cwd: workingDir || process.cwd(),
|
|
206
|
+
env: process.env,
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const child = spawn(binary, args, spawnOptions);
|
|
210
|
+
|
|
211
|
+
// Collect output
|
|
212
|
+
child.stdout.on('data', (data) => {
|
|
213
|
+
stdout += data.toString();
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
child.stderr.on('data', (data) => {
|
|
217
|
+
stderr += data.toString();
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
// Set timeout
|
|
221
|
+
const timeoutHandle = setTimeout(() => {
|
|
222
|
+
timedOut = true;
|
|
223
|
+
console.error('[codex-wrapper] Timeout reached, terminating process...', { file: 'stderr' });
|
|
224
|
+
|
|
225
|
+
// Graceful termination attempt
|
|
226
|
+
child.kill('SIGTERM');
|
|
227
|
+
|
|
228
|
+
// Force kill after grace period
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
if (!child.killed) {
|
|
231
|
+
console.error('[codex-wrapper] Force killing process...', { file: 'stderr' });
|
|
232
|
+
child.kill('SIGKILL');
|
|
233
|
+
}
|
|
234
|
+
}, KILL_GRACE_PERIOD_MS);
|
|
235
|
+
}, timeout);
|
|
236
|
+
|
|
237
|
+
// Handle process exit
|
|
238
|
+
child.on('close', (exitCode) => {
|
|
239
|
+
clearTimeout(timeoutHandle);
|
|
240
|
+
const durationMs = Date.now() - startTime;
|
|
241
|
+
|
|
242
|
+
resolve({
|
|
243
|
+
exitCode: exitCode !== null ? exitCode : 1,
|
|
244
|
+
stdout,
|
|
245
|
+
stderr,
|
|
246
|
+
timedOut,
|
|
247
|
+
durationMs,
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// Handle spawn errors
|
|
252
|
+
child.on('error', (error) => {
|
|
253
|
+
clearTimeout(timeoutHandle);
|
|
254
|
+
const durationMs = Date.now() - startTime;
|
|
255
|
+
|
|
256
|
+
resolve({
|
|
257
|
+
exitCode: 1,
|
|
258
|
+
stdout,
|
|
259
|
+
stderr: stderr + '\nSpawn error: ' + error.message,
|
|
260
|
+
timedOut: false,
|
|
261
|
+
durationMs,
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Parse JSON Lines output from codex
|
|
269
|
+
* @param {string} output - Raw output string
|
|
270
|
+
* @returns {Object} Parsed result { events: object[], finalMessage: string|null, parseErrors: string[] }
|
|
271
|
+
*/
|
|
272
|
+
function parseJsonLines(output) {
|
|
273
|
+
const lines = output.split('\n').filter(line => line.trim().length > 0);
|
|
274
|
+
const events = [];
|
|
275
|
+
const parseErrors = [];
|
|
276
|
+
let finalMessage = null;
|
|
277
|
+
|
|
278
|
+
for (const line of lines) {
|
|
279
|
+
try {
|
|
280
|
+
const event = JSON.parse(line);
|
|
281
|
+
events.push(event);
|
|
282
|
+
|
|
283
|
+
// Codex CLI v0.99.0 format: item.completed events with agent_message type
|
|
284
|
+
if (event.type === 'item.completed' && event.item) {
|
|
285
|
+
if (event.item.type === 'agent_message' && event.item.text) {
|
|
286
|
+
finalMessage = event.item.text;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
// Look for assistant message in various event structures (fallback for future API changes)
|
|
290
|
+
else if (event.type === 'assistant_message' && event.content) {
|
|
291
|
+
finalMessage = event.content;
|
|
292
|
+
} else if (event.message && event.message.role === 'assistant') {
|
|
293
|
+
finalMessage = event.message.content || event.message.text;
|
|
294
|
+
} else if (event.role === 'assistant' && event.content) {
|
|
295
|
+
finalMessage = event.content;
|
|
296
|
+
}
|
|
297
|
+
} catch (error) {
|
|
298
|
+
parseErrors.push(`Failed to parse line: ${error.message}`);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return {
|
|
303
|
+
events,
|
|
304
|
+
finalMessage,
|
|
305
|
+
parseErrors,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Main execution function
|
|
311
|
+
*/
|
|
312
|
+
async function main() {
|
|
313
|
+
const args = parseArgs();
|
|
314
|
+
|
|
315
|
+
// Validate required arguments
|
|
316
|
+
if (!args.prompt) {
|
|
317
|
+
const result = {
|
|
318
|
+
success: false,
|
|
319
|
+
error: 'Missing required argument: --prompt',
|
|
320
|
+
exit_code: 2,
|
|
321
|
+
};
|
|
322
|
+
console.log(JSON.stringify(result, null, 2));
|
|
323
|
+
process.exit(2);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Validate environment
|
|
327
|
+
const validation = validateEnvironment();
|
|
328
|
+
if (!validation.valid) {
|
|
329
|
+
const result = {
|
|
330
|
+
success: false,
|
|
331
|
+
error: 'Environment validation failed',
|
|
332
|
+
validation_errors: validation.errors,
|
|
333
|
+
exit_code: 2,
|
|
334
|
+
};
|
|
335
|
+
console.log(JSON.stringify(result, null, 2));
|
|
336
|
+
process.exit(2);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
console.error(`[codex-wrapper] Executing codex with timeout: ${args.timeout}ms`);
|
|
340
|
+
if (args.workingDir) {
|
|
341
|
+
console.error(`[codex-wrapper] Working directory: ${args.workingDir}`);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Build command
|
|
345
|
+
const command = buildCommand(args);
|
|
346
|
+
console.error(`[codex-wrapper] Command: ${command.binary} ${command.args.join(' ')}`);
|
|
347
|
+
|
|
348
|
+
// Execute
|
|
349
|
+
const execResult = await executeCodex(
|
|
350
|
+
command.binary,
|
|
351
|
+
command.args,
|
|
352
|
+
args.timeout,
|
|
353
|
+
args.workingDir
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
// Process result
|
|
357
|
+
let output = null;
|
|
358
|
+
let eventsCount = 0;
|
|
359
|
+
|
|
360
|
+
if (args.json && execResult.stdout) {
|
|
361
|
+
const parsed = parseJsonLines(execResult.stdout);
|
|
362
|
+
eventsCount = parsed.events.length;
|
|
363
|
+
output = parsed.finalMessage;
|
|
364
|
+
|
|
365
|
+
if (parsed.parseErrors.length > 0) {
|
|
366
|
+
console.error('[codex-wrapper] JSON parse errors:', parsed.parseErrors.join('; '));
|
|
367
|
+
}
|
|
368
|
+
} else {
|
|
369
|
+
output = execResult.stdout.trim();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// Determine success
|
|
373
|
+
const success = execResult.exitCode === 0 && !execResult.timedOut;
|
|
374
|
+
|
|
375
|
+
// Build result object
|
|
376
|
+
const result = {
|
|
377
|
+
success,
|
|
378
|
+
duration_ms: execResult.durationMs,
|
|
379
|
+
exit_code: execResult.exitCode,
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
if (success) {
|
|
383
|
+
result.output = output || execResult.stdout;
|
|
384
|
+
result.model = args.model || 'o3';
|
|
385
|
+
if (args.json) {
|
|
386
|
+
result.events_count = eventsCount;
|
|
387
|
+
}
|
|
388
|
+
} else {
|
|
389
|
+
if (execResult.timedOut) {
|
|
390
|
+
result.error = `Execution timed out after ${args.timeout}ms`;
|
|
391
|
+
} else {
|
|
392
|
+
result.error = 'Execution failed';
|
|
393
|
+
}
|
|
394
|
+
if (execResult.stderr) {
|
|
395
|
+
result.stderr = execResult.stderr.trim();
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// Write output file if requested
|
|
400
|
+
if (args.output && output) {
|
|
401
|
+
try {
|
|
402
|
+
const outputDir = path.dirname(args.output);
|
|
403
|
+
if (!fs.existsSync(outputDir)) {
|
|
404
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
405
|
+
}
|
|
406
|
+
fs.writeFileSync(args.output, output, 'utf-8');
|
|
407
|
+
console.error(`[codex-wrapper] Output written to: ${args.output}`);
|
|
408
|
+
} catch (error) {
|
|
409
|
+
console.error(`[codex-wrapper] Failed to write output file: ${error.message}`);
|
|
410
|
+
result.output_file_error = error.message;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// Output JSON result to stdout
|
|
415
|
+
console.log(JSON.stringify(result, null, 2));
|
|
416
|
+
|
|
417
|
+
process.exit(result.exit_code);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// Run
|
|
421
|
+
main().catch(error => {
|
|
422
|
+
const result = {
|
|
423
|
+
success: false,
|
|
424
|
+
error: 'Unexpected error: ' + error.message,
|
|
425
|
+
stack: error.stack,
|
|
426
|
+
exit_code: 1,
|
|
427
|
+
};
|
|
428
|
+
console.log(JSON.stringify(result, null, 2));
|
|
429
|
+
process.exit(1);
|
|
430
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omcodex:create-agent
|
|
3
|
+
description: Create a new agent with complete structure
|
|
4
|
+
scope: harness
|
|
5
|
+
argument-hint: "<name> --type <type>"
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
user-invocable: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Create Agent Skill
|
|
11
|
+
|
|
12
|
+
Create a new agent with complete directory structure, files, and registration.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Name | Type | Required | Description |
|
|
17
|
+
|------|------|----------|-------------|
|
|
18
|
+
| name | string | yes | Agent name (kebab-case) |
|
|
19
|
+
|
|
20
|
+
## Options
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
--type, -t Agent type (required)
|
|
24
|
+
Values: sw-engineer, sw-engineer/backend, infra-engineer, manager
|
|
25
|
+
--source, -s External source URL (for external agents)
|
|
26
|
+
--desc, -d Description
|
|
27
|
+
--skills Comma-separated skills to include
|
|
28
|
+
--dynamic Auto-discover skills and guides from context (used by routing fallback)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
1. Validate input
|
|
35
|
+
├── Name is unique
|
|
36
|
+
├── Name is kebab-case
|
|
37
|
+
└── Type is valid
|
|
38
|
+
|
|
39
|
+
2. Create agent file
|
|
40
|
+
└── .codex/agents/{name}.md
|
|
41
|
+
|
|
42
|
+
4. Validate
|
|
43
|
+
└── Run mgr-supplier:audit
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Templates
|
|
47
|
+
|
|
48
|
+
### Agent File Template
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
# {Name} Agent
|
|
52
|
+
|
|
53
|
+
> **Type**: {Type}
|
|
54
|
+
> **Source**: Internal
|
|
55
|
+
|
|
56
|
+
## Purpose
|
|
57
|
+
|
|
58
|
+
{Description}
|
|
59
|
+
|
|
60
|
+
## Capabilities
|
|
61
|
+
|
|
62
|
+
1.
|
|
63
|
+
2.
|
|
64
|
+
|
|
65
|
+
## Skills
|
|
66
|
+
|
|
67
|
+
| Skill | Purpose |
|
|
68
|
+
|-------|---------|
|
|
69
|
+
|
|
70
|
+
## Guides
|
|
71
|
+
|
|
72
|
+
| Guide | Purpose |
|
|
73
|
+
|-------|---------|
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Output Format
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
[mgr-creator:agent lang-golang-expert --type sw-engineer]
|
|
80
|
+
|
|
81
|
+
Creating agent: lang-golang-expert
|
|
82
|
+
|
|
83
|
+
[1/4] Validating...
|
|
84
|
+
✓ Name available
|
|
85
|
+
✓ Type valid: sw-engineer
|
|
86
|
+
|
|
87
|
+
[2/4] Creating agent file...
|
|
88
|
+
✓ .codex/agents/lang-golang-expert.md
|
|
89
|
+
|
|
90
|
+
[3/4] Validating...
|
|
91
|
+
✓ mgr-supplier:audit passed
|
|
92
|
+
|
|
93
|
+
Agent created successfully: .codex/agents/lang-golang-expert.md
|
|
94
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cve-triage
|
|
3
|
+
description: CVE triage workflow for vulnerability analysis, reproduction assessment, and patch verification
|
|
4
|
+
scope: core
|
|
5
|
+
user-invocable: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# CVE Triage Skill
|
|
9
|
+
|
|
10
|
+
A structured workflow for triaging CVE reports against a codebase. Coordinates security analysis, reproduction assessment, and patch verification.
|
|
11
|
+
|
|
12
|
+
## Triage Phases
|
|
13
|
+
|
|
14
|
+
### Phase 1: CVE Intake
|
|
15
|
+
|
|
16
|
+
- Parse CVE identifier and advisory details
|
|
17
|
+
- Identify affected component, version range, and CWE classification
|
|
18
|
+
- Determine if codebase uses the affected component
|
|
19
|
+
|
|
20
|
+
### Phase 2: Impact Assessment
|
|
21
|
+
|
|
22
|
+
- Locate affected code paths via grep/CodeQL
|
|
23
|
+
- Assess exploitability in the project's specific context
|
|
24
|
+
- Determine severity (CRITICAL/HIGH/MEDIUM/LOW/NONE)
|
|
25
|
+
- Check if existing mitigations reduce impact
|
|
26
|
+
|
|
27
|
+
### Phase 3: Reproduction Analysis
|
|
28
|
+
|
|
29
|
+
- Design minimal reproduction scenario
|
|
30
|
+
- Identify prerequisites (configuration, network access, authentication)
|
|
31
|
+
- Assess if reproduction is feasible in test environment
|
|
32
|
+
|
|
33
|
+
### Phase 4: Remediation
|
|
34
|
+
|
|
35
|
+
- Identify available patches or versions
|
|
36
|
+
- Assess upgrade compatibility and breaking changes
|
|
37
|
+
- Propose mitigation if patch unavailable
|
|
38
|
+
- Generate remediation plan with effort estimate
|
|
39
|
+
|
|
40
|
+
## Output Format
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## CVE Triage Report: {CVE-ID}
|
|
44
|
+
|
|
45
|
+
### Summary
|
|
46
|
+
| Field | Value |
|
|
47
|
+
|-------|-------|
|
|
48
|
+
| CVE | {CVE-ID} |
|
|
49
|
+
| CWE | {CWE-ID}: {description} |
|
|
50
|
+
| CVSS | {score} ({severity}) |
|
|
51
|
+
| Affected | {component} {version range} |
|
|
52
|
+
| Project Impact | {CRITICAL/HIGH/MEDIUM/LOW/NONE} |
|
|
53
|
+
|
|
54
|
+
### Analysis
|
|
55
|
+
{Detailed analysis of how CVE affects this codebase}
|
|
56
|
+
|
|
57
|
+
### Remediation
|
|
58
|
+
| Option | Effort | Risk |
|
|
59
|
+
|--------|--------|------|
|
|
60
|
+
| {option 1} | {effort} | {risk} |
|
|
61
|
+
|
|
62
|
+
### Action Items
|
|
63
|
+
- [ ] {item 1}
|
|
64
|
+
- [ ] {item 2}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Integration
|
|
68
|
+
|
|
69
|
+
- Uses sec-codeql-expert for code analysis when available
|
|
70
|
+
- Results feed into security documentation
|
|
71
|
+
- Can be triggered as part of /research security analysis
|
|
72
|
+
|
|
73
|
+
## Agent Selection
|
|
74
|
+
|
|
75
|
+
| Phase | Agent | Model |
|
|
76
|
+
|-------|-------|-------|
|
|
77
|
+
| CVE Intake | Explore | haiku |
|
|
78
|
+
| Impact Assessment | sec-codeql-expert | sonnet |
|
|
79
|
+
| Reproduction | sec-codeql-expert | sonnet |
|
|
80
|
+
| Remediation | appropriate-expert | sonnet |
|
|
81
|
+
|
|
82
|
+
## Workflow
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
1. Receive CVE identifier or advisory
|
|
86
|
+
2. Phase 1: Parse and classify the vulnerability
|
|
87
|
+
3. Phase 2: Search codebase for affected components
|
|
88
|
+
4. Phase 3: Evaluate reproduction feasibility
|
|
89
|
+
5. Phase 4: Propose remediation with effort/risk tradeoffs
|
|
90
|
+
6. Generate triage report in standard format
|
|
91
|
+
```
|