cc-codeconductor 0.4.3 → 1.0.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/README.md +95 -95
- package/dist/cli/errors.d.ts +65 -0
- package/dist/core/compilation/compile-checker.d.ts +51 -0
- package/dist/core/config/codeconductor-config.d.ts +42 -0
- package/dist/core/config/config-loader.d.ts +11 -0
- package/dist/core/filesystem/credential-guard.d.ts +18 -0
- package/dist/core/goal/goal-planner.d.ts +8 -0
- package/dist/core/goal/goal-state.d.ts +15 -0
- package/dist/core/loop/git-stats.d.ts +13 -0
- package/dist/core/loop/loop-engine.d.ts +79 -0
- package/dist/core/memory/episodic-store.d.ts +6 -0
- package/dist/core/memory/operational-state.d.ts +6 -0
- package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
- package/dist/core/planner/product-planner.d.ts +18 -0
- package/dist/core/presets/package-paths.d.ts +4 -0
- package/dist/core/product-graph/graph-store.d.ts +11 -0
- package/dist/core/product-graph/paths.d.ts +18 -0
- package/dist/core/verification/verification-runner.d.ts +57 -0
- package/dist/domain/loop/loop-state.d.ts +74 -0
- package/dist/domain/product/entities.d.ts +11 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +23721 -15064
- package/dist/library.js +2595 -0
- package/dist/utils/result.d.ts +36 -0
- package/dist/validation/schemas.d.ts +3660 -0
- package/package.json +15 -2
- package/policy.yml +12 -11
- package/presets/agy/AGENTS.md +11 -5
- package/presets/agy/gates/pre-commit/GATE.md +136 -0
- package/presets/agy/skills/cc-fix/SKILL.md +2 -2
- package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
- package/presets/agy/skills/evaluation/SKILL.md +6 -0
- package/presets/agy/skills/openspec/SKILL.md +32 -0
- package/presets/agy/workflows/cc-api-contract.md +12 -0
- package/presets/agy/workflows/cc-ask.md +55 -0
- package/presets/agy/workflows/cc-clarify.md +33 -0
- package/presets/agy/workflows/cc-council.md +31 -7
- package/presets/agy/workflows/cc-db-migration.md +22 -9
- package/presets/agy/workflows/cc-explore.md +37 -0
- package/presets/agy/workflows/cc-feature.md +41 -19
- package/presets/agy/workflows/cc-fix.md +50 -23
- package/presets/agy/workflows/cc-handoff.md +42 -0
- package/presets/agy/workflows/cc-iterative.md +128 -0
- package/presets/agy/workflows/cc-openspec.md +75 -0
- package/presets/agy/workflows/cc-pagespeed.md +12 -0
- package/presets/agy/workflows/cc-prototype.md +39 -0
- package/presets/agy/workflows/cc-refactor.md +12 -0
- package/presets/agy/workflows/cc-review.md +12 -0
- package/presets/agy/workflows/cc-scorecard.md +29 -0
- package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
- package/presets/agy/workflows/cc-test-plan.md +12 -0
- package/presets/agy/workflows/cc-triage.md +35 -0
- package/presets/claude/CLAUDE.md +64 -0
- package/presets/claude/commands/cc/api-contract.md +12 -0
- package/presets/claude/commands/cc/ask.md +55 -0
- package/presets/claude/commands/cc/clarify.md +32 -0
- package/presets/claude/commands/cc/council.md +87 -0
- package/presets/claude/commands/cc/db-migration.md +22 -9
- package/presets/claude/commands/cc/explore.md +36 -0
- package/presets/claude/commands/cc/feature.md +49 -22
- package/presets/claude/commands/cc/fix.md +74 -20
- package/presets/claude/commands/cc/handoff.md +44 -0
- package/presets/claude/commands/cc/iterative.md +132 -0
- package/presets/claude/commands/cc/openspec.md +169 -0
- package/presets/claude/commands/cc/pagespeed.md +12 -0
- package/presets/claude/commands/cc/prototype.md +38 -0
- package/presets/claude/commands/cc/refactor.md +152 -1
- package/presets/claude/commands/cc/review.md +90 -17
- package/presets/claude/commands/cc/scorecard.md +77 -0
- package/presets/claude/commands/cc/tdd-cycle.md +53 -3
- package/presets/claude/commands/cc/test-plan.md +12 -0
- package/presets/claude/commands/cc/triage.md +34 -0
- package/presets/claude/gates/pre-commit/GATE.md +136 -0
- package/presets/claude/settings.json +8 -46
- package/presets/claude/skills/evaluation/SKILL.md +42 -0
- package/presets/claude/skills/openspec/SKILL.md +54 -0
- package/presets/codex/AGENTS.md +62 -5
- package/presets/codex/commands/cc-ask.md +55 -0
- package/presets/codex/gates/pre-commit/GATE.md +136 -0
- package/presets/cursor/.cursorignore +15 -0
- package/presets/cursor/AGENTS.md +504 -0
- package/presets/cursor/agents/architect.md +211 -0
- package/presets/cursor/agents/business-agent.md +44 -0
- package/presets/cursor/agents/complexity-auditor.md +76 -0
- package/presets/cursor/agents/continuous-architect.md +37 -0
- package/presets/cursor/agents/contract-builder.md +75 -0
- package/presets/cursor/agents/docs.md +181 -0
- package/presets/cursor/agents/goal-planner.md +71 -0
- package/presets/cursor/agents/impact-analyst.md +43 -0
- package/presets/cursor/agents/implementer.md +161 -0
- package/presets/cursor/agents/orchestrator.md +377 -0
- package/presets/cursor/agents/repo-explorer.md +100 -0
- package/presets/cursor/agents/reviewer.md +237 -0
- package/presets/cursor/agents/security-reviewer.md +113 -0
- package/presets/cursor/agents/task-coach.md +145 -0
- package/presets/cursor/agents/tester.md +241 -0
- package/presets/cursor/commands/cc/api-contract.md +70 -0
- package/presets/cursor/commands/cc/ask.md +55 -0
- package/presets/cursor/commands/cc/clarify.md +32 -0
- package/presets/cursor/commands/cc/council.md +87 -0
- package/presets/cursor/commands/cc/db-migration.md +71 -0
- package/presets/cursor/commands/cc/explore.md +36 -0
- package/presets/cursor/commands/cc/feature.md +137 -0
- package/presets/cursor/commands/cc/fix.md +148 -0
- package/presets/cursor/commands/cc/handoff.md +41 -0
- package/presets/cursor/commands/cc/iterative.md +133 -0
- package/presets/cursor/commands/cc/openspec.md +159 -0
- package/presets/cursor/commands/cc/pagespeed.md +115 -0
- package/presets/cursor/commands/cc/prototype.md +38 -0
- package/presets/cursor/commands/cc/refactor.md +160 -0
- package/presets/cursor/commands/cc/review.md +149 -0
- package/presets/cursor/commands/cc/scorecard.md +77 -0
- package/presets/cursor/commands/cc/tdd-cycle.md +250 -0
- package/presets/cursor/commands/cc/test-plan.md +150 -0
- package/presets/cursor/commands/cc/triage.md +34 -0
- package/presets/cursor/gates/pre-commit/GATE.md +136 -0
- package/presets/cursor/rules/behavioral-discipline.mdc +14 -0
- package/presets/cursor/rules/context-budget.mdc +12 -0
- package/presets/cursor/rules/orchestration.mdc +12 -0
- package/presets/cursor/rules/yagni-stdlib.mdc +11 -0
- package/presets/cursor/skills/android/SKILL.md +122 -0
- package/presets/cursor/skills/api-versioning/SKILL.md +394 -0
- package/presets/cursor/skills/astro/SKILL.md +322 -0
- package/presets/cursor/skills/auth-token-inspector/SKILL.md +33 -0
- package/presets/cursor/skills/code-review/SKILL.md +208 -0
- package/presets/cursor/skills/conductor-setup/SKILL.md +127 -0
- package/presets/cursor/skills/django-orm/SKILL.md +463 -0
- package/presets/cursor/skills/django-testing/SKILL.md +417 -0
- package/presets/cursor/skills/django-uv/SKILL.md +409 -0
- package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +54 -0
- package/presets/cursor/skills/evaluation/SKILL.md +8 -0
- package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +46 -0
- package/presets/cursor/skills/find-skills/SKILL.md +144 -0
- package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +49 -0
- package/presets/cursor/skills/jpa-postgres/SKILL.md +626 -0
- package/presets/cursor/skills/laravel-specialist/SKILL.md +267 -0
- package/presets/cursor/skills/laravel-specialist/references/eloquent.md +351 -0
- package/presets/cursor/skills/laravel-specialist/references/livewire.md +512 -0
- package/presets/cursor/skills/laravel-specialist/references/queues.md +423 -0
- package/presets/cursor/skills/laravel-specialist/references/routing.md +362 -0
- package/presets/cursor/skills/laravel-specialist/references/testing.md +522 -0
- package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +39 -0
- package/presets/cursor/skills/multi-agent-orchestration/README.md +144 -0
- package/presets/cursor/skills/multi-agent-orchestration/SKILL.md +579 -0
- package/presets/cursor/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
- package/presets/cursor/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
- package/presets/cursor/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
- package/presets/cursor/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
- package/presets/cursor/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
- package/presets/cursor/skills/nextjs-typescript/SKILL.md +394 -0
- package/presets/cursor/skills/openspec/SKILL.md +52 -0
- package/presets/cursor/skills/pagespeed-insights/SKILL.md +445 -0
- package/presets/cursor/skills/pagespeed-insights/reference.md +50 -0
- package/presets/cursor/skills/pagespeed-perf/SKILL.md +281 -0
- package/presets/cursor/skills/php-pro/SKILL.md +210 -0
- package/presets/cursor/skills/php-pro/references/async-patterns.md +412 -0
- package/presets/cursor/skills/php-pro/references/laravel-patterns.md +377 -0
- package/presets/cursor/skills/php-pro/references/modern-php-features.md +323 -0
- package/presets/cursor/skills/php-pro/references/symfony-patterns.md +466 -0
- package/presets/cursor/skills/php-pro/references/testing-quality.md +466 -0
- package/presets/cursor/skills/python/SKILL.md +613 -0
- package/presets/cursor/skills/python-django-stack/SKILL.md +500 -0
- package/presets/cursor/skills/python-fastapi-stack/SKILL.md +464 -0
- package/presets/cursor/skills/security/SKILL.md +384 -0
- package/presets/cursor/skills/seo-analytics-injector/SKILL.md +44 -0
- package/presets/cursor/skills/spring-auth-auditor/SKILL.md +33 -0
- package/presets/cursor/skills/spring-boot-feature/SKILL.md +566 -0
- package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +408 -0
- package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +479 -0
- package/presets/cursor/skills/sqlalchemy/SKILL.md +473 -0
- package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +32 -0
- package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +28 -0
- package/presets/cursor/skills/testing-tdd/SKILL.md +592 -0
- package/presets/cursor/skills/workflow-orchestration-patterns/SKILL.md +98 -0
- package/presets/cursor/skills/workflow-orchestration-patterns/references/details.md +223 -0
- package/presets/opencode/agents/architect.md +22 -2
- package/presets/opencode/agents/complexity-auditor.md +16 -0
- package/presets/opencode/agents/contract-builder.md +109 -0
- package/presets/opencode/agents/devil.md +158 -0
- package/presets/opencode/agents/docs.md +19 -2
- package/presets/opencode/agents/goal-planner.md +112 -0
- package/presets/opencode/agents/implementer.md +39 -2
- package/presets/opencode/agents/orchestrator.md +124 -19
- package/presets/opencode/agents/planner.md +61 -0
- package/presets/opencode/agents/repo-explorer.md +15 -0
- package/presets/opencode/agents/reviewer.md +53 -2
- package/presets/opencode/agents/security-reviewer.md +159 -0
- package/presets/opencode/agents/task-coach.md +69 -2
- package/presets/opencode/agents/tester.md +18 -2
- package/presets/opencode/commands/cc-api-contract.md +12 -0
- package/presets/opencode/commands/cc-ask.md +55 -0
- package/presets/opencode/commands/cc-clarify.md +31 -0
- package/presets/opencode/commands/cc-council.md +87 -0
- package/presets/opencode/commands/cc-db-migration.md +22 -9
- package/presets/opencode/commands/cc-explore.md +35 -0
- package/presets/opencode/commands/cc-feature.md +41 -19
- package/presets/opencode/commands/cc-fix.md +50 -23
- package/presets/opencode/commands/cc-handoff.md +40 -0
- package/presets/opencode/commands/cc-iterative.md +127 -0
- package/presets/opencode/commands/cc-openspec.md +74 -0
- package/presets/opencode/commands/cc-pagespeed.md +12 -0
- package/presets/opencode/commands/cc-prototype.md +37 -0
- package/presets/opencode/commands/cc-refactor.md +12 -0
- package/presets/opencode/commands/cc-review.md +12 -0
- package/presets/opencode/commands/cc-scorecard.md +28 -0
- package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
- package/presets/opencode/commands/cc-test-plan.md +12 -0
- package/presets/opencode/commands/cc-triage.md +33 -0
- package/presets/opencode/gates/pre-commit/GATE.md +136 -0
- package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
- package/presets/opencode/prompts/v0.5.0/architect.md +222 -0
- package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +91 -0
- package/presets/opencode/prompts/v0.5.0/contract-builder.md +84 -0
- package/presets/opencode/prompts/v0.5.0/docs.md +190 -0
- package/presets/opencode/prompts/v0.5.0/goal-planner.md +80 -0
- package/presets/opencode/prompts/v0.5.0/implementer.md +171 -0
- package/presets/opencode/prompts/v0.5.0/orchestrator.md +388 -0
- package/presets/opencode/prompts/v0.5.0/repo-explorer.md +111 -0
- package/presets/opencode/prompts/v0.5.0/reviewer.md +248 -0
- package/presets/opencode/prompts/v0.5.0/security-reviewer.md +123 -0
- package/presets/opencode/prompts/v0.5.0/task-coach.md +156 -0
- package/presets/opencode/prompts/v0.5.0/tester.md +252 -0
- package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
- package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
- package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
- package/presets/opencode/prompts/v1.0.0/README.md +47 -0
- package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
- package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
- package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
- package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
- package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
- package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
- package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
- package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
- package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
- package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
- package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
- package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
- package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
- package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
- package/presets/opencode/skills/evaluation/SKILL.md +6 -0
- package/presets/opencode/skills/openspec/SKILL.md +50 -0
- package/presets/seo-hotel/settings.json +0 -17
- package/presets/templates/BACKLOG.md +33 -0
- package/presets/templates/execution-profile.yml +6 -0
- package/presets/templates/model-comparison.md +11 -0
- package/presets/templates/regression-checklist.yml +10 -0
- package/src/presets/manifests/agy.yml +2 -2
- package/src/presets/manifests/claude.yml +2 -2
- package/src/presets/manifests/codex.yml +2 -2
- package/src/presets/manifests/cursor.yml +19 -3
- package/src/presets/manifests/gemini.yml +2 -2
- package/src/presets/manifests/opencode.yml +2 -2
- package/src/presets/models/agy.yml +97 -49
- package/src/presets/models/claude.yml +83 -39
- package/src/presets/models/codex.yml +83 -40
- package/src/presets/models/cursor.yml +83 -39
- package/src/presets/models/gemini.yml +83 -39
- package/src/presets/models/opencode.yml +78 -34
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Run a structured Red-Green-Refactor TDD cycle — write a failing
|
|
4
|
+
test first, implement the minimum code to pass it, then refactor with the
|
|
5
|
+
suite green.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# TDD Cycle — Red → Green → Refactor
|
|
9
|
+
|
|
10
|
+
Scope: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
Describe what behavior you want to implement. Include:
|
|
13
|
+
|
|
14
|
+
- The function, method, or feature to implement
|
|
15
|
+
- The expected behavior (inputs and outputs, or acceptance criteria)
|
|
16
|
+
- Any known constraints or edge cases
|
|
17
|
+
- Relevant files or modules (if known)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 0 — CCEP Bootstrap
|
|
22
|
+
|
|
23
|
+
Command: `tdd-cycle` (fixed for this workflow — do not infer from user text)
|
|
24
|
+
|
|
25
|
+
1. Run: `npx cc-codeconductor ccep parse --command tdd-cycle "$ARGUMENTS" --output json`
|
|
26
|
+
2. Run: `npx cc-codeconductor ccep resolve --command tdd-cycle "$ARGUMENTS" --output json`
|
|
27
|
+
3. Run: `npx cc-codeconductor ccep profile tdd-cycle --output json`
|
|
28
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command tdd-cycle --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
29
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
30
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Before you begin — mandatory pre-check
|
|
35
|
+
|
|
36
|
+
This command enforces strict TDD discipline. The three phases are sequential and
|
|
37
|
+
non-negotiable:
|
|
38
|
+
|
|
39
|
+
1. **RED** — a failing test exists before any implementation code is written
|
|
40
|
+
2. **GREEN** — the minimum implementation to make the test pass (no more)
|
|
41
|
+
3. **REFACTOR** — clean up the code while keeping all tests green
|
|
42
|
+
|
|
43
|
+
Do not write implementation code during RED. Do not refactor during GREEN.
|
|
44
|
+
Mixing phases invalidates the cycle.
|
|
45
|
+
|
|
46
|
+
## Verifiable phase gates
|
|
47
|
+
|
|
48
|
+
RED → GREEN and GREEN → REFACTOR are enforced by `tddCycleStateMachine` in
|
|
49
|
+
`domain/loop`. Evidence must be captured with `captureTddSuiteEvidence` (verification
|
|
50
|
+
runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
|
|
51
|
+
|
|
52
|
+
- RED→GREEN requires runner evidence that the suite **failed**.
|
|
53
|
+
- GREEN→REFACTOR requires runner evidence that the suite **passed**.
|
|
54
|
+
|
|
55
|
+
Do not advance phases until that evidence exists.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Phase 1 — RED (Tester role)
|
|
60
|
+
|
|
61
|
+
Invoke the `tester` subagent via the Task tool.
|
|
62
|
+
|
|
63
|
+
### 1a — Scope clarification
|
|
64
|
+
|
|
65
|
+
Before writing any test, confirm:
|
|
66
|
+
|
|
67
|
+
- What is the unit of behavior being tested? (function, method, endpoint, domain
|
|
68
|
+
rule)
|
|
69
|
+
- What are the inputs and expected outputs?
|
|
70
|
+
- What are the failure cases?
|
|
71
|
+
|
|
72
|
+
If the scope is ambiguous, ask one clarifying question and wait for the answer.
|
|
73
|
+
|
|
74
|
+
### 1b — Write the failing test
|
|
75
|
+
|
|
76
|
+
Write a test that:
|
|
77
|
+
|
|
78
|
+
- Targets exactly the behavior described in the scope
|
|
79
|
+
- Fails for the right reason (not a compile error, not a missing dependency —
|
|
80
|
+
the logic does not exist yet)
|
|
81
|
+
- Has a name that describes the behavior: `given_X_when_Y_then_Z` or equivalent
|
|
82
|
+
in the project's test naming convention
|
|
83
|
+
- Covers at minimum: one happy path, one edge case, one failure case
|
|
84
|
+
|
|
85
|
+
Do not write the implementation. Do not make the test pass by any means other
|
|
86
|
+
than the implementation that will follow in Phase 2.
|
|
87
|
+
|
|
88
|
+
### 1c — Run the test suite and confirm RED
|
|
89
|
+
|
|
90
|
+
Run the test suite. The new test must fail. Existing tests must pass.
|
|
91
|
+
|
|
92
|
+
If the new test passes without implementation, the test is wrong. Fix the test
|
|
93
|
+
before continuing.
|
|
94
|
+
|
|
95
|
+
**RED Phase Report:**
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
## RED Phase Report
|
|
99
|
+
|
|
100
|
+
**Test file**: [path/to/test/file]
|
|
101
|
+
**Tests written**:
|
|
102
|
+
- [test name] — [what it verifies]
|
|
103
|
+
|
|
104
|
+
**Suite result**: [X passing, Y failing]
|
|
105
|
+
**New test status**: FAIL ✓
|
|
106
|
+
**Failure reason**: [quoted error or assertion message]
|
|
107
|
+
**Existing tests**: [all passing | N failing — list]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**STOP. Show the RED Phase Report. Do not proceed to GREEN without
|
|
111
|
+
confirmation.**
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Phase 2 — GREEN (Implementer role)
|
|
116
|
+
|
|
117
|
+
Invoke the `implementer` subagent via the Task tool.
|
|
118
|
+
|
|
119
|
+
### 2a — Read the failing test before writing any code
|
|
120
|
+
|
|
121
|
+
Understand exactly what the test asserts. Write only the code that satisfies
|
|
122
|
+
that assertion. Nothing more.
|
|
123
|
+
|
|
124
|
+
### 2b — Implement the minimum
|
|
125
|
+
|
|
126
|
+
Rules for GREEN phase:
|
|
127
|
+
|
|
128
|
+
- Write the smallest amount of code that makes the failing test pass
|
|
129
|
+
- Do not add features not tested
|
|
130
|
+
- Do not clean up or restructure existing code — that is Refactor's job
|
|
131
|
+
- Do not add new tests — that is another RED cycle
|
|
132
|
+
- Hardcoding a return value is acceptable if it makes the test pass (the
|
|
133
|
+
Refactor phase will generalize it)
|
|
134
|
+
|
|
135
|
+
### 2c — Run the test suite and confirm GREEN
|
|
136
|
+
|
|
137
|
+
Run the test suite. The new test must pass. All previously passing tests must
|
|
138
|
+
still pass.
|
|
139
|
+
|
|
140
|
+
If any previously passing test now fails, you introduced a regression. Fix it
|
|
141
|
+
before continuing.
|
|
142
|
+
|
|
143
|
+
**GREEN Phase Report:**
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
## GREEN Phase Report
|
|
147
|
+
|
|
148
|
+
**Files changed**:
|
|
149
|
+
- [path/to/file] — [what was added, one sentence]
|
|
150
|
+
|
|
151
|
+
**Implementation approach**: [one sentence — what the code does]
|
|
152
|
+
**Suite result**: [X passing, Y failing]
|
|
153
|
+
**New test status**: PASS ✓
|
|
154
|
+
**Regressions**: [none | list failing tests]
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**STOP. Show the GREEN Phase Report. Do not proceed to REFACTOR without
|
|
158
|
+
confirmation.**
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Phase 3 — REFACTOR (Implementer role, then Reviewer role)
|
|
163
|
+
|
|
164
|
+
Invoke the `implementer` subagent via the Task tool.
|
|
165
|
+
|
|
166
|
+
### 3a — Assess what needs cleaning
|
|
167
|
+
|
|
168
|
+
Before touching any code, identify:
|
|
169
|
+
|
|
170
|
+
- Duplication introduced during GREEN
|
|
171
|
+
- Names that do not clearly express intent
|
|
172
|
+
- Abstractions that belong in a separate function or module
|
|
173
|
+
- Logic that is hardcoded and should be generalized
|
|
174
|
+
|
|
175
|
+
Do not invent improvements. Only address what is directly in the implementation
|
|
176
|
+
written in Phase 2.
|
|
177
|
+
|
|
178
|
+
### 3b — Refactor
|
|
179
|
+
|
|
180
|
+
Rules for REFACTOR phase:
|
|
181
|
+
|
|
182
|
+
- All tests must remain GREEN throughout — run the suite after each change
|
|
183
|
+
- Do not add new behavior
|
|
184
|
+
- Do not add new tests (if you discover untested behavior, note it for a new RED
|
|
185
|
+
cycle)
|
|
186
|
+
- Do not change function signatures unless the original was clearly wrong
|
|
187
|
+
|
|
188
|
+
### 3c — Run the test suite and confirm GREEN after refactor
|
|
189
|
+
|
|
190
|
+
The full suite must pass. If any test fails during refactor, undo the last
|
|
191
|
+
change and investigate.
|
|
192
|
+
|
|
193
|
+
### 3d — Review (Reviewer role)
|
|
194
|
+
|
|
195
|
+
Invoke the `reviewer` subagent via the Task tool.
|
|
196
|
+
|
|
197
|
+
Review only the refactored code against these axes:
|
|
198
|
+
|
|
199
|
+
| Axis | What to check |
|
|
200
|
+
| ------------- | --------------------------------------------------------------- |
|
|
201
|
+
| Scope | Did the refactor change any behavior? |
|
|
202
|
+
| Correctness | Does the logic still satisfy the original test intent? |
|
|
203
|
+
| Architecture | Does the code follow existing project patterns? |
|
|
204
|
+
| Test coverage | Are all written tests still meaningful (not trivially passing)? |
|
|
205
|
+
|
|
206
|
+
Produce a Review Report. CRITICAL findings block completion.
|
|
207
|
+
|
|
208
|
+
**REFACTOR Phase Report:**
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
## REFACTOR Phase Report
|
|
212
|
+
|
|
213
|
+
**Changes made**:
|
|
214
|
+
- [path/to/file] — [what was cleaned up]
|
|
215
|
+
|
|
216
|
+
**Suite result**: [X passing, Y failing]
|
|
217
|
+
**Behavioral changes**: none (refactor only)
|
|
218
|
+
|
|
219
|
+
### Review findings
|
|
220
|
+
**CRITICAL**: (none) | [list]
|
|
221
|
+
**WARNING**: (none) | [list]
|
|
222
|
+
**SUGGESTION**: (none) | [list]
|
|
223
|
+
|
|
224
|
+
**Verdict**: approved | approved with warnings | blocked
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Completion
|
|
230
|
+
|
|
231
|
+
The TDD cycle is complete when:
|
|
232
|
+
|
|
233
|
+
- RED: at least one failing test was written and confirmed failing
|
|
234
|
+
- GREEN: the minimum implementation makes the test pass
|
|
235
|
+
- REFACTOR: the code is clean, all tests pass, no CRITICAL review findings
|
|
236
|
+
|
|
237
|
+
**Final Summary:**
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
## TDD Cycle Summary
|
|
241
|
+
|
|
242
|
+
**Behavior implemented**: [one sentence]
|
|
243
|
+
**Tests written**: [count] — [list test names]
|
|
244
|
+
**Files changed**: [list]
|
|
245
|
+
**Suite result**: [X passing, Y failing]
|
|
246
|
+
**Cycle status**: complete | blocked (reason)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
If the behavior requires additional test cases, start a new `/tdd-cycle` with
|
|
250
|
+
the next scenario. One cycle = one behavior.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Generate a structured test plan for a feature or module — covers
|
|
4
|
+
unit, integration, contract, and edge cases without writing implementation code.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Test Plan Workflow
|
|
8
|
+
|
|
9
|
+
Scope: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
Specify what to plan tests for. Examples:
|
|
12
|
+
|
|
13
|
+
- A feature name: `user authentication`
|
|
14
|
+
- A module or file path: `src/orders/OrderService.kt`
|
|
15
|
+
- A Task Card title: `Add paginated product listing endpoint`
|
|
16
|
+
- A PR or branch: `feature/payment-retry`
|
|
17
|
+
|
|
18
|
+
If $ARGUMENTS is empty, describe the scope in your next message before
|
|
19
|
+
proceeding.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Step 0 — CCEP Bootstrap
|
|
24
|
+
|
|
25
|
+
Command: `test-plan` (fixed for this workflow — do not infer from user text)
|
|
26
|
+
|
|
27
|
+
1. Run: `npx cc-codeconductor ccep parse --command test-plan "$ARGUMENTS" --output json`
|
|
28
|
+
2. Run: `npx cc-codeconductor ccep resolve --command test-plan "$ARGUMENTS" --output json`
|
|
29
|
+
3. Run: `npx cc-codeconductor ccep profile test-plan --output json`
|
|
30
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command test-plan --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
31
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step 1 — Scope confirmation
|
|
36
|
+
|
|
37
|
+
Before generating the test plan, confirm the scope is well-defined.
|
|
38
|
+
|
|
39
|
+
A valid scope includes:
|
|
40
|
+
|
|
41
|
+
- The behavior or module under test
|
|
42
|
+
- The acceptance criteria or expected behavior (from the Task Card if available)
|
|
43
|
+
- Known edge cases or failure modes
|
|
44
|
+
|
|
45
|
+
If the scope is vague (e.g., "test the whole service"), ask one clarifying
|
|
46
|
+
question and wait for the answer.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 2 — Test plan generation (Tester role, planning mode)
|
|
51
|
+
|
|
52
|
+
Invoke the `tester` subagent via the Task tool.
|
|
53
|
+
|
|
54
|
+
Produce a test plan document — not test code. The plan will be used as input
|
|
55
|
+
when tests are actually written.
|
|
56
|
+
|
|
57
|
+
Cover the following layers:
|
|
58
|
+
|
|
59
|
+
**Unit tests**
|
|
60
|
+
|
|
61
|
+
- Individual functions or methods in isolation
|
|
62
|
+
- One test per behavior, not per method
|
|
63
|
+
- Input/output contracts, null handling, type coercion
|
|
64
|
+
|
|
65
|
+
**Integration tests**
|
|
66
|
+
|
|
67
|
+
- Interactions between two or more components
|
|
68
|
+
- Database read/write cycles (if applicable)
|
|
69
|
+
- External service boundaries (mocked or stubbed)
|
|
70
|
+
|
|
71
|
+
**Contract tests**
|
|
72
|
+
|
|
73
|
+
- API endpoint contracts: request shape, response shape, status codes
|
|
74
|
+
- Event schema contracts (if event-driven components are in scope)
|
|
75
|
+
|
|
76
|
+
**Edge cases**
|
|
77
|
+
|
|
78
|
+
- Empty inputs, boundary values, max/min limits
|
|
79
|
+
- Concurrent access (if shared state is involved)
|
|
80
|
+
- Failure paths: what happens when a dependency is unavailable
|
|
81
|
+
|
|
82
|
+
**Regression cases**
|
|
83
|
+
|
|
84
|
+
- Known past bugs that must not recur (include reference if available)
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Step 3 — Test Plan format
|
|
89
|
+
|
|
90
|
+
Produce the plan in this format:
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
## Test Plan — [Scope Name]
|
|
94
|
+
|
|
95
|
+
### Scope
|
|
96
|
+
[What is being tested and why]
|
|
97
|
+
|
|
98
|
+
### Unit Tests
|
|
99
|
+
| Test ID | Target | Scenario | Expected Result |
|
|
100
|
+
| ------- | ------ | -------- | --------------- |
|
|
101
|
+
| U-001 | ... | ... | ... |
|
|
102
|
+
|
|
103
|
+
### Integration Tests
|
|
104
|
+
| Test ID | Components | Scenario | Expected Result |
|
|
105
|
+
| ------- | ---------- | -------- | --------------- |
|
|
106
|
+
| I-001 | ... | ... | ... |
|
|
107
|
+
|
|
108
|
+
### Contract Tests
|
|
109
|
+
| Test ID | Endpoint/Event | Property | Expected Value |
|
|
110
|
+
| ------- | -------------- | -------- | -------------- |
|
|
111
|
+
| C-001 | ... | ... | ... |
|
|
112
|
+
|
|
113
|
+
### Edge Cases
|
|
114
|
+
| Test ID | Input/Condition | Expected Behavior |
|
|
115
|
+
| ------- | --------------- | ----------------- |
|
|
116
|
+
| E-001 | ... | ... |
|
|
117
|
+
|
|
118
|
+
### Regression Cases
|
|
119
|
+
| Test ID | Reference | Scenario | Must Not Happen |
|
|
120
|
+
| ------- | --------- | -------- | --------------- |
|
|
121
|
+
| R-001 | ... | ... | ... |
|
|
122
|
+
|
|
123
|
+
### Coverage Targets
|
|
124
|
+
- Minimum unit coverage: [% or "all acceptance criteria covered"]
|
|
125
|
+
- Integration scenarios: [count]
|
|
126
|
+
- Contract validations: [count]
|
|
127
|
+
|
|
128
|
+
### Out of Scope
|
|
129
|
+
[What this test plan explicitly does not cover and why]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Step 4 — Human review
|
|
135
|
+
|
|
136
|
+
Show the Test Plan before any tests are written. The Test Plan is an artifact
|
|
137
|
+
for review and approval.
|
|
138
|
+
|
|
139
|
+
Writing test code is a separate action — run `/feature` or add a test task to
|
|
140
|
+
implement from this plan.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Completion
|
|
145
|
+
|
|
146
|
+
Deliver the complete Test Plan document. Save it as
|
|
147
|
+
`docs/test-plans/[scope-slug].md` if requested.
|
|
148
|
+
|
|
149
|
+
This command produces a plan, not test files. No production code and no test
|
|
150
|
+
code is written during this command.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
[cc: alias] Classify a request into type, risk, and the destination CodeConductor command.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Triage Workflow
|
|
7
|
+
|
|
8
|
+
Triage request: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Step 0 — CCEP Bootstrap
|
|
11
|
+
|
|
12
|
+
Command: `triage` (fixed for this workflow — do not infer from user text)
|
|
13
|
+
|
|
14
|
+
1. Run: `npx cc-codeconductor ccep parse --command triage "$ARGUMENTS" --output json`
|
|
15
|
+
2. Run: `npx cc-codeconductor ccep resolve --command triage "$ARGUMENTS" --output json`
|
|
16
|
+
3. Run: `npx cc-codeconductor ccep profile triage --output json`
|
|
17
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command triage --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
18
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Step 1 — Classify (task-coach)
|
|
23
|
+
|
|
24
|
+
Invoke `task-coach`. Produce: title, type (`feature` | `fix` | `refactor` | `review` | `docs` | `test`), risk, named scope, and the destination command (`feature`, `fix`, `refactor`, `review`, `explore`, …).
|
|
25
|
+
|
|
26
|
+
Ask one question per unresolved branch. If the human is unavailable, emit a Markdown questionnaire and stop at ConfirmationGate.
|
|
27
|
+
|
|
28
|
+
**STOP here. Show the classification and wait for confirmation before running the destination workflow.**
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Completion
|
|
33
|
+
|
|
34
|
+
Do not implement. Hand the human a destination slash command and a partial Task Card.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Pre-commit Gate: Typecheck and Test
|
|
2
|
+
|
|
3
|
+
Este gate instala un hook `pre-commit` que ejecuta `bun run typecheck` y `bun run test` antes de permitir commits en el repositorio. Si cualquiera de estos comandos falla, el commit es bloqueado.
|
|
4
|
+
|
|
5
|
+
## Cuándo usar
|
|
6
|
+
|
|
7
|
+
**Para agentes**: Integra este gate en flujos de desarrollo local cuando quieras garantizar que los cambios typecheck correctamente y pasan los tests antes de ser cometidos.
|
|
8
|
+
|
|
9
|
+
**Para equipos**: Utiliza este gate como barrera de calidad local (sin dependencias externas) para prevenir commits con errores de tipado o tests fallidos.
|
|
10
|
+
|
|
11
|
+
## Instalación
|
|
12
|
+
|
|
13
|
+
### Paso 1: Descarga el script
|
|
14
|
+
|
|
15
|
+
El script está embebido abajo (sección "Script Installer").
|
|
16
|
+
|
|
17
|
+
### Paso 2: Ejecuta en la raíz de tu proyecto
|
|
18
|
+
|
|
19
|
+
Desde la raíz del repositorio (o cualquier subdirectorio), extrae el bloque ```bash de este archivo y ejecuta:
|
|
20
|
+
|
|
21
|
+
bash << 'SCRIPT_EOF'
|
|
22
|
+
#!/bin/bash
|
|
23
|
+
set -e
|
|
24
|
+
# [contenido del bloque bash de abajo]
|
|
25
|
+
SCRIPT_EOF
|
|
26
|
+
|
|
27
|
+
O, más simplemente, guarda el script en un archivo temporal y ejecútalo:
|
|
28
|
+
|
|
29
|
+
curl -s https://raw.githubusercontent.com/.../ | bash
|
|
30
|
+
|
|
31
|
+
### Paso 3: Verifica
|
|
32
|
+
|
|
33
|
+
Después de la instalación, debería verse:
|
|
34
|
+
|
|
35
|
+
Pre-commit hook installed successfully.
|
|
36
|
+
|
|
37
|
+
## Script Installer
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
#!/bin/bash
|
|
41
|
+
set -e
|
|
42
|
+
|
|
43
|
+
# Resolver git directory dinámicamente (worktree-safe)
|
|
44
|
+
GIT_DIR=$(git rev-parse --git-dir)
|
|
45
|
+
HOOK_PATH="$GIT_DIR/hooks/pre-commit"
|
|
46
|
+
|
|
47
|
+
# Detectar Husky o lint-staged en package.json
|
|
48
|
+
if grep -q '"husky"' package.json 2>/dev/null || grep -q '"lint-staged"' package.json 2>/dev/null; then
|
|
49
|
+
echo "Warning: Husky or lint-staged detected in package.json. Installation skipped."
|
|
50
|
+
exit 0
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Verificar si un pre-commit hook ya existe
|
|
54
|
+
if [ -f "$HOOK_PATH" ]; then
|
|
55
|
+
echo "Warning: Pre-commit hook already exists at $HOOK_PATH. Not overwriting."
|
|
56
|
+
exit 0
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Crear directorio hooks si no existe
|
|
60
|
+
mkdir -p "$GIT_DIR/hooks"
|
|
61
|
+
|
|
62
|
+
# Escribir el hook pre-commit
|
|
63
|
+
cat > "$HOOK_PATH" << 'HOOK_EOF'
|
|
64
|
+
#!/bin/bash
|
|
65
|
+
bun run typecheck || exit 1
|
|
66
|
+
bun run test || exit 1
|
|
67
|
+
HOOK_EOF
|
|
68
|
+
|
|
69
|
+
# Hacer el hook ejecutable
|
|
70
|
+
chmod +x "$HOOK_PATH"
|
|
71
|
+
|
|
72
|
+
echo "Pre-commit hook installed successfully."
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Notas de implementación
|
|
76
|
+
|
|
77
|
+
- **Sin dependencias externas**: El script no instala Husky, lint-staged, ni ninguna otra herramienta. Solo escribe un archivo shell y configura permisos.
|
|
78
|
+
- **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
|
|
79
|
+
- **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
|
|
80
|
+
- **Protección de hooks existentes**: Si ya existe un `.git/hooks/pre-commit`, el script no lo sobrescribe.
|
|
81
|
+
- **Solo Bun**: El hook ejecuta `bun run typecheck` y `bun run test`. Asegúrate de que estos scripts están definidos en `package.json`.
|
|
82
|
+
|
|
83
|
+
## Verificación
|
|
84
|
+
|
|
85
|
+
Después de instalar, verifica que el hook está en su lugar.
|
|
86
|
+
|
|
87
|
+
Para verificar, ejecuta:
|
|
88
|
+
|
|
89
|
+
ls -la .git/hooks/pre-commit
|
|
90
|
+
|
|
91
|
+
Debe mostrar algo como:
|
|
92
|
+
|
|
93
|
+
-rwxr-xr-x user group ... .git/hooks/pre-commit
|
|
94
|
+
|
|
95
|
+
Luego, intenta hacer un commit. Si hay errores de tipo o tests fallidos, el commit será bloqueado:
|
|
96
|
+
|
|
97
|
+
git add .
|
|
98
|
+
git commit -m "test"
|
|
99
|
+
# Si typecheck o test falla, verás el error y el commit será abortado.
|
|
100
|
+
|
|
101
|
+
## Troubleshooting
|
|
102
|
+
|
|
103
|
+
### "Warning: Pre-commit hook already exists"
|
|
104
|
+
|
|
105
|
+
Ya hay un hook pre-commit. Revisa su contenido:
|
|
106
|
+
|
|
107
|
+
cat .git/hooks/pre-commit
|
|
108
|
+
|
|
109
|
+
Si quieres reemplazarlo, bórralo y ejecuta el script nuevamente:
|
|
110
|
+
|
|
111
|
+
rm .git/hooks/pre-commit
|
|
112
|
+
bash /path/to/installer
|
|
113
|
+
|
|
114
|
+
### "Warning: Husky or lint-staged detected"
|
|
115
|
+
|
|
116
|
+
Tu proyecto usa Husky o lint-staged. Este gate no se instala para evitar conflictos. Si quieres usar este gate, remove Husky/lint-staged de `package.json` y ejecuta de nuevo.
|
|
117
|
+
|
|
118
|
+
### Hook no se ejecuta al hacer commit
|
|
119
|
+
|
|
120
|
+
Verifica que el hook es ejecutable:
|
|
121
|
+
|
|
122
|
+
chmod +x .git/hooks/pre-commit
|
|
123
|
+
|
|
124
|
+
Verifica que `bun run typecheck` y `bun run test` existen en `package.json`:
|
|
125
|
+
|
|
126
|
+
cat package.json | grep -A 5 '"scripts"'
|
|
127
|
+
|
|
128
|
+
### "command not found: bun"
|
|
129
|
+
|
|
130
|
+
Bun no está instalado o no está en PATH. Instala Bun desde https://bun.sh o configura PATH adecuadamente.
|
|
131
|
+
|
|
132
|
+
## Adicional: Desinstalación
|
|
133
|
+
|
|
134
|
+
Para remover el hook, simplemente bórralo:
|
|
135
|
+
|
|
136
|
+
rm .git/hooks/pre-commit
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Behavioral discipline for all code changes — think before coding, simplicity first, surgical changes, goal-driven execution.
|
|
3
|
+
globs: "**/*"
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Behavioral Discipline
|
|
8
|
+
|
|
9
|
+
1. **Think Before Coding** — State assumptions explicitly. If uncertain, ask.
|
|
10
|
+
2. **Simplicity First** — Minimum code that solves the problem. No speculative abstractions.
|
|
11
|
+
3. **Surgical Changes** — Touch only what you must. Match existing style.
|
|
12
|
+
4. **Goal-Driven Execution** — Define verifiable success criteria. Loop until verified.
|
|
13
|
+
|
|
14
|
+
See @AGENTS.md for full routing policy and agent contracts.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Context budget and token optimization — use when conversation is long or switching tasks.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Context Budget
|
|
7
|
+
|
|
8
|
+
- Execute `/clear` when switching to an unrelated task type.
|
|
9
|
+
- Use `/summarize` or `/compress` before re-delegating with large context.
|
|
10
|
+
- Delegate verbose exploration to background subagents (`repo-explorer`).
|
|
11
|
+
- Prefer `@filename` references over pasting full file contents.
|
|
12
|
+
- Respect `.cursorignore` — do not read excluded paths unless explicitly required.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Cursor subagent orchestration patterns — multitask, parallel delegation, model tiers.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Orchestration Patterns
|
|
7
|
+
|
|
8
|
+
- Use `/multitask` for independent parallel steps (review + docs).
|
|
9
|
+
- Invoke subagents via Task tool: `orchestrator`, `architect`, `implementer`, `tester`, `reviewer`, `security-reviewer`, `complexity-auditor`, `docs`, `task-coach`, `repo-explorer`.
|
|
10
|
+
- High-risk routes: `architect` → `tester` → `implementer` → `security-reviewer` → `reviewer`.
|
|
11
|
+
- Run `repo-explorer` as background subagent for codebase mapping.
|
|
12
|
+
- See `.cursor/agents/orchestrator.md` for full routing table.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: YAGNI and stdlib-first constraints for source code changes.
|
|
3
|
+
globs: "src/**"
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# YAGNI and Stdlib-First
|
|
8
|
+
|
|
9
|
+
- Do not build features or abstractions not explicitly requested.
|
|
10
|
+
- Prefer the language standard library over third-party packages.
|
|
11
|
+
- Every line must solve a problem that exists now.
|