agentleFS
Renozoic-FoundryRenozoic-Foundry/forge-public/.claude/skills/synthesize/SKILL.md

synthesize

Skill0 starsChanged 3 months agoMITView on GitHub

Synthesize accumulated project artifacts into refined documents

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

37 rules. 0 are common, 4 are distinctive, and 33 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 33

    Very specific

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

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

    If $ARGUMENTS is ? or help: Print a usage block with the following information then stop — do not execute any further steps:

    line 19
  2. Distinctive:

    If no mode flag is present, print the help text above and stop.

    line 40
  3. Very specific:

    If --postmortem: set MODE=postmortem.

    line 41
  4. Very specific:

    If --topic: set MODE=topic.

    line 42
  5. Very specific:

    If --decisions: set MODE=decisions.

    line 43
  6. Very specific:

    If --architecture: set MODE=architecture.

    line 44
  7. Very specific:

    If --all: set MODE=all. No additional arguments required.

    line 45
  8. Very specific:

    If docs/synthesis/ does not exist, create it.

    line 55
  9. Very specific:

    Read all .md files in docs/sessions/ excluding _template.md, signals.md, error-log.md, insights-log.md, scratchpad.md, context-snapshot.md, …

    line 63
  10. Very specific:

    Read docs/sessions/error-log.md.

    line 79
  11. Very specific:

    If file does not exist: skip silently.

    line 80
  12. Very specific:

    Add to SOURCES if read.

    line 81
  13. Very specific:

    Read docs/sessions/signals.md.

    line 85
  14. Very specific:

    Write a structured postmortem document to OUTPUT_FILE with these sections:

    line 91
  15. Very specific:

    Search the following directories for files containing QUERY (case-insensitive):

    line 110
  16. Very specific:

    If no matches found: write a brief note to OUTPUT_FILE stating "No artifacts found matching the query." and stop.

    line 124
  17. Distinctive:

    Read the matching sections from each file (read the relevant portions, not entire files when they are large).

    line 128
  18. Very specific:

    Write a structured topic summary document to OUTPUT_FILE with these sections:

    line 130
  19. Very specific:

    If --since YYYY-MM-DD is set: only include files whose date prefix >= that date.

    line 149
  20. Very specific:

    Read all .md files in docs/decisions/ (if the directory exists).

    line 159
  21. Very specific:

    If directory does not exist or is empty: skip silently.

    line 161
  22. Very specific:

    Add each file to SOURCES if read.

    line 162
  23. Very specific:

    Write a structured decision log document to OUTPUT_FILE with these sections:

    line 166
  24. Very specific:

    If directory does not exist or is empty: note "No ADRs found" and continue.

    line 182
  25. Very specific:

    Read docs/specs/README.md to identify closed specs.

    line 187
  26. Very specific:

    If no closed specs exist: note "No closed specs found" and continue.

    line 189
  27. Very specific:

    Read AGENTS.md if it exists.

    line 194
  28. Very specific:

    Read CLAUDE.md. Extract the "Architecture quick-ref" section and any structural information.

    line 200
  29. Very specific:

    Write a structured architecture overview document to OUTPUT_FILE with these sections:

    line 205
  30. Very specific:

    Read the 3 most recent session logs from docs/sessions/ (sorted by filename descending).

    line 225
  31. Very specific:

    If a single spec ID or concept appears 3+× more than any other, set QUERY=<that-token>.

    line 227
  32. Distinctive:

    After all four modes have been attempted, print a single summary block:

    line 241
  33. Distinctive:

    After writing the output file, print:

    line 256
  34. Very specific:

    If postmortem: "Next: review the postmortem and share with your team.

    line 267
  35. Very specific:

    If topic: "Next: review the topic summary.

    line 268
  36. Very specific:

    If decisions: "Next: review the decision log for consistency.

    line 269
  37. Very specific:

    If architecture: "Next: review the architecture overview for accuracy.

    line 270

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “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
<!-- forge:paths-note (Spec 575): process-state paths in this command (docs/specs, docs/sessions, docs/decisions, docs/research, docs/process-kit, docs/backlog.md) are the CLASSIC-DEFAULT spellings, not fixed locations. When the project configures forge.paths (e.g. the `contained` layout), resolve each key before use — bash: `forge_path <key>` (source ${CLAUDE_PLUGIN_ROOT:-.}/.forge/lib/config.sh, forge_config_load AGENTS.md); python: `${CLAUDE_PLUGIN_ROOT:-.}/.forge/bin/forge-py .../runtime_config.py path <key>`. -->

