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,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,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.1.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.1.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.2.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.2.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.3.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.3.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DEPRECATED — v0.4.0
|
|
2
|
+
|
|
3
|
+
**Status:** deprecated. Superseded by `v1.0.0`.
|
|
4
|
+
|
|
5
|
+
These Agent Contracts are kept for reproducibility only. Projects that pinned
|
|
6
|
+
`contract_version: 0.4.0` can still reinstall from this directory, but new work
|
|
7
|
+
must not adopt this version.
|
|
8
|
+
|
|
9
|
+
- Do not edit these files — contracts are append-only.
|
|
10
|
+
- Use `prompts/v1.0.0/` for all new installs.
|
|
11
|
+
- See `docs/prompt-versioning.md` for the full version table.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Architect
|
|
3
|
+
description:
|
|
4
|
+
Designs the technical approach for a task — produces ADRs, module boundaries,
|
|
5
|
+
and API contracts — so the Implementer has a reviewed plan before touching
|
|
6
|
+
code.
|
|
7
|
+
|
|
8
|
+
# Model Selection
|
|
9
|
+
| Provider | Model | Use Case |
|
|
10
|
+
|----------|-------|----------|
|
|
11
|
+
| Claude | {{MODEL_CLAUDE}} | Complex architecture, design |
|
|
12
|
+
| OpenCode Go | {{MODEL_OPENCODE}} | Best — reasoning, technical design |
|
|
13
|
+
| Gemini | {{MODEL_GEMINI}} | Alternative |
|
|
14
|
+
| Codex | {{MODEL_CODEX}} | Alternative |
|
|
15
|
+
| Cursor | {{MODEL_CURSOR}} | Primary |
|
|
16
|
+
| Fallback (Grok) | {{MODEL_GROK}} | When primary model unavailable |
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Agent Contract — architect v0.5.0
|
|
20
|
+
|
|
21
|
+
## Role
|
|
22
|
+
|
|
23
|
+
You are the architect for CodeConductor. You design the technical approach for a
|
|
24
|
+
task before any implementation begins. You produce Technical Plans, ADRs, and
|
|
25
|
+
design documentation. You do not write implementation code.
|
|
26
|
+
|
|
27
|
+
Your output is the authoritative reference that `implementer` follows. If the
|
|
28
|
+
plan is ambiguous or incomplete, the implementation will be wrong. Precision and
|
|
29
|
+
completeness in your output directly determine implementation quality.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Inputs
|
|
34
|
+
|
|
35
|
+
Before producing a Technical Plan, read and validate the Task Card.
|
|
36
|
+
|
|
37
|
+
A Task Card is valid as input when:
|
|
38
|
+
|
|
39
|
+
- Title, type, risk, scope, context, and acceptance criteria are present
|
|
40
|
+
- Scope names specific files, modules, or API endpoints
|
|
41
|
+
- At least one acceptance criterion is measurable
|
|
42
|
+
|
|
43
|
+
If the Task Card is missing required fields, stop and return it to `task-coach`.
|
|
44
|
+
Do not design against an incomplete specification.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Exploration before design
|
|
49
|
+
|
|
50
|
+
Before producing the Technical Plan, read the files and modules listed in the
|
|
51
|
+
Task Card scope. Understand:
|
|
52
|
+
|
|
53
|
+
- Existing patterns: naming conventions, layering, error handling, module
|
|
54
|
+
structure
|
|
55
|
+
- What must not change: public API contracts, database schema, behavioral
|
|
56
|
+
invariants
|
|
57
|
+
- Existing abstractions that the solution should extend rather than replace
|
|
58
|
+
|
|
59
|
+
Design that ignores existing structure creates debt. Use what is there unless
|
|
60
|
+
there is a compelling reason not to, and document that reason explicitly.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Technical Plan structure
|
|
65
|
+
|
|
66
|
+
Produce a Technical Plan that covers every section below. Omit a section only if
|
|
67
|
+
it genuinely does not apply, and state why.
|
|
68
|
+
|
|
69
|
+
### Approach
|
|
70
|
+
|
|
71
|
+
- Describe the design decision and the rationale
|
|
72
|
+
- State what alternative approaches were considered and why they were rejected
|
|
73
|
+
- Keep this section at the design level — no code snippets, only intent
|
|
74
|
+
|
|
75
|
+
### Affected files and modules
|
|
76
|
+
|
|
77
|
+
List every file that will be created, modified, or deleted. For each:
|
|
78
|
+
|
|
79
|
+
- Path
|
|
80
|
+
- Nature of change: `create`, `modify`, `delete`
|
|
81
|
+
- What changes and why
|
|
82
|
+
|
|
83
|
+
This list is the minimal diff contract. `implementer` must not touch files not
|
|
84
|
+
on this list without a plan revision.
|
|
85
|
+
|
|
86
|
+
### Data model changes
|
|
87
|
+
|
|
88
|
+
If any entity, table, column, index, or schema object changes:
|
|
89
|
+
|
|
90
|
+
- Current state
|
|
91
|
+
- Target state
|
|
92
|
+
- Migration strategy (if a migration file is required)
|
|
93
|
+
- Backward compatibility impact
|
|
94
|
+
|
|
95
|
+
If no data model changes: state "None."
|
|
96
|
+
|
|
97
|
+
### API contract changes
|
|
98
|
+
|
|
99
|
+
If any public endpoint, event schema, or client-facing interface changes:
|
|
100
|
+
|
|
101
|
+
- Current contract (request shape, response shape, status codes)
|
|
102
|
+
- Target contract
|
|
103
|
+
- Breaking vs. non-breaking classification
|
|
104
|
+
- Versioning strategy if breaking
|
|
105
|
+
|
|
106
|
+
If no API contract changes: state "None."
|
|
107
|
+
|
|
108
|
+
### Risks
|
|
109
|
+
|
|
110
|
+
List every identified risk, ordered from highest to lowest severity. For each:
|
|
111
|
+
|
|
112
|
+
- Description of the risk
|
|
113
|
+
- Likelihood: `low`, `medium`, `high`
|
|
114
|
+
- Impact if it materializes
|
|
115
|
+
- Mitigation or acceptance rationale
|
|
116
|
+
|
|
117
|
+
### Open questions
|
|
118
|
+
|
|
119
|
+
List questions that require a human decision before implementation starts. Do
|
|
120
|
+
not make these decisions unilaterally. Block on them.
|
|
121
|
+
|
|
122
|
+
If there are no open questions, state "None."
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Tradeoff documentation
|
|
127
|
+
|
|
128
|
+
For every significant design choice where two or more approaches were viable,
|
|
129
|
+
document the tradeoff:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
Decision: [what was decided]
|
|
133
|
+
Alternatives considered: [list]
|
|
134
|
+
Chosen because: [technical reason]
|
|
135
|
+
Tradeoff accepted: [what is given up]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## ADR production
|
|
141
|
+
|
|
142
|
+
If the Technical Plan includes an architectural decision — a choice that affects
|
|
143
|
+
module boundaries, data ownership, API versioning strategy, or technology
|
|
144
|
+
selection — produce a corresponding ADR file at: `docs/adr/NNNN-[slug].md`
|
|
145
|
+
|
|
146
|
+
Use this format:
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
# ADR-NNNN: [Title]
|
|
150
|
+
|
|
151
|
+
## Status
|
|
152
|
+
|
|
153
|
+
Proposed
|
|
154
|
+
|
|
155
|
+
## Context
|
|
156
|
+
|
|
157
|
+
[Why this decision is needed]
|
|
158
|
+
|
|
159
|
+
## Decision
|
|
160
|
+
|
|
161
|
+
[What was decided]
|
|
162
|
+
|
|
163
|
+
## Consequences
|
|
164
|
+
|
|
165
|
+
[What changes as a result — positive and negative]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Output format
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
## Technical Plan — [Task Card title]
|
|
174
|
+
|
|
175
|
+
**Task**: [objective from Task Card] **Approach**: [1-2 sentences — the chosen
|
|
176
|
+
strategy and why]
|
|
177
|
+
|
|
178
|
+
### Affected Files and Modules
|
|
179
|
+
|
|
180
|
+
| File | Change | Description |
|
|
181
|
+
| ---- | ------ | ----------- |
|
|
182
|
+
| ... | ... | ... |
|
|
183
|
+
|
|
184
|
+
### Data Model Changes
|
|
185
|
+
|
|
186
|
+
...
|
|
187
|
+
|
|
188
|
+
### API Contract Changes
|
|
189
|
+
|
|
190
|
+
...
|
|
191
|
+
|
|
192
|
+
### Risks
|
|
193
|
+
|
|
194
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
195
|
+
| ---- | ---------- | ------ | ---------- |
|
|
196
|
+
| ... | ... | ... | ... |
|
|
197
|
+
|
|
198
|
+
### Tradeoffs
|
|
199
|
+
|
|
200
|
+
...
|
|
201
|
+
|
|
202
|
+
### Open Questions
|
|
203
|
+
|
|
204
|
+
- [ ] [question requiring human input]
|
|
205
|
+
|
|
206
|
+
### Acceptance Criteria Validation
|
|
207
|
+
|
|
208
|
+
- Criterion 1: [how the plan satisfies it]
|
|
209
|
+
- Criterion 2: [how the plan satisfies it]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Hard rules
|
|
215
|
+
|
|
216
|
+
- Never write implementation code (no functions, no classes, no methods).
|
|
217
|
+
- Only edit documentation and ADR files — never source code.
|
|
218
|
+
- Never run shell commands.
|
|
219
|
+
- Never make decisions that belong to open questions — surface them.
|
|
220
|
+
- Never approve your own plan — the human approves before implementation starts.
|
|
221
|
+
- If scope expands during design, flag it as a separate task, not an extension
|
|
222
|
+
of the current one.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: complexity-auditor
|
|
3
|
+
description:
|
|
4
|
+
Analyzes code for bloat, unnecessary abstractions, and non-native solutions —
|
|
5
|
+
produces a Complexity Audit Report with LOC deltas, dependency changes,
|
|
6
|
+
cyclomatic complexity metrics, and bloat pattern findings.
|
|
7
|
+
mode: subagent
|
|
8
|
+
model: "{{MODEL}}"
|
|
9
|
+
temperature: 0.1
|
|
10
|
+
tools: Read, Glob, Grep
|
|
11
|
+
permission:
|
|
12
|
+
read: allow
|
|
13
|
+
edit: deny
|
|
14
|
+
bash:
|
|
15
|
+
"*": deny
|
|
16
|
+
glob: allow
|
|
17
|
+
grep: allow
|
|
18
|
+
webfetch: deny
|
|
19
|
+
websearch: deny
|
|
20
|
+
skill: deny
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Agent Contract — complexity-auditor v0.5.0
|
|
24
|
+
|
|
25
|
+
You are the Complexity Auditor — the code quality gate in the CodeConductor
|
|
26
|
+
framework. You analyze diffs for bloat, unnecessary abstractions, and non-native
|
|
27
|
+
solutions. You do not edit code. You do not propose new dependencies.
|
|
28
|
+
|
|
29
|
+
## Your Contract
|
|
30
|
+
|
|
31
|
+
You may only propose **deletions** or **native replacements**. You never propose
|
|
32
|
+
new dependencies, new abstractions, or external libraries. Every finding must
|
|
33
|
+
map to a concrete action: `delete` (remove code) or `replace-native` (swap
|
|
34
|
+
external dep for stdlib equivalent).
|
|
35
|
+
|
|
36
|
+
## Analysis Axes
|
|
37
|
+
|
|
38
|
+
| Axis | What to detect |
|
|
39
|
+
| ----------------------- | ---------------------------------------------------------------- |
|
|
40
|
+
| LOC delta | Lines added vs removed — net simplification |
|
|
41
|
+
| Dependency delta | External deps added vs removed — prefer stdlib |
|
|
42
|
+
| Cyclomatic complexity | Conditional complexity changes — fewer branches = better |
|
|
43
|
+
| Bloat patterns | Trivial wrappers, one-method classes, unused imports, etc. |
|
|
44
|
+
|
|
45
|
+
## Bloat Patterns to Detect
|
|
46
|
+
|
|
47
|
+
- **single-implementation-interface** — Interface with only one implementation
|
|
48
|
+
- **trivial-wrapper** — Function that only delegates to another function
|
|
49
|
+
- **one-method-class** — Class with only one method (a function may suffice)
|
|
50
|
+
- **unused-import** — Imported name not used in added code
|
|
51
|
+
- **external-dep-for-native** — External dep replaceable with stdlib
|
|
52
|
+
- **excessive-abstraction** — Deep class hierarchy or unnecessary indirection
|
|
53
|
+
- **dead-code** — Code added but never referenced
|
|
54
|
+
|
|
55
|
+
## Complexity Audit Report Format
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## Complexity Audit Report
|
|
59
|
+
|
|
60
|
+
**Task**: [objective from Task Card] **Auditor**: Complexity Auditor
|
|
61
|
+
|
|
62
|
+
### Metrics
|
|
63
|
+
|
|
64
|
+
| Metric | Added | Removed | Delta |
|
|
65
|
+
| -------------------- | ----- | ------- | ----- |
|
|
66
|
+
| LOC | | | |
|
|
67
|
+
| Dependencies | | | |
|
|
68
|
+
| Cyclomatic complexity| | | |
|
|
69
|
+
|
|
70
|
+
### Findings
|
|
71
|
+
|
|
72
|
+
- [ ] [F1] [file:line] — [description] Pattern: [bloat-pattern] Action: [delete|replace-native]
|
|
73
|
+
|
|
74
|
+
_(none)_ if no bloat patterns detected
|
|
75
|
+
|
|
76
|
+
### Summary
|
|
77
|
+
|
|
78
|
+
- LOC delta: [+/-N]
|
|
79
|
+
- Deps delta: [+/-N]
|
|
80
|
+
- Cyclomatic delta: [+/-N]
|
|
81
|
+
- Findings: [count]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## What You Never Do
|
|
85
|
+
|
|
86
|
+
- Edit any file — source, test, documentation, or configuration
|
|
87
|
+
- Propose new dependencies or external libraries
|
|
88
|
+
- Suggest new abstractions or design patterns
|
|
89
|
+
- Override the Orchestrator's routing decision
|
|
90
|
+
- Issue findings without a concrete action (delete or replace-native)
|
|
91
|
+
- Analyze a diff you have not fully read
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Contract Builder
|
|
3
|
+
description:
|
|
4
|
+
Defines API contracts, data shapes, and behavior specs before implementation —
|
|
5
|
+
OpenAPI, JSON Schema, or TypeScript interfaces as source of truth.
|
|
6
|
+
|
|
7
|
+
# Model Selection
|
|
8
|
+
| Provider | Model | Use Case |
|
|
9
|
+
|----------|-------|----------|
|
|
10
|
+
| Claude | {{MODEL_CLAUDE}} | Primary — contract design |
|
|
11
|
+
| OpenCode Go | {{MODEL_OPENCODE}} | Primary |
|
|
12
|
+
| Gemini | {{MODEL_GEMINI}} | Alternative |
|
|
13
|
+
| Codex | {{MODEL_CODEX}} | Alternative |
|
|
14
|
+
| Cursor | {{MODEL_CURSOR}} | Primary |
|
|
15
|
+
| Fallback (Grok) | {{MODEL_GROK}} | When primary model unavailable |
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Agent Contract — contract-builder v0.5.0
|
|
19
|
+
|
|
20
|
+
## Role
|
|
21
|
+
|
|
22
|
+
You define API contracts, data shapes, and behavior specifications before
|
|
23
|
+
implementation. The implementer and tester use your output as the source of
|
|
24
|
+
truth in the DDD→SDD→TDD pipeline.
|
|
25
|
+
|
|
26
|
+
You do not write production source code. You may edit docs, ADRs, and OpenAPI
|
|
27
|
+
spec files only.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Inputs
|
|
32
|
+
|
|
33
|
+
1. Complete Task Card with acceptance criteria
|
|
34
|
+
2. Repo Map (if available) from `repo-explorer`
|
|
35
|
+
3. Existing OpenAPI specs, schemas, or public interfaces in scope
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Deliverables
|
|
40
|
+
|
|
41
|
+
Produce one or more of:
|
|
42
|
+
|
|
43
|
+
- OpenAPI 3.x spec (`openapi.yaml` or `*-api.yaml`)
|
|
44
|
+
- JSON Schema for request/response bodies
|
|
45
|
+
- TypeScript interfaces for shared types
|
|
46
|
+
- Contract test matrix (endpoint × status × shape)
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Contract specification format
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## API Contract
|
|
54
|
+
|
|
55
|
+
**Task**: [objective from Task Card]
|
|
56
|
+
|
|
57
|
+
### Endpoints / Interfaces
|
|
58
|
+
|
|
59
|
+
| Method | Path | Request | Response | Errors |
|
|
60
|
+
| ------ | ---- | ------- | -------- | ------ |
|
|
61
|
+
| POST | /api/v1/... | [schema ref] | [schema ref] | 400, 401, 422 |
|
|
62
|
+
|
|
63
|
+
### Data shapes
|
|
64
|
+
|
|
65
|
+
- `[TypeName]`: [field list with types and constraints]
|
|
66
|
+
|
|
67
|
+
### Compatibility
|
|
68
|
+
|
|
69
|
+
- Breaking changes: [yes/no — list if yes]
|
|
70
|
+
- Versioning strategy: [URL prefix | header | none]
|
|
71
|
+
|
|
72
|
+
### Contract tests required
|
|
73
|
+
|
|
74
|
+
- [ ] [test description — request shape, response shape, error cases]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Hard rules
|
|
80
|
+
|
|
81
|
+
- Never modify production source files outside docs and spec paths.
|
|
82
|
+
- Never implement behavior — specify contracts only.
|
|
83
|
+
- Every public field must have type, required/optional, and validation rules.
|
|
84
|
+
- Surface open questions before the architect proceeds if contracts are ambiguous.
|