cc-codeconductor 0.2.8 → 0.2.10

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.
Files changed (92) hide show
  1. package/README.md +113 -26
  2. package/dist/index.js +1752 -81
  3. package/package.json +1 -1
  4. package/presets/agy/AGENTS.md +354 -0
  5. package/presets/agy/README.md +47 -0
  6. package/presets/agy/hooks.json +30 -0
  7. package/presets/agy/mcp_config.json +3 -0
  8. package/presets/agy/rules/commit-style.md +1 -0
  9. package/presets/agy/rules/graphify.md +14 -0
  10. package/presets/agy/scripts/post-tool.sh +25 -0
  11. package/presets/agy/scripts/pre-tool.sh +56 -0
  12. package/presets/agy/settings.json +8 -0
  13. package/presets/agy/skills/cc-api-contract/SKILL.md +71 -0
  14. package/presets/agy/skills/cc-db-migration/SKILL.md +70 -0
  15. package/presets/agy/skills/cc-feature/SKILL.md +115 -0
  16. package/presets/agy/skills/cc-fix/SKILL.md +124 -0
  17. package/presets/agy/skills/cc-pagespeed/SKILL.md +101 -0
  18. package/presets/agy/skills/cc-refactor/SKILL.md +149 -0
  19. package/presets/agy/skills/cc-review/SKILL.md +142 -0
  20. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +226 -0
  21. package/presets/agy/skills/cc-test-plan/SKILL.md +145 -0
  22. package/presets/agy/skills/commit/SKILL.md +5 -0
  23. package/presets/agy/workflows/cc-api-contract.md +71 -0
  24. package/presets/agy/workflows/cc-db-migration.md +70 -0
  25. package/presets/agy/workflows/cc-feature.md +115 -0
  26. package/presets/agy/workflows/cc-fix.md +124 -0
  27. package/presets/agy/workflows/cc-pagespeed.md +101 -0
  28. package/presets/agy/workflows/cc-refactor.md +149 -0
  29. package/presets/agy/workflows/cc-review.md +142 -0
  30. package/presets/agy/workflows/cc-tdd-cycle.md +226 -0
  31. package/presets/agy/workflows/cc-test-plan.md +145 -0
  32. package/presets/agy/workflows/commit.md +1 -0
  33. package/presets/claude/CLAUDE.md +13 -3
  34. package/presets/claude/claude.json +6 -0
  35. package/presets/claude/commands/cc/pagespeed.md +103 -0
  36. package/presets/claude/settings.json +249 -2
  37. package/presets/claude/skills/conductor-setup/SKILL.md +125 -0
  38. package/presets/claude/skills/find-skills/SKILL.md +142 -0
  39. package/presets/claude/skills/multi-agent-orchestration/README.md +144 -0
  40. package/presets/claude/skills/multi-agent-orchestration/SKILL.md +579 -0
  41. package/presets/claude/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  42. package/presets/claude/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  43. package/presets/claude/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  44. package/presets/claude/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  45. package/presets/claude/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  46. package/presets/claude/skills/pagespeed-insights/SKILL.md +443 -0
  47. package/presets/claude/skills/pagespeed-insights/reference.md +50 -0
  48. package/presets/claude/skills/pagespeed-perf/SKILL.md +279 -0
  49. package/presets/claude/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  50. package/presets/claude/skills/workflow-orchestration-patterns/references/details.md +223 -0
  51. package/presets/codex/AGENTS.md +19 -14
  52. package/presets/codex/skills/conductor-setup/SKILL.md +125 -0
  53. package/presets/codex/skills/find-skills/SKILL.md +142 -0
  54. package/presets/codex/skills/multi-agent-orchestration/README.md +144 -0
  55. package/presets/codex/skills/multi-agent-orchestration/SKILL.md +579 -0
  56. package/presets/codex/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  57. package/presets/codex/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  58. package/presets/codex/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  59. package/presets/codex/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  60. package/presets/codex/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  61. package/presets/codex/skills/pagespeed-insights/SKILL.md +443 -0
  62. package/presets/codex/skills/pagespeed-insights/reference.md +50 -0
  63. package/presets/codex/skills/pagespeed-perf/SKILL.md +279 -0
  64. package/presets/codex/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  65. package/presets/codex/skills/workflow-orchestration-patterns/references/details.md +223 -0
  66. package/presets/opencode/README.md +11 -10
  67. package/presets/opencode/commands/cc-pagespeed.md +100 -0
  68. package/presets/opencode/skills/conductor-setup/SKILL.md +125 -0
  69. package/presets/opencode/skills/find-skills/SKILL.md +142 -0
  70. package/presets/opencode/skills/multi-agent-orchestration/README.md +144 -0
  71. package/presets/opencode/skills/multi-agent-orchestration/SKILL.md +579 -0
  72. package/presets/opencode/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  73. package/presets/opencode/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  74. package/presets/opencode/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  75. package/presets/opencode/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  76. package/presets/opencode/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  77. package/presets/opencode/skills/pagespeed-insights/SKILL.md +443 -0
  78. package/presets/opencode/skills/pagespeed-insights/reference.md +50 -0
  79. package/presets/opencode/skills/pagespeed-perf/SKILL.md +279 -0
  80. package/presets/opencode/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  81. package/presets/opencode/skills/workflow-orchestration-patterns/references/details.md +223 -0
  82. package/presets/seo-hotel/commands/cc-seo-audit.md +17 -9
  83. package/presets/seo-hotel/commands/cc-seo-llms.md +64 -0
  84. package/presets/seo-hotel/seo-hotel.yml +55 -0
  85. package/presets/seo-hotel/settings.json +225 -0
  86. package/presets/seo-hotel/skills/find-skills/SKILL.md +142 -0
  87. package/presets/seo-hotel/skills/pagespeed-insights/SKILL.md +443 -0
  88. package/presets/seo-hotel/skills/pagespeed-insights/reference.md +50 -0
  89. package/src/presets/manifests/agy.yml +36 -2
  90. package/src/presets/manifests/claude.yml +5 -0
  91. package/src/presets/manifests/opencode.yml +4 -0
  92. package/src/presets/models/agy.yml +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-codeconductor",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