Framework: FORGE

Model-Tier: sonnet

Synthesize accumulated FORGE artifacts into a refined, actionable document.

Timing guidance: see session-synthesize-evolve-guide for the canonical comparison of /session vs /synthesize vs /evolve — triggers, cadence, automation class.

If $ARGUMENTS is ? or help: Print a usage block with the following information then stop — do not execute any further steps:

  • Command: /synthesize — Knowledge synthesis command (FORGE Spec 106).
  • Usage: /synthesize <mode> [options]
  • Modes (exactly one required):
    • --postmortem: Generate narrative sprint retrospective from recent session logs (use /evolve for process gate reviews)
    • --topic <query>: Summarize all artifacts related to a topic
    • --decisions [--since YYYY-MM-DD]: Compile decision log from session logs
    • --architecture: Draft architecture overview from ADRs, specs, and agent config
    • --all: Run all four modes sequentially. For --topic, uses the dominant theme inferred from recent sessions, or falls back to a generic "recent-activity" topic if no theme dominates. Continue-on-error: if any mode fails, the remaining modes still run; the final summary lists per-mode pass/fail and output paths. (Spec 328)
  • Options:
    • --sessions N: Number of recent sessions to include (postmortem only, default 5)
    • --since YYYY-MM-DD: Limit to artifacts on or after this date (decisions mode)
  • Output: docs/synthesis/YYYY-MM-DD-<mode>.md (one file per mode; --all writes four)
  • Each output includes a Sources section listing every artifact that contributed.
  • Reference: docs/specs/106-knowledge-synthesis-command.md

Parse $ARGUMENTS:

  • Detect the mode flag: --postmortem, --topic, --decisions, --architecture, --all.
  • If no mode flag is present, print the help text above and stop.
  • If --postmortem: set MODE=postmortem. Parse optional --sessions N (default 5).
  • If --topic: set MODE=topic. The next argument is QUERY (required — if missing, print help and stop).
  • If --decisions: set MODE=decisions. Parse optional --since YYYY-MM-DD.
  • If --architecture: set MODE=architecture.
  • If --all: set MODE=all. No additional arguments required. Skip directly to Mode E — All modes below.

Set TODAY = current date in YYYY-MM-DD format. Set OUTPUT_DIR = docs/synthesis. Set OUTPUT_FILE = docs/synthesis/{TODAY}-{MODE}.md (for topic mode: docs/synthesis/{TODAY}-topic-{QUERY}.md with spaces replaced by hyphens).


[mechanical] Step 1 — Ensure output directory

If docs/synthesis/ does not exist, create it.


Mode A — Postmortem (--postmortem)

[mechanical] Step A1 — Gather session logs

Read all .md files in docs/sessions/ excluding _template.md, signals.md, error-log.md, insights-log.md, scratchpad.md, context-snapshot.md, and registry.md.

Sort by filename date prefix (newest first). Take the most recent N files (where N = --sessions value, default 5).

From each session log, extract:

  • Session ID: from the filename
  • Summary: the objective or summary section
  • Pain points / blockers: lines under "Pain points", "Blockers", or "Process improvement items"
  • Decisions made: items in any "Decisions" section
  • Error autopsies referenced: any EA-NNN references
  • Specs worked on: any spec IDs mentioned

Track each file path in SOURCES list.

[mechanical] Step A2 — Read error-log.md

Read docs/sessions/error-log.md. Extract EA-NNN entries referenced in the gathered session logs. If file does not exist: skip silently. Add to SOURCES if read.

[mechanical] Step A3 — Read signals.md

Read docs/sessions/signals.md. Extract SIG-NNN entries from the date range covered by the gathered sessions. If file does not exist: skip silently. Add to SOURCES if read.

