forge

Verified·Scanned 2/18/2026

The skill mines session transcripts for decisions, learnings, failures, and patterns and writes findings to .agents/forge/YYYY-MM-DD-forge.md. It invokes local CLI commands such as ao forge transcript --last-session --queue --quiet and runs scripts/validate.sh, requiring shell command execution but no explicit network endpoints or secret access.

by boshu2·vad2fcc7·4.8 KB·77 installs
Scanned from main at ad2fcc7 · Transparency log ↗
$ vett add boshu2/agentops/forge

Forge Skill

Typically runs automatically via SessionEnd hook.

Extract knowledge from session transcripts.

How It Works

The SessionEnd hook runs:

ao forge transcript --last-session --queue --quiet

This queues the session for knowledge extraction.

Manual Execution

Given /forge [path]:

Step 1: Identify Transcript

With ao CLI:

# Mine recent sessions
ao forge --recent

# Mine specific transcript
ao forge transcript <path>

Without ao CLI: Look at recent conversation history and extract learnings manually.

Step 2: Extract Knowledge Types

Look for these patterns in the transcript:

TypeSignalsWeight
Decision"decided to", "chose", "went with"0.8
Learning"learned that", "discovered", "realized"0.9
Failure"failed because", "broke when", "didn't work"1.0
Pattern"always do X", "the trick is", "pattern:"0.7

Step 3: Write Candidates

Write to: .agents/forge/YYYY-MM-DD-forge.md

# Forged: YYYY-MM-DD

## Decisions
- [D1] <decision made>
  - Source: <where in conversation>
  - Confidence: <0.0-1.0>

## Learnings
- [L1] <what was learned>
  - Source: <where in conversation>
  - Confidence: <0.0-1.0>

## Failures
- [F1] <what failed and why>
  - Source: <where in conversation>
  - Confidence: <0.0-1.0>

## Patterns
- [P1] <reusable pattern>
  - Source: <where in conversation>
  - Confidence: <0.0-1.0>

Step 4: Index for Search

ao forge index .agents/forge/YYYY-MM-DD-forge.md 2>/dev/null

Step 5: Report Results

Tell the user:

  • Number of items extracted by type
  • Location of forge output
  • Candidates ready for promotion to learnings

The Quality Pool

Forged candidates enter at Tier 0:

Transcript → /forge → .agents/forge/ (Tier 0)
                           ↓
                   Human review or 2+ citations
                           ↓
                   .agents/learnings/ (Tier 1)

Key Rules

  • Runs automatically - usually via hook
  • Extract, don't interpret - capture what was said
  • Score by confidence - not all extractions are equal
  • Queue for review - candidates need validation

Examples

SessionEnd Hook Invocation

Hook triggers: session-end.sh runs when session ends

What happens:

  1. Hook calls ao forge transcript --last-session --queue --quiet
  2. CLI analyzes session transcript for decisions, learnings, failures, patterns
  3. CLI writes session ID to .agents/ao/pending.jsonl queue
  4. Next session start triggers /extract to process the queue

Result: Session transcript automatically queued for knowledge extraction without user action.

Manual Transcript Mining

User says: /forge <path> or "mine this transcript for knowledge"

What happens:

  1. Agent identifies transcript path or uses ao forge --recent
  2. Agent scans transcript for knowledge patterns (decisions, learnings, failures, patterns)
  3. Agent scores each extraction by confidence (0.0-1.0)
  4. Agent writes candidates to .agents/forge/YYYY-MM-DD-forge.md
  5. Agent indexes forge output with ao forge index
  6. Agent reports extraction counts and candidate locations

Result: Transcript mined for reusable knowledge, candidates ready for human review or 2+ citations promotion.

Troubleshooting

ProblemCauseSolution
No extractions foundTranscript lacks knowledge signals or ao CLI unavailableCheck transcript contains decisions/learnings; verify ao CLI installed
Low confidence scoresWeak signals or vague conversationFocus sessions on concrete decisions and explicit learnings
forge --queue failsCLI not available or permission errorManually append to .agents/ao/pending.jsonl with session metadata
Duplicate forge outputsSame session forged multiple timesCheck forge filenames before writing; ao CLI handles dedup automatically