Add Wave general-purpose pipelines
ADR, changelog, code-review, debug, doc-sync, explain, feature, hotfix, improve, onboard, plan, prototype, refactor, security-scan, smoke-test, speckit-flow, supervise, test-gen, and more. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
121
.wave/pipelines/editing.yaml
Normal file
121
.wave/pipelines/editing.yaml
Normal file
@@ -0,0 +1,121 @@
|
||||
kind: WavePipeline
|
||||
metadata:
|
||||
name: editing
|
||||
description: "Apply editorial criticism to a blog post draft"
|
||||
release: true
|
||||
|
||||
input:
|
||||
source: cli
|
||||
examples:
|
||||
- "69965d55.md | restructure section 3, the sandboxing analogy is weak, needs a concrete before/after code example"
|
||||
- "698b6f33.md | too long, cut the history section, sharpen the thesis in the intro"
|
||||
- "69965d55.md | tone is too cautious, rewrite to be more authoritative per the series voice"
|
||||
|
||||
steps:
|
||||
- id: analyze
|
||||
persona: navigator
|
||||
workspace:
|
||||
mount:
|
||||
- source: ./
|
||||
target: /project
|
||||
mode: readonly
|
||||
exec:
|
||||
type: prompt
|
||||
source: |
|
||||
Analyze a blog draft and map editorial criticism to specific actions.
|
||||
|
||||
Input: {{ input }}
|
||||
|
||||
The input format is "filename.md | criticism".
|
||||
Parse the filename and criticism from the input.
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Read the draft**: Read the note file to understand its full content
|
||||
2. **Map the structure**: Identify all sections with headings, line ranges,
|
||||
summaries, and word counts
|
||||
3. **Read linked notes**: Follow outgoing links to understand the context
|
||||
the draft draws from
|
||||
4. **Parse the criticism**: Break the author's feedback into discrete editorial concerns
|
||||
5. **Create an editorial plan**: For each concern, produce a specific action:
|
||||
- What type of edit (rewrite, restructure, cut, expand, add, replace_example,
|
||||
fix_tone, fix_links)
|
||||
- Which section it targets
|
||||
- What specifically should change and why
|
||||
- Which part of the criticism it addresses
|
||||
- Priority (high/medium/low)
|
||||
6. **Order by priority**: High-priority structural changes first, then rewrites,
|
||||
then polish
|
||||
|
||||
## Output
|
||||
|
||||
Write the result as JSON to output/editorial-plan.json matching the contract schema.
|
||||
output_artifacts:
|
||||
- name: editorial-plan
|
||||
path: output/editorial-plan.json
|
||||
type: json
|
||||
handover:
|
||||
contract:
|
||||
type: json_schema
|
||||
source: output/editorial-plan.json
|
||||
schema_path: .wave/contracts/editorial-plan.schema.json
|
||||
on_failure: retry
|
||||
max_retries: 2
|
||||
|
||||
- id: revise
|
||||
persona: scribe
|
||||
dependencies: [analyze]
|
||||
memory:
|
||||
inject_artifacts:
|
||||
- step: analyze
|
||||
artifact: editorial-plan
|
||||
as: plan
|
||||
workspace:
|
||||
mount:
|
||||
- source: ./
|
||||
target: /project
|
||||
mode: readwrite
|
||||
exec:
|
||||
type: prompt
|
||||
source: |
|
||||
Revise a blog draft by applying the editorial plan.
|
||||
|
||||
Input: {{ input }}
|
||||
|
||||
Parse the filename from the input (format: "filename.md | criticism").
|
||||
|
||||
Read the editorial plan: cat artifacts/plan
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Read the current draft** in full
|
||||
|
||||
2. **Apply each editorial action** in order from the plan:
|
||||
- **rewrite**: Rewrite the target section preserving links and references
|
||||
- **restructure**: Move, merge, or split sections as described
|
||||
- **cut**: Remove the section or content, clean up any dangling references
|
||||
- **expand**: Add depth, examples, or explanation to the section
|
||||
- **add**: Insert new content at the specified location
|
||||
- **replace_example**: Swap out the example for a better one
|
||||
- **fix_tone**: Adjust voice (authoritative, not cautionary; framework-oriented)
|
||||
- **fix_links**: Add missing links or fix broken references
|
||||
|
||||
3. **Maintain writing standards**:
|
||||
- One sentence per line
|
||||
- Contextual link explanations
|
||||
- Blog series voice: authoritative, framework-oriented, technically substantive
|
||||
- Keep quotes with proper attribution
|
||||
|
||||
4. **Commit the revision**:
|
||||
- `git add *.md`
|
||||
- `git commit -m "editing: {brief description of main changes}"`
|
||||
|
||||
5. **Write revision summary** to output/revision-summary.md:
|
||||
- Draft filename and title
|
||||
- List of editorial actions applied (EDIT-001, etc.)
|
||||
- Sections modified
|
||||
- Word count before and after
|
||||
output_artifacts:
|
||||
- name: revision-summary
|
||||
path: output/revision-summary.md
|
||||
type: markdown
|
||||
Reference in New Issue
Block a user