Skip to main content

Github Issue Lifecycle

@webframp/github-issue-lifecyclev2026.07.27.1· 1d agoMODELSWORKFLOWSREPORTS
01README

GitHub issue lifecycle tracker for swamp. Drives issues from open through triage, planning, implementation, PR linkage, and merge as versioned swamp data — with optional label sync and comment posting back to the issue.

No external dependencies beyond the gh CLI. Designed for solo developers or small teams working on GitHub repos who want observable, queryable issue lifecycle data without leaving the terminal.

State Machine

opened ──[start]──> triaging
triaging ──[triage]──> classified
classified ──[plan]──> planned
planned ──[iterate]──> planned  (feedback loop)
planned ──[approve]──> approved
approved ──[implement]──> implementing
implementing ──[link_pr]──> pr_open
pr_open ──[pr_merged]──> done
pr_open ──[pr_failed]──> pr_failed
pr_failed ──[link_pr]──> pr_open  (retry)
Any ──[close]──> closed

Usage

swamp extension pull @webframp/github-issue-lifecycle

# Create a lifecycle tracker for a repo
swamp model create @webframp/github-issue-lifecycle tracker \
  --global repo=webframp/swamp-extensions

# Start tracking an issue
swamp model method run tracker start --input issue_number=42

# Triage it
swamp model method run tracker triage \
  --input issue_number=42 --input kind=bug --input priority=high

# Plan implementation
swamp model method run tracker plan \
  --input issue_number=42 \
  --input summary="Fix pagination bug" \
  --input steps='["Read current code","Fix off-by-one","Add test"]'

# Approve and implement
swamp model method run tracker approve --input issue_number=42
swamp model method run tracker implement --input issue_number=42

# Link a PR
swamp model method run tracker link_pr \
  --input issue_number=42 \
  --input pr_url=https://github.com/webframp/swamp-extensions/pull/100

# Record merge
swamp model method run tracker pr_merged --input issue_number=42

Prerequisites

  • gh CLI installed and authenticated (gh auth login)
  • swamp initialized in the repository (swamp init)
02Release Notes

2026.07.27.1

Fixed: The fmt task ran deno fmt --check, so deno task fmt verified formatting instead of applying it and there was no way to format the extension through its own task. fmt now formats and a new fmt:check verifies, matching every other extension in the repository.

Fixed: deno fmt no longer inspects CLAUDE.md / AGENTS.md. Those files are gitignored and never present in CI, but deno fmt does not read .gitignore, so deno task fmt:check could fail locally on a file CI does not have.

Upgrade note: Tooling and formatting only. No model, method, schema, or behavior change — nothing to do on upgrade.

03Models1
@webframp/github-issue-lifecyclev2026.07.27.1github-issue-lifecycle/lifecycle.ts

Global Arguments

