agentleFS
dmlguq456dmlguq456/hearting/skills/draft-refine/SKILL.md

draft-refine

Skill8 starsChanged 2 months agoMITView on GitHub

Use only when autopilot-draft or autopilot-refine dispatches an internal strategy or draft refinement stage. Not for top-level user requests or primary capability routing.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow the three-tier output convention.

    line 18
  2. Distinctive:

    no match → report the resolution error

    line 31
  3. Very specific:

    Do not generate a language-companion pair by default.

    line 33
  4. Distinctive:

    Every memo is re-grounded against its source before application or override.

    line 54
  5. Very specific:

    Use a fast fact-checker because source comparison is bounded matching, not creative drafting.

    line 69
  6. Very specific:

    After the research/research-survey unit returns:

    line 73
  7. Distinctive:

    No critical finding → report both selected verdicts.

    line 117
  8. Very specific:

    After two rounds, write remaining issues to the localized Unresolved Issues section, report resolved and unresolved items with reasons, and …

    line 122

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

draft-refine

Follow the three-tier output convention. Store review logs in _internal/strategy_reviews/ or _internal/draft_reviews/. Use _internal/versions/v{N}/ for modern snapshots and recognize legacy sibling _v{N}.md snapshots when already present.

Resolve the Document

Resolve $ARGUMENTS to a canonical strategy or draft and any existing required audience-language companion.

  • A path containing /draft/ selects draft mode and canonical draft.md.
  • A path containing /strategy/ selects strategy mode and canonical strategy.md.
  • A directory defaults to strategy/strategy.md.
  • A Markdown file is used as supplied; recognize a sibling draft_ko.md or strategy_ko.md only when it exists or the workflow explicitly requires that legacy companion.
  • Otherwise fuzzy-search with ls -d $AGENT_ARTIFACT_OUTPUT_DIR/documents/*$ARGUMENTS* 2>/dev/null.
    • one match → resolve its canonical strategy and existing companions
    • multiple matches → ask the user to choose
    • no match → report the resolution error

Do not generate a language-companion pair by default. Preserve the target artifact's existing or explicitly requested language and follow <agent-home>/roles/response-policy.md for user-facing output.

Prepare Versioning

Version snapshots are managed by utilities/artifact-snapshot.py for the active refinement. Existing version receipts remain the source of snapshot paths.

Pass the helper-reported version, convention, snapshot paths, canonical path, and existing companion paths to the research/research-survey unit. The helper preserves a detected legacy sibling layout and uses _internal/versions/v{N}/<relative-path> for modern/new layouts. A new target has no prior state to snapshot.

Delegate Refinement

Load references/delegate-prompt.md, substitute its variables, and dispatch the research/research-survey unit with the complete prompt. Read references/changelog-example.md for the legacy-to-frontmatter example.

Check these invariants:

  • The file begins with ---.
  • changelog: is a newest-first YAML array in frontmatter, using block scalar | entries rather than top-of-file HTML comments.
  • Every memo is re-grounded against its source before application or override.
  • An override records its reason in the changelog.

QA Scaling

Derive rigor from the selected intensity and changed sections. At Standard+, run quality and fact review in parallel.

LevelConditionQuality reviewFact checkMaximum rounds
QuickDirect quick invocation; the parent autopilot normally skips refinementOne fast spot-checkSkip1, no reinvocation on critical findings
LightAt most 3 sectionsOne fast reviewerSkip; reviewer covers basic spot-checks2
StandardAt least 4 sectionsOne deep reviewerOne fast fact-checker2
ThoroughMajor overhaul or new evidenceTwo deep reviewers in parallelOne fast fact-checker2
AdversarialImminent external review or explicit adversarial intensityTwo deep reviewers plus one external adversaryOne fast fact-checker2 plus one external pass

Use a fast fact-checker because source comparison is bounded matching, not creative drafting. The canonical 8-row classification table lives in roles/units/research/fact-check.md.

Post-Refine Review

After the research/research-survey unit returns:

  1. Set {log_dir} to the document artifact root and create the selected review directory:

    mkdir -p {log_dir}/_internal/strategy_reviews
    mkdir -p {log_dir}/_internal/draft_reviews
  2. Invoke only the reviewers selected by the QA budget.

Quality reviewer prompt:

Review changed sections for quality, cohesion, audience fit, and strategy alignment.
Document type and path: [type/path]
Changed sections: [list]
For rebuttals, verify that every reviewer point remains addressed.
Do not verify individual venue, year, metric, lineage, or classification facts; the fact-checker owns those.
Write: {log_dir}/{review_subdir}/refine_round_{N}_quality.md
Return ONLY the path and one-line verdict.

Fact-checker prompt for Standard or higher:

Act as a fact-checker, not a narrative reviewer.
Document type and path: [type/path]
Changed sections: [list]

For every material model, venue, year, metric, lineage, or classification claim, open and compare the ground-truth source:
- $AGENT_ARTIFACT_OUTPUT_DIR/analysis_project/paper/*.md is the primary source produced by `analyze-project --mode paper`
- open original PDFs only when the paper analysis lacks the fact
- use {artifact_root}/strategy/ or analysis/ for strategy-specific evidence

Output one table only:
| Slide/Section | Claim in deliverable | Source (file:line or section) | Match (✅/❌) | Severity (🔴/🟡) |

Do not discuss writing quality or audience fit. Limit the table to about 30 material claims when more than 10 sections changed.
Write: {log_dir}/{review_subdir}/refine_round_{N}_factcheck.md
Return ONLY the path and one-line verdict.
  1. Branch on the combined verdict.
    • No critical finding → report both selected verdicts.
    • Quick → stop after round 1, add remaining critical findings to the artifact's localized Unresolved Issues section, and report them.
    • Quality critical → re-dispatch the research/research-survey unit with quality findings.
    • Fact critical → re-dispatch the research/research-survey unit with mandatory source re-grounding against the named analyses or PDFs.
    • Both → combine findings in one bounded correction.
  2. After two rounds, write remaining issues to the localized Unresolved Issues section, report resolved and unresolved items with reasons, and tag fact residuals [FACT-RESIDUAL].

Task

Refine the document at: $ARGUMENTS

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.