Workflows compound

From Kastalien-Research/thoughtbox · View interactive version

Workflows compound is an AI agent skill from the GitHub repository Kastalien-Research/thoughtbox. Capture learnings from the workflow into reusable documentation. Stage 7 of the development workflow.

How to use this skill

Skill file

Capture learnings from the current workflow: $ARGUMENTS

Purpose

You are executing Stage 7 (Compound) of the development workflow. Implementation is reviewed and revised. Your job is to extract reusable learnings from this workflow and persist them so future workflows benefit. You are NOT writing code — you are documenting what was learned.

Pre-Conditions

Before starting, verify:

  1. .workflow/state.json exists and currentStage is "compound"
  2. Review has passed (check stages.review.status is "completed")
  3. If revision happened, it's also completed

If pre-conditions are not met, report what's missing and halt.

Process

Step 1: Gather Evidence

Read all workflow artifacts:

  1. Workflow state: .workflow/state.json — timeline, iterations, stage notes
  2. Sub-agent summaries: .workflow/summaries/*.md — what was built
  3. Review report: .workflow/review-report.md — what was found
  4. Spec and ADR: The original design documents
  5. Git log: What actually changed
git log --oneline --since="$(jq -r .startedAt .workflow/state.json)" -- .

Step 2: Extract Learnings

Identify three categories of learnings:

Solutions — Reusable patterns for solving specific problems:

Discoveries — Things learned about the codebase or domain:

Process — What worked or didn't in the workflow itself:

Step 3: Write Solution Document

If a reusable solution was produced, write it to docs/solutions/:

# <Problem Title>

## Problem
[What problem this solves, in 2-3 sentences]

## Solution
[The approach that worked, with code references]

## Context
- Workflow: <id>
- Spec: <path>
- Date: <ISO date>

## Key Decisions
- [Decision 1]: [Why this choice was made]
- [Decision 2]: [Why this choice was made]

## What Didn't Work
- [Approach that was tried and abandoned, with brief explanation]

## Related
- [Links to specs, ADRs, or other solutions]

Step 4: Update Agent Memory

If significant patterns or discoveries should persist across sessions:

  1. Check existing memory files for related entries
  2. Update or add entries as appropriate
  3. Include fitness tags (HOT/WARM/COLD) per the DGM calibration rules

Step 5: Record and Handoff

  1. Update workflow state (.workflow/state.json):
  1. Present the handoff:

```

COMPOUND COMPLETE

==================

Solutions captured: N

Discoveries: N

Process notes: N

Solution doc: <path or "none — no reusable pattern identified">

Next: Stage 8 - Reflection (/workflow-reflection)

```

What Makes a Good Learning

A learning is worth capturing if it meets ANY of these:

A learning is NOT worth capturing if:

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.