A Prompt Pipeline Demonstrates Meta-Programming Properties

✍️ OpenClawRadar📅 Published: April 13, 2026🔗 Source
A Prompt Pipeline Demonstrates Meta-Programming Properties
Ad

A developer has documented a prompt pipeline used to build an Electron app (Claude Code CLI, React, TypeScript, SQLite) that demonstrates the structural properties of a meta-programming language, including typed inputs/outputs, control flow, loops, state machines, and module interfaces.

Pipeline Architecture

The system operates in four distinct stages with typed contracts between them.

Stage 1: Static Analysis

The repo-eval.md prompt performs a full codebase scan. It reads every source file, traces dependency graphs, maps IPC flows end-to-end, and emits a structured findings report to issues.md. Each finding includes:

  • Section ID
  • Title
  • Severity (Critical/High/Medium/Low)
  • Category
  • File paths with line ranges
  • Evidence
  • Impact assessment
  • Recommended fix

Stage 2: Compilation

The address-issues.md prompt parses the output of Stage 1. It groups findings by file affinity, assigns prompt numbers (FIX-01, FIX-02, ...), determines inter-prompt dependencies, and sorts by severity. Output is a directory (prompts/arch/r{NNN}/) containing:

  • FIX-NN.md — Self-contained fix prompts specifying objective, findings addressed, files to modify, implementation steps, and verification criteria.
  • STATE.md — Execution state tracker with status per prompt (pending/in-progress/done/blocked), dependency graph, completion dates, and handoff notes.
  • MASTER.md — Execution loop specification.

Stage 3: Execution

MASTER.md serves as the runtime loop. On each iteration:

  1. Read STATE.md
  2. Select next pending prompt whose dependencies are satisfied
  3. Read the prompt
  4. Read all affected source files
  5. Execute implementation steps
  6. Run verification (tsc --noEmit, grep for removed patterns, line count checks)
  7. Update STATE.md
  8. Append changelog entry, update architecture docs
  9. Loop to step 1

Stage 4: Packaging

The release-notes.md prompt reads the changelog, runs git log and git diff --stat against the last tag, categorizes changes, and emits formatted release notes with version bump recommendation.

Ad

Key Properties

Typed Contracts: The output schema of repo-eval is the input contract for address-issues. The output schema of address-issues is the input contract for MASTER. The FIX prompts consume the exact format that address-issues produces. STATE.md has a defined schema that MASTER reads and writes.

Automatic Documentation: A system prompt (agents.md) attached to every Claude Code context window includes a post-execution protocol: append a changelog entry, update affected architecture docs, update state tracking. Documentation is emitted as a side effect of prompt execution, eliminating context decay.

Prompts as ADRs: Each FIX-NN.md functions as a design doc, work order, and architectural decision record, capturing problem, rationale, implementation plan, and verification criteria before execution.

Output

One day of running this pipeline produced:

  • 2 full repo evaluations
  • 17 bug fixes across 2 revision rounds (race conditions, stream architecture, concurrent state management)
  • Service decomposition: 1,218 lines → 403 lines + 5 extracted services
  • 3 additional crash fixes
  • README rewrite verified against source
  • 6-page GitHub Pages website
  • 21 changelog entries

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also