[decision] Step A4 — Generate postmortem

Write a structured postmortem document to OUTPUT_FILE with these sections:

  1. Title: "Postmortem — {TODAY}" with a generated-by note showing N sessions analyzed
  2. Period Covered: date of oldest session to date of newest session
  3. Executive Summary: 2-3 sentence summary of key accomplishments, recurring problems, and overall trajectory
  4. Key Accomplishments: bulleted list of specs completed, features delivered, process improvements made
  5. Recurring Problems: bulleted list of pain points or blockers appearing in 2+ sessions, with session references
  6. Error Patterns: summary of error autopsies grouped by root cause; if none, state "No error autopsies recorded in this period."
  7. Decisions Made: chronological list with date and context for each
  8. Signals & Observations: notable signals grouped by type
  9. Recommendations: 3-5 actionable recommendations based on patterns observed
  10. Sources: bulleted list of every file path that contributed

Mode B — Topic Summary (--topic <query>)

[mechanical] Step B1 — Search artifacts

Search the following directories for files containing QUERY (case-insensitive):

  • docs/specs/ — spec files
  • docs/sessions/ — session logs
  • docs/decisions/ — ADR files
  • docs/sessions/signals.md — signal entries
  • docs/sessions/error-log.md — error autopsies
  • docs/sessions/insights-log.md — chat insights
  • docs/sessions/scratchpad.md — open notes
  • AGENTS.md — agent configuration

For each match, record the file path and the matching section/context (the paragraph or list item containing the match, plus surrounding context).

Track each file path in SOURCES list.

If no matches found: write a brief note to OUTPUT_FILE stating "No artifacts found matching the query." and stop.

[decision] Step B2 — Generate topic summary

Read the matching sections from each file (read the relevant portions, not entire files when they are large).

Write a structured topic summary document to OUTPUT_FILE with these sections:

  1. Title: "Topic Summary: {QUERY}" with a generated-by note and list of artifact types searched
  2. Overview: 2-3 sentence synthesis of what the project artifacts say about this topic
  3. Spec Coverage: list of specs referencing this topic, with status and one-line relevance summary
  4. Decisions & Rationale: decisions from session logs and ADRs in chronological order
  5. Signals & Observations: relevant signals, error autopsies, and insights
  6. Open Items: scratchpad notes, unresolved questions, or draft specs related to this topic
  7. Synthesis: coherent narrative connecting findings — what has been decided, what remains open, trajectory
  8. Sources: bulleted list of every file path that contributed

Mode C — Decision Log (--decisions)

[mechanical] Step C1 — Gather session logs

Read all .md files in docs/sessions/ excluding _template.md, signals.md, error-log.md, insights-log.md, scratchpad.md, context-snapshot.md, and registry.md.

If --since YYYY-MM-DD is set: only include files whose date prefix >= that date.

Sort by filename date prefix (oldest first — chronological order).

From each session log, extract content under "Decisions made" or "Decisions" sections.

Track each file path in SOURCES list.

[mechanical] Step C2 — Read ADRs

Read all .md files in docs/decisions/ (if the directory exists). Extract the decision title, status, date, and context from each ADR. If directory does not exist or is empty: skip silently. Add each file to SOURCES if read.

[decision] Step C3 — Generate decision log

Write a structured decision log document to OUTPUT_FILE with these sections:

  1. Title: "Decision Log" with a generated-by note and period covered
  2. Summary: count of decisions extracted from N session logs and M ADRs
  3. Chronological Decision Log: for each session date, list each decision with its text, surrounding context, and spec ID if referenced
  4. ADR Decisions: list each ADR with title, status, date, and one-line summary; if none, state "No ADRs found."
  5. Decision Themes: group decisions by theme/area (e.g., Architecture, Process, Tooling) and summarize trajectory
  6. Sources: bulleted list of every file path that contributed

Mode D — Architecture Overview (--architecture)

[mechanical] Step D1 — Read ADRs

Read all .md files in docs/decisions/ (if the directory exists). If directory does not exist or is empty: note "No ADRs found" and continue. Add each file to SOURCES if read.

[mechanical] Step D2 — Read closed specs

