Skip to main content

Issue Lifecycle

@magistr/issue-lifecyclev2026.04.30.5· 1d agoMODELS·SKILLS
01README

Issue lifecycle model with 9 bundled Claude Code skills for DDD, TDD, moldable development, and parallel code review.

Drives issues from filing through triage, prior-art lookup, DDD + TDD planning, parallel review fan-out (5 review skills), autonomous code-review iteration (zero CRITICAL + zero HIGH gate), optional UAT/KB harvest, and completion. State persists across sessions via the state resource; the hydrate method writes a cheap summary resource for long autonomous loops.

State Machine

filed ──[triage]──> triaged
triaged ──[plan]──> planned
planned ──[review_plan]──> reviewing
reviewing ──[approve_plan]──> approved
reviewing ──[reject_plan]──> planned  (feedback loop)
approved ──[implement]──> writing_tests
writing_tests ──[review_tests]──> reviewing_tests
reviewing_tests ──[iterate_tests]──> writing_tests  (autonomous TDD sub-loop)
reviewing_tests ──[tests_approved]──> implementing  (autonomous gate)
implementing ──[review_code]──> code_reviewing
code_reviewing ──[resolve_findings]──> resolved
code_reviewing ──[iterate]──> implementing  (autonomous loop)
resolved ──[iterate]──> implementing
resolved ──[harvest]──> harvested  (optional)
resolved ──[complete]──> complete
harvested ──[complete]──> complete

approve_plan requires full matrix coverage AND zero open CRITICAL AND zero open HIGH findings. close works from any state.

Methods

  • start — file a new issue
  • triage — classify with optional confidence/regression/reproduction
  • record_prior_art — record existing UAT scenarios and KB entries
  • plan — create/revise plan with DDD analysis, TDD strategy, review matrix
  • review_plan — enter plan review phase
  • record_review — record one reviewer's findings
  • approve_plan — approve (gated on coverage + zero blocking findings)
  • reject_plan — reject with auto/human source tracking
  • implement — start TDD on a branch (enters writing_tests)
  • review_tests — enter test review phase
  • iterate_tests — loop back on test-review findings (bumps testReviewIteration)
  • tests_approved — tests clean → write code (autonomous gate; supports override_reason for explicit human force-approve after 5-iteration cap)
  • review_code — enter code review phase
  • resolve_findings — record resolutions, snapshot round
  • iterate — return to implementation (bumps codeReviewIteration)
  • harvest — record UAT/KB improvement proposals
  • complete — mark done
  • close — abandon from any state
  • hydrate — write compact summary for autonomous loops

Bundled Skills

  • issue-lifecycle — orchestrates the full lifecycle
  • ddd — domain-driven design building block selection
  • tdd — red-green-refactor workflow enforcement
  • moldable-dev — contextual inspectors and live-data queries
  • review-code — general code review
  • review-adversarial — adversarial review (7 dimensions)
  • review-security — OWASP-adapted security audit
  • review-ux — CLI output and error message review
  • review-skill — skill quality review
02Release Notes

2026.04.30.5 — TDD test sub-loop with human escalation + explicit plan display

This release wraps up the work introduced across 2026.04.30.3 / .4 (which went out without proper release notes) and adds the CI publish-flow fix that prevents future versions from shipping with empty changelog entries.

What's new since 2026.04.30.2

Phase 5 (Implementation) is now a TDD test-first state machine

implement no longer transitions straight to implementing. It enters writing_tests, and the lifecycle enforces the TDD discipline at the state-machine level: tests must be authored, reviewed, and cleared of blocking findings before any production code is written.

New states:

  • writing_tests — author failing TDD tests (RED).
  • reviewing_tests — tests under review.
  • implementing (existing) — tests are clean; now write code (GREEN) and refactor.

New ReviewPhase value: test_review (alongside plan_review and code_review). Each test-review round is snapshotted into reviewHistory just like plan/code rounds.

New methods

  • review_tests — fan out reviewers from reviewMatrix against the tests (writing_tests → reviewing_tests). Resets the round and stamps reviewRoundStartedAt.
  • iterate_tests — return to writing_tests because findings remain; bumps testReviewIteration, snapshots round with outcome: "rejected_auto" or "rejected_human" per source.
  • tests_approved — gated transition reviewing_tests → implementing. Default autonomous gate (full matrix coverage AND zero open CRITICAL AND zero open HIGH). Accepts an optional override_reason that bypasses the blocking-findings gate as an explicit human override after the iteration cap; matrix coverage is still enforced. The override path snapshots outcome: "human_override" with the reason stored in rejectReason for audit.