ArgumentTypeDescription
repostringGitHub repo in owner/name format (e.g., webframp/swamp-extensions)
postCommentsbooleanPost lifecycle transition comments to the GitHub issue
syncLabelsbooleanSync lifecycle phase as a GitHub label (lifecycle:<phase>)
fn start(issue_number: number)
Fetch issue context from GitHub and begin lifecycle tracking.
ArgumentTypeDescription
issue_numbernumberGitHub issue number
fn triage(issue_number: number, kind: enum, priority?: enum, component?: string, notes?: string)
Classify the issue and set labels.
ArgumentTypeDescription
issue_numbernumber
kindenum
priority?enum
component?string
notes?string
fn plan(issue_number: number, summary: string, steps: array, risks?: array, feedback?: string)
Record an implementation plan.
ArgumentTypeDescription
issue_numbernumber
summarystringOne-line summary of approach
stepsarrayImplementation steps
risks?array
feedback?string
fn iterate(issue_number: number, summary: string, steps: array, risks?: array, feedback: string)
Revise the plan with feedback (bumps iteration).
ArgumentTypeDescription
issue_numbernumber
summarystring
stepsarray
risks?array
feedbackstringWhat changed and why
fn approve(issue_number: number)
Lock the plan — ready for implementation.
ArgumentTypeDescription
issue_numbernumber
fn implement(issue_number: number, branch?: string)
Signal that implementation has started.
ArgumentTypeDescription
issue_numbernumber
branch?stringWorking branch name if known
fn link_pr(issue_number: number, pr_url: string, branch?: string)
Associate a PR URL with the issue. Idempotent.
ArgumentTypeDescription
issue_numbernumber
pr_urlstringFull PR URL
branch?string
fn pr_merged(issue_number: number)
Record PR merge and close the issue.
ArgumentTypeDescription
issue_numbernumber
fn pr_failed(issue_number: number, reason?: string)
Record that the PR failed CI or review.
ArgumentTypeDescription
issue_numbernumber
reason?string
fn complete(issue_number: number, close_issue?: boolean)
Mark done without full PR flow.
ArgumentTypeDescription
issue_numbernumber
close_issue?booleanClose the GitHub issue (default: true)
fn close(issue_number: number, reason?: string)
Abandon the issue from any state.
ArgumentTypeDescription
issue_numbernumber
reason?string
fn status(issue_number: number)
Read-only: refresh and show current issue state.
ArgumentTypeDescription
issue_numbernumber

Resources

state(infinite)— Current lifecycle phase and transition metadata.
context(infinite)— Issue context fetched from GitHub.
classification(infinite)— Issue classification (kind, priority, component).
plan(infinite)— Implementation plan (versioned on iterate).
pullRequest(infinite)— Linked pull request metadata.
04Workflows1
@webframp/issue-lifecycle-drivef7a1b2c3-d4e5-6789-abcd-0123456789ab

Drives a GitHub issue through the full lifecycle: start → triage → plan → approve → implement. Each job calls the corresponding lifecycle model method sequentially, with the agent providing classification and plan content as inputs. This workflow handles the pre-PR phases. Once implementation starts, the pr-fix-loop skill takes over and calls link_pr / pr_merged / pr_failed as the PR progresses through CI. Designed to be called once per issue when you want the agent to drive the full triage-to

startFetch issue context from GitHub and begin lifecycle tracking.
1.start-lifecycle${{ inputs.lifecycle_model }}.start— Transition issue to triaging phase.
triageClassify the issue.
1.classify${{ inputs.lifecycle_model }}.triage— Apply classification and priority labels.
planRecord the implementation plan.
1.create-plan${{ inputs.lifecycle_model }}.plan— Write plan with summary and steps.
approveLock the plan — transition to approved.
1.approve-plan${{ inputs.lifecycle_model }}.approve— Approve the plan for implementation.
implementSignal implementation has started.
1.start-implementation${{ inputs.lifecycle_model }}.implement— Transition to implementing phase.
05Reports1
@webframp/lifecycle-metricsmodel
lifecycle_metrics.ts

Cycle-time metrics, stuck issues, and retry counts from lifecycle data

lifecyclemetricssdlc
06Previous Versions1
2026.07.24.1

2026.07.24.1

Added: Initial release of the GitHub issue lifecycle tracker.

  • 12 methods covering the full issue lifecycle: start, triage, plan, iterate, approve, implement, link_pr, pr_merged, pr_failed, complete, close, status
  • State machine with enforced valid transitions
  • Optional lifecycle comment posting to the GitHub issue thread
  • Optional lifecycle:<phase> label sync on the issue
  • All state stored as versioned swamp resources (state, context, classification, plan, pullRequest) — queryable via CEL
  • PR number auto-extraction from URL
  • Idempotent link_pr (safe to re-link after retry)
  • Configurable via globalArgs: repo, postComments, syncLabels
07Stats
A
100 / 100
Downloads
0
Archive size
18.9 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
08Platforms
09Labels