cc-devflow 1.0.1
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/.claude/CLAUDE.md +83 -0
- package/.claude/agents/architecture-designer.md +443 -0
- package/.claude/agents/bug-analyzer.md +382 -0
- package/.claude/agents/checklist-agent.md +175 -0
- package/.claude/agents/clarify-analyst.md +50 -0
- package/.claude/agents/code-reviewer.md +71 -0
- package/.claude/agents/codex-analyzer.md +39 -0
- package/.claude/agents/compatibility-checker.md +580 -0
- package/.claude/agents/consistency-checker.md +532 -0
- package/.claude/agents/impact-analyzer.md +441 -0
- package/.claude/agents/planner.md +230 -0
- package/.claude/agents/prd-writer.md +320 -0
- package/.claude/agents/project-guidelines-generator.md +1329 -0
- package/.claude/agents/qa-tester.md +313 -0
- package/.claude/agents/release-manager.md +295 -0
- package/.claude/agents/security-reviewer.md +314 -0
- package/.claude/agents/style-guide-generator.md +458 -0
- package/.claude/agents/tech-architect.md +516 -0
- package/.claude/agents/ui-designer.md +485 -0
- package/.claude/commands/code-review-high.md +58 -0
- package/.claude/commands/core-architecture.md +429 -0
- package/.claude/commands/core-guidelines.md +486 -0
- package/.claude/commands/core-roadmap.md +439 -0
- package/.claude/commands/core-style.md +293 -0
- package/.claude/commands/flow-archive.md +245 -0
- package/.claude/commands/flow-checklist.md +260 -0
- package/.claude/commands/flow-clarify.md +136 -0
- package/.claude/commands/flow-constitution.md +82 -0
- package/.claude/commands/flow-dev.md +134 -0
- package/.claude/commands/flow-epic.md +150 -0
- package/.claude/commands/flow-fix.md +104 -0
- package/.claude/commands/flow-ideate.md +214 -0
- package/.claude/commands/flow-init.md +313 -0
- package/.claude/commands/flow-new.md +394 -0
- package/.claude/commands/flow-prd.md +131 -0
- package/.claude/commands/flow-qa.md +93 -0
- package/.claude/commands/flow-release.md +92 -0
- package/.claude/commands/flow-restart.md +98 -0
- package/.claude/commands/flow-status.md +64 -0
- package/.claude/commands/flow-tech.md +142 -0
- package/.claude/commands/flow-ui.md +189 -0
- package/.claude/commands/flow-update.md +111 -0
- package/.claude/commands/flow-upgrade.md +115 -0
- package/.claude/commands/flow-verify.md +96 -0
- package/.claude/commands/problem-analyzer.md +60 -0
- package/.claude/config/quality-rules.yml +161 -0
- package/.claude/docs/SPEC_KIT_CONSTITUTION_ANALYSIS.md +426 -0
- package/.claude/docs/design/consistency-conflict-detection-algorithms.md +658 -0
- package/.claude/docs/design/intent-driven-input-design.md +380 -0
- package/.claude/docs/design/prd-version-management-design.md +437 -0
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +117 -0
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +151 -0
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +188 -0
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +338 -0
- package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +633 -0
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +261 -0
- package/.claude/docs/templates/CHECKLIST_TEMPLATE.md +52 -0
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +206 -0
- package/.claude/docs/templates/CODE_REVIEW_TEMPLATE.md +71 -0
- package/.claude/docs/templates/EPIC_TEMPLATE.md +805 -0
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +213 -0
- package/.claude/docs/templates/INTENT_CLARIFICATION_TEMPLATE.md +57 -0
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +148 -0
- package/.claude/docs/templates/PRD_TEMPLATE.md +562 -0
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +276 -0
- package/.claude/docs/templates/REVIEW-HIGH.md +57 -0
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +198 -0
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +310 -0
- package/.claude/docs/templates/STYLE_TEMPLATE.md +1266 -0
- package/.claude/docs/templates/TASKS_TEMPLATE.md +523 -0
- package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +1019 -0
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +1436 -0
- package/.claude/guides/agent-guides/agent-coordination-guide.md +459 -0
- package/.claude/guides/project-guidelines-system.md +463 -0
- package/.claude/guides/technical-guides/datetime-handling-guide.md +563 -0
- package/.claude/guides/technical-guides/git-github-guide.md +642 -0
- package/.claude/guides/technical-guides/test-execution-guide.md +618 -0
- package/.claude/guides/workflow-guides/bug-fix-orchestrator.md +217 -0
- package/.claude/guides/workflow-guides/flow-orchestrator.md +282 -0
- package/.claude/hooks/checklist-gate.js +397 -0
- package/.claude/hooks/error-handling-reminder.sh +12 -0
- package/.claude/hooks/error-handling-reminder.ts +459 -0
- package/.claude/hooks/post-tool-use-tracker.sh +280 -0
- package/.claude/hooks/pre-tool-use-guardrail.sh +36 -0
- package/.claude/hooks/pre-tool-use-guardrail.ts +342 -0
- package/.claude/hooks/skill-activation-prompt.sh +36 -0
- package/.claude/hooks/skill-activation-prompt.ts +214 -0
- package/.claude/hooks/state/skills-used-test-guard.json +3 -0
- package/.claude/rules/devflow-conventions.md +305 -0
- package/.claude/rules/project-constitution.md +748 -0
- package/.claude/schemas/constitution.schema.json +43 -0
- package/.claude/scripts/analyze-upgrade-impact.sh +200 -0
- package/.claude/scripts/archive-requirement.sh +351 -0
- package/.claude/scripts/calculate-checklist-completion.sh +243 -0
- package/.claude/scripts/calculate-quarter.sh +206 -0
- package/.claude/scripts/check-dependencies.sh +409 -0
- package/.claude/scripts/check-prerequisites.sh +232 -0
- package/.claude/scripts/check-task-status.sh +264 -0
- package/.claude/scripts/checklist-errors.sh +131 -0
- package/.claude/scripts/common.sh +570 -0
- package/.claude/scripts/consolidate-research.sh +182 -0
- package/.claude/scripts/create-requirement.sh +426 -0
- package/.claude/scripts/export-contracts.sh +117 -0
- package/.claude/scripts/extract-data-model.sh +78 -0
- package/.claude/scripts/generate-clarification-questions.sh +377 -0
- package/.claude/scripts/generate-clarification-report.sh +463 -0
- package/.claude/scripts/generate-quickstart.sh +146 -0
- package/.claude/scripts/generate-research-tasks.sh +157 -0
- package/.claude/scripts/generate-status-report.sh +523 -0
- package/.claude/scripts/generate-tech-analysis.sh +46 -0
- package/.claude/scripts/locate-requirement-in-roadmap.sh +233 -0
- package/.claude/scripts/manage-constitution.sh +602 -0
- package/.claude/scripts/mark-task-complete.sh +198 -0
- package/.claude/scripts/populate-research-tasks.sh +259 -0
- package/.claude/scripts/recover-workflow.sh +460 -0
- package/.claude/scripts/run-clarify-scan.sh +601 -0
- package/.claude/scripts/run-high-review.sh +62 -0
- package/.claude/scripts/run-problem-analysis.sh +68 -0
- package/.claude/scripts/setup-epic.sh +173 -0
- package/.claude/scripts/sync-roadmap-progress.sh +300 -0
- package/.claude/scripts/sync-task-marks.sh +199 -0
- package/.claude/scripts/test-clarify-scan.sh +515 -0
- package/.claude/scripts/update-agent-context.sh +806 -0
- package/.claude/scripts/validate-constitution.sh +567 -0
- package/.claude/scripts/validate-hooks.sh +487 -0
- package/.claude/scripts/validate-research.sh +332 -0
- package/.claude/scripts/validate-scope-boundary.sh +493 -0
- package/.claude/scripts/verify-setup.sh +37 -0
- package/.claude/settings.json +76 -0
- package/.claude/skills/_reference-implementations/README.md +96 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/SKILL.md +302 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/architecture-overview.md +451 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/async-and-errors.md +307 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/complete-examples.md +638 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/configuration.md +275 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/database-patterns.md +224 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/middleware-guide.md +213 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/routing-and-controllers.md +756 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/sentry-and-monitoring.md +336 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/services-and-repositories.md +789 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/testing-guide.md +235 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/validation-patterns.md +754 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/SKILL.md +399 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/common-patterns.md +331 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/complete-examples.md +872 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/component-patterns.md +502 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/data-fetching.md +767 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/file-organization.md +502 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/loading-and-error-states.md +501 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/performance.md +406 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/routing-guide.md +364 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/styling-guide.md +428 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/typescript-standards.md +418 -0
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +229 -0
- package/.claude/skills/constitution-guardian/SKILL.md +306 -0
- package/.claude/skills/devflow-constitution-quick-ref/SKILL.md +374 -0
- package/.claude/skills/devflow-file-standards/SKILL.md +353 -0
- package/.claude/skills/devflow-tdd-enforcer/SKILL.md +192 -0
- package/.claude/skills/skill-developer/ADVANCED.md +197 -0
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +306 -0
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +152 -0
- package/.claude/skills/skill-developer/SKILL.md +426 -0
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +315 -0
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +305 -0
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +514 -0
- package/.claude/skills/skill-rules.json +213 -0
- package/.claude/tests/README.md +300 -0
- package/.claude/tests/TODO.md +69 -0
- package/.claude/tests/__pycache__/test_analyze_upgrade_impact.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_consolidate_research.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_export_contracts.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_extract_data_model.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_quickstart.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_research_tasks.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/constitution/run_all_constitution_tests.sh +111 -0
- package/.claude/tests/constitution/test_agent_assignment.sh +207 -0
- package/.claude/tests/constitution/test_article_coverage.sh +201 -0
- package/.claude/tests/constitution/test_template_completeness.sh +150 -0
- package/.claude/tests/constitution/test_version_consistency.sh +120 -0
- package/.claude/tests/fixtures/spec_delta_full.md +16 -0
- package/.claude/tests/fixtures/tasks_progress_sample.md +5 -0
- package/.claude/tests/run-all-tests.sh +229 -0
- package/.claude/tests/scripts/run.sh +30 -0
- package/.claude/tests/scripts/test-framework.sh +128 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh +511 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak +504 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak2 +505 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak3 +506 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak4 +507 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak5 +508 -0
- package/.claude/tests/scripts/test_check_task_status.sh +499 -0
- package/.claude/tests/scripts/test_common.sh +244 -0
- package/.claude/tests/scripts/test_generate_status_report.sh +71 -0
- package/.claude/tests/scripts/test_mark_task_complete.sh +441 -0
- package/.claude/tests/scripts/test_mark_task_complete.sh.backup +410 -0
- package/.claude/tests/scripts/test_recover_workflow.sh +304 -0
- package/.claude/tests/scripts/test_setup_epic.sh +437 -0
- package/.claude/tests/scripts/test_sync_task_marks.sh +196 -0
- package/.claude/tests/scripts/test_validate_constitution.sh +74 -0
- package/.claude/tests/scripts/test_validate_research.sh +462 -0
- package/.claude/tests/slugify.bats +82 -0
- package/.claude/tests/test-framework.sh +732 -0
- package/.claude/tests/test_analyze_upgrade_impact.py +34 -0
- package/.claude/tests/test_consolidate_research.py +48 -0
- package/.claude/tests/test_export_contracts.py +43 -0
- package/.claude/tests/test_extract_data_model.py +33 -0
- package/.claude/tests/test_generate_quickstart.py +50 -0
- package/.claude/tests/test_generate_research_tasks.py +52 -0
- package/.claude/tsc-cache/6e64f818-6398-49ca-8623-581a9af85c44/edited-files.log +1 -0
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/affected-repos.txt +1 -0
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/edited-files.log +1 -0
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/affected-repos.txt +1 -0
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/edited-files.log +1 -0
- package/CHANGELOG.md +507 -0
- package/LICENSE +21 -0
- package/README.md +534 -0
- package/README.zh-CN.md +530 -0
- package/bin/adapt.js +240 -0
- package/bin/cc-devflow-cli.js +185 -0
- package/bin/cc-devflow.js +78 -0
- package/config/adapters.yml +5 -0
- package/config/schema/adapters.schema.json +44 -0
- package/docs/CLAUDE.md +26 -0
- package/docs/commands/README.md +61 -0
- package/docs/commands/README.zh-CN.md +55 -0
- package/docs/commands/core-roadmap.md +106 -0
- package/docs/commands/core-roadmap.zh-CN.md +102 -0
- package/docs/commands/core-style.md +405 -0
- package/docs/commands/core-style.zh-CN.md +405 -0
- package/docs/commands/flow-init.md +134 -0
- package/docs/commands/flow-init.zh-CN.md +163 -0
- package/docs/commands/flow-new.md +274 -0
- package/docs/commands/flow-new.zh-CN.md +270 -0
- package/docs/guides/getting-started.md +204 -0
- package/docs/guides/getting-started.zh-CN.md +152 -0
- package/lib/adapters/adapter-interface.js +57 -0
- package/lib/adapters/claude-adapter.js +74 -0
- package/lib/adapters/codex-adapter.js +40 -0
- package/lib/adapters/config-validator.js +68 -0
- package/lib/adapters/logger.js +42 -0
- package/lib/adapters/registry.js +153 -0
- package/lib/compiler/CLAUDE.md +92 -0
- package/lib/compiler/__tests__/drift.test.js +215 -0
- package/lib/compiler/__tests__/errors.test.js +184 -0
- package/lib/compiler/__tests__/incremental.test.js +174 -0
- package/lib/compiler/__tests__/integration.test.js +174 -0
- package/lib/compiler/__tests__/manifest.test.js +233 -0
- package/lib/compiler/__tests__/parser.test.js +456 -0
- package/lib/compiler/__tests__/schemas.test.js +301 -0
- package/lib/compiler/__tests__/skills-registry.test.js +125 -0
- package/lib/compiler/__tests__/transformer.test.js +286 -0
- package/lib/compiler/emitters/antigravity-emitter.js +171 -0
- package/lib/compiler/emitters/base-emitter.js +73 -0
- package/lib/compiler/emitters/codex-emitter.js +52 -0
- package/lib/compiler/emitters/cursor-emitter.js +31 -0
- package/lib/compiler/emitters/index.js +50 -0
- package/lib/compiler/emitters/qwen-emitter.js +39 -0
- package/lib/compiler/errors.js +119 -0
- package/lib/compiler/index.js +256 -0
- package/lib/compiler/manifest.js +242 -0
- package/lib/compiler/parser.js +258 -0
- package/lib/compiler/platforms.js +113 -0
- package/lib/compiler/resource-copier.js +320 -0
- package/lib/compiler/rules-emitters/__tests__/antigravity-rules-emitter.test.js +191 -0
- package/lib/compiler/rules-emitters/__tests__/codex-rules-emitter.test.js +109 -0
- package/lib/compiler/rules-emitters/__tests__/cursor-rules-emitter.test.js +123 -0
- package/lib/compiler/rules-emitters/__tests__/qwen-rules-emitter.test.js +123 -0
- package/lib/compiler/rules-emitters/antigravity-rules-emitter.js +253 -0
- package/lib/compiler/rules-emitters/base-rules-emitter.js +83 -0
- package/lib/compiler/rules-emitters/codex-rules-emitter.js +116 -0
- package/lib/compiler/rules-emitters/cursor-rules-emitter.js +98 -0
- package/lib/compiler/rules-emitters/index.js +71 -0
- package/lib/compiler/rules-emitters/qwen-rules-emitter.js +70 -0
- package/lib/compiler/schemas.js +144 -0
- package/lib/compiler/skills-registry.js +225 -0
- package/lib/compiler/transformer.js +236 -0
- package/package.json +50 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Advanced Topics & Future Enhancements
|
|
2
|
+
|
|
3
|
+
Ideas and concepts for future improvements to the skill system.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Dynamic Rule Updates
|
|
8
|
+
|
|
9
|
+
**Current State:** Requires Claude Code restart to pick up changes to skill-rules.json
|
|
10
|
+
|
|
11
|
+
**Future Enhancement:** Hot-reload configuration without restart
|
|
12
|
+
|
|
13
|
+
**Implementation Ideas:**
|
|
14
|
+
- Watch skill-rules.json for changes
|
|
15
|
+
- Reload on file modification
|
|
16
|
+
- Invalidate cached compiled regexes
|
|
17
|
+
- Notify user of reload
|
|
18
|
+
|
|
19
|
+
**Benefits:**
|
|
20
|
+
- Faster iteration during skill development
|
|
21
|
+
- No need to restart Claude Code
|
|
22
|
+
- Better developer experience
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Skill Dependencies
|
|
27
|
+
|
|
28
|
+
**Current State:** Skills are independent
|
|
29
|
+
|
|
30
|
+
**Future Enhancement:** Specify skill dependencies and load order
|
|
31
|
+
|
|
32
|
+
**Configuration Idea:**
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"my-advanced-skill": {
|
|
36
|
+
"dependsOn": ["prerequisite-skill", "base-skill"],
|
|
37
|
+
"type": "domain",
|
|
38
|
+
...
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Use Cases:**
|
|
44
|
+
- Advanced skill builds on base skill knowledge
|
|
45
|
+
- Ensure foundational skills loaded first
|
|
46
|
+
- Chain skills for complex workflows
|
|
47
|
+
|
|
48
|
+
**Benefits:**
|
|
49
|
+
- Better skill composition
|
|
50
|
+
- Clearer skill relationships
|
|
51
|
+
- Progressive disclosure
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Conditional Enforcement
|
|
56
|
+
|
|
57
|
+
**Current State:** Enforcement level is static
|
|
58
|
+
|
|
59
|
+
**Future Enhancement:** Enforce based on context or environment
|
|
60
|
+
|
|
61
|
+
**Configuration Idea:**
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"enforcement": {
|
|
65
|
+
"default": "suggest",
|
|
66
|
+
"when": {
|
|
67
|
+
"production": "block",
|
|
68
|
+
"development": "suggest",
|
|
69
|
+
"ci": "block"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Use Cases:**
|
|
76
|
+
- Stricter enforcement in production
|
|
77
|
+
- Relaxed rules during development
|
|
78
|
+
- CI/CD pipeline requirements
|
|
79
|
+
|
|
80
|
+
**Benefits:**
|
|
81
|
+
- Environment-appropriate enforcement
|
|
82
|
+
- Flexible rule application
|
|
83
|
+
- Context-aware guardrails
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Skill Analytics
|
|
88
|
+
|
|
89
|
+
**Current State:** No usage tracking
|
|
90
|
+
|
|
91
|
+
**Future Enhancement:** Track skill usage patterns and effectiveness
|
|
92
|
+
|
|
93
|
+
**Metrics to Collect:**
|
|
94
|
+
- Skill trigger frequency
|
|
95
|
+
- False positive rate
|
|
96
|
+
- False negative rate
|
|
97
|
+
- Time to skill usage after suggestion
|
|
98
|
+
- User override rate (skip markers, env vars)
|
|
99
|
+
- Performance metrics (execution time)
|
|
100
|
+
|
|
101
|
+
**Dashbord Ideas:**
|
|
102
|
+
- Most/least used skills
|
|
103
|
+
- Skills with highest false positive rate
|
|
104
|
+
- Performance bottlenecks
|
|
105
|
+
- Skill effectiveness scores
|
|
106
|
+
|
|
107
|
+
**Benefits:**
|
|
108
|
+
- Data-driven skill improvement
|
|
109
|
+
- Identify problems early
|
|
110
|
+
- Optimize patterns based on real usage
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Skill Versioning
|
|
115
|
+
|
|
116
|
+
**Current State:** No version tracking
|
|
117
|
+
|
|
118
|
+
**Future Enhancement:** Version skills and track compatibility
|
|
119
|
+
|
|
120
|
+
**Configuration Idea:**
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"my-skill": {
|
|
124
|
+
"version": "2.1.0",
|
|
125
|
+
"minClaudeVersion": "1.5.0",
|
|
126
|
+
"changelog": "Added support for new workflow patterns",
|
|
127
|
+
...
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Benefits:**
|
|
133
|
+
- Track skill evolution
|
|
134
|
+
- Ensure compatibility
|
|
135
|
+
- Document changes
|
|
136
|
+
- Support migration paths
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Multi-Language Support
|
|
141
|
+
|
|
142
|
+
**Current State:** English only
|
|
143
|
+
|
|
144
|
+
**Future Enhancement:** Support multiple languages for skill content
|
|
145
|
+
|
|
146
|
+
**Implementation Ideas:**
|
|
147
|
+
- Language-specific SKILL.md variants
|
|
148
|
+
- Automatic language detection
|
|
149
|
+
- Fallback to English
|
|
150
|
+
|
|
151
|
+
**Use Cases:**
|
|
152
|
+
- International teams
|
|
153
|
+
- Localized documentation
|
|
154
|
+
- Multi-language projects
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Skill Testing Framework
|
|
159
|
+
|
|
160
|
+
**Current State:** Manual testing with npx tsx commands
|
|
161
|
+
|
|
162
|
+
**Future Enhancement:** Automated skill testing
|
|
163
|
+
|
|
164
|
+
**Features:**
|
|
165
|
+
- Test cases for trigger patterns
|
|
166
|
+
- Assertion framework
|
|
167
|
+
- CI/CD integration
|
|
168
|
+
- Coverage reports
|
|
169
|
+
|
|
170
|
+
**Example Test:**
|
|
171
|
+
```typescript
|
|
172
|
+
describe('database-verification', () => {
|
|
173
|
+
it('triggers on Prisma imports', () => {
|
|
174
|
+
const result = testSkill({
|
|
175
|
+
prompt: "add user tracking",
|
|
176
|
+
file: "services/user.ts",
|
|
177
|
+
content: "import { PrismaService } from './prisma'"
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
expect(result.triggered).toBe(true);
|
|
181
|
+
expect(result.skill).toBe('database-verification');
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Benefits:**
|
|
187
|
+
- Prevent regressions
|
|
188
|
+
- Validate patterns before deployment
|
|
189
|
+
- Confidence in changes
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Related Files
|
|
194
|
+
|
|
195
|
+
- [SKILL.md](SKILL.md) - Main skill guide
|
|
196
|
+
- [TROUBLESHOOTING.md](TROUBLESHOOTING.md) - Current debugging guide
|
|
197
|
+
- [HOOK_MECHANISMS.md](HOOK_MECHANISMS.md) - How hooks work today
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# Hook Mechanisms - Deep Dive
|
|
2
|
+
|
|
3
|
+
Technical deep dive into how the UserPromptSubmit and PreToolUse hooks work.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [UserPromptSubmit Hook Flow](#userpromptsubmit-hook-flow)
|
|
8
|
+
- [PreToolUse Hook Flow](#pretooluse-hook-flow)
|
|
9
|
+
- [Exit Code Behavior (CRITICAL)](#exit-code-behavior-critical)
|
|
10
|
+
- [Session State Management](#session-state-management)
|
|
11
|
+
- [Performance Considerations](#performance-considerations)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## UserPromptSubmit Hook Flow
|
|
16
|
+
|
|
17
|
+
### Execution Sequence
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
User submits prompt
|
|
21
|
+
↓
|
|
22
|
+
.claude/settings.json registers hook
|
|
23
|
+
↓
|
|
24
|
+
skill-activation-prompt.sh executes
|
|
25
|
+
↓
|
|
26
|
+
npx tsx skill-activation-prompt.ts
|
|
27
|
+
↓
|
|
28
|
+
Hook reads stdin (JSON with prompt)
|
|
29
|
+
↓
|
|
30
|
+
Loads skill-rules.json
|
|
31
|
+
↓
|
|
32
|
+
Matches keywords + intent patterns
|
|
33
|
+
↓
|
|
34
|
+
Groups matches by priority (critical → high → medium → low)
|
|
35
|
+
↓
|
|
36
|
+
Outputs formatted message to stdout
|
|
37
|
+
↓
|
|
38
|
+
stdout becomes context for Claude (injected before prompt)
|
|
39
|
+
↓
|
|
40
|
+
Claude sees: [skill suggestion] + user's prompt
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Key Points
|
|
44
|
+
|
|
45
|
+
- **Exit code**: Always 0 (allow)
|
|
46
|
+
- **stdout**: → Claude's context (injected as system message)
|
|
47
|
+
- **Timing**: Runs BEFORE Claude processes prompt
|
|
48
|
+
- **Behavior**: Non-blocking, advisory only
|
|
49
|
+
- **Purpose**: Make Claude aware of relevant skills
|
|
50
|
+
|
|
51
|
+
### Input Format
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"session_id": "abc-123",
|
|
56
|
+
"transcript_path": "/path/to/transcript.json",
|
|
57
|
+
"cwd": "/root/git/your-project",
|
|
58
|
+
"permission_mode": "normal",
|
|
59
|
+
"hook_event_name": "UserPromptSubmit",
|
|
60
|
+
"prompt": "how does the layout system work?"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Output Format (to stdout)
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
68
|
+
🎯 SKILL ACTIVATION CHECK
|
|
69
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
70
|
+
|
|
71
|
+
📚 RECOMMENDED SKILLS:
|
|
72
|
+
→ project-catalog-developer
|
|
73
|
+
|
|
74
|
+
ACTION: Use Skill tool BEFORE responding
|
|
75
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Claude sees this output as additional context before processing the user's prompt.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## PreToolUse Hook Flow
|
|
83
|
+
|
|
84
|
+
### Execution Sequence
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Claude calls Edit/Write tool
|
|
88
|
+
↓
|
|
89
|
+
.claude/settings.json registers hook (matcher: Edit|Write)
|
|
90
|
+
↓
|
|
91
|
+
skill-verification-guard.sh executes
|
|
92
|
+
↓
|
|
93
|
+
npx tsx skill-verification-guard.ts
|
|
94
|
+
↓
|
|
95
|
+
Hook reads stdin (JSON with tool_name, tool_input)
|
|
96
|
+
↓
|
|
97
|
+
Loads skill-rules.json
|
|
98
|
+
↓
|
|
99
|
+
Checks file path patterns (glob matching)
|
|
100
|
+
↓
|
|
101
|
+
Reads file for content patterns (if file exists)
|
|
102
|
+
↓
|
|
103
|
+
Checks session state (was skill already used?)
|
|
104
|
+
↓
|
|
105
|
+
Checks skip conditions (file markers, env vars)
|
|
106
|
+
↓
|
|
107
|
+
IF MATCHED AND NOT SKIPPED:
|
|
108
|
+
Update session state (mark skill as enforced)
|
|
109
|
+
Output block message to stderr
|
|
110
|
+
Exit with code 2 (BLOCK)
|
|
111
|
+
ELSE:
|
|
112
|
+
Exit with code 0 (ALLOW)
|
|
113
|
+
↓
|
|
114
|
+
IF BLOCKED:
|
|
115
|
+
stderr → Claude sees message
|
|
116
|
+
Edit/Write tool does NOT execute
|
|
117
|
+
Claude must use skill and retry
|
|
118
|
+
IF ALLOWED:
|
|
119
|
+
Tool executes normally
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Key Points
|
|
123
|
+
|
|
124
|
+
- **Exit code 2**: BLOCK (stderr → Claude)
|
|
125
|
+
- **Exit code 0**: ALLOW
|
|
126
|
+
- **Timing**: Runs BEFORE tool execution
|
|
127
|
+
- **Session tracking**: Prevents repeated blocks in same session
|
|
128
|
+
- **Fail open**: On errors, allows operation (don't break workflow)
|
|
129
|
+
- **Purpose**: Enforce critical guardrails
|
|
130
|
+
|
|
131
|
+
### Input Format
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"session_id": "abc-123",
|
|
136
|
+
"transcript_path": "/path/to/transcript.json",
|
|
137
|
+
"cwd": "/root/git/your-project",
|
|
138
|
+
"permission_mode": "normal",
|
|
139
|
+
"hook_event_name": "PreToolUse",
|
|
140
|
+
"tool_name": "Edit",
|
|
141
|
+
"tool_input": {
|
|
142
|
+
"file_path": "/root/git/your-project/form/src/services/user.ts",
|
|
143
|
+
"old_string": "...",
|
|
144
|
+
"new_string": "..."
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Output Format (to stderr when blocked)
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
⚠️ BLOCKED - Database Operation Detected
|
|
153
|
+
|
|
154
|
+
📋 REQUIRED ACTION:
|
|
155
|
+
1. Use Skill tool: 'database-verification'
|
|
156
|
+
2. Verify ALL table and column names against schema
|
|
157
|
+
3. Check database structure with DESCRIBE commands
|
|
158
|
+
4. Then retry this edit
|
|
159
|
+
|
|
160
|
+
Reason: Prevent column name errors in Prisma queries
|
|
161
|
+
File: form/src/services/user.ts
|
|
162
|
+
|
|
163
|
+
💡 TIP: Add '// @skip-validation' comment to skip future checks
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Claude receives this message and understands it needs to use the skill before retrying the edit.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Exit Code Behavior (CRITICAL)
|
|
171
|
+
|
|
172
|
+
### Exit Code Reference Table
|
|
173
|
+
|
|
174
|
+
| Exit Code | stdout | stderr | Tool Execution | Claude Sees |
|
|
175
|
+
|-----------|--------|--------|----------------|-------------|
|
|
176
|
+
| 0 (UserPromptSubmit) | → Context | → User only | N/A | stdout content |
|
|
177
|
+
| 0 (PreToolUse) | → User only | → User only | **Proceeds** | Nothing |
|
|
178
|
+
| 2 (PreToolUse) | → User only | → **CLAUDE** | **BLOCKED** | stderr content |
|
|
179
|
+
| Other | → User only | → User only | Blocked | Nothing |
|
|
180
|
+
|
|
181
|
+
### Why Exit Code 2 Matters
|
|
182
|
+
|
|
183
|
+
This is THE critical mechanism for enforcement:
|
|
184
|
+
|
|
185
|
+
1. **Only way** to send message to Claude from PreToolUse
|
|
186
|
+
2. stderr content is "fed back to Claude automatically"
|
|
187
|
+
3. Claude sees the block message and understands what to do
|
|
188
|
+
4. Tool execution is prevented
|
|
189
|
+
5. Critical for enforcement of guardrails
|
|
190
|
+
|
|
191
|
+
### Example Conversation Flow
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
User: "Add a new user service with Prisma"
|
|
195
|
+
|
|
196
|
+
Claude: "I'll create the user service..."
|
|
197
|
+
[Attempts to Edit form/src/services/user.ts]
|
|
198
|
+
|
|
199
|
+
PreToolUse Hook: [Exit code 2]
|
|
200
|
+
stderr: "⚠️ BLOCKED - Use database-verification"
|
|
201
|
+
|
|
202
|
+
Claude sees error, responds:
|
|
203
|
+
"I need to verify the database schema first."
|
|
204
|
+
[Uses Skill tool: database-verification]
|
|
205
|
+
[Verifies column names]
|
|
206
|
+
[Retries Edit - now allowed (session tracking)]
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Session State Management
|
|
212
|
+
|
|
213
|
+
### Purpose
|
|
214
|
+
|
|
215
|
+
Prevent repeated nagging in the same session - once Claude uses a skill, don't block again.
|
|
216
|
+
|
|
217
|
+
### State File Location
|
|
218
|
+
|
|
219
|
+
`.claude/hooks/state/skills-used-{session_id}.json`
|
|
220
|
+
|
|
221
|
+
### State File Structure
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"skills_used": [
|
|
226
|
+
"database-verification",
|
|
227
|
+
"error-tracking"
|
|
228
|
+
],
|
|
229
|
+
"files_verified": []
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### How It Works
|
|
234
|
+
|
|
235
|
+
1. **First edit** of file with Prisma:
|
|
236
|
+
- Hook blocks with exit code 2
|
|
237
|
+
- Updates session state: adds "database-verification" to skills_used
|
|
238
|
+
- Claude sees message, uses skill
|
|
239
|
+
|
|
240
|
+
2. **Second edit** (same session):
|
|
241
|
+
- Hook checks session state
|
|
242
|
+
- Finds "database-verification" in skills_used
|
|
243
|
+
- Exits with code 0 (allow)
|
|
244
|
+
- No message to Claude
|
|
245
|
+
|
|
246
|
+
3. **Different session**:
|
|
247
|
+
- New session ID = new state file
|
|
248
|
+
- Hook blocks again
|
|
249
|
+
|
|
250
|
+
### Limitation
|
|
251
|
+
|
|
252
|
+
The hook cannot detect when the skill is *actually* invoked - it just blocks once per session per skill. This means:
|
|
253
|
+
|
|
254
|
+
- If Claude doesn't use the skill but makes a different edit, it won't block again
|
|
255
|
+
- Trust that Claude follows the instruction
|
|
256
|
+
- Future enhancement: detect actual Skill tool usage
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Performance Considerations
|
|
261
|
+
|
|
262
|
+
### Target Metrics
|
|
263
|
+
|
|
264
|
+
- **UserPromptSubmit**: < 100ms
|
|
265
|
+
- **PreToolUse**: < 200ms
|
|
266
|
+
|
|
267
|
+
### Performance Bottlenecks
|
|
268
|
+
|
|
269
|
+
1. **Loading skill-rules.json** (every execution)
|
|
270
|
+
- Future: Cache in memory
|
|
271
|
+
- Future: Watch for changes, reload only when needed
|
|
272
|
+
|
|
273
|
+
2. **Reading file content** (PreToolUse)
|
|
274
|
+
- Only when contentPatterns configured
|
|
275
|
+
- Only if file exists
|
|
276
|
+
- Can be slow for large files
|
|
277
|
+
|
|
278
|
+
3. **Glob matching** (PreToolUse)
|
|
279
|
+
- Regex compilation for each pattern
|
|
280
|
+
- Future: Compile once, cache
|
|
281
|
+
|
|
282
|
+
4. **Regex matching** (Both hooks)
|
|
283
|
+
- Intent patterns (UserPromptSubmit)
|
|
284
|
+
- Content patterns (PreToolUse)
|
|
285
|
+
- Future: Lazy compile, cache compiled regexes
|
|
286
|
+
|
|
287
|
+
### Optimization Strategies
|
|
288
|
+
|
|
289
|
+
**Reduce patterns:**
|
|
290
|
+
- Use more specific patterns (fewer to check)
|
|
291
|
+
- Combine similar patterns where possible
|
|
292
|
+
|
|
293
|
+
**File path patterns:**
|
|
294
|
+
- More specific = fewer files to check
|
|
295
|
+
- Example: `form/src/services/**` better than `form/**`
|
|
296
|
+
|
|
297
|
+
**Content patterns:**
|
|
298
|
+
- Only add when truly necessary
|
|
299
|
+
- Simpler regex = faster matching
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
**Related Files:**
|
|
304
|
+
- [SKILL.md](SKILL.md) - Main skill guide
|
|
305
|
+
- [TROUBLESHOOTING.md](TROUBLESHOOTING.md) - Debug hook issues
|
|
306
|
+
- [SKILL_RULES_REFERENCE.md](SKILL_RULES_REFERENCE.md) - Configuration reference
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Common Patterns Library
|
|
2
|
+
|
|
3
|
+
Ready-to-use regex and glob patterns for skill triggers. Copy and customize for your skills.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Intent Patterns (Regex)
|
|
8
|
+
|
|
9
|
+
### Feature/Endpoint Creation
|
|
10
|
+
```regex
|
|
11
|
+
(add|create|implement|build).*?(feature|endpoint|route|service|controller)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Component Creation
|
|
15
|
+
```regex
|
|
16
|
+
(create|add|make|build).*?(component|UI|page|modal|dialog|form)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Database Work
|
|
20
|
+
```regex
|
|
21
|
+
(add|create|modify|update).*?(user|table|column|field|schema|migration)
|
|
22
|
+
(database|prisma).*?(change|update|query)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Error Handling
|
|
26
|
+
```regex
|
|
27
|
+
(fix|handle|catch|debug).*?(error|exception|bug)
|
|
28
|
+
(add|implement).*?(try|catch|error.*?handling)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Explanation Requests
|
|
32
|
+
```regex
|
|
33
|
+
(how does|how do|explain|what is|describe|tell me about).*?
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Workflow Operations
|
|
37
|
+
```regex
|
|
38
|
+
(create|add|modify|update).*?(workflow|step|branch|condition)
|
|
39
|
+
(debug|troubleshoot|fix).*?workflow
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Testing
|
|
43
|
+
```regex
|
|
44
|
+
(write|create|add).*?(test|spec|unit.*?test)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## File Path Patterns (Glob)
|
|
50
|
+
|
|
51
|
+
### Frontend
|
|
52
|
+
```glob
|
|
53
|
+
frontend/src/**/*.tsx # All React components
|
|
54
|
+
frontend/src/**/*.ts # All TypeScript files
|
|
55
|
+
frontend/src/components/** # Only components directory
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Backend Services
|
|
59
|
+
```glob
|
|
60
|
+
form/src/**/*.ts # Form service
|
|
61
|
+
email/src/**/*.ts # Email service
|
|
62
|
+
users/src/**/*.ts # Users service
|
|
63
|
+
projects/src/**/*.ts # Projects service
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Database
|
|
67
|
+
```glob
|
|
68
|
+
**/schema.prisma # Prisma schema (anywhere)
|
|
69
|
+
**/migrations/**/*.sql # Migration files
|
|
70
|
+
database/src/**/*.ts # Database scripts
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Workflows
|
|
74
|
+
```glob
|
|
75
|
+
form/src/workflow/**/*.ts # Workflow engine
|
|
76
|
+
form/src/workflow-definitions/**/*.json # Workflow definitions
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Test Exclusions
|
|
80
|
+
```glob
|
|
81
|
+
**/*.test.ts # TypeScript tests
|
|
82
|
+
**/*.test.tsx # React component tests
|
|
83
|
+
**/*.spec.ts # Spec files
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Content Patterns (Regex)
|
|
89
|
+
|
|
90
|
+
### Prisma/Database
|
|
91
|
+
```regex
|
|
92
|
+
import.*[Pp]risma # Prisma imports
|
|
93
|
+
PrismaService # PrismaService usage
|
|
94
|
+
prisma\. # prisma.something
|
|
95
|
+
\.findMany\( # Prisma query methods
|
|
96
|
+
\.create\(
|
|
97
|
+
\.update\(
|
|
98
|
+
\.delete\(
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Controllers/Routes
|
|
102
|
+
```regex
|
|
103
|
+
export class.*Controller # Controller classes
|
|
104
|
+
router\. # Express router
|
|
105
|
+
app\.(get|post|put|delete|patch) # Express app routes
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Error Handling
|
|
109
|
+
```regex
|
|
110
|
+
try\s*\{ # Try blocks
|
|
111
|
+
catch\s*\( # Catch blocks
|
|
112
|
+
throw new # Throw statements
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### React/Components
|
|
116
|
+
```regex
|
|
117
|
+
export.*React\.FC # React functional components
|
|
118
|
+
export default function.* # Default function exports
|
|
119
|
+
useState|useEffect # React hooks
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
**Usage Example:**
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"my-skill": {
|
|
129
|
+
"promptTriggers": {
|
|
130
|
+
"intentPatterns": [
|
|
131
|
+
"(create|add|build).*?(component|UI|page)"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"fileTriggers": {
|
|
135
|
+
"pathPatterns": [
|
|
136
|
+
"frontend/src/**/*.tsx"
|
|
137
|
+
],
|
|
138
|
+
"contentPatterns": [
|
|
139
|
+
"export.*React\\.FC",
|
|
140
|
+
"useState|useEffect"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
**Related Files:**
|
|
150
|
+
- [SKILL.md](SKILL.md) - Main skill guide
|
|
151
|
+
- [TRIGGER_TYPES.md](TRIGGER_TYPES.md) - Detailed trigger documentation
|
|
152
|
+
- [SKILL_RULES_REFERENCE.md](SKILL_RULES_REFERENCE.md) - Complete schema
|