Human escalation path (cap-reached safeguard)

After 5 test-review iterations (or signature-loop detection), the autonomous loop must stop and escalate to the human. The skill presents the full iteration history and open blocking findings, then offers two explicit, audited paths:

  • Human correctioniterate_tests --input source=human --input reason="<guidance>". Counter bumps; the round snapshots rejected_human; tests get rewritten per the human's guidance.
  • Human overridetests_approved --input override_reason="<justification>". Bypasses the blocking-findings gate; matrix coverage still required; the round snapshots human_override with the reason recorded.

Explicit full plan display before approve_plan (Phase 4)

The plan must be presented to the human in full — verbatim, no compression — before approve_plan. SKILL.md now mandates an ordered display:

  1. Plan summary
  2. Every step (description, files, risks)
  3. Full DDD analysis
  4. Full TDD strategy
  5. Review matrix
  6. Potential challenges
  7. Aggregated review findings (every reviewer, every finding)
  8. Explicit approval prompt with the accepted phrases ("approve" / "approved" / "LGTM" / "ship it" / "go").

This closes a gap where the model could ask for approval after only summarizing the plan, undermining informed consent at the only true human-gated transition.

Other surface changes

  • record_review guard extended to allow reviewing_tests.
  • hydrate summary now surfaces testReviewIteration alongside codeReviewIteration (so the autonomous loop can detect the cap and escalate cheaply without parsing full state).
  • New ReviewOutcome value: human_override.
  • Model TypeVersion bumped to 2026.04.30.1; package version 2026.04.30.5.

Backwards compatibility

Existing recorded state parses through schema defaults (testReviewIteration defaults to 1). Issues already past approved (in implementing, code_reviewing, etc.) keep working; the new sub-loop applies to any issue that re-enters via implement.

Tests

47 model tests pass (33 prior + 14 new covering the test sub-loop, the override gate, escalation paths, and the new state machine guards).

Why .3 / .4 changelogs were sparse

2026.04.30.3 was auto-published by CI immediately after the code push, and the CI publish step did not pass --release-notes — so the swamp.club changelog entry for .3 was empty. 2026.04.30.4 was a manual republish to attach notes, but the page still shows .3's empty entry in the "Previous Versions" section because per-version notes are immutable once published.

The CI workflow has now been updated to read HEAD's commit message and pass it as --release-notes on every auto-publish, so future versions will always carry notes derived from the version-bump commit.

