Skip to content

Add step-retrospective reasoning protoco#123

Merged
Alan-Jowett merged 1 commit intomainfrom
add-step-retrospective-protocol
Mar 30, 2026
Merged

Add step-retrospective reasoning protoco#123
Alan-Jowett merged 1 commit intomainfrom
add-step-retrospective-protocol

Conversation

@abeltrano
Copy link
Copy Markdown
Collaborator

@abeltrano abeltrano commented Mar 30, 2026

Summary

Adds a step-retrospective reasoning protocol — a systematic methodology for learning from execution experience in iterative workflows. After completing a step, the protocol drives analysis of what happened, why it diverged from expectations, and what concrete improvements to feed back into the tooling and
process.

Closes #122

Why This Protocol?

PromptKit has protocols for quality-gating (self-verification), multi-agent evaluation (workflow-arbitration), and document revision (iterative-refinement). But none address the feedback loop: converting execution experience into tooling improvements for the next iteration.

Without this, iterative workflows repeat the same mistakes. With it, each step makes the next one better — the agent, scripts, and checklists improve as the workflow progresses.

The 5 Phases

Phase Purpose Output
Outcome Assessment Quantitative comparison of actual vs expected Metrics table
Variance Analysis Classify each deviation (tooling/process/knowledge/external) Categorized findings
Root Cause Identification 5-whys to trace fundamental cause Root cause per finding
Feedback Action Planning Concrete, file-targeted improvements with priorities Action table (block/improve/defer)
Apply and Verify Execute priority actions, verify, commit Improved tooling

New Components

Just 1 protocol — everything else is reused:

Component Type File
step-retrospective reasoning protocol protocols/reasoning/step-retrospective.md

Key Design Decisions

  • Protocol, not template: This is a reusable reasoning methodology, not a task-specific prompt. Any iterative template can reference it.
  • 4 variance categories: Tooling gap, process gap, knowledge gap, external factor — covers all root cause types encountered in practice.
  • 3 action priorities: block (must fix now), improve (should fix), defer (document for later) — prevents both under-fixing and over-fixing.
  • Anti-patterns section: Explicitly rejects vague findings, vague actions, blame attribution, and documentation theater (recording without applying).
  • Quantitative emphasis: Metrics first, interpretation second — prevents subjective retrospectives.
  • Domain-agnostic examples: Variance category examples span linting, deployment, testing, CI, and API design — not tied to any specific project.

Origin

Developed during a Cilium fork synchronization effort where 8 iterative merge steps each produced findings (verifier issues, struct layout mismatches, build system gaps, test infrastructure problems) that were fed back into the merge agent, devtest scripts, and safety nets. The protocol formalizes what was
done ad-hoc into a repeatable methodology.

Validation

  • SPDX headers present (MIT, PromptKit Contributors)
  • YAML frontmatter valid and complete
  • File name is kebab-case matching name field
  • Protocol has numbered, ordered phases with specific checks
  • No vague instructions — every step is actionable
  • manifest.yaml updated with correct entry
  • Does not duplicate or conflict with existing protocols
  • applicable_to references valid template names
  • LF line endings (normalized from CRLF)

Copilot AI review requested due to automatic review settings March 30, 2026 13:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new reusable reasoning protocol to PromptKit for running structured post-step retrospectives in iterative workflows, and registers it in the library manifest so it can be discovered/assembled by the bootstrap engine.

Changes:

  • Added step-retrospective reasoning protocol with 5 explicit phases (outcome → variance → root cause → actions → apply/verify).
  • Updated manifest.yaml to include the new protocol under protocols.reasoning.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
protocols/reasoning/step-retrospective.md New reasoning protocol describing a step-level retrospective methodology and action feedback loop.
manifest.yaml Registers the new protocol so it’s discoverable by PromptKit’s component manifest.

@abeltrano abeltrano force-pushed the add-step-retrospective-protocol branch from 1d84319 to 39d0488 Compare March 30, 2026 13:38
Copilot AI review requested due to automatic review settings March 30, 2026 13:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@abeltrano abeltrano force-pushed the add-step-retrospective-protocol branch from 169fb84 to 7018e1c Compare March 30, 2026 13:51
Copilot AI review requested due to automatic review settings March 30, 2026 13:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

New reasoning protocol for learning from execution experience in
iterative workflows. After completing a step, systematically:

1. Assess outcomes (quantitative metrics vs expectations)
2. Classify variances (tooling gap, process gap, knowledge gap, external)
3. Identify root causes (5-whys, proximate vs fundamental)
4. Plan feedback actions (concrete, file-targeted, prioritized)
5. Apply and verify improvements before the next step

Designed to be composable with any iterative template — the protocol
converts execution experience into concrete tooling/process improvements
rather than just documenting what happened.

Inspired by the Cilium fork sync retrospective workflow where each
merge step's findings (PREVAIL verifier issues, struct layout mismatches,
build system gaps) were fed back into the agent and scripts, making
each subsequent step more reliable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@abeltrano abeltrano force-pushed the add-step-retrospective-protocol branch from 7018e1c to 8091c52 Compare March 30, 2026 13:56
@Alan-Jowett Alan-Jowett merged commit 08914d0 into main Mar 30, 2026
5 checks passed
@Alan-Jowett Alan-Jowett deleted the add-step-retrospective-protocol branch March 30, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add step-retrospective reasoning protocol for iterative workflow learning

4 participants