Read docs/specs/README.md to identify closed specs. For each closed spec, read its "Implementation Summary" section (the ## Implementation Summary block). If no closed specs exist: note "No closed specs found" and continue. Add each file to SOURCES if read.

[mechanical] Step D3 — Read agent config

Read AGENTS.md if it exists. Extract the architecture-relevant sections (capabilities, tools, coordination patterns). If file does not exist: skip silently. Add to SOURCES if read.

[mechanical] Step D4 — Read CLAUDE.md

Read CLAUDE.md. Extract the "Architecture quick-ref" section and any structural information. Add to SOURCES.

[decision] Step D5 — Generate architecture overview

Write a structured architecture overview document to OUTPUT_FILE with these sections:

  1. Title: "Architecture Overview" with a generated-by note and a disclaimer to verify against source artifacts
  2. System Overview: high-level description based on CLAUDE.md, AGENTS.md, and closed specs
  3. Key Components: list of major components/modules with one-line descriptions
  4. Architectural Decisions: summary of ADRs and rationale; if none, state "No ADRs recorded. Architectural decisions are embedded in spec files and session logs."
  5. Evolution History: how architecture evolved based on closed specs, chronologically ordered
  6. Current State: what the architecture looks like now based on most recent closed specs and AGENTS.md
  7. Known Gaps & Open Questions: gaps from draft/in-progress specs, scratchpad notes, or missing ADRs
  8. Sources: bulleted list of every file path that contributed

Mode E — All modes (--all) (Spec 328)

When MODE=all, run all four single-mode bodies sequentially in this order: postmortem → decisions → architecture → topic. Each mode writes its standard output file using the existing naming convention. Continue-on-error: if any mode fails (missing input artifacts, write error, etc.), record the failure and proceed to the next mode — do NOT abort the run.

[mechanical] Step E1 — Resolve --topic query for the topic mode

For the --topic portion of --all, no QUERY was supplied at invocation. Infer one:

  • Read the 3 most recent session logs from docs/sessions/ (sorted by filename descending).
  • Count mentions of each spec ID and significant concept (e.g., recurring multi-word phrases) across those logs.
  • If a single spec ID or concept appears 3+× more than any other, set QUERY=<that-token>.
  • Otherwise, set QUERY=recent-activity and run the topic mode against general recent-session content.
  • Record the inferred query in the run summary (Step E3) so the operator can override on the next manual invocation.

[mechanical] Step E2 — Run each mode

For each mode in the order [postmortem, decisions, architecture, topic]:

  1. Set CURRENT_MODE and OUTPUT_FILE per the mode's standard naming convention.
  2. Execute the mode's existing Step body (Mode A, C, D, B respectively above).
  3. On success: record <mode>: PASS — <path>.
  4. On failure (e.g., insufficient artifacts, write error): record <mode>: FAIL — <reason> and continue to the next mode. Do NOT propagate the failure or abort.

[mechanical] Step E3 — Write run summary

After all four modes have been attempted, print a single summary block:

Synthesis (--all) complete:
- postmortem: <PASS|FAIL> — <path or reason>
- decisions:  <PASS|FAIL> — <path or reason>
- architecture: <PASS|FAIL> — <path or reason>
- topic ({QUERY}): <PASS|FAIL> — <path or reason>
Total: <N>/4 modes succeeded.

Then proceed to Step 3 — Next action below (the next-action recommendations apply to whichever modes succeeded).


[mechanical] Step 2 — Confirm output

After writing the output file, print:

Synthesis complete: {OUTPUT_FILE}
Mode: {MODE}
Sources: {count} artifacts consulted

Skip this step if MODE=all — the run summary in Step E3 replaces this single-mode confirmation.

[mechanical] Step 3 — Next action

Present a context-aware next action:

  • If postmortem: "Next: review the postmortem and share with your team. Run /note to capture any follow-up items."
  • If topic: "Next: review the topic summary. Run /spec if any open items need formal tracking."
  • If decisions: "Next: review the decision log for consistency. Run /evolve if decision patterns suggest process improvements."
  • If architecture: "Next: review the architecture overview for accuracy. Run /note to flag any corrections needed."

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.