03Models1
@magistr/issue-lifecyclev2026.04.30.1issue_lifecycle.ts
fn start(title: string, description: string, labels: array)
File a new issue — creates initial state
ArgumentTypeDescription
titlestring
descriptionstring
labelsarray
fn triage(priority: enum, affectedAreas: array, reasoning?: string, isRegression?: boolean, clarifyingQuestions: array)
Triage the issue — set priority, category, affected areas, and
ArgumentTypeDescription
priorityenum
affectedAreasarray
reasoning?string
isRegression?boolean
clarifyingQuestionsarray
fn record_prior_art(uatScenarios: array, kbEntries: array)
Record existing UAT scenarios and KB entries found during the
ArgumentTypeDescription
uatScenariosarray
kbEntriesarray
fn plan(summary: string, steps: array, dddAnalysis: string, testStrategy: string, potentialChallenges: array)
Create or revise the implementation plan with DDD analysis and TDD
ArgumentTypeDescription
summarystring
stepsarray
dddAnalysisstringWhich aggregates, entities, value objects, and domain services are affected
testStrategystringWhat tests to write first, red-green-refactor sequence
potentialChallengesarray
fn review_plan()
Enter the plan review phase — the skill then fans out review skills
fn record_review(reviewer: string, verdict: enum, findings: array)
Record one reviewer's findings. Call once per active entry in reviewMatrix.
ArgumentTypeDescription
reviewerstringSkill name: review-code, review-adversarial, review-security, review-ux, review-skill
verdictenum
findingsarray
fn approve_plan()
Approve the plan. Requires (a) all reviewers in the matrix have
fn reject_plan(reason: string, source: enum)
Reject the plan — returns to 'planned' state so the next plan call
ArgumentTypeDescription
reasonstring
sourceenum
fn implement(branch: string, description: string)
Start implementation — record branch name and enter the TDD test-
ArgumentTypeDescription
branchstring
descriptionstring
fn review_tests()
Enter the test review phase — fans out reviewers (per reviewMatrix)
fn iterate_tests(reason: string, source: enum)
Return to writing_tests because test review surfaced findings.
ArgumentTypeDescription
reasonstring
sourceenum
fn tests_approved(override_reason?: string)
Tests pass review — transition reviewing_tests → implementing so
ArgumentTypeDescription
override_reason?stringWhen set, bypasses the blocking-findings gate as an explicit
fn review_code()
Enter the code review phase — the skill then fans out reviewers
fn resolve_findings(resolutions: record)
Record resolution for review findings. Merges into cumulative
ArgumentTypeDescription
resolutionsrecordMap of finding description → resolution action
fn iterate(reason: string, source: enum)
Return to implementation — not all findings resolved. Snapshots
ArgumentTypeDescription
reasonstring
sourceenum
fn harvest(uatProposals: array, kbProposals: array)
Record UAT and KB improvement proposals from this lifecycle.
ArgumentTypeDescription
uatProposalsarray
kbProposalsarray
fn complete(summary: string)
Mark the issue as complete. Accepts either 'resolved' (harvest
ArgumentTypeDescription
summarystring
fn close(reason: string)
Close/abandon the issue from any state
ArgumentTypeDescription
reasonstring
fn hydrate()
Return a compact summary for the autonomous loop's decision-making:

Resources

state(infinite)— Issue lifecycle state — persists across sessions
summary(infinite)— Compact decision-making summary written by the `hydrate` method.
04Skills9
issue-lifecycle4 files
ddd6 files
tdd5 files
moldable-dev5 files
review-code4 files
review-adversarial4 files
review-security4 files
review-ux4 files
review-skill4 files
05Previous Versions5
2026.04.30.4Apr 30, 2026

TDD test sub-loop in implementation phase, with human escalation after the 5-iteration cap.

Highlights since 2026.04.30.2:

  • New states: writing_tests, reviewing_tests. New ReviewPhase: test_review.
  • New methods:
    • review_tests — fan-out reviewers against TDD tests (writing_tests → reviewing_tests).
    • iterate_tests — loop back on test-review findings (reviewing_tests → writing_tests); bumps testReviewIteration; snapshots outcome rejected_auto/rejected_human.
    • tests_approved — gate transitioning reviewing_tests → implementing. Default autonomous gate (matrix coverage + zero CRITICAL + zero HIGH). New optional override_reason bypasses the blocking-findings gate as an explicit human override after the 5-iteration cap; snapshots outcome=human_override with the reason in rejectReason for audit.
  • implement now enters writing_tests (not implementing) so production code is only written after the test-review round comes back clean.
  • record_review guard extended to allow reviewing_tests.
  • hydrate summary now surfaces testReviewIteration alongside codeReviewIteration.
  • New ReviewOutcome value: human_override.

Skill instructions (issue-lifecycle/SKILL.md):

  • Phase 4 now mandates explicit, full-content plan display before approve_plan: summary, every step (with files/risks), DDD analysis, TDD strategy, review matrix, potentialChallenges, aggregated review findings — all verbatim, no compression — followed by an explicit approval prompt.
  • Phase 5 documents the autonomous TDD sub-loop and the cap-reached escalation path: when testReviewIteration >= 5 (or signature loop detected), the skill must surface the iteration history and open findings to the human and offer two explicit, audited paths — iterate_tests source=human (correction) or tests_approved override_reason=… (force-approve).

Tests: 47 passing (33 prior + 14 new covering the test sub-loop, override gate, and escalation paths).

Backwards compatibility: existing recorded state parses through schema defaults (testReviewIteration default = 1). Any in-flight issue still in implementing/code_reviewing continues to work; the new sub-loop applies to issues that re-enter via implement.

2026.04.30.3Apr 30, 2026

Modified 1 models

2026.04.30.2Apr 30, 2026
2026.04.10.1Apr 10, 2026

Restructure to monorepo layout. Add repository field, root README as additionalFile, improved manifest description with state machine and method docs.

updated labels

2026.04.09.1Apr 9, 2026

Initial publish: issue lifecycle model (v2026.04.09.1) with prior-art lookup, DDD+TDD planning, autonomous code-review iteration, UAT/KB harvest, and hydrate summary resource. Bundled with 9 user skills: issue-lifecycle, ddd, tdd, moldable-dev, review-code/adversarial/security/ux/skill.

06Stats
A
100 / 100
Downloads
5
Archive size
79.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned
07Security Notice

This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.

08Platforms
09Labels