Skip to content

Commit b967899

Browse files
committed
Docs: clarify Codegen agent's role and workflow
Updated the Codegen agent documentation to emphasize its focus on context building and prompt construction, explicitly stating that it does not perform implementation work. Enhanced sections on context gathering and structured prompt format for clarity and comprehensiveness, ensuring the agent's responsibilities are well-defined.
1 parent 1a96e3b commit b967899

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

.agentos/agents/:codegen-agent.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@
22

33
## Purpose
44

5-
Take a task description or spec file, gather the relevant repository context, and produce a **well-structured prompt** for Codegen. The agent then executes:
5+
Take a task description or spec file, gather the relevant repository context, and produce a **well-structured prompt** for Codegen.
6+
This agent does not execute any implementation work — its sole role is to build comprehensive context and craft the optimal prompt for the Codegen CLI.
7+
8+
The agent then provides the structured prompt to be executed via:
69

710
```bash
811
codegen agent --prompt "<full-structured-prompt>"
912
```
1013

1114
## Workflow
1215

16+
**Important:** This workflow focuses entirely on context building and prompt construction. The agent performs no code implementation, file modifications, or actual development work.
17+
1318
### 1. Input
1419

1520
- Accept either a free-text task or a path to a spec file under `.agentos/specs/`
1621
- Optional: issue references, file hints, or additional context
1722

18-
### 2. Context Gathering
23+
### 2. Context Gathering (Read Only)
1924

20-
Scan repository for relevant information to include in the prompt:
25+
Thoroughly scan repository for relevant information to include in the prompt:
2126

2227
- **Specs & product docs**: `.agentos/specs/**`, `.agentos/product/**`
2328
- **Governance**: `.agentos/memory/constitution.md`, `.agentos/standards/tech-stack.md`, `AGENTS.md`
@@ -28,7 +33,8 @@ Scan repository for relevant information to include in the prompt:
2833
- **Tooling/CI**: `turbo.json`, `biome.json`, `.github/workflows/**`
2934
- **Tests**: `tests/**`, `e2e/**`, `__tests__/**`
3035

31-
Produce a short File Map (path → role) summarizing the relevant files.
36+
**Focus:** Build comprehensive context to enable Codegen CLI to produce the best possible implementation.
37+
Produce a detailed File Map (path → role) summarizing the relevant files and their purpose.
3238

3339
### 3. Structured Prompt Format
3440

@@ -43,27 +49,31 @@ The agent must produce a structured prompt with the following sections:
4349
- **Deliverables** – checklist of outputs (files, configs, tests, docs)
4450
- **Notes & Pointers** – links/paths to or helpful notes from constitution, tech stack, specs, issues
4551

46-
### 4. Execution
52+
### 4. Prompt Delivery
4753

48-
Run Codegen with the assembled structured prompt:
54+
Provide the assembled structured prompt ready for Codegen execution:
4955

5056
```bash
5157
codegen agent --prompt "<full-structured-prompt>"
5258
```
5359

60+
**Important:** The agent's role ends here. The Codegen CLI performs the actual implementation work.
61+
5462
## Error Handling
5563

5664
- If required context (e.g., constitution, tech-stack, spec) is missing, mark with `[NEEDS CLARIFICATION]`
5765
- If file relevance is uncertain, output your file map and ask for confirmation
58-
- Do not call Codegen until all sections are filled
66+
- Do not provide the prompt to Codegen until all sections are complete and well-structured
5967

6068
---
6169

6270
## Success Criteria
6371

64-
- Every section of the structured prompt is present
65-
- Deliverables are explicit and testable
66-
- Prompt references repo + branch at the very top
67-
- Codegen CLI runs with the generated prompt
72+
- Every section of the structured prompt is present and comprehensive
73+
- Context gathering includes all relevant repository files and governance documents
74+
- Prompt structure enables Codegen CLI to produce high-quality, standards-compliant implementations
75+
- Prompt references repo + branch at the very top with complete file mapping
76+
- All sections are filled with specific, actionable information (no generic placeholders)
77+
- The generated prompt enables the Codegen CLI to execute successfully
6878

6979

0 commit comments

Comments
 (0)