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,17 @@
|
|
|
1
|
+
package com.example.demo.repository;
|
|
2
|
+
|
|
3
|
+
import com.example.demo.entity.User;
|
|
4
|
+
import com.example.demo.entity.UserStatus;
|
|
5
|
+
import org.springframework.data.jpa.repository.JpaRepository;
|
|
6
|
+
import org.springframework.data.jpa.repository.Query;
|
|
7
|
+
import org.springframework.data.repository.query.Param;
|
|
8
|
+
|
|
9
|
+
import java.util.List;
|
|
10
|
+
import java.util.Optional;
|
|
11
|
+
|
|
12
|
+
public interface UserRepository extends JpaRepository<User, Long> {
|
|
13
|
+
Optional<User> findByEmail(String email);
|
|
14
|
+
|
|
15
|
+
@Query("SELECT u FROM User u WHERE u.status = :status")
|
|
16
|
+
List<User> findByStatus(@Param("status") UserStatus status);
|
|
17
|
+
}
|
package/templates/.claude/skills/springboot-best-practices/examples/repository-test-example.java
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
package com.example.demo.repository;
|
|
2
|
+
|
|
3
|
+
import com.example.demo.entity.User;
|
|
4
|
+
import org.junit.jupiter.api.Test;
|
|
5
|
+
import org.springframework.beans.factory.annotation.Autowired;
|
|
6
|
+
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
|
|
7
|
+
|
|
8
|
+
import java.util.Optional;
|
|
9
|
+
|
|
10
|
+
import static org.assertj.core.api.Assertions.assertThat;
|
|
11
|
+
|
|
12
|
+
@DataJpaTest
|
|
13
|
+
class UserRepositoryTest {
|
|
14
|
+
@Autowired
|
|
15
|
+
private UserRepository userRepository;
|
|
16
|
+
|
|
17
|
+
@Test
|
|
18
|
+
void findByEmail_shouldReturnUser() {
|
|
19
|
+
User user = userRepository.save(new User("test@example.com"));
|
|
20
|
+
Optional<User> found = userRepository.findByEmail("test@example.com");
|
|
21
|
+
assertThat(found).isPresent();
|
|
22
|
+
}
|
|
23
|
+
}
|
package/templates/.claude/skills/springboot-best-practices/examples/security-config-example.java
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
package com.example.demo.config;
|
|
2
|
+
|
|
3
|
+
import lombok.RequiredArgsConstructor;
|
|
4
|
+
import org.springframework.context.annotation.Bean;
|
|
5
|
+
import org.springframework.context.annotation.Configuration;
|
|
6
|
+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
7
|
+
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
8
|
+
import org.springframework.security.config.http.SessionCreationPolicy;
|
|
9
|
+
import org.springframework.security.web.SecurityFilterChain;
|
|
10
|
+
|
|
11
|
+
@Configuration
|
|
12
|
+
@EnableWebSecurity
|
|
13
|
+
@RequiredArgsConstructor
|
|
14
|
+
public class SecurityConfig {
|
|
15
|
+
@Bean
|
|
16
|
+
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
|
17
|
+
return http
|
|
18
|
+
.csrf(csrf -> csrf.disable())
|
|
19
|
+
.sessionManagement(session ->
|
|
20
|
+
session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
|
21
|
+
.authorizeHttpRequests(auth -> auth
|
|
22
|
+
.requestMatchers("/api/v1/auth/**").permitAll()
|
|
23
|
+
.requestMatchers("/api/v1/admin/**").hasRole("ADMIN")
|
|
24
|
+
.anyRequest().authenticated())
|
|
25
|
+
.build();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
package com.example.demo.service;
|
|
2
|
+
|
|
3
|
+
import com.example.demo.dto.UserRequest;
|
|
4
|
+
import com.example.demo.dto.UserResponse;
|
|
5
|
+
import com.example.demo.entity.User;
|
|
6
|
+
import com.example.demo.exception.UserNotFoundException;
|
|
7
|
+
import com.example.demo.mapper.UserMapper;
|
|
8
|
+
import com.example.demo.repository.UserRepository;
|
|
9
|
+
import lombok.RequiredArgsConstructor;
|
|
10
|
+
import org.springframework.stereotype.Service;
|
|
11
|
+
import org.springframework.transaction.annotation.Transactional;
|
|
12
|
+
|
|
13
|
+
@Service
|
|
14
|
+
@Transactional(readOnly = true)
|
|
15
|
+
@RequiredArgsConstructor
|
|
16
|
+
public class UserServiceImpl implements UserService {
|
|
17
|
+
private final UserRepository userRepository;
|
|
18
|
+
private final UserMapper userMapper;
|
|
19
|
+
|
|
20
|
+
@Override
|
|
21
|
+
public UserResponse findById(Long id) {
|
|
22
|
+
User user = userRepository.findById(id)
|
|
23
|
+
.orElseThrow(() -> new UserNotFoundException(id));
|
|
24
|
+
return userMapper.toResponse(user);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@Override
|
|
28
|
+
@Transactional
|
|
29
|
+
public UserResponse create(UserRequest request) {
|
|
30
|
+
User user = userMapper.toEntity(request);
|
|
31
|
+
return userMapper.toResponse(userRepository.save(user));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omcodex:status
|
|
3
|
+
description: Show system status and health checks
|
|
4
|
+
scope: harness
|
|
5
|
+
argument-hint: "[--verbose] [--health]"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# System Status Skill
|
|
10
|
+
|
|
11
|
+
Show comprehensive system status including agents, skills, guides, and health checks.
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
--verbose, -v Detailed status
|
|
17
|
+
--health, -h Health checks only
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Output Format
|
|
21
|
+
|
|
22
|
+
### Default Status
|
|
23
|
+
```
|
|
24
|
+
AI Agent System - Status
|
|
25
|
+
|
|
26
|
+
System:
|
|
27
|
+
Rules: 10 loaded (R000-R009)
|
|
28
|
+
|
|
29
|
+
Agents:
|
|
30
|
+
Orchestrator: 1 (secretary)
|
|
31
|
+
Manager: 3 (mgr-creator, mgr-updater, mgr-supplier)
|
|
32
|
+
SW Engineer: 6
|
|
33
|
+
Backend Engineer: 3
|
|
34
|
+
Infra Engineer: 2
|
|
35
|
+
Total: 15 agents
|
|
36
|
+
|
|
37
|
+
Skills:
|
|
38
|
+
Development: 8
|
|
39
|
+
Backend: 3
|
|
40
|
+
Infrastructure: 2
|
|
41
|
+
Total: 13 skills
|
|
42
|
+
|
|
43
|
+
Guides: 12 loaded
|
|
44
|
+
Commands: 10 available
|
|
45
|
+
|
|
46
|
+
Health: ✓ OK
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Verbose Status
|
|
50
|
+
```
|
|
51
|
+
status --verbose
|
|
52
|
+
|
|
53
|
+
AI Agent System - Detailed Status
|
|
54
|
+
|
|
55
|
+
Rules:
|
|
56
|
+
MUST:
|
|
57
|
+
✓ R000 language-policy
|
|
58
|
+
✓ R001 safety
|
|
59
|
+
✓ R002 permissions
|
|
60
|
+
✓ R006 agent-design
|
|
61
|
+
|
|
62
|
+
SHOULD:
|
|
63
|
+
✓ R003 interaction
|
|
64
|
+
✓ R004 error-handling
|
|
65
|
+
✓ R007 agent-identification
|
|
66
|
+
✓ R008 tool-identification
|
|
67
|
+
|
|
68
|
+
MAY:
|
|
69
|
+
✓ R005 optimization
|
|
70
|
+
✓ R009 parallel-execution
|
|
71
|
+
|
|
72
|
+
Agents:
|
|
73
|
+
orchestrator/
|
|
74
|
+
✓ secretary (internal)
|
|
75
|
+
|
|
76
|
+
manager/
|
|
77
|
+
✓ mgr-creator (internal)
|
|
78
|
+
✓ mgr-updater (internal)
|
|
79
|
+
✓ mgr-supplier (internal)
|
|
80
|
+
|
|
81
|
+
sw-engineer/
|
|
82
|
+
✓ lang-golang-expert (internal)
|
|
83
|
+
✓ lang-python-expert (internal)
|
|
84
|
+
✓ lang-rust-expert (internal)
|
|
85
|
+
✓ lang-kotlin-expert (internal)
|
|
86
|
+
✓ lang-typescript-expert (internal)
|
|
87
|
+
✓ fe-vercel-agent (external v1.0.0)
|
|
88
|
+
|
|
89
|
+
sw-engineer/backend/
|
|
90
|
+
✓ be-fastapi-expert (internal)
|
|
91
|
+
✓ be-springboot-expert (internal)
|
|
92
|
+
✓ be-go-backend-expert (internal)
|
|
93
|
+
|
|
94
|
+
infra-engineer/
|
|
95
|
+
✓ infra-docker-expert (internal)
|
|
96
|
+
✓ infra-aws-expert (internal)
|
|
97
|
+
|
|
98
|
+
Skills:
|
|
99
|
+
development/
|
|
100
|
+
✓ go-best-practices
|
|
101
|
+
✓ python-best-practices
|
|
102
|
+
✓ rust-best-practices
|
|
103
|
+
✓ kotlin-best-practices
|
|
104
|
+
✓ typescript-best-practices
|
|
105
|
+
✓ react-best-practices
|
|
106
|
+
✓ web-design-guidelines
|
|
107
|
+
✓ vercel-deploy
|
|
108
|
+
|
|
109
|
+
backend/
|
|
110
|
+
✓ fastapi-best-practices
|
|
111
|
+
✓ springboot-best-practices
|
|
112
|
+
✓ go-backend-best-practices
|
|
113
|
+
|
|
114
|
+
infrastructure/
|
|
115
|
+
✓ docker-best-practices
|
|
116
|
+
✓ aws-best-practices
|
|
117
|
+
|
|
118
|
+
Guides:
|
|
119
|
+
✓ claude-code, web-design
|
|
120
|
+
✓ golang, python, rust, kotlin, typescript
|
|
121
|
+
✓ fastapi, springboot, go-backend
|
|
122
|
+
✓ docker, aws
|
|
123
|
+
|
|
124
|
+
Commands:
|
|
125
|
+
system: lists, status, help
|
|
126
|
+
manager: create-agent, update-docs, update-external, audit-agents, fix-refs
|
|
127
|
+
dev: dev-review, dev-refactor
|
|
128
|
+
|
|
129
|
+
All systems operational.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Health Check
|
|
133
|
+
```
|
|
134
|
+
status --health
|
|
135
|
+
|
|
136
|
+
Health Checks:
|
|
137
|
+
|
|
138
|
+
Agents:
|
|
139
|
+
✓ 15/15 agents valid
|
|
140
|
+
✓ All agent files exist in .codex/agents/
|
|
141
|
+
|
|
142
|
+
Dependencies:
|
|
143
|
+
✓ All skill references valid
|
|
144
|
+
✓ All guide references valid
|
|
145
|
+
|
|
146
|
+
External Sources:
|
|
147
|
+
✓ fe-vercel-agent (github: reachable)
|
|
148
|
+
|
|
149
|
+
Documentation:
|
|
150
|
+
✓ AGENTS.md in sync
|
|
151
|
+
✓ All .codex/agents/*.md files valid
|
|
152
|
+
✓ All .codex/skills/*/SKILL.md files valid
|
|
153
|
+
|
|
154
|
+
Result: HEALTHY
|
|
155
|
+
```
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: structured-dev-cycle
|
|
3
|
+
description: 6-stage structured development cycle with stage-based tool restrictions
|
|
4
|
+
scope: core
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Structured Development Cycle
|
|
10
|
+
|
|
11
|
+
A disciplined 6-stage development cycle that enforces quality through stage-based tool restrictions. Prevents premature implementation by requiring planning and verification phases.
|
|
12
|
+
|
|
13
|
+
## Background
|
|
14
|
+
|
|
15
|
+
Inspired by Pi Coding Agent Workflow Extension's structured development approach. The core insight: restricting file modification tools during planning phases forces thorough analysis before code changes.
|
|
16
|
+
|
|
17
|
+
## Stages
|
|
18
|
+
|
|
19
|
+
| # | Stage | Allowed Tools | Blocked Tools | Purpose |
|
|
20
|
+
|---|-------|---------------|---------------|---------|
|
|
21
|
+
| 1 | **Plan** | Read, Glob, Grep, WebSearch, WebFetch | Write, Edit, Bash (modifying) | Define approach, analyze requirements |
|
|
22
|
+
| 2 | **Verify Plan** | Read, Glob, Grep | Write, Edit, Bash | Review plan from different perspective |
|
|
23
|
+
| 3 | **Implement** | All tools | None | Write code, create files |
|
|
24
|
+
| 4 | **Verify Implementation** | Read, Glob, Grep, Bash (tests only) | Write, Edit | Review code, run tests |
|
|
25
|
+
| 5 | **Compound** | Read, Bash (tests only) | Write, Edit | Integration testing, cross-module validation |
|
|
26
|
+
| 6 | **Done** | Read | Write, Edit, Bash | Summary and documentation |
|
|
27
|
+
|
|
28
|
+
### Stage Model Recommendations
|
|
29
|
+
|
|
30
|
+
Following the [reasoning-sandwich](/skills/reasoning-sandwich) pattern:
|
|
31
|
+
|
|
32
|
+
| Stage | Recommended Model | Rationale |
|
|
33
|
+
|-------|------------------|-----------|
|
|
34
|
+
| 1: Plan | opus | Architectural reasoning, requirement analysis |
|
|
35
|
+
| 2: Verify Plan | opus | Edge case detection, alternative evaluation |
|
|
36
|
+
| 3: Implement | sonnet | Code generation, file creation optimized |
|
|
37
|
+
| 4: Verify Implementation | sonnet | Test execution, structural review |
|
|
38
|
+
| 5: Compound | sonnet | Integration testing, cross-module validation |
|
|
39
|
+
| 6: Done | haiku | Checklist validation, summary generation |
|
|
40
|
+
|
|
41
|
+
Model selection is advisory — the orchestrator may override based on task complexity.
|
|
42
|
+
|
|
43
|
+
## Stage Tracking
|
|
44
|
+
|
|
45
|
+
Stage state is tracked via a marker file for hook enforcement:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Set stage (used by orchestrator or skill)
|
|
49
|
+
echo "plan" > /tmp/.codex-dev-stage
|
|
50
|
+
|
|
51
|
+
# Valid stage values (all block Write/Edit except 'implement'):
|
|
52
|
+
# plan, verify-plan, implement, verify-impl, compound, done
|
|
53
|
+
|
|
54
|
+
# Clear stage (disable blocking)
|
|
55
|
+
rm -f /tmp/.codex-dev-stage
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
A PreToolUse hook in `.codex/hooks/hooks.json` checks this marker and blocks Write/Edit tools during non-implementation stages.
|
|
59
|
+
|
|
60
|
+
## Workflow
|
|
61
|
+
|
|
62
|
+
### Stage 1: Plan
|
|
63
|
+
```
|
|
64
|
+
[Stage 1/6: Plan]
|
|
65
|
+
├── Analyze requirements and constraints
|
|
66
|
+
├── Read existing code for context
|
|
67
|
+
├── Search for related patterns
|
|
68
|
+
├── Define approach with rationale
|
|
69
|
+
└── Output: Implementation plan document
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Exit criteria**: Clear plan with file list, approach description, and risk assessment.
|
|
73
|
+
|
|
74
|
+
### Stage 2: Verify Plan
|
|
75
|
+
```
|
|
76
|
+
[Stage 2/6: Verify Plan]
|
|
77
|
+
├── Review plan for completeness
|
|
78
|
+
├── Check for missing edge cases
|
|
79
|
+
├── Validate against existing patterns
|
|
80
|
+
├── Consider alternative approaches
|
|
81
|
+
└── Output: Plan approval or revision requests
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Exit criteria**: Plan verified by different perspective (ideally different model via multi-model-verification).
|
|
85
|
+
|
|
86
|
+
### Stage 3: Implement
|
|
87
|
+
```
|
|
88
|
+
[Stage 3/6: Implement]
|
|
89
|
+
├── Follow verified plan
|
|
90
|
+
├── Create/modify files as specified
|
|
91
|
+
├── Write tests alongside code
|
|
92
|
+
├── Track deviations from plan
|
|
93
|
+
└── Output: Implementation complete
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Codex-Exec Hybrid Option**: When entering Stage 3:
|
|
97
|
+
1. Check `/tmp/.codex-env-status-*` for codex CLI availability
|
|
98
|
+
2. If available AND task involves new file creation → automatically delegate scaffolding to `/codex-exec`:
|
|
99
|
+
- Display: `[Codex Hybrid] Delegating scaffolding to codex-exec...`
|
|
100
|
+
- codex-exec generates initial code (strength: fast generation)
|
|
101
|
+
- Claude expert reviews and refines codex output (strength: reasoning, quality)
|
|
102
|
+
3. If unavailable → display `[Codex] Unavailable — proceeding with Claude experts directly` and proceed with standard implementation via Claude experts
|
|
103
|
+
|
|
104
|
+
Suitable for codex hybrid: new files, boilerplate, test stubs, scaffolding
|
|
105
|
+
Not suitable: modifying existing code, architecture-dependent changes
|
|
106
|
+
|
|
107
|
+
**Exit criteria**: All planned files created/modified, tests written.
|
|
108
|
+
|
|
109
|
+
### Stage 4: Verify Implementation
|
|
110
|
+
```
|
|
111
|
+
[Stage 4/6: Verify Implementation]
|
|
112
|
+
├── Run test suite
|
|
113
|
+
├── Review code quality
|
|
114
|
+
├── Check for plan deviations
|
|
115
|
+
├── Validate error handling
|
|
116
|
+
└── Output: Verification report
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Exit criteria**: All tests pass, no critical issues found. If issues found, return to Stage 3.
|
|
120
|
+
|
|
121
|
+
### Stage 5: Compound
|
|
122
|
+
```
|
|
123
|
+
[Stage 5/6: Compound]
|
|
124
|
+
├── Run integration tests
|
|
125
|
+
├── Cross-module validation
|
|
126
|
+
├── Check for side effects
|
|
127
|
+
├── Verify documentation accuracy
|
|
128
|
+
└── Output: Integration report
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Exit criteria**: No integration issues. If issues found, return to Stage 3.
|
|
132
|
+
|
|
133
|
+
### Stage 6: Done
|
|
134
|
+
```
|
|
135
|
+
[Stage 6/6: Done]
|
|
136
|
+
├── Summarize changes made
|
|
137
|
+
├── List files modified
|
|
138
|
+
├── Note any deviations from plan
|
|
139
|
+
├── Suggest follow-up tasks
|
|
140
|
+
└── Output: Completion summary
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Integration
|
|
144
|
+
|
|
145
|
+
### With EnterPlanMode
|
|
146
|
+
Stage 1 (Plan) maps to Claude Code's `EnterPlanMode`. When the structured cycle is active:
|
|
147
|
+
- EnterPlanMode triggers Stage 1
|
|
148
|
+
- ExitPlanMode transitions to Stage 2 (Verify Plan), not directly to implementation
|
|
149
|
+
|
|
150
|
+
### With Multi-Model Verification
|
|
151
|
+
Stage 2 (Verify Plan) and Stage 4 (Verify Implementation) can invoke the `multi-model-verification` skill for comprehensive review.
|
|
152
|
+
|
|
153
|
+
### With PreToolUse Hooks
|
|
154
|
+
The stage marker file (`/tmp/.codex-dev-stage`) is read by a PreToolUse hook that enforces tool restrictions. This provides a safety net beyond instruction-based compliance.
|
|
155
|
+
|
|
156
|
+
### With Agent Teams
|
|
157
|
+
For complex tasks, Agent Teams is **preferred** when available (R018):
|
|
158
|
+
- Plan: architect agent
|
|
159
|
+
- Verify: reviewer agent(s) — multi-model-verification via Agent Teams
|
|
160
|
+
- Implement: domain expert agent (+ codex-exec hybrid if available)
|
|
161
|
+
- Compound: QA agent
|
|
162
|
+
|
|
163
|
+
When Agent Teams is enabled AND task involves 3+ agents or review→fix cycles, using Agent Teams is MANDATORY per R018.
|
|
164
|
+
|
|
165
|
+
## When to Use
|
|
166
|
+
|
|
167
|
+
| Task Complexity | Recommended Cycle |
|
|
168
|
+
|----------------|-------------------|
|
|
169
|
+
| Simple fix (< 3 files) | Skip — direct implementation |
|
|
170
|
+
| Medium feature (3-10 files) | Stages 1, 3, 4, 6 (skip verify plan, compound) |
|
|
171
|
+
| Complex feature (10+ files) | Full 6-stage cycle |
|
|
172
|
+
| Architecture change | Full 6-stage cycle with multi-model verification |
|
|
173
|
+
| Security-critical code | Full 6-stage cycle (mandatory) |
|
|
174
|
+
|
|
175
|
+
## Stage Transition Commands
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Orchestrator manages transitions:
|
|
179
|
+
echo "plan" > /tmp/.codex-dev-stage # Enter planning
|
|
180
|
+
echo "verify-plan" > /tmp/.codex-dev-stage # Enter plan verification
|
|
181
|
+
echo "implement" > /tmp/.codex-dev-stage # Enter implementation
|
|
182
|
+
echo "verify-impl" > /tmp/.codex-dev-stage # Enter impl verification
|
|
183
|
+
echo "compound" > /tmp/.codex-dev-stage # Enter compound testing
|
|
184
|
+
echo "done" > /tmp/.codex-dev-stage # Mark done
|
|
185
|
+
rm -f /tmp/.codex-dev-stage # Clear (disable blocking)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Limitations
|
|
189
|
+
|
|
190
|
+
- **Single session**: The fixed path `/tmp/.codex-dev-stage` does not support concurrent Claude Code sessions. Running multiple sessions simultaneously may cause stage state conflicts.
|
|
191
|
+
- **World-writable path**: The `/tmp/` directory is accessible to all users. For multi-user environments, consider using a user-scoped path like `/tmp/.codex-dev-stage-$(id -u)`.
|
|
192
|
+
|
|
193
|
+
## Display Format
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
═══ Structured Dev Cycle ═══════════════════════════
|
|
197
|
+
[■■□□□□] Stage 2/6: Verify Plan
|
|
198
|
+
Files planned: 5 | Risks identified: 2
|
|
199
|
+
═════════════════════════════════════════════════════
|
|
200
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stuck-recovery
|
|
3
|
+
description: Detect stuck loops and advise recovery strategies
|
|
4
|
+
scope: core
|
|
5
|
+
user-invocable: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Stuck Recovery Skill
|
|
9
|
+
|
|
10
|
+
Detects when tasks are stuck in repetitive failure loops and advises recovery strategies. **Advisory-only** — the orchestrator decides the action (R010).
|
|
11
|
+
|
|
12
|
+
## Detection Signals
|
|
13
|
+
|
|
14
|
+
| Signal | Pattern | Threshold |
|
|
15
|
+
|--------|---------|-----------|
|
|
16
|
+
| Repeated error | Same error message appears 3+ times | 3 occurrences |
|
|
17
|
+
| Edit loop | Same file edited 3+ times in sequence | 3 edits |
|
|
18
|
+
| Agent retry | Same agent_type fails 3+ times consecutively | 3 failures |
|
|
19
|
+
| Tool loop | Same tool called 5+ times with similar input | 5 calls |
|
|
20
|
+
|
|
21
|
+
## Recovery Strategies
|
|
22
|
+
|
|
23
|
+
| Strategy | When | Action |
|
|
24
|
+
|----------|------|--------|
|
|
25
|
+
| Fresh context | Repeated same error | Suggest rephrasing the task |
|
|
26
|
+
| Model escalation | Agent retry loop | Trigger model-escalation advisory |
|
|
27
|
+
| Alternative approach | Edit loop detected | Suggest different file/method |
|
|
28
|
+
| Human intervention | All automated strategies exhausted | Ask user for guidance |
|
|
29
|
+
| Context reset | Long-running task (>30min) or context >80% | Structured handoff: save state to memory, create fresh session with task summary |
|
|
30
|
+
|
|
31
|
+
## Architecture
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
PostToolUse (Edit, Write, Bash, Task) → stuck-detector.sh
|
|
35
|
+
Tracks: tool_name, file_path, error_hash, agent_type
|
|
36
|
+
Storage: /tmp/.codex-tool-history-$PPID (JSON lines, max 100)
|
|
37
|
+
Detection: sliding window pattern matching
|
|
38
|
+
Output: stderr advisory when loop detected
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Advisory Format
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
--- [Stuck Detection] Loop detected ---
|
|
45
|
+
Signal: {signal_type}
|
|
46
|
+
Pattern: {description}
|
|
47
|
+
Occurrences: {count}/{threshold}
|
|
48
|
+
💡 Recovery: {suggested_strategy}
|
|
49
|
+
---
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Integration
|
|
53
|
+
|
|
54
|
+
- Complements model-escalation skill (escalation is one recovery strategy)
|
|
55
|
+
- Respects R010 (advisory only, orchestrator decides)
|
|
56
|
+
- Uses same PPID-scoped temp file pattern as other hooks
|
|
57
|
+
- Works with task-outcome-recorder.sh data when available
|
|
58
|
+
|
|
59
|
+
## Context Reset Strategy
|
|
60
|
+
|
|
61
|
+
For long-running tasks (>30 minutes) or when context usage exceeds 80%, context reset is preferred over compaction:
|
|
62
|
+
|
|
63
|
+
1. **Save state**: Write current progress, decisions, and open items to native auto-memory
|
|
64
|
+
2. **Create handoff**: Generate structured task summary with:
|
|
65
|
+
- Completed steps and their outcomes
|
|
66
|
+
- Current step and its state
|
|
67
|
+
- Remaining steps
|
|
68
|
+
- Key decisions made and their rationale
|
|
69
|
+
3. **Reset**: Start fresh session with handoff document as input
|
|
70
|
+
|
|
71
|
+
Context reset preserves decision quality by avoiding the information loss inherent in compaction. Based on Anthropic's finding that models experience "context anxiety" — prematurely concluding tasks due to perceived token limits.
|
|
72
|
+
|
|
73
|
+
### When to Use
|
|
74
|
+
|
|
75
|
+
| Condition | Strategy |
|
|
76
|
+
|-----------|----------|
|
|
77
|
+
| Context < 60% | Continue normally |
|
|
78
|
+
| Context 60-80% | Consider `/compact` |
|
|
79
|
+
| Context > 80% OR duration > 30min | Context reset recommended |
|
|
80
|
+
| Repeated compaction in same session | Context reset required |
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: supabase-postgres-best-practices
|
|
3
|
+
description: PostgreSQL performance optimization guidelines from Supabase. Apply when writing SQL, designing schemas, configuring RLS, or optimizing database performance.
|
|
4
|
+
scope: core
|
|
5
|
+
user-invocable: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Supabase PostgreSQL Best Practices
|
|
9
|
+
|
|
10
|
+
> Source: https://github.com/supabase/agent-skills
|
|
11
|
+
|
|
12
|
+
### Rule Categories (Prioritized by Impact)
|
|
13
|
+
|
|
14
|
+
| Priority | Category | Impact | Prefix |
|
|
15
|
+
|----------|----------|--------|--------|
|
|
16
|
+
| 1 | Query Performance | CRITICAL | query- |
|
|
17
|
+
| 2 | Connection Management | CRITICAL | conn- |
|
|
18
|
+
| 3 | Security & RLS | CRITICAL | security- |
|
|
19
|
+
| 4 | Schema Design | HIGH | schema- |
|
|
20
|
+
| 5 | Concurrency & Locking | MEDIUM-HIGH | lock- |
|
|
21
|
+
| 6 | Data Access Patterns | MEDIUM | data- |
|
|
22
|
+
| 7 | Monitoring & Diagnostics | LOW-MEDIUM | monitor- |
|
|
23
|
+
| 8 | Advanced Features | LOW | advanced- |
|
|
24
|
+
|
|
25
|
+
### 1. Query Performance (CRITICAL)
|
|
26
|
+
|
|
27
|
+
- Always add indexes for columns used in WHERE, JOIN, and ORDER BY clauses
|
|
28
|
+
- Use partial indexes for filtered queries: `CREATE INDEX idx_active ON users(email) WHERE active = true`
|
|
29
|
+
- Prefer `EXISTS` over `IN` for subqueries
|
|
30
|
+
- Avoid `SELECT *` - specify only needed columns
|
|
31
|
+
- Use `EXPLAIN ANALYZE` to verify query plans
|
|
32
|
+
- Add composite indexes for multi-column queries (column order matters)
|
|
33
|
+
- Use covering indexes to avoid heap lookups
|
|
34
|
+
|
|
35
|
+
### 2. Connection Management (CRITICAL)
|
|
36
|
+
|
|
37
|
+
- Use Supabase connection pooler (PgBouncer) for serverless/edge functions
|
|
38
|
+
- Use transaction mode for short-lived queries
|
|
39
|
+
- Use session mode only when needed (prepared statements, advisory locks)
|
|
40
|
+
- Set appropriate pool size limits
|
|
41
|
+
- Release connections promptly - avoid holding connections during external calls
|
|
42
|
+
- Use connection timeouts to prevent leaks
|
|
43
|
+
|
|
44
|
+
### 3. Security & RLS (CRITICAL)
|
|
45
|
+
|
|
46
|
+
- Enable RLS on ALL tables exposed via Supabase API
|
|
47
|
+
- Write policies using `auth.uid()` and `auth.jwt()`
|
|
48
|
+
- Avoid functions marked `SECURITY DEFINER` unless necessary
|
|
49
|
+
- Use `SECURITY INVOKER` as default for functions
|
|
50
|
+
- Never trust client-side data - validate in policies
|
|
51
|
+
- Test RLS policies with different roles
|
|
52
|
+
- Use `USING` for read policies, `WITH CHECK` for write policies
|
|
53
|
+
|
|
54
|
+
### 4. Schema Design (HIGH)
|
|
55
|
+
|
|
56
|
+
- Use appropriate data types (e.g., `uuid` for IDs, `timestamptz` for times)
|
|
57
|
+
- Add `NOT NULL` constraints where applicable
|
|
58
|
+
- Use `CHECK` constraints for data validation
|
|
59
|
+
- Prefer `text` over `varchar(n)` unless length limit is meaningful
|
|
60
|
+
- Use partial indexes instead of filtered queries
|
|
61
|
+
- Design schemas for the access patterns, not just the data model
|
|
62
|
+
|
|
63
|
+
### 5. Concurrency & Locking (MEDIUM-HIGH)
|
|
64
|
+
|
|
65
|
+
- Use `SELECT ... FOR UPDATE SKIP LOCKED` for queue patterns
|
|
66
|
+
- Keep transactions short to minimize lock contention
|
|
67
|
+
- Avoid long-running transactions during migrations
|
|
68
|
+
- Use advisory locks for application-level coordination
|
|
69
|
+
- Be aware of lock ordering to prevent deadlocks
|
|
70
|
+
|
|
71
|
+
### 6. Data Access Patterns (MEDIUM)
|
|
72
|
+
|
|
73
|
+
- Use Supabase client libraries for standard CRUD
|
|
74
|
+
- Use RPC functions for complex operations
|
|
75
|
+
- Implement pagination with cursor-based approach (not OFFSET)
|
|
76
|
+
- Use realtime subscriptions judiciously
|
|
77
|
+
- Batch operations where possible
|
|
78
|
+
|
|
79
|
+
### 7. Monitoring & Diagnostics (LOW-MEDIUM)
|
|
80
|
+
|
|
81
|
+
- Monitor `pg_stat_statements` for slow queries
|
|
82
|
+
- Check `pg_stat_user_indexes` for unused indexes
|
|
83
|
+
- Monitor connection count and pool utilization
|
|
84
|
+
- Set up alerts for long-running queries
|
|
85
|
+
- Review lock waits periodically
|
|
86
|
+
|
|
87
|
+
### 8. Advanced Features (LOW)
|
|
88
|
+
|
|
89
|
+
- Use CTEs for readable complex queries (but note CTE materialization)
|
|
90
|
+
- Leverage PostgreSQL extensions (pgvector, pg_trgm, etc.)
|
|
91
|
+
- Use generated columns for computed values
|
|
92
|
+
- Consider table partitioning for very large tables
|
|
93
|
+
- Use LISTEN/NOTIFY for event-driven patterns
|
|
94
|
+
|
|
95
|
+
### References
|
|
96
|
+
- Supabase Documentation: https://supabase.com/docs
|
|
97
|
+
- PostgreSQL Official Docs: https://www.postgresql.org/docs/
|
|
98
|
+
- Supabase Agent Skills: https://github.com/supabase/agent-skills
|
|
99
|
+
|
|
100
|
+
For detailed rule files with specific examples, see templates/guides/supabase-postgres/.
|