mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-26 19:56:37 +08:00
feat: convert all codex agent definitions from .md to .toml format
Convert 20 agent .md files to Codex-native .toml format with proper metadata (name, description, model, sandbox_mode, developer_instructions). Update all 19 skill files to use agent_type references instead of .md file paths. Remove "Read role definition" bootstrapping step from spawn messages since TOML developer_instructions replaces it. Agent format: YAML frontmatter + body → TOML with inline instructions Calling schema: agent: "path.md" → agent_type: "toml_name" Sandbox: read-only for exploration agents, workspace-write for executors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,17 +85,17 @@ const dimensions = ['security', 'architecture', 'quality', 'action-items', 'perf
|
||||
|
||||
dimensions.forEach(dimension => {
|
||||
const agentId = spawn_agent({
|
||||
agent_type: "cli_explore_agent",
|
||||
message: `
|
||||
## TASK ASSIGNMENT
|
||||
|
||||
### MANDATORY FIRST STEPS (Agent Execute)
|
||||
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
|
||||
2. Read review state: ${reviewStateJsonPath}
|
||||
3. Get target files: Read resolved_files from review-state.json
|
||||
4. Validate file access: bash(ls -la ${targetFiles.join(' ')})
|
||||
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
|
||||
6. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
|
||||
7. Execute: ccw spec load --category review (review standards and checklists)
|
||||
1. Read review state: ${reviewStateJsonPath}
|
||||
2. Get target files: Read resolved_files from review-state.json
|
||||
3. Validate file access: bash(ls -la ${targetFiles.join(' ')})
|
||||
4. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
|
||||
5. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
|
||||
6. Execute: ccw spec load --category review (review standards and checklists)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,7 +124,7 @@ Use **Deep Scan mode** for this review:
|
||||
|
||||
## Expected Deliverables
|
||||
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 4, follow schema exactly
|
||||
|
||||
1. Dimension Results JSON: ${outputDir}/dimensions/${dimension}.json
|
||||
|
||||
@@ -207,18 +207,18 @@ const dimensions = ['security', 'architecture', 'quality', 'action-items', 'perf
|
||||
|
||||
dimensions.forEach(dimension => {
|
||||
const agentId = spawn_agent({
|
||||
agent_type: "cli_explore_agent",
|
||||
message: `
|
||||
## TASK ASSIGNMENT
|
||||
|
||||
### MANDATORY FIRST STEPS (Agent Execute)
|
||||
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
|
||||
2. Read session metadata: ${sessionMetadataPath}
|
||||
3. Read completed task summaries: bash(find ${summariesDir} -name "IMPL-*.md" -type f)
|
||||
4. Get changed files: bash(cd ${workflowDir} && git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u)
|
||||
5. Read review state: ${reviewStateJsonPath}
|
||||
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
|
||||
7. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
|
||||
8. Execute: ccw spec load --category review (review standards and checklists)
|
||||
1. Read session metadata: ${sessionMetadataPath}
|
||||
2. Read completed task summaries: bash(find ${summariesDir} -name "IMPL-*.md" -type f)
|
||||
3. Get changed files: bash(cd ${workflowDir} && git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u)
|
||||
4. Read review state: ${reviewStateJsonPath}
|
||||
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
|
||||
6. Execute: ccw spec load --category "exploration execution" (technology stack and constraints)
|
||||
7. Execute: ccw spec load --category review (review standards and checklists)
|
||||
|
||||
---
|
||||
|
||||
@@ -247,7 +247,7 @@ Use **Deep Scan mode** for this review:
|
||||
|
||||
## Expected Deliverables
|
||||
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
|
||||
|
||||
1. Dimension Results JSON: ${outputDir}/dimensions/${dimension}.json
|
||||
|
||||
@@ -326,18 +326,18 @@ reviewAgents.forEach(id => close_agent({ id }));
|
||||
```javascript
|
||||
// Spawn deep-dive agent
|
||||
const deepDiveAgentId = spawn_agent({
|
||||
agent_type: "cli_explore_agent",
|
||||
message: `
|
||||
## TASK ASSIGNMENT
|
||||
|
||||
### MANDATORY FIRST STEPS (Agent Execute)
|
||||
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
|
||||
2. Read original finding: ${dimensionJsonPath}
|
||||
3. Read affected file: ${file}
|
||||
4. Identify related code: bash(grep -r "import.*${basename(file)}" ${projectDir}/src --include="*.ts")
|
||||
5. Read test files: bash(find ${projectDir}/tests -name "*${basename(file, '.ts')}*" -type f)
|
||||
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
|
||||
7. Execute: ccw spec load --category "exploration execution" (technology stack and constraints for remediation)
|
||||
8. Execute: ccw spec load --category review (review standards and checklists)
|
||||
1. Read original finding: ${dimensionJsonPath}
|
||||
2. Read affected file: ${file}
|
||||
3. Identify related code: bash(grep -r "import.*${basename(file)}" ${projectDir}/src --include="*.ts")
|
||||
4. Read test files: bash(find ${projectDir}/tests -name "*${basename(file, '.ts')}*" -type f)
|
||||
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
|
||||
6. Execute: ccw spec load --category "exploration execution" (technology stack and constraints for remediation)
|
||||
7. Execute: ccw spec load --category review (review standards and checklists)
|
||||
|
||||
---
|
||||
|
||||
@@ -372,7 +372,7 @@ Then apply **Deep Scan mode** for semantic analysis:
|
||||
|
||||
## Expected Deliverables
|
||||
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
|
||||
|
||||
1. Deep-Dive Results JSON: ${outputDir}/iterations/iteration-${iteration}-finding-${findingId}.json
|
||||
|
||||
|
||||
@@ -79,18 +79,18 @@ const deepDiveAgents = [];
|
||||
|
||||
selectedFindings.forEach(finding => {
|
||||
const agentId = spawn_agent({
|
||||
agent_type: "cli_explore_agent",
|
||||
message: `
|
||||
## TASK ASSIGNMENT
|
||||
|
||||
### MANDATORY FIRST STEPS (Agent Execute)
|
||||
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
|
||||
2. Read original finding: ${dimensionJsonPath}
|
||||
3. Read affected file: ${finding.file}
|
||||
4. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${projectDir}/src --include="*.ts")
|
||||
5. Read test files: bash(find ${projectDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
|
||||
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
|
||||
7. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
|
||||
8. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
|
||||
1. Read original finding: ${dimensionJsonPath}
|
||||
2. Read affected file: ${finding.file}
|
||||
3. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${projectDir}/src --include="*.ts")
|
||||
4. Read test files: bash(find ${projectDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
|
||||
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
|
||||
6. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
|
||||
7. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
|
||||
|
||||
---
|
||||
|
||||
@@ -125,7 +125,7 @@ Then apply **Deep Scan mode** for semantic analysis:
|
||||
|
||||
## Expected Deliverables
|
||||
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
|
||||
|
||||
1. Deep-Dive Results JSON: ${outputDir}/iterations/iteration-${iteration}-finding-${finding.id}.json
|
||||
|
||||
@@ -190,18 +190,18 @@ const deepDiveAgents = [];
|
||||
|
||||
selectedFindings.forEach(finding => {
|
||||
const agentId = spawn_agent({
|
||||
agent_type: "cli_explore_agent",
|
||||
message: `
|
||||
## TASK ASSIGNMENT
|
||||
|
||||
### MANDATORY FIRST STEPS (Agent Execute)
|
||||
1. **Read role definition**: ~/.codex/agents/cli-explore-agent.md (MUST read first)
|
||||
2. Read original finding: ${dimensionJsonPath}
|
||||
3. Read affected file: ${finding.file}
|
||||
4. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${workflowDir}/src --include="*.ts")
|
||||
5. Read test files: bash(find ${workflowDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
|
||||
6. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
|
||||
7. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
|
||||
8. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
|
||||
1. Read original finding: ${dimensionJsonPath}
|
||||
2. Read affected file: ${finding.file}
|
||||
3. Identify related code: bash(grep -r "import.*${basename(finding.file)}" ${workflowDir}/src --include="*.ts")
|
||||
4. Read test files: bash(find ${workflowDir}/tests -name "*${basename(finding.file, '.ts')}*" -type f)
|
||||
5. Execute: cat ~/.ccw/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
|
||||
6. Read: ${projectRoot}/.workflow/project-tech.json (technology stack and architecture context)
|
||||
7. Read: ${projectRoot}/.workflow/specs/*.md (user-defined constraints for remediation compliance)
|
||||
|
||||
---
|
||||
|
||||
@@ -237,7 +237,7 @@ Then apply **Deep Scan mode** for semantic analysis:
|
||||
|
||||
## Expected Deliverables
|
||||
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 6, follow schema exactly
|
||||
**Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
|
||||
|
||||
1. Deep-Dive Results JSON: ${outputDir}/iterations/iteration-${iteration}-finding-${finding.id}.json
|
||||
|
||||
|
||||
@@ -100,12 +100,12 @@ for (let i = 1; i <= aggregatedPlan.groups.length; i++) {
|
||||
```javascript
|
||||
// Spawn planning agent for a batch
|
||||
const agentId = spawn_agent({
|
||||
agent_type: "cli_planning_agent",
|
||||
message: `
|
||||
## TASK ASSIGNMENT
|
||||
|
||||
### MANDATORY FIRST STEPS (Agent Execute)
|
||||
1. **Read role definition**: ~/.codex/agents/cli-planning-agent.md (MUST read first)
|
||||
2. Execute: ccw spec load --category planning
|
||||
1. Execute: ccw spec load --category planning
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -55,12 +55,12 @@ if (result.passRate < 100%) {
|
||||
```javascript
|
||||
// Spawn execution agent for a group
|
||||
const execAgentId = spawn_agent({
|
||||
agent_type: "cli_execution_agent",
|
||||
message: `
|
||||
## TASK ASSIGNMENT
|
||||
|
||||
### MANDATORY FIRST STEPS (Agent Execute)
|
||||
1. **Read role definition**: ~/.codex/agents/cli-execution-agent.md (MUST read first)
|
||||
2. Execute: ccw spec load --category execution
|
||||
1. Execute: ccw spec load --category execution
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user