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,120 @@
|
|
|
1
|
+
# Flutter Security Guide
|
|
2
|
+
|
|
3
|
+
> Reference: OWASP Mobile Top 10 (2024), Flutter Official Documentation
|
|
4
|
+
|
|
5
|
+
## OWASP Mobile Top 10 Mapping
|
|
6
|
+
|
|
7
|
+
### M1 — Improper Credential Usage
|
|
8
|
+
|
|
9
|
+
- Never hardcode API keys, tokens, or credentials in source code
|
|
10
|
+
- Backend proxy pattern: route ALL sensitive API calls through server
|
|
11
|
+
- `--dart-define-from-file=.env` is for NON-SECRET build config only (values are extractable from binary)
|
|
12
|
+
- Credential rotation: implement token refresh with `dio` interceptor
|
|
13
|
+
- OAuth2 flow: use `flutter_appauth` for PKCE-based authentication
|
|
14
|
+
|
|
15
|
+
### M2 — Inadequate Supply Chain Security
|
|
16
|
+
|
|
17
|
+
- Run `dart pub audit` before every release to check for known vulnerabilities
|
|
18
|
+
- Pin exact versions in `pubspec.yaml` for production (`package: 1.2.3` not `package: ^1.2.3`)
|
|
19
|
+
- Verify package publisher on pub.dev (look for verified publisher badge)
|
|
20
|
+
- Review transitive dependencies: `dart pub deps --style=compact`
|
|
21
|
+
- Avoid packages with no recent updates (> 12 months without commits)
|
|
22
|
+
|
|
23
|
+
### M3 — Insecure Authentication/Authorization
|
|
24
|
+
|
|
25
|
+
- Biometric authentication: `local_auth` package with `BiometricType.fingerprint` / `BiometricType.face`
|
|
26
|
+
- Session management: implement token expiry checking before API calls
|
|
27
|
+
- JWT client-side validation: verify `exp`, `aud`, `iss` claims before using tokens
|
|
28
|
+
- Re-authentication: require biometric/PIN for sensitive operations (payment, profile changes)
|
|
29
|
+
- Deep link auth: validate authentication state before processing deep link navigation
|
|
30
|
+
|
|
31
|
+
### M4 — Insufficient Input/Output Validation
|
|
32
|
+
|
|
33
|
+
- Validate ALL deep link URI parameters with RegExp allowlists
|
|
34
|
+
- Sanitize user input before displaying in WebView (`flutter_inappwebview`)
|
|
35
|
+
- Use `Uri.parse()` with try-catch, never trust raw string URLs
|
|
36
|
+
- Output encoding: escape HTML entities when rendering user content
|
|
37
|
+
- Form validation: use `TextFormField` validators, never trust client-side validation alone
|
|
38
|
+
|
|
39
|
+
### M5 — Insecure Communication
|
|
40
|
+
|
|
41
|
+
- Certificate pinning (SPKI): use `dio` with custom `SecurityContext`
|
|
42
|
+
- Extract SPKI hash: `openssl s_client -connect host:443 | openssl x509 -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -binary | base64`
|
|
43
|
+
- Include backup pins for certificate rotation
|
|
44
|
+
- Android: `network_security_config.xml` with `cleartextTrafficPermitted=false`
|
|
45
|
+
- iOS: ATS enabled (`NSAllowsArbitraryLoads=false`), never override in production
|
|
46
|
+
|
|
47
|
+
### M6 — Inadequate Privacy Controls
|
|
48
|
+
|
|
49
|
+
- Request minimum platform permissions (camera, location, contacts)
|
|
50
|
+
- iOS: provide usage description strings in Info.plist for every permission
|
|
51
|
+
- Android: use runtime permissions, respect "Don't ask again"
|
|
52
|
+
- Data minimization: only collect and store data that is necessary
|
|
53
|
+
- GDPR/CCPA: implement data export and deletion capabilities
|
|
54
|
+
|
|
55
|
+
### M7 — Insufficient Binary Protections
|
|
56
|
+
|
|
57
|
+
- Release builds: `flutter build --obfuscate --split-debug-info=debug-info/`
|
|
58
|
+
- Store debug symbols securely for crash reporting (Crashlytics, Sentry)
|
|
59
|
+
- Android ProGuard: configure `android/app/proguard-rules.pro`
|
|
60
|
+
- Note: `--obfuscate` does NOT apply to `flutter build web` (JS minification is the web equivalent)
|
|
61
|
+
- Anti-tampering: consider `flutter_jailbreak_detection` for integrity checks
|
|
62
|
+
|
|
63
|
+
### M8 — Security Misconfiguration
|
|
64
|
+
|
|
65
|
+
- Android: set `android:debuggable="false"` in release manifest
|
|
66
|
+
- Android: set `android:allowBackup="false"` to prevent ADB data extraction
|
|
67
|
+
- iOS: enable data protection with `NSFileProtectionComplete`
|
|
68
|
+
- Remove all debug logging in release: guard with `kDebugMode`
|
|
69
|
+
- Firebase: secure `google-services.json` / `GoogleService-Info.plist` (add to .gitignore)
|
|
70
|
+
|
|
71
|
+
### M9 — Insecure Data Storage
|
|
72
|
+
|
|
73
|
+
- Sensitive data: `flutter_secure_storage` v10+ (iOS Keychain / Android EncryptedSharedPreferences)
|
|
74
|
+
- iOS: `IOSOptions(accessibility: KeychainAccessibility.first_unlock_this_device)`
|
|
75
|
+
- Android: `AndroidOptions(encryptedSharedPreferences: true)`
|
|
76
|
+
- Web WARNING: `flutter_secure_storage` uses localStorage on Web (XSS vulnerable) — use HttpOnly cookies or in-memory storage
|
|
77
|
+
- Never use `SharedPreferences` for tokens, PII, or credentials
|
|
78
|
+
- Screenshot protection: Android `FLAG_SECURE` via `flutter_windowmanager`
|
|
79
|
+
|
|
80
|
+
### M10 — Insufficient Cryptography
|
|
81
|
+
|
|
82
|
+
- Use `pointycastle` or `cryptography` package for custom crypto operations
|
|
83
|
+
- Avoid: MD5, SHA-1, DES, ECB mode, hardcoded IVs/keys
|
|
84
|
+
- Prefer: AES-256-GCM for symmetric, RSA-OAEP or ECDSA for asymmetric
|
|
85
|
+
- Key storage: always delegate to platform Keychain/Keystore, never store in app data
|
|
86
|
+
- Random number generation: use `Random.secure()` for security-sensitive values
|
|
87
|
+
|
|
88
|
+
## Platform-Specific Security
|
|
89
|
+
|
|
90
|
+
### iOS
|
|
91
|
+
|
|
92
|
+
- Keychain with Secure Enclave: `IOSOptions(useSecureEnclave: true)` for high-value data
|
|
93
|
+
- ATS enforcement: never add `NSAllowsArbitraryLoads` exception for production
|
|
94
|
+
- Jailbreak detection: `flutter_jailbreak_detection` package
|
|
95
|
+
|
|
96
|
+
### Android
|
|
97
|
+
|
|
98
|
+
- Keystore-backed encryption via `EncryptedSharedPreferences`
|
|
99
|
+
- Network security config: pin certificates, block cleartext
|
|
100
|
+
- Root detection: `flutter_jailbreak_detection` or `safe_device`
|
|
101
|
+
- `allowBackup=false` in AndroidManifest.xml
|
|
102
|
+
|
|
103
|
+
### Web
|
|
104
|
+
|
|
105
|
+
- CSP headers: configure on the server hosting Flutter web app
|
|
106
|
+
- Avoid storing sensitive data in localStorage or sessionStorage
|
|
107
|
+
- Use HttpOnly, Secure, SameSite cookies for authentication tokens
|
|
108
|
+
- XSS prevention: sanitize all user-generated content before rendering
|
|
109
|
+
|
|
110
|
+
## Package Recommendations
|
|
111
|
+
|
|
112
|
+
| Category | Package | Notes |
|
|
113
|
+
|----------|---------|-------|
|
|
114
|
+
| Secure Storage | `flutter_secure_storage` | Keychain/Keystore, v10+; Web: localStorage (XSS risk) |
|
|
115
|
+
| OAuth2 / PKCE | `flutter_appauth` | PKCE-based auth flows |
|
|
116
|
+
| Biometrics | `local_auth` | Fingerprint, Face ID |
|
|
117
|
+
| HTTP (pinning) | `dio` | Custom `SecurityContext` for certificate pinning |
|
|
118
|
+
| Crypto | `cryptography` | AES-GCM, RSA-OAEP, ECDSA |
|
|
119
|
+
| Integrity check | `flutter_jailbreak_detection` | Root/jailbreak detection |
|
|
120
|
+
| Screenshot protect | `flutter_windowmanager` | Android `FLAG_SECURE` |
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Flutter State Management
|
|
2
|
+
|
|
3
|
+
> Reference: riverpod.dev, bloclibrary.dev, docs.flutter.dev/data-and-backend/state-mgmt
|
|
4
|
+
|
|
5
|
+
## Selection Guide
|
|
6
|
+
|
|
7
|
+
| Approach | Complexity | Scalability | Best For |
|
|
8
|
+
|----------|-----------|-------------|----------|
|
|
9
|
+
| **Riverpod 3.0** | Medium | Excellent | New projects (default) |
|
|
10
|
+
| **BLoC 9.0** | High | Excellent | Enterprise, regulated industries |
|
|
11
|
+
| **Provider** | Low | Moderate | Simple apps, learning |
|
|
12
|
+
| **setState** | Low | Poor | Ephemeral local UI state |
|
|
13
|
+
| **GetX** | Low | Poor | **AVOID** for new projects |
|
|
14
|
+
|
|
15
|
+
## Riverpod 3.0 (Default)
|
|
16
|
+
|
|
17
|
+
### Provider Types
|
|
18
|
+
|
|
19
|
+
```dart
|
|
20
|
+
// Simple value provider
|
|
21
|
+
@riverpod
|
|
22
|
+
String greeting(Ref ref) => 'Hello, World!';
|
|
23
|
+
|
|
24
|
+
// Async data provider
|
|
25
|
+
@riverpod
|
|
26
|
+
Future<List<Product>> products(Ref ref) async {
|
|
27
|
+
final api = ref.watch(apiClientProvider);
|
|
28
|
+
return api.getProducts();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Stateful notifier
|
|
32
|
+
@riverpod
|
|
33
|
+
class Counter extends _$Counter {
|
|
34
|
+
@override
|
|
35
|
+
int build() => 0;
|
|
36
|
+
|
|
37
|
+
void increment() => state++;
|
|
38
|
+
void decrement() => state--;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Async stateful notifier
|
|
42
|
+
@riverpod
|
|
43
|
+
class ProductList extends _$ProductList {
|
|
44
|
+
@override
|
|
45
|
+
Future<List<Product>> build() async {
|
|
46
|
+
return ref.watch(productRepositoryProvider).getAll();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Future<void> addProduct(Product product) async {
|
|
50
|
+
await ref.read(productRepositoryProvider).add(product);
|
|
51
|
+
ref.invalidateSelf();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### UI Consumption
|
|
57
|
+
|
|
58
|
+
```dart
|
|
59
|
+
class ProductListScreen extends ConsumerWidget {
|
|
60
|
+
@override
|
|
61
|
+
Widget build(BuildContext context, WidgetRef ref) {
|
|
62
|
+
final state = ref.watch(productListProvider);
|
|
63
|
+
|
|
64
|
+
return state.when(
|
|
65
|
+
loading: () => const CircularProgressIndicator(),
|
|
66
|
+
error: (e, st) => Text('Error: $e'),
|
|
67
|
+
data: (products) => ListView.builder(
|
|
68
|
+
itemCount: products.length,
|
|
69
|
+
itemBuilder: (_, i) => ProductCard(products[i]),
|
|
70
|
+
),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Key Rules
|
|
77
|
+
|
|
78
|
+
- `ref.watch()` in build methods only (reactive)
|
|
79
|
+
- `ref.read()` in callbacks and event handlers (one-time)
|
|
80
|
+
- Never call `ref.watch()` inside non-build methods
|
|
81
|
+
- Use `family` for parameterized providers
|
|
82
|
+
- Use `keepAlive` sparingly (expensive computations only)
|
|
83
|
+
|
|
84
|
+
## BLoC 9.0 (Enterprise)
|
|
85
|
+
|
|
86
|
+
### Cubit (Simple)
|
|
87
|
+
|
|
88
|
+
```dart
|
|
89
|
+
class CounterCubit extends Cubit<int> {
|
|
90
|
+
CounterCubit() : super(0);
|
|
91
|
+
|
|
92
|
+
void increment() => emit(state + 1);
|
|
93
|
+
void decrement() => emit(state - 1);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// UI
|
|
97
|
+
BlocBuilder<CounterCubit, int>(
|
|
98
|
+
builder: (context, count) => Text('$count'),
|
|
99
|
+
)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Bloc (Full Events)
|
|
103
|
+
|
|
104
|
+
```dart
|
|
105
|
+
// Events
|
|
106
|
+
sealed class AuthEvent {}
|
|
107
|
+
class LoginRequested extends AuthEvent {
|
|
108
|
+
final String email, password;
|
|
109
|
+
LoginRequested(this.email, this.password);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// States
|
|
113
|
+
sealed class AuthState {}
|
|
114
|
+
class AuthInitial extends AuthState {}
|
|
115
|
+
class AuthLoading extends AuthState {}
|
|
116
|
+
class AuthSuccess extends AuthState { final User user; AuthSuccess(this.user); }
|
|
117
|
+
class AuthFailure extends AuthState { final String error; AuthFailure(this.error); }
|
|
118
|
+
|
|
119
|
+
// Bloc
|
|
120
|
+
class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
|
121
|
+
AuthBloc(this._authRepo) : super(AuthInitial()) {
|
|
122
|
+
on<LoginRequested>(_onLogin);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
final AuthRepository _authRepo;
|
|
126
|
+
|
|
127
|
+
Future<void> _onLogin(LoginRequested event, Emitter<AuthState> emit) async {
|
|
128
|
+
emit(AuthLoading());
|
|
129
|
+
final result = await _authRepo.login(event.email, event.password);
|
|
130
|
+
switch (result) {
|
|
131
|
+
case Ok(:final value): emit(AuthSuccess(value));
|
|
132
|
+
case Error(:final error): emit(AuthFailure(error.toString()));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Key Rules
|
|
139
|
+
|
|
140
|
+
- One event per user action
|
|
141
|
+
- Cubit for simple state, Bloc when audit trail needed
|
|
142
|
+
- Never emit state in constructor
|
|
143
|
+
- `BlocListener` for side effects, `BlocBuilder` for UI
|
|
144
|
+
- Cancel subscriptions in `close()`
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Flutter Testing
|
|
2
|
+
|
|
3
|
+
> Reference: docs.flutter.dev/testing/overview
|
|
4
|
+
|
|
5
|
+
## Test Pyramid
|
|
6
|
+
|
|
7
|
+
| Level | Speed | Confidence | Tool |
|
|
8
|
+
|-------|-------|------------|------|
|
|
9
|
+
| Unit | Fast | Low | `flutter_test` |
|
|
10
|
+
| Widget | Fast | Medium | `testWidgets`, `WidgetTester` |
|
|
11
|
+
| Integration | Slow | High | `integration_test` package |
|
|
12
|
+
| Golden | Fast | Visual | `matchesGoldenFile()` |
|
|
13
|
+
|
|
14
|
+
## Widget Tests (Primary)
|
|
15
|
+
|
|
16
|
+
```dart
|
|
17
|
+
testWidgets('ProductCard displays name and price', (tester) async {
|
|
18
|
+
await tester.pumpWidget(
|
|
19
|
+
MaterialApp(
|
|
20
|
+
home: ProductCard(
|
|
21
|
+
product: Product(id: 1, name: 'Widget', price: 9.99),
|
|
22
|
+
),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
expect(find.text('Widget'), findsOneWidget);
|
|
27
|
+
expect(find.text('\$9.99'), findsOneWidget);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
testWidgets('tapping add button calls onAdd', (tester) async {
|
|
31
|
+
var called = false;
|
|
32
|
+
await tester.pumpWidget(
|
|
33
|
+
MaterialApp(
|
|
34
|
+
home: AddButton(onAdd: () => called = true),
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
await tester.tap(find.byType(ElevatedButton));
|
|
39
|
+
expect(called, isTrue);
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Riverpod Testing
|
|
44
|
+
|
|
45
|
+
```dart
|
|
46
|
+
testWidgets('ProductListScreen shows products', (tester) async {
|
|
47
|
+
await tester.pumpWidget(
|
|
48
|
+
ProviderScope(
|
|
49
|
+
overrides: [
|
|
50
|
+
productListProvider.overrideWith(
|
|
51
|
+
() => FakeProductListNotifier(),
|
|
52
|
+
),
|
|
53
|
+
],
|
|
54
|
+
child: const MaterialApp(home: ProductListScreen()),
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
await tester.pumpAndSettle();
|
|
59
|
+
expect(find.byType(ProductCard), findsNWidgets(3));
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## BLoC Testing
|
|
64
|
+
|
|
65
|
+
```dart
|
|
66
|
+
blocTest<CounterCubit, int>(
|
|
67
|
+
'increment emits [1] when initial state is 0',
|
|
68
|
+
build: () => CounterCubit(),
|
|
69
|
+
act: (cubit) => cubit.increment(),
|
|
70
|
+
expect: () => [1],
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
blocTest<AuthBloc, AuthState>(
|
|
74
|
+
'login emits [loading, success] on valid credentials',
|
|
75
|
+
build: () => AuthBloc(FakeAuthRepository()),
|
|
76
|
+
act: (bloc) => bloc.add(LoginRequested('user@test.com', 'pass123')),
|
|
77
|
+
expect: () => [
|
|
78
|
+
isA<AuthLoading>(),
|
|
79
|
+
isA<AuthSuccess>(),
|
|
80
|
+
],
|
|
81
|
+
);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Mocking with mocktail
|
|
85
|
+
|
|
86
|
+
```dart
|
|
87
|
+
class MockProductRepository extends Mock implements ProductRepository {}
|
|
88
|
+
|
|
89
|
+
void main() {
|
|
90
|
+
late MockProductRepository mockRepo;
|
|
91
|
+
|
|
92
|
+
setUp(() {
|
|
93
|
+
mockRepo = MockProductRepository();
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('getProducts returns list', () async {
|
|
97
|
+
when(() => mockRepo.getAll()).thenAnswer(
|
|
98
|
+
(_) async => Ok([Product(id: 1, name: 'Test', price: 9.99)]),
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
final result = await mockRepo.getAll();
|
|
102
|
+
expect(result, isA<Ok<List<Product>>>());
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Golden Tests
|
|
108
|
+
|
|
109
|
+
```dart
|
|
110
|
+
testWidgets('ProductCard matches golden', (tester) async {
|
|
111
|
+
await tester.pumpWidget(
|
|
112
|
+
MaterialApp(
|
|
113
|
+
home: ProductCard(product: testProduct),
|
|
114
|
+
),
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
await expectLater(
|
|
118
|
+
find.byType(ProductCard),
|
|
119
|
+
matchesGoldenFile('goldens/product_card.png'),
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Update goldens: flutter test --update-goldens
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Accessibility Testing
|
|
127
|
+
|
|
128
|
+
```dart
|
|
129
|
+
testWidgets('meets accessibility guidelines', (tester) async {
|
|
130
|
+
final handle = tester.ensureSemantics();
|
|
131
|
+
await tester.pumpWidget(const MaterialApp(home: MyScreen()));
|
|
132
|
+
|
|
133
|
+
await expectLater(tester, meetsGuideline(androidTapTargetGuideline));
|
|
134
|
+
await expectLater(tester, meetsGuideline(iOSTapTargetGuideline));
|
|
135
|
+
await expectLater(tester, meetsGuideline(textContrastGuideline));
|
|
136
|
+
|
|
137
|
+
handle.dispose();
|
|
138
|
+
});
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Test Organization
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
test/
|
|
145
|
+
├── unit/
|
|
146
|
+
│ ├── repositories/product_repository_test.dart
|
|
147
|
+
│ └── viewmodels/home_viewmodel_test.dart
|
|
148
|
+
├── widget/
|
|
149
|
+
│ ├── screens/product_list_screen_test.dart
|
|
150
|
+
│ └── widgets/product_card_test.dart
|
|
151
|
+
├── goldens/
|
|
152
|
+
│ └── product_card.png
|
|
153
|
+
integration_test/
|
|
154
|
+
└── app_test.dart
|
|
155
|
+
```
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Git Worktree Workflow
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Git worktrees allow you to check out multiple branches simultaneously in separate directories, each with its own working tree. This eliminates the need to stash changes or commit incomplete work when switching between branches.
|
|
6
|
+
|
|
7
|
+
**Key benefits:**
|
|
8
|
+
- Work on `develop` and `team-plugin` simultaneously without context switching
|
|
9
|
+
- Keep long-running feature branches open alongside hotfix branches
|
|
10
|
+
- Run tests on one branch while coding on another
|
|
11
|
+
|
|
12
|
+
## Recommended Directory Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
~/workspace/projects/
|
|
16
|
+
├── oh-my-customcodex/ # Main worktree (develop)
|
|
17
|
+
├── oh-my-customcodex-team-plugin/ # team-plugin branch
|
|
18
|
+
└── oh-my-customcodex-release/ # release/* branches
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Convention: `{repo-name}-{branch-suffix}` as sibling directories to the main worktree.
|
|
22
|
+
|
|
23
|
+
## Basic Commands
|
|
24
|
+
|
|
25
|
+
### Create a worktree
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# From the main repository directory
|
|
29
|
+
cd ~/workspace/projects/oh-my-customcodex
|
|
30
|
+
|
|
31
|
+
# Attach to an existing remote branch
|
|
32
|
+
git worktree add ../oh-my-customcodex-team-plugin team-plugin
|
|
33
|
+
|
|
34
|
+
# Create a new branch and worktree together
|
|
35
|
+
git worktree add ../oh-my-customcodex-release release/v0.43.0
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### List worktrees
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git worktree list
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Output:
|
|
45
|
+
```
|
|
46
|
+
/Users/you/workspace/projects/oh-my-customcodex abc1234 [develop]
|
|
47
|
+
/Users/you/workspace/projects/oh-my-customcodex-team-plugin def5678 [team-plugin]
|
|
48
|
+
/Users/you/workspace/projects/oh-my-customcodex-release ghi9012 [release/v0.43.0]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Remove a worktree
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Remove after branch is merged
|
|
55
|
+
git worktree remove ../oh-my-customcodex-release
|
|
56
|
+
|
|
57
|
+
# Clean up stale worktree references
|
|
58
|
+
git worktree prune
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Move a worktree
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git worktree move ../oh-my-customcodex-release ../oh-my-customcodex-hotfix
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Runtime Integration
|
|
68
|
+
|
|
69
|
+
### Built-in Worktree Tools
|
|
70
|
+
|
|
71
|
+
The runtime provides `EnterWorktree` and `ExitWorktree` tools for session-scoped worktree management:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
EnterWorktree(name: "feature-x")
|
|
75
|
+
# Creates .claude/worktrees/feature-x with a new branch based on HEAD
|
|
76
|
+
# Session working directory switches to the worktree
|
|
77
|
+
|
|
78
|
+
EnterWorktree(path: "/absolute/path/to/existing-worktree")
|
|
79
|
+
# Switches into an existing worktree of the current repository (v2.1.105+)
|
|
80
|
+
# No new branch is created — uses the worktree as-is
|
|
81
|
+
|
|
82
|
+
ExitWorktree()
|
|
83
|
+
# Returns to the main repository
|
|
84
|
+
# Prompts to keep or remove the worktree
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Agent Isolation Mode
|
|
88
|
+
|
|
89
|
+
Agents can use `isolation: worktree` in their frontmatter to run in an isolated git worktree:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
---
|
|
93
|
+
name: my-agent
|
|
94
|
+
isolation: worktree
|
|
95
|
+
---
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This gives the agent a separate working copy, enabling safe code changes with rollback capability. The worktree is automatically created and cleaned up by the agent lifecycle.
|
|
99
|
+
|
|
100
|
+
### Superpowers Skill
|
|
101
|
+
|
|
102
|
+
The `superpowers` plugin includes a `using-git-worktrees` skill with additional patterns for worktree-based workflows. Reference it for advanced use cases like parallel CI testing and multi-branch refactoring.
|
|
103
|
+
|
|
104
|
+
## Caveats
|
|
105
|
+
|
|
106
|
+
### Same branch restriction
|
|
107
|
+
|
|
108
|
+
A branch cannot be checked out in multiple worktrees simultaneously. Attempting this will fail:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# ERROR: 'develop' is already checked out at '~/workspace/projects/oh-my-customcodex'
|
|
112
|
+
git worktree add ../oh-my-customcodex-dev2 develop
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Independent dependencies
|
|
116
|
+
|
|
117
|
+
Each worktree has its own `node_modules`. Run package installation separately:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
cd ../oh-my-customcodex-team-plugin
|
|
121
|
+
bun install
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Gitignored files
|
|
125
|
+
|
|
126
|
+
Files under `.claude/` are gitignored in this project. When adding new `.claude/` files, use `git add -f`:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
git add -f .claude/agents/new-agent.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Shared git objects
|
|
133
|
+
|
|
134
|
+
All worktrees share the same `.git` object store. Operations like `git gc` and `git fetch` affect all worktrees.
|
|
135
|
+
|
|
136
|
+
### Worktree-local files
|
|
137
|
+
|
|
138
|
+
Files listed in `.gitignore` (like `node_modules/`, `.env`) are independent per worktree. Configuration files that are not tracked must be set up separately in each worktree.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Go Backend Guide
|
|
2
|
+
|
|
3
|
+
metadata:
|
|
4
|
+
name: go-backend
|
|
5
|
+
description: Go backend development reference documentation
|
|
6
|
+
|
|
7
|
+
source:
|
|
8
|
+
type: external
|
|
9
|
+
origin: various
|
|
10
|
+
urls:
|
|
11
|
+
- https://go.dev/doc/effective_go
|
|
12
|
+
- https://github.com/golang-standards/project-layout
|
|
13
|
+
- https://github.com/uber-go/guide/blob/master/style.md
|
|
14
|
+
last_fetched: "2026-01-22"
|
|
15
|
+
|
|
16
|
+
documents:
|
|
17
|
+
- name: uber-style
|
|
18
|
+
path: ./uber-style.md
|
|
19
|
+
description: Uber Go style guide
|
|
20
|
+
|
|
21
|
+
- name: project-layout
|
|
22
|
+
path: ./project-layout.md
|
|
23
|
+
description: Standard Go project layout
|
|
24
|
+
|
|
25
|
+
used_by:
|
|
26
|
+
- be-go-backend-expert
|