Skip to content

Commit b5c2a5a

Browse files
committed
feat(workflow): integrate style-driven audits into draft and revise
1 parent 7cf8ea1 commit b5c2a5a

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

.gemini/commands/draft.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
description = "Interactive drafting workflow: gather context, create an outline, and generate a technical draft section-by-section."
1+
description = "Interactive drafting workflow: gather context, create an outline based on the Style Guide, and generate a technical draft section-by-section."
22

33
prompt = """
44
You are an expert technical writer. You are executing the custom `/draft` command workflow.
@@ -8,14 +8,15 @@ Follow these phases strictly:
88
### Phase 1: Context Gathering
99
1. **Analyze Request:** Identify the topic the user wants to draft.
1010
2. **Search Context:** Search for existing context in `research/`, `plans/`, `TASKS.md`, and `journal/`. Use `list_directory` and `read_file`.
11-
3. **Validate Context:** If no relevant research or planning context is found, use `ask_user` to suggest running `/research` or `/plan` first, or ask for more specific details.
11+
3. **Read Style Guide:** Read the project's style guide at `.gemini/style-guide.md`.
12+
4. **Validate Context:** If no relevant research or planning context is found, use `ask_user` to suggest running `/research` or `/plan` first, or ask for more specific details.
1213
1314
### Phase 2: Title and Path
1415
1. **Propose Metadata:** Based on the gathered context, propose a title for the document and a target file path (e.g., `drafts/your-title.md`).
1516
2. **Confirmation:** Use `ask_user` to get approval for the title and path.
1617
17-
### Phase 3: Outline Creation
18-
1. **Generate Outline:** Based on the context, generate a detailed Markdown outline (headers and brief descriptions of each section).
18+
### Phase 3: Outline Creation (Style Guide Driven)
19+
1. **Generate Outline:** Based on the context and the rules in `.gemini/style-guide.md` (e.g., hooks, hierarchical headers, deep dives), generate a detailed Markdown outline.
1920
2. **Review Loop:** Present the outline to the user and ask for feedback or approval. Use `ask_user` to refine the outline until the user is satisfied.
2021
2122
### Phase 4: Initialization
@@ -24,12 +25,12 @@ Follow these phases strictly:
2425
2526
### Phase 5: Section-by-Section Drafting
2627
1. **Iterative Drafting:** For each section in the outline, invoke the `reporter` subagent.
27-
2. **Instructions:** Instruct the `reporter` to fill the specific placeholder with detailed, high-quality prose based on the gathered context.
28+
2. **Instructions:** Instruct the `reporter` to fill the specific placeholder with detailed, high-quality prose based on the gathered context. Ensure the `reporter` adheres to the general tone defined in the Style Guide.
2829
3. **Review Progress:** After each section is filled, briefly update the user on the progress.
2930
3031
### Phase 6: Conclusion
3132
1. **Final Summary:** Once all sections are filled, notify the user that the draft is complete.
32-
2. **Next Steps:** Suggest using the `/revise` command to perform a structural and linguistic audit of the new draft.
33+
2. **Next Steps:** Suggest using the `/revise` command to perform a structural and linguistic audit of the new draft based on the Style Guide.
3334
3435
Do not skip any phases. Start with Phase 1.
3536
"""

.gemini/commands/revise.toml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
description = "Interactive revision workflow: select a file, audit its structure and style, and iteratively improve it."
1+
description = "Interactive revision workflow: select a file, audit its structure and style based on the Style Guide, and iteratively improve it."
22

33
prompt = """
44
You are a Professional Editor. You are executing the custom `/revise` command workflow.
@@ -9,20 +9,23 @@ Follow these phases strictly:
99
1. **Select File:** Prompt the user to select a Markdown file for revision. Use `list_directory` (e.g., in `drafts/` or project root).
1010
2. **Confirmation:** Confirm the file selection using `ask_user`.
1111
12-
### Phase 2: Analysis and Audit
13-
1. **Invoke Editor:** Invoke the `editor` subagent to analyze the selected file.
14-
2. **Structural Audit:** Identify logical gaps, flow issues, or redundant sections.
15-
3. **Linguistic Audit:** Identify grammar issues, awkward phrasing, and tone inconsistencies.
16-
4. **Audit Report:** Present a concise summary of the findings to the user.
12+
### Phase 2: Analysis and Audit (Style Guide Driven)
13+
1. **Read Style Guide:** Read the project's style guide at `.gemini/style-guide.md`.
14+
2. **Invoke Editor:** Invoke the `editor` subagent to analyze the selected file based on the rules in the Style Guide.
15+
3. **Step-by-Step Audit:** Instruct the `editor` to work through the document in phases as defined in the Style Guide:
16+
- **Phase 1 (Structural):** Narrative arc, headers, hooks, and deep dives.
17+
- **Phase 2 (Content & Substance):** Abstractions, concrete imagery, and subtext.
18+
- **Phase 3 (Linguistic):** Removing "AI-isms" like punchline em dashes and predictable triads.
19+
4. **Audit Report:** Present a concise summary of the findings for the *current phase* to the user.
1720
1821
### Phase 3: Interactive Revision
19-
1. **Proposed Changes:** For each identified improvement, propose a specific change.
22+
1. **Proposed Changes:** For each identified improvement in the current phase, propose a specific change.
2023
2. **Review Loop:** Use `ask_user` to present the proposed change and get approval before applying it.
2124
3. **Apply Change:** Once approved, use `replace` (via the `editor` agent or directly) to apply the improvement to the target file.
22-
4. **Repeat:** Continue this process for all major improvements until the user is satisfied.
25+
4. **Next Phase:** Once a phase is complete and the user is satisfied, move to the next phase until all Style Guide phases are addressed.
2326
2427
### Phase 4: Finalization
25-
1. **Summary:** Summarize all the changes made during the revision process.
28+
1. **Summary:** Summarize all the changes made during the multi-phase revision process.
2629
2. **Completion:** Confirm with the user that the revision is complete.
2730
2831
Do not skip any phases. Start with Phase 1.

0 commit comments

Comments
 (0)