phase-build
Skill62 starsChanged 4 months agoApache-2.0View on GitHub
Run Phase Build — section drafting (N parallel agents), fact-check, citation injection, assembly. Use when research.json and outline.json exist and need to write the actual article body. Triggered by /seo-blog build, "draft the article now", "write the body".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- thomas-powers-jr/cadencetheir own version, first seen Sep 24, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- thomas-powers-jr/cadence★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- phase-monitorSkill
- phase-optimizeSkill
- phase-publishSkill
- phase-researchSkill
- seo-blogSkill
- website-auditSkill
- weekly-digestSkill
The file
Files
Phase Build Orchestrator
Convert outline.json → full markdown draft via parallel section writers + fact verification.
Inputs
Required in workspace/{task_id}/:
state.jsonresearch.jsonangle.json(from format-selector + topic-angle-selector)outline.json(from outline-architect)
Stages
1. section-drafter (parallel N=outline.sections.length)
- Spawn N independent subagents via Task tool
- Each gets: ONE section spec + 800-word context summary of others
- Each writes markdown + claims[] + citation_capsule
- Tool whitelist: Read, Write ONLY (no WebFetch, no Bash)
- Output: workspace/{task}/sections/{0..N-1}.json
2. citation-capsule-builder
- Verify each H2 has 40-60 word AI-quotable block
- Princeton GEO requirement (+28-41% AI citation rate)
3. chart-generator (if outline.sections[].needs_table)
- Generate ≥2 markdown tables OR XSS-safe SVG charts
- At least 1 in front 50% of article
4. fact-check-and-citation
- For each [claim:cN_S] marker: Crossref → Tavily → HEAD check
- Build References section (APA 7, ≤10 entries)
- Replace markers with (Author, Year) in-text
- Output: workspace/{task}/citations.json
5. assembly (scripts/build/assemble.py)
- Concatenate: Abstract → Key Takeaways → ToC → Body → FAQ → Conclusion → References
- Anchor links auto-generated for ToC
- Mandatory-H2 coverage is enforced by scripts/lint/mandatory_sections_check.py,
which reads THIS project's `business-context.json :: mandatory_sections` (assemble.py
imports `_load_mandatory_sections` from it). Do NOT substitute
markdown_structure_check.py here: it carries a HARDCODED section table and would
override the project contract (see feedback_project_contract_not_hardcoded_labels).
It remains available as a standalone structural report, not as this stage's gate.
- Output: workspace/{task}/draft.md (frontmatter Stage: build-done)Parallel execution pattern
Section drafter spawns subagents in single Task batch:
tasks = []
for section in outline.sections:
tasks.append({
"subagent_type": "writer",
"section_spec": section,
"context_summary": summarize_others(outline, section),
"primary_keyword": state.brief.primary_keyword,
"format_id": angle.format_id,
"modifiers": angle.modifiers,
"references_to_load": [
"style/voices/" + brand_voice_choice,
"style/banned-words.md",
"style/ai-tells-43.md",
"style/em-dash-prohibition.md",
"seo/citation-capsules-princeton.md"
]
})
results = parallel_dispatch(tasks) # 1 round-trip, N writersHard constraints (enforced post-section)
Each section must pass self_check:
- word_count within
[budget × 0.9, budget × 1.1] - em_dash_count == 0
- banned_words_found == false
- ai_tells_found == false
- has citation_capsule of 40-60 words
- contains claims with hint_query for fact-checker
Otherwise section is rejected and drafter retried (max 2 retries per section).
Post-build lint (mandatory before handoff to Optimize)
# Section completeness — catches writer subagent silent dropout (6/50 sections
# dropped in 2026-05-22 batch). Run immediately after Stage 1 parallel dispatch
# returns, BEFORE Stage 4 fact-check.
python -m scripts.lint.section_completeness_check --workspace {task_id} --json
# exit 0 = all sections present; exit 1 = missing or extra
# Auto-writes to workspace/{task_id}/section-completeness.json (file-bus)
# Missing indices → re-dispatch writer subagent for each before proceeding.Output
workspace/{task}/sections/*.json(N files, schemas/section.schema.json)workspace/{task}/citations.json(schemas/citations.schema.json)workspace/{task}/draft.md(markdown with frontmatterStage: build-done)
Handoff
recommended_next_skill: "phase-optimize"
See also
subskills/build/section-drafter/SKILL.mdsubskills/build/fact-check-and-citation/SKILL.mdsubskills/build/citation-capsule-builder/SKILL.mdagents/writer.mdagents/fact-checker.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

