Skip to content

Commit 5499412

Browse files
committed
docs: add plan and task for /draft command improvement
1 parent 967118a commit 5499412

3 files changed

Lines changed: 74 additions & 0 deletions

File tree

TASKS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Put done tasks into the Archive.
1818

1919
## Active Tasks
2020

21+
- [ ] Improve the `/draft` command and evolve the `writer` agent to include a review-driven "Refinement Phase." (See plan: plans/improve-draft-command-and-writer-agent.md)
22+
2123
---
2224

2325
## Archive

journal/2026-03-23.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
[2026-03-23T05:48:51] - Update /draft command to suggest /review instead of /revise.
66
[2026-03-23T05:50:16] - Update README, Style Guide, and User Guide to reflect /review and reviewer agent.
77
[2026-03-23T05:51:31] - Mark /review command improvement as done and archive task.
8+
[2026-03-23T06:00:12] - Plan and task for improving /draft command and evolve writer agent.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Plan: Improve `/draft` Command and Evolve `writer` Agent
2+
3+
This plan outlines the migration and enhancement of the legacy `reporter` agent into a more capable `writer` agent, and the corresponding upgrade of the `/draft` command to handle both initial content generation and a new, review-driven "Refinement Phase."
4+
5+
## Objective
6+
Promote the `reporter` agent to `writer` and upgrade the `/draft` command to implement a full feedback loop. This allows the `writer` agent to ingest `.review.md` files (generated by the `/review` command) and apply suggested improvements directly to the target file.
7+
8+
## Architecture
9+
- **Agent Evolution:** The `reporter` agent is renamed to `writer`, expanding its role from section expansion to sophisticated refinement and style alignment.
10+
- **Feedback Loop:** This change closes the loop between the non-destructive `/review` command and the content generation process.
11+
- **Direct Refinement:** The `/draft` command will include a dedicated "Refinement Phase" that uses the `writer` agent to apply suggested changes from a `.review.md` file directly to the target document.
12+
13+
---
14+
15+
## Detailed Workflow
16+
17+
### Phase 1: Context & Mode Selection
18+
- **Analyze Request:** Identify the target file for drafting or refinement.
19+
- **Check for Review:** Search for a corresponding `<filename>.review.md` file.
20+
- **Branching Logic:**
21+
- **Initial Drafting:** If no review exists, follow the current Outline -> Skeleton -> Expansion workflow.
22+
- **Refinement Mode:** If a review exists, initiate the Refinement Phase.
23+
24+
### Phase 2: Initial Drafting (Existing Workflow)
25+
- **Outline Creation:** Generate a detailed Markdown outline based on the Style Guide.
26+
- **Skeleton Initialization:** Create a target file with placeholders.
27+
- **Section-by-Section Drafting:** Use the `writer` agent to fill placeholders with detailed prose.
28+
29+
### Phase 3: Refinement Phase (New Mode)
30+
- **Goal:** Apply suggested improvements from a `.review.md` file.
31+
- **Action:** The `/draft` command reads the target file and its `.review.md` sidecar.
32+
- **Agent Invocation:** Invoke the `writer` agent with instructions to process the review findings.
33+
- **Direct Modification:** The `writer` agent identifies suggested changes (Structural, Substance, or Linguistic) and uses the `replace` tool to update the target file directly.
34+
- **Consistency Check:** Ensure the modifications maintain a consistent tone and adhere to the Style Guide.
35+
36+
### Finalization
37+
- **Summary:** Notify the user that the draft has been updated or refined.
38+
- **Next Steps:** Suggest a final `/review` if significant changes were made.
39+
40+
---
41+
42+
## Implementation Steps
43+
44+
### Step 1: Agent Evolution (Rename & Refactor)
45+
1. **Rename File:** Move `.gemini/agents/reporter.md` to `.gemini/agents/writer.md`.
46+
2. **Update Agent Definition:**
47+
- Change name from `reporter` to `writer`.
48+
- Update the prompt to reflect its role as a "Full-Blown Writer" capable of both original composition and deep refinement.
49+
- Explicitly instruct the agent on how to interpret and apply findings from `.review.md` files using the `replace` tool.
50+
51+
### Step 2: Upgrade `/draft` Command (`.gemini/commands/draft.toml`)
52+
1. **Update References:** Change all calls from `reporter` to `writer`.
53+
2. **Implement Branching:** Update the prompt to check for `.review.md` files and offer a "Refinement Mode."
54+
3. **Refine Refinement Logic:** Provide clear instructions for the `writer` agent to perform direct, surgical updates during the Refinement Phase.
55+
56+
### Step 3: Global Alignment
57+
1. **Documentation:** Update `docs/user-guide.md` and `docs/design.md` to reflect the new agent name and workflow.
58+
2. **Cross-References:** Update mentions of "reporter" in `README.md`, `TASKS.md`, and `CHANGELOG.md`.
59+
60+
---
61+
62+
## Verification Strategy
63+
64+
### 1. Functional Testing
65+
- **Initial Draft:** Verify `/draft` still works for new documents using the renamed `writer` agent.
66+
- **Refinement Detection:** Ensure `/draft` correctly identifies a `.review.md` file and enters Refinement Mode.
67+
- **Direct Replacement:** Confirm the `writer` agent successfully uses `replace` to apply a suggestion from a review file.
68+
69+
### 2. Quality Audit
70+
- **Style Consistency:** Verify that refined sections still adhere to the project's Style Guide.
71+
- **Technical Depth:** Ensure the `writer` agent maintains a high level of technical detail (7-8/10) during both drafting and refinement.

0 commit comments

Comments
 (0)