agentsys 5.0.3 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +21 -14
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +2 -1
- package/CHANGELOG.md +18 -0
- package/README.md +7 -6
- package/adapters/codex/skills/agnix/SKILL.md +0 -1
- package/adapters/codex/skills/audit-project/SKILL.md +0 -1
- package/adapters/codex/skills/audit-project-agents/SKILL.md +0 -1
- package/adapters/codex/skills/audit-project-github/SKILL.md +0 -1
- package/adapters/codex/skills/consult/SKILL.md +132 -57
- package/adapters/codex/skills/debate/SKILL.md +214 -0
- package/adapters/codex/skills/delivery-approval/SKILL.md +0 -1
- package/adapters/codex/skills/deslop/SKILL.md +0 -1
- package/adapters/codex/skills/drift-detect/SKILL.md +0 -1
- package/adapters/codex/skills/enhance/SKILL.md +0 -1
- package/adapters/codex/skills/learn/SKILL.md +0 -1
- package/adapters/codex/skills/next-task/SKILL.md +0 -1
- package/adapters/codex/skills/perf/SKILL.md +0 -1
- package/adapters/codex/skills/repo-map/SKILL.md +0 -1
- package/adapters/codex/skills/ship/SKILL.md +0 -1
- package/adapters/codex/skills/ship-ci-review-loop/SKILL.md +0 -1
- package/adapters/codex/skills/ship-deployment/SKILL.md +0 -1
- package/adapters/codex/skills/ship-error-handling/SKILL.md +0 -1
- package/adapters/codex/skills/sync-docs/SKILL.md +0 -1
- package/adapters/opencode/agents/agent-enhancer.md +0 -1
- package/adapters/opencode/agents/agnix-agent.md +0 -1
- package/adapters/opencode/agents/ci-fixer.md +0 -1
- package/adapters/opencode/agents/ci-monitor.md +0 -1
- package/adapters/opencode/agents/claudemd-enhancer.md +0 -1
- package/adapters/opencode/agents/consult-agent.md +122 -30
- package/adapters/opencode/agents/cross-file-enhancer.md +0 -1
- package/adapters/opencode/agents/debate-orchestrator.md +169 -0
- package/adapters/opencode/agents/delivery-validator.md +0 -1
- package/adapters/opencode/agents/deslop-agent.md +0 -1
- package/adapters/opencode/agents/docs-enhancer.md +0 -1
- package/adapters/opencode/agents/exploration-agent.md +0 -1
- package/adapters/opencode/agents/hooks-enhancer.md +0 -1
- package/adapters/opencode/agents/implementation-agent.md +0 -1
- package/adapters/opencode/agents/learn-agent.md +0 -1
- package/adapters/opencode/agents/map-validator.md +0 -1
- package/adapters/opencode/agents/perf-analyzer.md +0 -1
- package/adapters/opencode/agents/perf-code-paths.md +0 -1
- package/adapters/opencode/agents/perf-investigation-logger.md +0 -1
- package/adapters/opencode/agents/perf-orchestrator.md +0 -1
- package/adapters/opencode/agents/perf-theory-gatherer.md +0 -1
- package/adapters/opencode/agents/perf-theory-tester.md +0 -1
- package/adapters/opencode/agents/plan-synthesizer.md +0 -1
- package/adapters/opencode/agents/planning-agent.md +0 -1
- package/adapters/opencode/agents/plugin-enhancer.md +0 -1
- package/adapters/opencode/agents/prompt-enhancer.md +0 -1
- package/adapters/opencode/agents/simple-fixer.md +0 -1
- package/adapters/opencode/agents/skills-enhancer.md +0 -1
- package/adapters/opencode/agents/sync-docs-agent.md +0 -1
- package/adapters/opencode/agents/task-discoverer.md +0 -1
- package/adapters/opencode/agents/test-coverage-checker.md +0 -1
- package/adapters/opencode/agents/worktree-manager.md +0 -1
- package/adapters/opencode/commands/agnix.md +0 -1
- package/adapters/opencode/commands/audit-project-agents.md +0 -1
- package/adapters/opencode/commands/audit-project-github.md +0 -1
- package/adapters/opencode/commands/audit-project.md +0 -1
- package/adapters/opencode/commands/consult.md +133 -57
- package/adapters/opencode/commands/debate.md +224 -0
- package/adapters/opencode/commands/delivery-approval.md +0 -1
- package/adapters/opencode/commands/deslop.md +0 -1
- package/adapters/opencode/commands/drift-detect.md +0 -1
- package/adapters/opencode/commands/enhance.md +0 -1
- package/adapters/opencode/commands/learn.md +0 -1
- package/adapters/opencode/commands/next-task.md +0 -1
- package/adapters/opencode/commands/perf.md +0 -1
- package/adapters/opencode/commands/repo-map.md +0 -1
- package/adapters/opencode/commands/ship-ci-review-loop.md +0 -1
- package/adapters/opencode/commands/ship-deployment.md +0 -1
- package/adapters/opencode/commands/ship-error-handling.md +0 -1
- package/adapters/opencode/commands/ship.md +0 -1
- package/adapters/opencode/commands/sync-docs.md +0 -1
- package/adapters/opencode/skills/agnix/SKILL.md +1 -2
- package/adapters/opencode/skills/consult/SKILL.md +33 -23
- package/adapters/opencode/skills/debate/SKILL.md +245 -0
- package/adapters/opencode/skills/deslop/SKILL.md +1 -2
- package/adapters/opencode/skills/discover-tasks/SKILL.md +1 -2
- package/adapters/opencode/skills/drift-analysis/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-agent-prompts/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-claude-memory/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-cross-file/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-docs/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-hooks/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-orchestrator/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-plugins/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-prompts/SKILL.md +1 -2
- package/adapters/opencode/skills/enhance-skills/SKILL.md +1 -2
- package/adapters/opencode/skills/learn/SKILL.md +1 -2
- package/adapters/opencode/skills/orchestrate-review/SKILL.md +0 -1
- package/adapters/opencode/skills/perf-analyzer/SKILL.md +1 -2
- package/adapters/opencode/skills/perf-baseline-manager/SKILL.md +1 -2
- package/adapters/opencode/skills/perf-benchmarker/SKILL.md +1 -2
- package/adapters/opencode/skills/perf-code-paths/SKILL.md +1 -2
- package/adapters/opencode/skills/perf-investigation-logger/SKILL.md +1 -2
- package/adapters/opencode/skills/perf-profiler/SKILL.md +1 -2
- package/adapters/opencode/skills/perf-theory-gatherer/SKILL.md +1 -2
- package/adapters/opencode/skills/perf-theory-tester/SKILL.md +1 -2
- package/adapters/opencode/skills/repo-mapping/SKILL.md +1 -2
- package/adapters/opencode/skills/sync-docs/SKILL.md +1 -2
- package/adapters/opencode/skills/validate-delivery/SKILL.md +1 -2
- package/lib/adapter-transforms.js +24 -4
- package/package.json +1 -1
- package/plugins/agnix/.claude-plugin/plugin.json +1 -1
- package/plugins/agnix/skills/agnix/SKILL.md +1 -1
- package/plugins/audit-project/.claude-plugin/plugin.json +1 -1
- package/plugins/audit-project/lib/adapter-transforms.js +24 -4
- package/plugins/consult/.claude-plugin/plugin.json +1 -1
- package/plugins/consult/agents/consult-agent.md +122 -29
- package/plugins/consult/commands/consult.md +135 -58
- package/plugins/consult/skills/consult/SKILL.md +31 -20
- package/plugins/debate/.claude-plugin/plugin.json +21 -0
- package/plugins/debate/agents/debate-orchestrator.md +175 -0
- package/plugins/debate/commands/debate.md +221 -0
- package/plugins/debate/lib/adapter-transforms.js +298 -0
- package/plugins/debate/lib/collectors/codebase.js +392 -0
- package/plugins/debate/lib/collectors/docs-patterns.js +713 -0
- package/plugins/debate/lib/collectors/documentation.js +219 -0
- package/plugins/debate/lib/collectors/github.js +330 -0
- package/plugins/debate/lib/collectors/index.js +126 -0
- package/plugins/debate/lib/config/index.js +14 -0
- package/plugins/debate/lib/cross-platform/index.js +539 -0
- package/plugins/debate/lib/discovery/index.js +352 -0
- package/plugins/debate/lib/drift-detect/collectors.js +37 -0
- package/plugins/debate/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/debate/lib/enhance/agent-patterns.js +571 -0
- package/plugins/debate/lib/enhance/auto-suppression.js +622 -0
- package/plugins/debate/lib/enhance/benchmark.js +417 -0
- package/plugins/debate/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/debate/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/debate/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/debate/lib/enhance/docs-patterns.js +671 -0
- package/plugins/debate/lib/enhance/fixer.js +721 -0
- package/plugins/debate/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/debate/lib/enhance/hook-patterns.js +40 -0
- package/plugins/debate/lib/enhance/index.js +127 -0
- package/plugins/debate/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/debate/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/debate/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/debate/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/debate/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/debate/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/debate/lib/enhance/reporter.js +1348 -0
- package/plugins/debate/lib/enhance/security-patterns.js +284 -0
- package/plugins/debate/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/debate/lib/enhance/skill-patterns.js +147 -0
- package/plugins/debate/lib/enhance/suppression.js +352 -0
- package/plugins/debate/lib/enhance/tool-patterns.js +373 -0
- package/plugins/debate/lib/index.js +270 -0
- package/plugins/debate/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/debate/lib/patterns/pipeline.js +948 -0
- package/plugins/debate/lib/patterns/review-patterns.js +558 -0
- package/plugins/debate/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/debate/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/debate/lib/perf/analyzer/index.js +22 -0
- package/plugins/debate/lib/perf/argument-parser.js +105 -0
- package/plugins/debate/lib/perf/baseline-comparator.js +50 -0
- package/plugins/debate/lib/perf/baseline-store.js +127 -0
- package/plugins/debate/lib/perf/benchmark-runner.js +404 -0
- package/plugins/debate/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/debate/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/debate/lib/perf/checkpoint.js +123 -0
- package/plugins/debate/lib/perf/code-paths.js +86 -0
- package/plugins/debate/lib/perf/consolidation.js +37 -0
- package/plugins/debate/lib/perf/constraint-runner.js +71 -0
- package/plugins/debate/lib/perf/experiment-runner.js +32 -0
- package/plugins/debate/lib/perf/index.js +41 -0
- package/plugins/debate/lib/perf/investigation-state.js +874 -0
- package/plugins/debate/lib/perf/optimization-runner.js +79 -0
- package/plugins/debate/lib/perf/profilers/go.js +22 -0
- package/plugins/debate/lib/perf/profilers/index.js +46 -0
- package/plugins/debate/lib/perf/profilers/java.js +23 -0
- package/plugins/debate/lib/perf/profilers/node.js +27 -0
- package/plugins/debate/lib/perf/profilers/python.js +23 -0
- package/plugins/debate/lib/perf/profilers/rust.js +23 -0
- package/plugins/debate/lib/perf/profiling-runner.js +75 -0
- package/plugins/debate/lib/perf/schemas.js +140 -0
- package/plugins/debate/lib/platform/detect-platform.js +413 -0
- package/plugins/debate/lib/platform/detection-configs.js +93 -0
- package/plugins/debate/lib/platform/state-dir.js +132 -0
- package/plugins/debate/lib/platform/verify-tools.js +182 -0
- package/plugins/debate/lib/repo-map/cache.js +152 -0
- package/plugins/debate/lib/repo-map/concurrency.js +29 -0
- package/plugins/debate/lib/repo-map/index.js +222 -0
- package/plugins/debate/lib/repo-map/installer.js +212 -0
- package/plugins/debate/lib/repo-map/queries/go.js +27 -0
- package/plugins/debate/lib/repo-map/queries/index.js +100 -0
- package/plugins/debate/lib/repo-map/queries/java.js +38 -0
- package/plugins/debate/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/debate/lib/repo-map/queries/python.js +24 -0
- package/plugins/debate/lib/repo-map/queries/rust.js +73 -0
- package/plugins/debate/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/debate/lib/repo-map/runner.js +1364 -0
- package/plugins/debate/lib/repo-map/updater.js +562 -0
- package/plugins/debate/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/debate/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/debate/lib/schemas/validator.js +247 -0
- package/plugins/debate/lib/sources/custom-handler.js +199 -0
- package/plugins/debate/lib/sources/policy-questions.js +246 -0
- package/plugins/debate/lib/sources/source-cache.js +165 -0
- package/plugins/debate/lib/state/workflow-state.js +576 -0
- package/plugins/debate/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/debate/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/debate/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/debate/lib/types/index.d.ts +84 -0
- package/plugins/debate/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/debate/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/debate/lib/utils/atomic-write.js +94 -0
- package/plugins/debate/lib/utils/cache-manager.js +159 -0
- package/plugins/debate/lib/utils/command-parser.js +0 -0
- package/plugins/debate/lib/utils/context-optimizer.js +300 -0
- package/plugins/debate/lib/utils/deprecation.js +37 -0
- package/plugins/debate/lib/utils/shell-escape.js +88 -0
- package/plugins/debate/lib/utils/state-helpers.js +61 -0
- package/plugins/debate/skills/debate/SKILL.md +264 -0
- package/plugins/deslop/.claude-plugin/plugin.json +1 -1
- package/plugins/deslop/lib/adapter-transforms.js +24 -4
- package/plugins/deslop/skills/deslop/SKILL.md +1 -1
- package/plugins/drift-detect/.claude-plugin/plugin.json +1 -1
- package/plugins/drift-detect/lib/adapter-transforms.js +24 -4
- package/plugins/drift-detect/skills/drift-analysis/SKILL.md +1 -1
- package/plugins/enhance/.claude-plugin/plugin.json +1 -1
- package/plugins/enhance/lib/adapter-transforms.js +24 -4
- package/plugins/enhance/skills/enhance-agent-prompts/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-claude-memory/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-cross-file/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-docs/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-hooks/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-orchestrator/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-plugins/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-prompts/SKILL.md +1 -1
- package/plugins/enhance/skills/enhance-skills/SKILL.md +1 -1
- package/plugins/learn/.claude-plugin/plugin.json +1 -1
- package/plugins/learn/agents/learn-agent.md +1 -1
- package/plugins/learn/lib/adapter-transforms.js +24 -4
- package/plugins/learn/skills/learn/SKILL.md +1 -1
- package/plugins/next-task/.claude-plugin/plugin.json +1 -1
- package/plugins/next-task/agents/exploration-agent.md +1 -1
- package/plugins/next-task/lib/adapter-transforms.js +24 -4
- package/plugins/next-task/skills/discover-tasks/SKILL.md +1 -1
- package/plugins/next-task/skills/validate-delivery/SKILL.md +1 -1
- package/plugins/perf/.claude-plugin/plugin.json +1 -1
- package/plugins/perf/lib/adapter-transforms.js +24 -4
- package/plugins/perf/skills/perf-analyzer/SKILL.md +1 -1
- package/plugins/perf/skills/perf-baseline-manager/SKILL.md +1 -1
- package/plugins/perf/skills/perf-benchmarker/SKILL.md +1 -1
- package/plugins/perf/skills/perf-code-paths/SKILL.md +1 -1
- package/plugins/perf/skills/perf-investigation-logger/SKILL.md +1 -1
- package/plugins/perf/skills/perf-profiler/SKILL.md +1 -1
- package/plugins/perf/skills/perf-theory-gatherer/SKILL.md +1 -1
- package/plugins/perf/skills/perf-theory-tester/SKILL.md +1 -1
- package/plugins/repo-map/.claude-plugin/plugin.json +1 -1
- package/plugins/repo-map/lib/adapter-transforms.js +24 -4
- package/plugins/ship/.claude-plugin/plugin.json +1 -1
- package/plugins/ship/lib/adapter-transforms.js +24 -4
- package/plugins/sync-docs/.claude-plugin/plugin.json +1 -1
- package/plugins/sync-docs/lib/adapter-transforms.js +24 -4
- package/plugins/sync-docs/skills/sync-docs/SKILL.md +1 -1
- package/scripts/gen-adapters.js +6 -7
- package/scripts/generate-docs.js +4 -2
- package/scripts/plugins.txt +1 -0
- package/site/content.json +6 -6
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- AUTO-GENERATED by scripts/gen-adapters.js - DO NOT EDIT -->
|
|
2
1
|
---
|
|
3
2
|
description: Consult another AI CLI tool for a second opinion. Use when you want to cross-check ideas, get alternative approaches, or validate decisions with Gemini, Codex, Claude, OpenCode, or Copilot.
|
|
4
3
|
agent: general
|
|
@@ -12,67 +11,94 @@ agent: general
|
|
|
12
11
|
|
|
13
12
|
# /consult - Cross-Tool AI Consultation
|
|
14
13
|
|
|
15
|
-
You are executing the /consult command. Your job is to
|
|
14
|
+
You are executing the /consult command. Your job is to parse the user's request (natural language or flags), resolve missing parameters interactively, and execute the consultation.
|
|
16
15
|
|
|
17
16
|
## Constraints
|
|
18
17
|
|
|
19
18
|
- NEVER expose API keys in commands or output
|
|
20
19
|
- NEVER run with permission-bypassing flags (`--dangerously-skip-permissions`, `bypassPermissions`)
|
|
21
|
-
- MUST use safe-mode defaults (
|
|
20
|
+
- MUST use safe-mode defaults (`--allowedTools "Read,Glob,Grep"` for Claude, `-c model_reasoning_effort` for Codex)
|
|
22
21
|
- MUST enforce 120s timeout on all tool executions
|
|
23
|
-
- MUST validate
|
|
22
|
+
- MUST validate tool names against allow-list: gemini, codex, claude, opencode, copilot (reject all others)
|
|
24
23
|
- MUST validate `--context=file=PATH` is within the project directory (reject absolute paths outside cwd)
|
|
25
24
|
- MUST quote all user-provided values in shell commands to prevent injection
|
|
26
25
|
- NEVER execute tools the user has not explicitly requested
|
|
27
26
|
|
|
28
|
-
##
|
|
27
|
+
## Execution
|
|
29
28
|
|
|
30
|
-
Parse
|
|
29
|
+
### Phase 1: Parse Input (Flags + Natural Language)
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
- **--tool**: Target tool: `gemini`, `codex`, `claude`, `opencode`, `copilot` (interactive picker if omitted)
|
|
34
|
-
- **--effort**: Thinking effort: `low`, `medium`, `high`, `max` (interactive picker if omitted)
|
|
35
|
-
- **--model**: Specific model name (interactive picker if omitted). Free text.
|
|
36
|
-
- **--context**: Auto-include context: `diff` (git diff), `file=PATH` (attach specific file), `none` (default)
|
|
37
|
-
- **--continue**: Continue last consultation session, or `--continue=SESSION_ID` for specific session
|
|
31
|
+
Parse `$ARGUMENTS` using both explicit flags and natural language extraction. Flags always take priority over NLP when both provide the same parameter.
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
#### Step 1a: Extract explicit flags
|
|
34
|
+
|
|
35
|
+
Look for and remove these flags from `$ARGUMENTS`:
|
|
36
|
+
|
|
37
|
+
1. `--tool=VALUE` or `--tool VALUE` where VALUE is one of: gemini, codex, claude, opencode, copilot
|
|
38
|
+
2. `--effort=VALUE` or `--effort VALUE` where VALUE is one of: low, medium, high, max
|
|
39
|
+
3. `--model=VALUE` or `--model VALUE` (any string, including quoted)
|
|
40
|
+
4. `--context=VALUE` where VALUE is: diff, file=PATH, or none
|
|
41
|
+
5. `--continue` (optionally `--continue=SESSION_ID`)
|
|
42
|
+
6. `--count=N` where N is 1-5
|
|
43
|
+
|
|
44
|
+
Remove all matched flags and their values from `$ARGUMENTS`.
|
|
45
|
+
|
|
46
|
+
#### Step 1b: Natural language extraction (on remaining text)
|
|
47
|
+
|
|
48
|
+
After removing flags, parse the remaining text for these patterns:
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
**Tool extraction** (case-insensitive):
|
|
51
|
+
- "with {tool}" (e.g., "with codex") -> tool
|
|
52
|
+
- "ask {tool}" (e.g., "ask gemini") -> tool
|
|
53
|
+
- "consult {tool}" -> tool
|
|
54
|
+
- "{tool} about" (e.g., "codex about") -> tool
|
|
55
|
+
- Tool names: claude, gemini, codex, opencode, copilot
|
|
42
56
|
|
|
43
|
-
|
|
57
|
+
**Count extraction**:
|
|
58
|
+
- "ask {N} {tool}" (e.g., "ask 3 codex") -> count=N, tool
|
|
59
|
+
- "{N} {tool}" (e.g., "3 codex") -> count=N, tool
|
|
60
|
+
- "{N} instances" -> count=N
|
|
61
|
+
- "few instances" / "multiple" / "several" -> count=ambiguous (ask user in Phase 2)
|
|
44
62
|
|
|
45
|
-
1.
|
|
46
|
-
2. Look for `--effort=VALUE` or `--effort VALUE` where VALUE MUST be one of: low, medium, high, max
|
|
47
|
-
3. Look for `--model=VALUE` or `--model VALUE` (any string, including quoted strings like `"my model"`)
|
|
48
|
-
4. Look for `--context=VALUE` where VALUE is: diff, file=PATH, or none
|
|
49
|
-
5. Look for `--continue` (optionally `--continue=SESSION_ID`)
|
|
50
|
-
6. Remove all matched flags (including their values) from `$ARGUMENTS`. Handle quoted flag values (e.g., `--model "gpt 4"`) by removing the entire quoted string. Everything remaining is the **question**.
|
|
63
|
+
**Count validation**: After extracting count (from flags or NLP), validate: 1 <= count <= 5. If count < 1 or count > 5, show `[ERROR] Instance count must be 1-5. Got: {count}` and stop.
|
|
51
64
|
|
|
52
|
-
|
|
65
|
+
**Effort extraction**:
|
|
66
|
+
- "quick" / "fast" / "brief" -> effort=low
|
|
67
|
+
- "thorough" / "deep" / "carefully" / "detailed" -> effort=high
|
|
68
|
+
- "maximum" / "max effort" / "exhaustive" -> effort=max
|
|
69
|
+
|
|
70
|
+
**Question extraction**:
|
|
71
|
+
- Text after "about" is the question (e.g., "with codex about my auth approach" -> question="my auth approach")
|
|
72
|
+
- If no "about" pattern, everything remaining after removing tool/count/effort markers is the question
|
|
73
|
+
|
|
74
|
+
**Precedence rule**: Flags from Step 1a always override NLP from Step 1b.
|
|
75
|
+
|
|
76
|
+
If no question text and no `--continue` flag found after both steps:
|
|
53
77
|
```
|
|
54
|
-
[ERROR] Usage: /consult "your question"
|
|
78
|
+
[ERROR] Usage: /consult "your question" or /consult with gemini about your question
|
|
55
79
|
```
|
|
56
80
|
|
|
57
|
-
### Phase 2: Interactive Parameter
|
|
81
|
+
### Phase 2: Interactive Parameter Resolution
|
|
58
82
|
|
|
59
|
-
MUST resolve ALL missing parameters interactively
|
|
83
|
+
MUST resolve ALL missing parameters interactively. ONLY skip this phase if ALL required params (tool, effort, model) are resolved AND either a question exists or --continue is present. Do NOT silently default any parameter.
|
|
60
84
|
|
|
61
85
|
#### Step 2a: Handle --continue
|
|
62
86
|
|
|
87
|
+
**Note:** `--continue` and `--count > 1` are mutually exclusive. Session resume applies to a single tool session. If both are present, show `[ERROR] Cannot use --continue with --count > 1. Use --continue for single session resume.` and stop.
|
|
88
|
+
|
|
63
89
|
If `--continue` is present:
|
|
64
90
|
1. Read the session file at `{AI_STATE_DIR}/consult/last-session.json`
|
|
65
91
|
|
|
66
92
|
Platform state directory:
|
|
67
|
-
- Claude Code: `.
|
|
93
|
+
- Claude Code: `.claude/`
|
|
68
94
|
- OpenCode: `.opencode/`
|
|
69
95
|
- Codex CLI: `.codex/`
|
|
70
96
|
2. If the file exists, restore the saved tool, session_id, and model from it
|
|
71
97
|
3. If the file does not exist, show `[WARN] No previous session found` and proceed as a fresh consultation
|
|
72
98
|
|
|
73
|
-
#### Step 2b:
|
|
99
|
+
#### Step 2b: Detect installed tools
|
|
74
100
|
|
|
75
|
-
|
|
101
|
+
Run all 5 checks **in parallel** via Bash:
|
|
76
102
|
|
|
77
103
|
- `where.exe <tool> 2>nul && echo FOUND || echo NOTFOUND` (Windows)
|
|
78
104
|
- `which <tool> 2>/dev/null && echo FOUND || echo NOTFOUND` (Unix)
|
|
@@ -81,12 +107,14 @@ Check for: claude, gemini, codex, opencode, copilot.
|
|
|
81
107
|
|
|
82
108
|
If zero tools are installed: `[ERROR] No AI CLI tools found. Install at least one: npm i -g @anthropic-ai/claude-code, npm i -g @openai/codex, npm i -g opencode-ai`
|
|
83
109
|
|
|
84
|
-
|
|
110
|
+
#### Step 2c: Batch selection for missing params
|
|
111
|
+
|
|
112
|
+
Use a SINGLE AskUserQuestion call to ask all missing parameters at once. Include ONLY questions for parameters NOT already resolved from Phase 1:
|
|
85
113
|
|
|
86
114
|
```
|
|
87
115
|
AskUserQuestion:
|
|
88
116
|
questions:
|
|
89
|
-
- header: "AI Tool" # SKIP if
|
|
117
|
+
- header: "AI Tool" # SKIP if tool resolved
|
|
90
118
|
question: "Which AI tool should I consult?"
|
|
91
119
|
multiSelect: false
|
|
92
120
|
options (only if installed):
|
|
@@ -96,7 +124,7 @@ AskUserQuestion:
|
|
|
96
124
|
- label: "OpenCode" description: "Flexible model choice"
|
|
97
125
|
- label: "Copilot" description: "GitHub-integrated AI"
|
|
98
126
|
|
|
99
|
-
- header: "Effort" # SKIP if
|
|
127
|
+
- header: "Effort" # SKIP if effort resolved
|
|
100
128
|
question: "What thinking effort level?"
|
|
101
129
|
multiSelect: false
|
|
102
130
|
options:
|
|
@@ -104,16 +132,29 @@ AskUserQuestion:
|
|
|
104
132
|
- label: "Low" description: "Fast, minimal reasoning"
|
|
105
133
|
- label: "High" description: "Thorough analysis"
|
|
106
134
|
- label: "Max" description: "Maximum reasoning depth"
|
|
135
|
+
|
|
136
|
+
- header: "Instances" # SKIP if count resolved or not hinted
|
|
137
|
+
question: "How many parallel consultations?"
|
|
138
|
+
multiSelect: false
|
|
139
|
+
options:
|
|
140
|
+
- label: "1 (Single)" description: "Standard single consultation"
|
|
141
|
+
- label: "2 (Compare)" description: "Two responses to compare"
|
|
142
|
+
- label: "3 (Panel)" description: "Three perspectives"
|
|
143
|
+
- label: "5 (Full spread)" description: "Five diverse perspectives"
|
|
107
144
|
```
|
|
108
145
|
|
|
109
|
-
|
|
110
|
-
|
|
146
|
+
ONLY show the Instances question if:
|
|
147
|
+
- The user explicitly mentioned multiple instances (e.g., "few", "multiple", "several")
|
|
148
|
+
- The count was set but ambiguous
|
|
149
|
+
Do NOT show Instances question for simple single-tool requests. Default count=1 silently when no multi-instance intent detected.
|
|
111
150
|
|
|
112
|
-
|
|
151
|
+
Map tool choice to lowercase: "Claude" -> "claude", "Codex" -> "codex", etc.
|
|
152
|
+
Map effort choice: "Medium (Recommended)" -> "medium", "Low" -> "low", etc.
|
|
153
|
+
Map count choice: "1 (Single)" -> 1, "2 (Compare)" -> 2, "3 (Panel)" -> 3.
|
|
113
154
|
|
|
114
|
-
#### Step
|
|
155
|
+
#### Step 2d: Model selection (MUST ask if no --model)
|
|
115
156
|
|
|
116
|
-
After tool is resolved
|
|
157
|
+
After tool is resolved, present a model picker with options specific to the selected tool. The user can always type a custom model name via the "Other" option.
|
|
117
158
|
|
|
118
159
|
**For Claude:**
|
|
119
160
|
```
|
|
@@ -153,7 +194,7 @@ AskUserQuestion:
|
|
|
153
194
|
- label: "gpt-5.3-codex" description: "Latest, most capable coding model"
|
|
154
195
|
- label: "gpt-5.2-codex" description: "Strong coding model"
|
|
155
196
|
- label: "gpt-5.2" description: "General purpose GPT-5.2"
|
|
156
|
-
- label: "gpt-5-codex-
|
|
197
|
+
- label: "gpt-5.3-codex-spark" description: "Cost-effective, 4x more usage"
|
|
157
198
|
```
|
|
158
199
|
|
|
159
200
|
**For OpenCode:**
|
|
@@ -180,17 +221,21 @@ AskUserQuestion:
|
|
|
180
221
|
options:
|
|
181
222
|
- label: "claude-sonnet-4-5" description: "Default Copilot model"
|
|
182
223
|
- label: "claude-opus-4-6" description: "Most capable Claude model"
|
|
183
|
-
- label: "gpt-5.3-codex"
|
|
224
|
+
- label: "gpt-5.3-codex" description: "OpenAI GPT-5.3 Codex"
|
|
184
225
|
- label: "gemini-3-pro" description: "Google Gemini 3 Pro"
|
|
185
226
|
```
|
|
186
227
|
|
|
187
|
-
Map the user's choice to the model string (strip " (Recommended)" suffix if present).
|
|
228
|
+
Map the user's choice to the model string (strip " (Recommended)" suffix if present).
|
|
188
229
|
|
|
189
|
-
IMPORTANT: Do NOT skip
|
|
230
|
+
IMPORTANT: Do NOT skip model selection. Do NOT silently use a default model. If --model was not explicitly provided, you MUST present this picker.
|
|
190
231
|
|
|
191
|
-
### Phase 3:
|
|
232
|
+
### Phase 3: Execute Consultation
|
|
192
233
|
|
|
193
|
-
With all parameters resolved (tool, effort, model, question, and optionally context
|
|
234
|
+
With all parameters resolved (tool, effort, model, question, count, and optionally context/continue):
|
|
235
|
+
|
|
236
|
+
#### Single instance (count=1, the default)
|
|
237
|
+
|
|
238
|
+
Invoke the `consult` skill directly using the Skill tool:
|
|
194
239
|
|
|
195
240
|
```
|
|
196
241
|
Skill: consult
|
|
@@ -199,15 +244,35 @@ Args: "[question]" --tool=[tool] --effort=[effort] --model=[model] [--context=[c
|
|
|
199
244
|
Example: "Is this the right approach?" --tool=gemini --effort=high --model=gemini-3-pro
|
|
200
245
|
```
|
|
201
246
|
|
|
202
|
-
The skill handles the full consultation lifecycle:
|
|
247
|
+
The skill handles the full consultation lifecycle: model resolution, command building, context packaging, execution with 120s timeout, and returns a plain JSON result.
|
|
203
248
|
|
|
204
|
-
|
|
249
|
+
#### Multi-instance (count > 1)
|
|
205
250
|
|
|
206
|
-
|
|
251
|
+
Spawn the `consult-agent` via the Task tool with all resolved parameters:
|
|
207
252
|
|
|
208
|
-
|
|
253
|
+
```
|
|
254
|
+
Task:
|
|
255
|
+
subagent_type: "consult-agent"
|
|
256
|
+
prompt: |
|
|
257
|
+
Execute a multi-instance consultation with these pre-resolved parameters:
|
|
258
|
+
- tool: [tool]
|
|
259
|
+
- model: [model]
|
|
260
|
+
- effort: [effort]
|
|
261
|
+
- question: [question]
|
|
262
|
+
- count: [count]
|
|
263
|
+
- context: [context or none]
|
|
264
|
+
|
|
265
|
+
Run [count] parallel consultations with the same tool and parameters.
|
|
266
|
+
Return all responses formatted with numbered headers and a brief synthesis.
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The agent handles parallel execution, temp file management, result parsing, and synthesis.
|
|
270
|
+
|
|
271
|
+
### Phase 4: Present Results
|
|
209
272
|
|
|
210
|
-
|
|
273
|
+
#### Single instance
|
|
274
|
+
|
|
275
|
+
Parse the skill's plain JSON output and display:
|
|
211
276
|
|
|
212
277
|
```
|
|
213
278
|
Tool: {tool}, Model: {model}, Effort: {effort}, Duration: {duration_ms}ms.
|
|
@@ -218,12 +283,11 @@ The results of the consultation are:
|
|
|
218
283
|
|
|
219
284
|
For continuable tools (Claude, Gemini, Codex, OpenCode), display: `Session: {session_id} - use /consult --continue to resume`
|
|
220
285
|
|
|
221
|
-
Save session state
|
|
286
|
+
Save session state to `{AI_STATE_DIR}/consult/last-session.json`.
|
|
287
|
+
|
|
288
|
+
#### Multi-instance
|
|
222
289
|
|
|
223
|
-
|
|
224
|
-
- Claude Code: `.opencode/`
|
|
225
|
-
- OpenCode: `.opencode/`
|
|
226
|
-
- Codex CLI: `.codex/`
|
|
290
|
+
Display the agent's formatted output directly. The agent returns numbered responses with a synthesis section.
|
|
227
291
|
|
|
228
292
|
On failure: `[ERROR] Consultation Failed: {specific error message}`
|
|
229
293
|
|
|
@@ -231,22 +295,34 @@ On failure: `[ERROR] Consultation Failed: {specific error message}`
|
|
|
231
295
|
|
|
232
296
|
| Error | Output |
|
|
233
297
|
|-------|--------|
|
|
234
|
-
| No question provided | `[ERROR] Usage: /consult "your question"
|
|
298
|
+
| No question provided | `[ERROR] Usage: /consult "your question" or /consult with gemini about your question` |
|
|
235
299
|
| Tool not installed | `[ERROR] {tool} is not installed. Install with: {install command from skill}` |
|
|
236
300
|
| Tool execution fails | `[ERROR] {tool} failed: {error}. Try a different tool with --tool=[other]` |
|
|
237
301
|
| Timeout (>120s) | `[ERROR] {tool} timed out after 120s. Try --effort=low for faster response` |
|
|
238
302
|
| No tools available | `[ERROR] No AI CLI tools found. Install: npm i -g @anthropic-ai/claude-code` |
|
|
239
303
|
| Session not found | `[WARN] No previous session found. Starting fresh consultation.` |
|
|
240
304
|
| API key missing | `[ERROR] {tool} requires API key. Set {env var} (see skill for details)` |
|
|
305
|
+
| Count out of range | `[ERROR] Instance count must be 1-5. Got: {count}` |
|
|
306
|
+
| Multi-instance partial failure | Show successful responses, note failures |
|
|
241
307
|
|
|
242
308
|
## Example Usage
|
|
243
309
|
|
|
244
310
|
```bash
|
|
245
|
-
|
|
246
|
-
/consult
|
|
247
|
-
/consult
|
|
311
|
+
# Natural language (NLP parsing)
|
|
312
|
+
/consult with codex about my auth approach
|
|
313
|
+
/consult ask 3 codex about this design
|
|
314
|
+
/consult gemini should I use redis or postgres
|
|
315
|
+
/consult thoroughly ask claude about error handling
|
|
316
|
+
/consult codex few instances about performance
|
|
317
|
+
|
|
318
|
+
# Explicit flags (backward compatible)
|
|
319
|
+
/consult "Is this the right approach?" --tool=gemini --effort=high
|
|
320
|
+
/consult "Review this function" --tool=codex --count=3
|
|
248
321
|
/consult "Suggest improvements" --tool=opencode --model=github-copilot/claude-opus-4-6
|
|
249
|
-
/consult
|
|
322
|
+
/consult --continue
|
|
250
323
|
/consult "Explain this error" --context=diff --tool=gemini
|
|
251
324
|
/consult "Review this file" --context=file=src/index.js --tool=claude
|
|
325
|
+
|
|
326
|
+
# Mixed (flags + natural language)
|
|
327
|
+
/consult with gemini --effort=max about database schema design
|
|
252
328
|
```
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Structured debate between two AI tools to stress-test ideas. Proposer/Challenger format with a verdict.
|
|
3
|
+
agent: general
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **OpenCode Note**: Invoke agents using `@agent-name` syntax.
|
|
7
|
+
> Available agents: task-discoverer, exploration-agent, planning-agent,
|
|
8
|
+
> implementation-agent, deslop-agent, delivery-validator, sync-docs-agent, consult-agent
|
|
9
|
+
> Example: `@exploration-agent analyze the codebase`
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# /debate - Structured AI Dialectic
|
|
13
|
+
|
|
14
|
+
You are executing the /debate command. Your job is to parse the user's request, resolve missing parameters interactively, and spawn the debate orchestrator.
|
|
15
|
+
|
|
16
|
+
## Constraints
|
|
17
|
+
|
|
18
|
+
- NEVER expose API keys in commands or output
|
|
19
|
+
- NEVER run with permission-bypassing flags
|
|
20
|
+
- MUST validate tool names against allow-list: gemini, codex, claude, opencode, copilot
|
|
21
|
+
- Proposer and challenger MUST be different tools
|
|
22
|
+
- Rounds MUST be 1-5 (default: 2)
|
|
23
|
+
|
|
24
|
+
## Execution
|
|
25
|
+
|
|
26
|
+
### Phase 1: Parse Input (Flags + Natural Language)
|
|
27
|
+
|
|
28
|
+
Parse `$ARGUMENTS` using both explicit flags and natural language. Flags take priority.
|
|
29
|
+
|
|
30
|
+
#### Step 1a: Extract explicit flags
|
|
31
|
+
|
|
32
|
+
1. `--tools=TOOL1,TOOL2` (comma-separated pair, first is proposer, second is challenger)
|
|
33
|
+
2. `--rounds=N` where N is 1-5
|
|
34
|
+
3. `--effort=VALUE` where VALUE is one of: low, medium, high, max
|
|
35
|
+
4. `--model-proposer=VALUE` (any string)
|
|
36
|
+
5. `--model-challenger=VALUE` (any string)
|
|
37
|
+
6. `--context=VALUE` where VALUE is: diff, file=PATH, or none (passed through to consult skill for each tool invocation)
|
|
38
|
+
|
|
39
|
+
Remove matched flags from `$ARGUMENTS`.
|
|
40
|
+
|
|
41
|
+
#### Step 1b: Natural language extraction
|
|
42
|
+
|
|
43
|
+
**Tool pair extraction** (case-insensitive):
|
|
44
|
+
- "{tool} vs {tool}" (e.g., "codex vs gemini") -> proposer, challenger
|
|
45
|
+
- "{tool} and {tool}" -> proposer, challenger
|
|
46
|
+
- "with {tool} and {tool}" -> proposer, challenger
|
|
47
|
+
- "between {tool} and {tool}" -> proposer, challenger
|
|
48
|
+
- Tool names: claude, gemini, codex, opencode, copilot
|
|
49
|
+
|
|
50
|
+
**Rounds extraction**:
|
|
51
|
+
- "{N} rounds" -> rounds=N
|
|
52
|
+
- "single round" / "one round" -> rounds=1
|
|
53
|
+
- "deep" / "extended" -> rounds=3
|
|
54
|
+
|
|
55
|
+
**Effort extraction** (same as consult):
|
|
56
|
+
- "quick" / "fast" -> effort=low
|
|
57
|
+
- "thorough" / "deep" / "carefully" -> effort=high
|
|
58
|
+
- "maximum" / "max effort" -> effort=max
|
|
59
|
+
|
|
60
|
+
**Topic extraction**:
|
|
61
|
+
- Text after "about" is the topic
|
|
62
|
+
- If no "about" pattern, remaining text after removing tool/rounds/effort markers
|
|
63
|
+
|
|
64
|
+
**Validation**: rounds must be 1-5. Proposer and challenger must differ. If same tool specified for both, show: `[ERROR] Proposer and challenger must be different tools.`
|
|
65
|
+
|
|
66
|
+
If no topic found: `[ERROR] Usage: /debate "your topic" or /debate codex vs gemini about your topic`
|
|
67
|
+
|
|
68
|
+
### Phase 2: Interactive Parameter Resolution
|
|
69
|
+
|
|
70
|
+
MUST resolve ALL missing parameters. Do NOT silently default.
|
|
71
|
+
|
|
72
|
+
#### Step 2a: Detect installed tools
|
|
73
|
+
|
|
74
|
+
Run all 5 checks **in parallel** via Bash:
|
|
75
|
+
- `which <tool> 2>/dev/null && echo FOUND || echo NOTFOUND` (Unix)
|
|
76
|
+
- `where.exe <tool> 2>nul && echo FOUND || echo NOTFOUND` (Windows)
|
|
77
|
+
|
|
78
|
+
Check for: claude, gemini, codex, opencode, copilot.
|
|
79
|
+
|
|
80
|
+
If fewer than 2 tools installed: `[ERROR] Debate requires at least 2 AI CLI tools. Install more: npm i -g @anthropic-ai/claude-code, npm i -g @openai/codex`
|
|
81
|
+
|
|
82
|
+
#### Step 2b: Batch selection for missing params
|
|
83
|
+
|
|
84
|
+
Use a SINGLE AskUserQuestion call for all missing params:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
AskUserQuestion:
|
|
88
|
+
questions:
|
|
89
|
+
- id: "debate-proposer"
|
|
90
|
+
header: "Proposer" # SKIP if proposer resolved
|
|
91
|
+
question: "Which tool should PROPOSE (argue for)?"
|
|
92
|
+
multiSelect: false
|
|
93
|
+
options (only installed tools):
|
|
94
|
+
- label: "Claude" description: "Deep code reasoning"
|
|
95
|
+
- label: "Gemini" description: "Fast multimodal analysis"
|
|
96
|
+
- label: "Codex" description: "Agentic coding"
|
|
97
|
+
- label: "OpenCode" description: "Flexible model choice"
|
|
98
|
+
- label: "Copilot" description: "GitHub-integrated AI"
|
|
99
|
+
|
|
100
|
+
- id: "debate-challenger"
|
|
101
|
+
header: "Challenger" # SKIP if challenger resolved
|
|
102
|
+
question: "Which tool should CHALLENGE (find flaws)?"
|
|
103
|
+
multiSelect: false
|
|
104
|
+
options (only installed, excluding proposer):
|
|
105
|
+
[same list minus the proposer tool]
|
|
106
|
+
|
|
107
|
+
- id: "debate-effort"
|
|
108
|
+
header: "Effort" # SKIP if effort resolved
|
|
109
|
+
question: "What thinking effort level?"
|
|
110
|
+
multiSelect: false
|
|
111
|
+
options:
|
|
112
|
+
- label: "High (Recommended)" description: "Thorough analysis for debate"
|
|
113
|
+
- label: "Medium" description: "Balanced speed and quality"
|
|
114
|
+
- label: "Low" description: "Fast, minimal reasoning"
|
|
115
|
+
- label: "Max" description: "Maximum reasoning depth"
|
|
116
|
+
|
|
117
|
+
- id: "debate-rounds"
|
|
118
|
+
header: "Rounds" # SKIP if rounds resolved
|
|
119
|
+
question: "How many debate rounds?"
|
|
120
|
+
multiSelect: false
|
|
121
|
+
options:
|
|
122
|
+
- label: "2 (Recommended)" description: "Propose + challenge + defend + respond"
|
|
123
|
+
- label: "1 (Quick)" description: "Single propose + challenge"
|
|
124
|
+
- label: "3 (Extended)" description: "Three full exchanges"
|
|
125
|
+
- label: "5 (Exhaustive)" description: "Five rounds, deep exploration"
|
|
126
|
+
|
|
127
|
+
- id: "debate-context"
|
|
128
|
+
header: "Context" # SKIP if --context resolved
|
|
129
|
+
question: "Include codebase context for both tools?"
|
|
130
|
+
multiSelect: false
|
|
131
|
+
options:
|
|
132
|
+
- label: "None (Recommended)" description: "No extra context, just the topic"
|
|
133
|
+
- label: "Diff" description: "Include current git diff"
|
|
134
|
+
- label: "File" description: "Include a specific file (will ask path)"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Map choices: "Claude" -> "claude", "High (Recommended)" -> "high", "2 (Recommended)" -> 2, "None (Recommended)" -> "none", "Diff" -> "diff", "File" -> "file" (then ask for path). Strip " (Recommended)" suffix.
|
|
138
|
+
|
|
139
|
+
If context resolved to "file":
|
|
140
|
+
Use a follow-up AskUserQuestion to ask for the file path:
|
|
141
|
+
```
|
|
142
|
+
AskUserQuestion:
|
|
143
|
+
questions:
|
|
144
|
+
- id: "debate-file-path"
|
|
145
|
+
header: "File path"
|
|
146
|
+
question: "Which file should both tools see?"
|
|
147
|
+
multiSelect: false
|
|
148
|
+
options:
|
|
149
|
+
- label: "src/" description: "Source directory file"
|
|
150
|
+
- label: "README.md" description: "Project readme"
|
|
151
|
+
```
|
|
152
|
+
The user can type any path via "Other".
|
|
153
|
+
After getting the path:
|
|
154
|
+
1. Reject absolute paths outside the current working directory
|
|
155
|
+
2. Reject paths containing `..` that escape the project root
|
|
156
|
+
3. Reject UNC paths (`\\` or `//` prefix)
|
|
157
|
+
4. Validate the file exists using the Read tool
|
|
158
|
+
If the path escapes the project: `[ERROR] Context file must be within the project directory`
|
|
159
|
+
If the file doesn't exist: `[ERROR] Context file not found: {PATH}`
|
|
160
|
+
If valid, set context to `file={user_provided_path}`.
|
|
161
|
+
|
|
162
|
+
If proposer and challenger resolve to the same tool after selection, show error and re-ask for challenger.
|
|
163
|
+
|
|
164
|
+
### Phase 3: Spawn Debate Orchestrator
|
|
165
|
+
|
|
166
|
+
With all parameters resolved, spawn the debate orchestrator agent:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
Task:
|
|
170
|
+
subagent_type: "debate-orchestrator"
|
|
171
|
+
model: opus
|
|
172
|
+
prompt: |
|
|
173
|
+
Execute a structured debate with these pre-resolved parameters:
|
|
174
|
+
- topic: [topic]
|
|
175
|
+
- proposer: [proposer tool]
|
|
176
|
+
- challenger: [challenger tool]
|
|
177
|
+
- effort: [effort]
|
|
178
|
+
- rounds: [rounds]
|
|
179
|
+
- model_proposer: [model or "omit"]
|
|
180
|
+
- model_challenger: [model or "omit"]
|
|
181
|
+
|
|
182
|
+
If model is "omit" or empty, do NOT include --model in consult skill invocations. The consult skill will use effort-based defaults.
|
|
183
|
+
- context: [context or "none"]
|
|
184
|
+
|
|
185
|
+
Follow the debate skill templates. Display each round progressively.
|
|
186
|
+
Deliver a verdict that picks a winner.
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Phase 4: Present Results
|
|
190
|
+
|
|
191
|
+
Display the orchestrator's output directly. It includes:
|
|
192
|
+
- Progressive round-by-round output (displayed as each round completes)
|
|
193
|
+
- Final synthesis with verdict, agreements, disagreements, and recommendation
|
|
194
|
+
|
|
195
|
+
On failure: `[ERROR] Debate Failed: {specific error message}`
|
|
196
|
+
|
|
197
|
+
## Error Handling
|
|
198
|
+
|
|
199
|
+
| Error | Output |
|
|
200
|
+
|-------|--------|
|
|
201
|
+
| No topic provided | `[ERROR] Usage: /debate "your topic" or /debate codex vs gemini about your topic` |
|
|
202
|
+
| Tool not installed | `[ERROR] {tool} is not installed. Install with: {install command}` |
|
|
203
|
+
| Fewer than 2 tools | `[ERROR] Debate requires at least 2 AI CLI tools installed.` |
|
|
204
|
+
| Same tool for both | `[ERROR] Proposer and challenger must be different tools.` |
|
|
205
|
+
| Rounds out of range | `[ERROR] Rounds must be 1-5. Got: {rounds}` |
|
|
206
|
+
| Context file not found | `[ERROR] Context file not found: {PATH}` |
|
|
207
|
+
| Orchestrator fails | `[ERROR] Debate failed: {error}` |
|
|
208
|
+
|
|
209
|
+
## Example Usage
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Natural language
|
|
213
|
+
/debate codex vs gemini about microservices vs monolith
|
|
214
|
+
/debate with claude and codex about our auth implementation
|
|
215
|
+
/debate thoroughly gemini vs codex about database schema design
|
|
216
|
+
/debate codex vs gemini 3 rounds about event sourcing
|
|
217
|
+
|
|
218
|
+
# Explicit flags
|
|
219
|
+
/debate "Should we use event sourcing?" --tools=claude,gemini --rounds=3 --effort=high
|
|
220
|
+
/debate "Redis vs PostgreSQL for caching" --tools=codex,opencode
|
|
221
|
+
|
|
222
|
+
# Mixed
|
|
223
|
+
/debate codex vs gemini --effort=max about performance optimization strategies
|
|
224
|
+
```
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- AUTO-GENERATED by scripts/gen-adapters.js - DO NOT EDIT -->
|
|
2
1
|
---
|
|
3
2
|
description: This skill should be used when the user asks to "clean up slop", "remove AI artifacts", "deslop the codebase", "find debug statements", "remove console.logs", "repo hygiene", or mentions "AI slop", "code cleanup", "slop detection".
|
|
4
3
|
agent: general
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- AUTO-GENERATED by scripts/gen-adapters.js - DO NOT EDIT -->
|
|
2
1
|
---
|
|
3
2
|
description: Use when user asks to "learn about topic", "research subject", "create learning guide", "build knowledge base", "study topic", or wants to gather online resources on any subject.
|
|
4
3
|
agent: general
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- AUTO-GENERATED by scripts/gen-adapters.js - DO NOT EDIT -->
|
|
2
1
|
---
|
|
3
2
|
description: Use when user asks to "update docs", "sync documentation", "fix outdated docs", "update changelog", "docs are stale", or after completing code changes that might affect documentation.
|
|
4
3
|
agent: general
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
<!-- AUTO-GENERATED by scripts/gen-adapters.js - DO NOT EDIT -->
|
|
2
1
|
---
|
|
3
2
|
name: agnix
|
|
4
3
|
description: "Use when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'. Validates agent configuration files against 155 rules across 10+ AI tools."
|
|
5
|
-
version: 5.0
|
|
4
|
+
version: 5.1.0
|
|
6
5
|
argument-hint: "[path] [--fix] [--strict] [--target=claude-code|cursor|codex]"
|
|
7
6
|
---
|
|
8
7
|
|