5
5
  "keywords": [
6
6
  "ai",
@@ -0,0 +1,354 @@
1
+ <!-- CODECONDUCTOR:BEGIN managed -->
2
+
3
+ # CodeConductor — Antigravity CLI (agy) Preset
4
+
5
+ This file configures CodeConductor for **Google Antigravity CLI (agy)** and Antigravity 2.0. Place it at `.agents/AGENTS.md` relative to your project root.
6
+
7
+ ---
8
+
9
+ ## Workflow Contract
10
+
11
+ Do not touch a single file until you understand the task contract.
12
+
13
+ Required flow:
14
+
15
+ 1. Receive or validate a **Task Card** (structured request with context, scope, constraints, and acceptance criteria)
16
+ 2. Classify risk: `low` / `medium` / `high`
17
+ 3. Route to the correct **Conductor Agent** based on task type and risk
18
+ 4. Implement **minimal diff** — only what the task requires
19
+ 5. Run tests and verify behavior
20
+ 6. Produce a **Deliverable** that meets the Scorecard criteria
21
+ 7. Wait for human review before merging
22
+
23
+ Skipping any step is not an optimization. It is a defect.
24
+
25
+ ---
26
+
27
+ ## Trigger Commands
28
+
29
+ Antigravity CLI loads custom slash commands from `.agents/workflows/*.md`. The following commands are registered:
30
+
31
+ | Slash Command | Workflow Description |
32
+ | ---------------- | ------------------------------------------------------------------ |
33
+ | `/cc-feature` | Runs the full feature design, implementation, and review workflow |
34
+ | `/cc-fix` | Runs the bug fix verification and repair workflow |
35
+ | `/cc-refactor` | Runs the code refactoring and test safety workflow |
36
+ | `/cc-review` | Runs a structured, multi-perspective code review and audit |
37
+ | `/cc-test-plan` | Generates a structured test plan for a given scope |
38
+ | `/cc-tdd-cycle` | Runs a Test-Driven Development (TDD) cycle |
39
+ | `/cc-api-contract`| Handles API contract modification and validation |
40
+ | `/cc-db-migration`| Coordinates database schema migrations safely |
41
+ | `/cc-pagespeed` | Performs a web performance and Core Web Vitals audit |
42
+
43
+ ---
44
+
45
+ ## Routing Policy
46
+
47
+ ### Risk Classification
48
+
49
+ | Signal | Risk Level |
50
+ | ----------------------------------------- | ---------- |
51
+ | New behavior, no existing tests | medium |
52
+ | Changes to public API or contracts | high |
53
+ | Database migration | high |
54
+ | Security, auth, or payment paths | high |
55
+ | Internal refactor with full test coverage | low |
56
+ | Documentation only | low |
57
+ | Bug fix in isolated component | low–medium |
58
+ | New feature (no existing path) | high |
59
+
60
+ When multiple signals apply, take the highest risk level. Do not average.
61
+
62
+ ### Agent Routing Table
63
+
64
+ | Task Type | Risk | Route |
65
+ | -------------------- | ----------- | --------------------------------------------------- |
66
+ | New feature design | any | `architect` → `implementer` |
67
+ | Bug fix | low | `implementer` |
68
+ | Bug fix | medium–high | `task-coach` → `implementer` → `tester` |
69
+ | Refactor | low | `implementer` |
70
+ | Refactor | medium–high | `architect` → `implementer` → `reviewer` |
71
+ | API change | any | `architect` → `implementer` → `reviewer` |
72
+ | Database migration | any | `architect` → `implementer` → `tester` → `reviewer` |
73
+ | Test coverage | any | `tester` |
74
+ | Documentation update | any | `docs` |
75
+ | Codebase exploration | any | `repo-explorer` |
76
+ | Code review | any | `reviewer` |
77
+
78
+ ---
79
+
80
+ ## Conductor Agents
81
+
82
+ ---
83
+
84
+ ### orchestrator
85
+
86
+ **Role:** Coordinates the workflow. Receives the Task Card, classifies risk, selects the route, delegates to agents, and monitors the deliverable.
87
+
88
+ **Use when:** Task requires multiple agents, risk is unclear, or the user needs a complete plan before implementation.
89
+
90
+ **Permissions:**
91
+ - read: `allow`
92
+ - edit: `ask`
93
+ - bash: `ask` (git status, git diff, git log only)
94
+ - network: `deny`
95
+
96
+ **Does not:** Write code. Execute tests. Push to any branch.
97
+
98
+ **Model:** `{{MODEL_GEMINI}}`
99
+
100
+ **Responsibilities:**
101
+ 1. Validate the Task Card before doing anything else.
102
+ 2. Classify the risk level using the table above.
103
+ 3. Select and document the agent route.
104
+ 4. Surface blockers rather than working around them.
105
+ 5. Declare completion only when all Deliverables are produced and verified.
106
+
107
+ **Task Card validation — required fields before routing:**
108
+ - Title (short description, max 80 chars)
109
+ - Type (`feature`, `fix`, `refactor`, `review`, `docs`, `test`)
110
+ - Risk (`low`, `medium`, `high`)
111
+ - Scope (named files, modules, or components)
112
+ - Context (current behavior and problem/opportunity)
113
+ - Context scope (`isolated`, `continuation`, `full`)
114
+ - Acceptance criteria (measurable, verifiable conditions)
115
+
116
+ If any required field is missing, route to `task-coach` to clarify.
117
+
118
+ **Routing documentation format:**
119
+ ```markdown
120
+ ## Routing Decision
121
+
122
+ Task: [title] Type: [type] Risk: [low | medium | high] Route: [agent1] → [agent2] → ...
123
+ Justification: [one sentence explaining why this route was selected]
124
+ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
125
+ ```
126
+
127
+ ---
128
+
129
+ ### task-coach
130
+
131
+ **Role:** Transforms vague requests into complete, routable Task Cards by asking targeted clarifying questions.
132
+
133
+ **Use when:** Request lacks acceptance criteria, scope is ambiguous, or risk cannot be classified without more context.
134
+
135
+ **Permissions:**
136
+ - read: `allow`
137
+ - edit: `deny`
138
+ - bash: `deny`
139
+ - network: `deny`
140
+
141
+ **Model:** `{{MODEL_GEMINI}}`
142
+
143
+ **Intake process:**
144
+ 1. Read the entire request before asking anything.
145
+ 2. Identify missing or ambiguous fields.
146
+ 3. Ask one focused question at a time.
147
+ 4. Wait for the answer.
148
+ 5. Produce the Task Card.
149
+
150
+ **Task Card format:**
151
+ ```markdown
152
+ ## Task Card
153
+
154
+ **Objective**: [one sentence]
155
+
156
+ **Acceptance Criteria**:
157
+ 1. [verifiable condition]
158
+ 2. [verifiable condition]
159
+
160
+ **Scope**:
161
+ - In: [what is included]
162
+ - Out: [what is explicitly excluded]
163
+
164
+ **Risk Level**: [low | medium | high] — [one-sentence justification]
165
+
166
+ **Context**:
167
+ - Files: [list relevant files or "unknown"]
168
+ - Services: [list relevant services or "none"]
169
+ - Constraints: [constraints or "none"]
170
+ ```
171
+
172
+ ---
173
+
174
+ ### repo-explorer
175
+
176
+ **Role:** Maps the repository structure. Identifies conventions. Locates relevant files. Estimates impact radius.
177
+
178
+ **Use when:** Starting a new task without context, investigating an unfamiliar module, or identifying impact radius.
179
+
180
+ **Permissions:**
181
+ - read: `allow`
182
+ - edit: `deny`
183
+ - bash: `allow` (git log, git diff, git status)
184
+ - network: `deny`
185
+
186
+ **Model:** `{{MODEL_GEMINI}}`
187
+
188
+ **Repo Map format:**
189
+ ```markdown
190
+ ## Repo Map
191
+
192
+ **Task**: [objective from Task Card]
193
+
194
+ ### Structure
195
+ [directory tree — relevant portions only]
196
+
197
+ ### Conventions
198
+ | Concern | Convention |
199
+ | ------- | ---------- |
200
+ | Naming | ... |
201
+ | Testing | ... |
202
+
203
+ ### Relevant Files
204
+ - [path/to/file] — [relevance]
205
+ ```
206
+
207
+ ---
208
+
209
+ ### architect
210
+
211
+ **Role:** Designs the technical approach. Produces ADRs, module boundaries, and API contracts.
212
+
213
+ **Use when:** New feature, refactor with structural impact, API changes, or database changes.
214
+
215
+ **Permissions:**
216
+ - read: `allow`
217
+ - edit: `ask` (docs and ADRs only)
218
+ - bash: `deny`
219
+ - network: `deny`
220
+
221
+ **Model:** `{{MODEL_GEMINI}}`
222
+
223
+ **Technical Plan format:**
224
+ ```markdown
225
+ ## Technical Plan
226
+
227
+ **Task**: [objective]
228
+ **Approach**: [chosen strategy and why]
229
+
230
+ **Tradeoffs**:
231
+ - Chosen: [approach] because [reason]
232
+ - Rejected: [alternative] because [reason]
233
+
234
+ **Files Affected**:
235
+ - [path/to/file] — [what changes]
236
+
237
+ **Risks**:
238
+ - [risk] — mitigation: [how to handle]
239
+
240
+ **Open Questions**:
241
+ - [questions for human input]
242
+ ```
243
+
244
+ ---
245
+
246
+ ### implementer
247
+
248
+ **Role:** Executes the Technical Plan. Writes code following accepted designs.
249
+
250
+ **Use when:** Task has an accepted plan, files to modify are clear, and acceptance criteria exist.
251
+
252
+ **Permissions:**
253
+ - read: `allow`
254
+ - edit: `ask`
255
+ - bash: `allow` (build, test, and lint commands only)
256
+ - network: `deny`
257
+
258
+ **Model:** `{{MODEL_GEMINI}}`
259
+
260
+ **Pre-implementation checklist:**
261
+ 1. Create a Git Worktree: `git worktree add ../<branch>-session <branch>`
262
+ 2. Read the Technical Plan completely.
263
+ 3. Read the target files.
264
+ 4. Verify tests pass before starting.
265
+
266
+ **Implementation Summary format:**
267
+ ```markdown
268
+ ## Implementation Summary
269
+
270
+ **Task**: [objective] **Status**: complete | blocked
271
+ **Worktree**: [path to worktree]
272
+
273
+ **Changes Made**:
274
+ - [path/to/file] — [summary of change]
275
+
276
+ **Tests**:
277
+ - Runner: [npm test | pytest | ...]
278
+ - Result: [passed | failed]
279
+ ```
280
+
281
+ ---
282
+
283
+ ### tester
284
+
285
+ **Role:** Generates unit, integration, and contract tests. Verifies behavior against acceptance criteria.
286
+
287
+ **Use when:** New behavior is introduced, bugs are fixed, or refactoring carries behavioral risk.
288
+
289
+ **Permissions:**
290
+ - read: `allow`
291
+ - edit: `ask` (test files only)
292
+ - bash: `allow` (test commands only)
293
+ - network: `deny`
294
+
295
+ **Model:** `{{MODEL_GEMINI}}`
296
+
297
+ **Coverage Summary format:**
298
+ ```markdown
299
+ ## Coverage Summary
300
+
301
+ **Task**: [objective]
302
+ **Test Files Added/Modified**:
303
+ - [path/to/test] — [cases covered]
304
+
305
+ **Test Run Results**:
306
+ - Passed: [count]
307
+ - Failed: [count]
308
+ ```
309
+
310
+ ---
311
+
312
+ ### reviewer
313
+
314
+ **Role:** Reviews diffs for correctness, architecture alignment, security, and technical debt.
315
+
316
+ **Use when:** Before committing, before opening a PR, or after agent-generated changes.
317
+
318
+ **Permissions:**
319
+ - read: `allow`
320
+ - edit: `deny`
321
+ - bash: `allow` (git diff, git status, test commands)
322
+ - network: `deny`
323
+
324
+ **Model:** `{{MODEL_GEMINI}}`
325
+
326
+ **Review Report format:**
327
+ ```markdown
328
+ ## Review Report
329
+
330
+ **Task**: [objective]
331
+
332
+ ### Findings
333
+ - **CRITICAL**: [must be fixed before merge]
334
+ - **WARNING**: [resolve before merge]
335
+ - **SUGGESTION**: [optional enhancement]
336
+ ```
337
+
338
+ ---
339
+
340
+ ### docs
341
+
342
+ **Role:** Updates README, OpenAPI specs, ADRs, and changelogs.
343
+
344
+ **Use when:** Public API changed, new module introduced, or behavior documented incorrectly.
345
+
346
+ **Permissions:**
347
+ - read: `allow`
348
+ - edit: `ask` (docs and markdown only)
349
+ - bash: `deny`
350
+ - network: `deny`
351
+
352
+ **Model:** `{{MODEL_GEMINI}}`
353
+
354
+ <!-- CODECONDUCTOR:END managed -->
@@ -0,0 +1,47 @@
1
+ # Antigravity CLI (agy) Preset for CodeConductor
2
+
3
+ This preset configures CodeConductor for **Google Antigravity CLI (agy)** and Antigravity 2.0.
4
+
5
+ ## Structure
6
+
7
+ When installed, this preset writes files into your project's workspace customizations root:
8
+
9
+ - **`.agents/AGENTS.md`**: Core agent contracts, routing policy, and workflow instructions.
10
+ - **`.agents/rules/`**: Target rules and style guidelines (e.g., commit messages, knowledge graphs).
11
+ - **`.agents/workflows/`**: Custom slash commands representing CodeConductor workflows (e.g., `/cc-feature`, `/cc-fix`).
12
+ - **`.agents/skills/`**: Domain-specific skills (e.g., Spring Boot, Django, Next.js).
13
+
14
+ ---
15
+
16
+ ## Orchestrator Agent Workflow
17
+
18
+ Antigravity CLI automatically parses `.agents/AGENTS.md` and registered workflows under `.agents/workflows/`.
19
+
20
+ To run any CodeConductor workflow:
21
+
22
+ 1. Start the Antigravity CLI:
23
+ ```bash
24
+ agy
25
+ ```
26
+ 2. Run one of the custom slash commands:
27
+ ```text
28
+ /cc-feature "Describe the new feature to build"
29
+ /cc-fix "Describe the bug and where it is"
30
+ /cc-refactor "Describe the refactoring scope"
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Configuration Settings (`settings.json`)
36
+
37
+ To configure permissions, models, and execution modes for the Antigravity CLI, update your global settings at `~/.gemini/antigravity-cli/settings.json` or project-scoped settings.
38
+
39
+ Recommended settings:
40
+ ```json
41
+ {
42
+ "model": "gemini-3.5-pro",
43
+ "toolPermission": "request-review",
44
+ "enableTerminalSandbox": true,
45
+ "allowNonWorkspaceAccess": false
46
+ }
47
+ ```
@@ -0,0 +1,30 @@
1
+ {
2
+ "code-formatter": {
3
+ "enabled": true,
4
+ "PostToolUse": [
5
+ {
6
+ "matcher": "write_to_file|replace_file_content|multi_replace_file_content",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "if [ -f \"./.agents/scripts/post-tool.sh\" ]; then bash ./.agents/scripts/post-tool.sh; else bash \"$HOME/.gemini/config/scripts/post-tool.sh\"; fi"
11
+ }
12
+ ]
13
+ }
14
+ ]
15
+ },
16
+ "safety-gate": {
17
+ "enabled": true,
18
+ "PreToolUse": [
19
+ {
20
+ "matcher": "run_command|write_to_file|replace_file_content|multi_replace_file_content|view_file",
21
+ "hooks": [
22
+ {
23
+ "type": "command",
24
+ "command": "if [ -f \"./.agents/scripts/pre-tool.sh\" ]; then bash ./.agents/scripts/pre-tool.sh; else bash \"$HOME/.gemini/config/scripts/pre-tool.sh\"; fi"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }
30
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "mcpServers": {}
3
+ }
@@ -0,0 +1 @@
1
+ {{COMMIT_STYLE}}
@@ -0,0 +1,14 @@
1
+ ---
2
+ trigger: always_on
3
+ description: Consult the graphify knowledge graph at graphify-out/ for codebase and architecture questions.
4
+ ---
5
+
6
+ ## graphify
7
+
8
+ This project has a graphify knowledge graph at graphify-out/.
9
+
10
+ Rules:
11
+ - For codebase or architecture questions, when `graphify-out/graph.json` exists, first run `graphify query "<question>"` (CLI) or `query_graph` (MCP). Use `graphify path "<A>" "<B>"` / `shortest_path` for relationships and `graphify explain "<concept>"` / `get_node` for focused concepts. These return a scoped subgraph, usually much smaller than `GRAPH_REPORT.md` or raw grep output.
12
+ - If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
13
+ - Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context
14
+ - After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)
@@ -0,0 +1,25 @@
1
+ #!/bin/bash
2
+ # Read stdin JSON payload
3
+ JSON_INPUT=$(cat)
4
+ TOOL_NAME=$(echo "$JSON_INPUT" | jq -r '.toolName')
5
+
6
+ if [[ "$TOOL_NAME" == "write_to_file" || "$TOOL_NAME" == "replace_file_content" || "$TOOL_NAME" == "multi_replace_file_content" ]]; then
7
+ FILE_PATH=$(echo "$JSON_INPUT" | jq -r '.arguments.TargetFile')
8
+ if [ -f "$FILE_PATH" ]; then
9
+ # Run Prettier
10
+ if echo "$FILE_PATH" | grep -qE '\.(ts|tsx|js|jsx|mjs|cjs|json|jsonc|md|mdx|css|scss|html|astro|yaml|yml)$'; then
11
+ npx --no-install prettier --write "$FILE_PATH" 2>/dev/null || true
12
+ fi
13
+ # Run ESLint
14
+ if echo "$FILE_PATH" | grep -qE '\.(ts|tsx|js|jsx|mjs|cjs)$'; then
15
+ npx --no-install eslint --fix "$FILE_PATH" 2>/dev/null || true
16
+ fi
17
+ # Run Ruff (Python)
18
+ if echo "$FILE_PATH" | grep -qE '\.py$'; then
19
+ ruff format "$FILE_PATH" 2>/dev/null && ruff check --fix "$FILE_PATH" 2>/dev/null || true
20
+ fi
21
+ fi
22
+ fi
23
+
24
+ # Return an empty JSON object to stdout
25
+ echo "{}"
@@ -0,0 +1,56 @@
1
+ #!/bin/bash
2
+ # Read stdin JSON payload
3
+ JSON_INPUT=$(cat)
4
+ TOOL_NAME=$(echo "$JSON_INPUT" | jq -r '.toolName')
5
+
6
+ # Check paths for write/edit/read operations
7
+ TARGET_PATH=""
8
+ if [[ "$TOOL_NAME" == "write_to_file" || "$TOOL_NAME" == "replace_file_content" || "$TOOL_NAME" == "multi_replace_file_content" ]]; then
9
+ TARGET_PATH=$(echo "$JSON_INPUT" | jq -r '.arguments.TargetFile')
10
+ elif [[ "$TOOL_NAME" == "view_file" ]]; then
11
+ TARGET_PATH=$(echo "$JSON_INPUT" | jq -r '.arguments.AbsolutePath')
12
+ fi
13
+
14
+ if [[ ! -z "$TARGET_PATH" ]]; then
15
+ if echo "$TARGET_PATH" | grep -qE '(\.env|secrets/|/\.ssh/|/\.aws/|/\.kube/)'; then
16
+ echo '{"action": "deny", "error": "Blocked: Attempt to access sensitive path"}'
17
+ exit 0
18
+ fi
19
+ fi
20
+
21
+ if [[ "$TOOL_NAME" == "run_command" ]]; then
22
+ COMMAND_LINE=$(echo "$JSON_INPUT" | jq -r '.arguments.CommandLine')
23
+
24
+ # 1. Deny patterns
25
+ if echo "$COMMAND_LINE" | grep -qE '(\.env|secrets/|id_rsa|\\.pem|\\.key)\\b' && echo "$COMMAND_LINE" | grep -qE '(cat|less|more|head|tail|cp |mv |scp )'; then
26
+ echo '{"action": "deny", "error": "Blocked: Attempt to read sensitive files"}'
27
+ exit 0
28
+ fi
29
+
30
+ if echo "$COMMAND_LINE" | grep -qE '^rm\s+-rf\s+\*' || \
31
+ echo "$COMMAND_LINE" | grep -qE '^sudo\s+' || \
32
+ echo "$COMMAND_LINE" | grep -qE '^git\s+push\s+.*--force' || \
33
+ echo "$COMMAND_LINE" | grep -qE '^git\s+push\s+.*-f' || \
34
+ echo "$COMMAND_LINE" | grep -qE '^git\s+rebase\s+' || \
35
+ echo "$COMMAND_LINE" | grep -qE '^git\s+reset\s+--hard\s+' || \
36
+ echo "$COMMAND_LINE" | grep -qE 'curl\s+.*\s*\|\s*(sh|bash)' || \
37
+ echo "$COMMAND_LINE" | grep -qE 'wget\s+.*\s*\|\s*(sh|bash)' || \
38
+ echo "$COMMAND_LINE" | grep -qE '^chmod\s+777\s+' || \
39
+ echo "$COMMAND_LINE" | grep -qE '^dd\s+' || \
40
+ echo "$COMMAND_LINE" | grep -qE '^mkfs\s+'; then
41
+ echo '{"action": "deny", "error": "Blocked: Command violated security policy"}'
42
+ exit 0
43
+ fi
44
+
45
+ # 2. Ask patterns
46
+ if echo "$COMMAND_LINE" | grep -qE '^git\s+commit\s*' || \
47
+ echo "$COMMAND_LINE" | grep -qE '^git\s+checkout\s*' || \
48
+ echo "$COMMAND_LINE" | grep -qE '^git\s+switch\s*' || \
49
+ echo "$COMMAND_LINE" | grep -qE '^docker\s+compose\s*'; then
50
+ echo '{"action": "ask"}'
51
+ exit 0
52
+ fi
53
+ fi
54
+
55
+ # Default: allow
56
+ echo '{"action": "allow"}'
@@ -0,0 +1,8 @@
1
+ {
2
+ "model": "gemini-3.5-pro",
3
+ "toolPermission": "request-review",
4
+ "enableTerminalSandbox": true,
5
+ "allowNonWorkspaceAccess": false,
6
+ "verbosity": "low",
7
+ "alwaysThinkingEnabled": true
8
+ }
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: cc-api-contract
3
+ description:
4
+ Run the API contract workflow for request/response shape changes,
5
+ compatibility constraints, contract tests, documentation, and review.
6
+ ---
7
+
8
+ # API Contract Workflow
9
+
10
+ API contract request: $ARGUMENTS
11
+
12
+ ## Step 1 — Task Card validation (task-coach)
13
+
14
+ Invoke `task-coach` with the request above.
15
+
16
+ The Task Card must classify the task as `feature` or `refactor` with `high`
17
+ risk unless the human provides a narrower validated risk. It must include:
18
+
19
+ - affected endpoint, command, or public interface
20
+ - request and response examples
21
+ - backward compatibility and versioning impact
22
+ - consumers that must remain compatible
23
+ - contract tests and documentation acceptance criteria
24
+
25
+ **STOP here. Show the Task Card and wait for human confirmation.**
26
+
27
+ ---
28
+
29
+ ## Step 2 — Technical Plan (architect)
30
+
31
+ Invoke `architect` with the approved Task Card.
32
+
33
+ architect must define the API contract, compatibility strategy, validation
34
+ rules, docs/OpenAPI impact, and migration path for consumers.
35
+
36
+ **STOP here. Show the Technical Plan and wait for explicit human approval.**
37
+
38
+ ---
39
+
40
+ ## Step 3 — Implementation (implementer)
41
+
42
+ Invoke `implementer` with the approved plan.
43
+
44
+ implementer must apply the minimal diff, preserve compatible behavior unless a
45
+ breaking change was explicitly approved, and update only the files named in the
46
+ plan.
47
+
48
+ ---
49
+
50
+ ## Step 4 — Contract tests (tester)
51
+
52
+ Invoke `tester`.
53
+
54
+ tester must add or update contract tests covering request shape, response shape,
55
+ status/error behavior, and backward compatibility constraints.
56
+
57
+ ---
58
+
59
+ ## Step 5 — Review (reviewer)
60
+
61
+ Invoke `reviewer`.
62
+
63
+ reviewer must block on missing contract tests, undocumented breaking changes,
64
+ or docs/OpenAPI drift.
65
+
66
+ ---
67
+
68
+ ## Completion
69
+
70
+ Report the final Task Card, Technical Plan, implementation summary, test report,
71
+ review report, docs updated, compatibility impact, and residual risks.
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: cc-db-migration
3
+ description:
4
+ Run the database migration workflow for schema/data changes, operational
5
+ sequencing, tests, and review.
6
+ ---
7
+
8
+ # Database Migration Workflow
9
+
10
+ Migration request: $ARGUMENTS
11
+
12
+ ## Step 1 — Task Card validation (task-coach)
13
+
14
+ Invoke `task-coach` with the request above.
15
+
16
+ The Task Card must classify the task as `high` risk and include:
17
+
18
+ - tables, collections, models, or migration files in scope
19
+ - data backfill or data cleanup requirements
20
+ - deployment ordering and compatibility window
21
+ - rollback or forward-fix strategy
22
+ - lock risk, data risk, and verification commands
23
+
24
+ **STOP here. Show the Task Card and wait for human confirmation.**
25
+
26
+ ---
27
+
28
+ ## Step 2 — Migration Plan (architect)
29
+
30
+ Invoke `architect` with the approved Task Card.
31
+
32
+ architect must define the schema/data plan, operational sequencing,
33
+ compatibility strategy, rollback/forward-fix notes, and test approach.
34
+
35
+ **STOP here. Show the Technical Plan and wait for explicit human approval.**
36
+
37
+ ---
38
+
39
+ ## Step 3 — Implementation (implementer)
40
+
41
+ Invoke `implementer` with the approved plan.
42
+
43
+ implementer must keep model and migration changes together, avoid unrelated
44
+ refactors, and preserve the deployment order specified by architect.
45
+
46
+ ---
47
+
48
+ ## Step 4 — Migration tests (tester)
49
+
50
+ Invoke `tester`.
51
+
52
+ tester must cover migration-sensitive behavior where the stack supports it,
53
+ including happy path, existing-data edge cases, and rollback/forward-fix notes
54
+ when automated rollback tests are not practical.
55
+
56
+ ---
57
+
58
+ ## Step 5 — Review (reviewer)
59
+
60
+ Invoke `reviewer`.
61
+
62
+ reviewer must block on missing migration tests, missing data-risk notes,
63
+ undocumented deployment sequencing, or model/migration drift.
64
+
65
+ ---
66
+
67
+ ## Completion
68
+
69
+ Report migration files changed, model files changed, tests run, lock risk, data
70
+ risk, operational sequencing, rollback/forward-fix notes, and residual risk.