fn start()
Ensure the swamp-club issue exists and begin the lifecycle
fn triage(confidence: enum, reasoning: string, isRegression?: boolean, regressionEvidence?: string, regressionCounterEvidence?: string, regressionVerdict?: enum, regressionVerdictReasoning?: string, clarifyingQuestions?: array)
Classify the issue based on context
| Argument | Type | Required | Description |
|---|
| confidence | enum | yes | |
| reasoning | string | yes | |
| isRegression? | boolean | no | True if this is a regression (something that previously worked). Implies type=bug. |
| regressionEvidence? | string | no | Concrete evidence that this previously worked (commit hash, version, test output). |
| regressionCounterEvidence? | string | no | The strongest argument that this is NOT a regression. |
| regressionVerdict? | enum | no | Final verdict after weighing evidence and counter-evidence. |
| regressionVerdictReasoning? | string | no | Why the verdict stands despite the counter-evidence. |
| clarifyingQuestions? | array | no | |
fn plan(summary: string, dddAnalysis: string, steps: array, testingStrategy: string, potentialChallenges: array)
Generate an initial implementation plan
| Argument | Type | Required | Description |
|---|
| summary | string | yes | |
| dddAnalysis | string | yes | |
| steps | array | yes | |
| testingStrategy | string | yes | |
| potentialChallenges | array | yes | |
fn review(version?: number)
Display the current plan (read-only)
| Argument | Type | Required | Description |
|---|
| version? | number | no | Specific plan version to review |
fn iterate(feedback: string, summary: string, dddAnalysis: string, steps: array, testingStrategy: string, potentialChallenges: array)
Submit feedback and a revised plan incorporating all prior feedback
| Argument | Type | Required | Description |
|---|
| feedback | string | yes | Human feedback on the current plan |
| summary | string | yes | |
| dddAnalysis | string | yes | |
| steps | array | yes | |
| testingStrategy | string | yes | |
| potentialChallenges | array | yes | |
fn adversarial_review(findings: array)
Record adversarial review findings for the current plan version
| Argument | Type | Required | Description |
|---|
| findings | array | yes | |
fn resolve_findings(resolutions: array)
Mark adversarial review findings as resolved after plan revision
| Argument | Type | Required | Description |
|---|
| resolutions | array | yes | |
fn code_conformance_review(steps: array)
Record an adversarial comparison of implemented code against the approved plan.
| Argument | Type | Required | Description |
|---|
| steps | array | yes | Per-step verification of plan conformance, plus entries for unplanned changes |
fn justify_deviations(justifications: array)
Add justifications to code conformance review steps that deviate from the plan.
| Argument | Type | Required | Description |
|---|
| justifications | array | yes | |
fn approve()
Approve the current plan
fn implement()
Signal that implementation has started
fn verify(commit: string, branch: string)
Start verification — transitions to verifying phase. The agent
| Argument | Type | Required | Description |
|---|
| commit | string | yes | Commit SHA being verified |
| branch | string | yes | Branch being verified |
fn verification_passed(workflowRunId: string, commit: string, branch: string, steps: array)
Record that verification passed. Carries the full verification
| Argument | Type | Required | Description |
|---|
| workflowRunId | string | yes | |
| commit | string | yes | |
| branch | string | yes | |
| steps | array | yes | |
fn verification_failed(workflowRunId: string, commit: string, branch: string, failureReason: string)
Record that verification failed. Transitions back to implementing
| Argument | Type | Required | Description |
|---|
| workflowRunId | string | yes | |
| commit | string | yes | |
| branch | string | yes | |
| failureReason | string | yes | Summary of what failed in the verification workflow |
fn post_attestation(attestation: string)
Post the verification attestation to swamp-club. Must be called
| Argument | Type | Required | Description |
|---|
| attestation | string | yes | The verification attestation JSON as a string. Must include |
fn link_pr(url: string)
Link a pull request to the implementation. Idempotent — calling
| Argument | Type | Required | Description |
|---|
| url | string | yes | Canonical pull request URL. Opaque to the model — pass whatever |
fn pr_merged(mergedAt?: string)
Record that the linked PR has been merged. Transitions to releasing.
| Argument | Type | Required | Description |
|---|
| mergedAt? | string | no | ISO-8601 timestamp of when the PR was merged. Defaults to now. |
fn pr_failed(reason: string)
Record that the linked PR has failed (CI failure, review rejection, etc.).
| Argument | Type | Required | Description |
|---|
| reason | string | yes | Why the PR failed: CI failure details, review rejection reason, etc. |
fn ship(releaseUrl?: string, releaseNotes?: string)
Mark the release as shipped after the release build completes.
| Argument | Type | Required | Description |
|---|
| releaseUrl? | string | no | URL of the release (e.g., GitHub release page, package registry). Optional. |
| releaseNotes? | string | no | Brief release notes or summary. Optional. |
fn complete()
Mark the issue lifecycle as done
fn notify(message?: string, force?: boolean)
Thank the issue author with a ripple on the issue, unless they are
| Argument | Type | Required | Description |
|---|
| message? | string | no | Custom thank-you message. If omitted, a default message is generated. |
| force? | boolean | no | Post the thank-you without checking the team roster, e.g. to |
fn skip_notify()
Skip contributor notification and transition directly to summarizing.
fn summarize(originalProblem: string, deliveredOutcome: string, outcomeMet: boolean)
Record a session summary restating the original problem and delivered outcome.
| Argument | Type | Required | Description |
|---|
| originalProblem | string | yes | Plain-language restatement of the bug or feature request from the issue. |
| deliveredOutcome | string | yes | Plain-language description of what was actually built or fixed. |
| outcomeMet | boolean | yes | Whether the delivered outcome addresses the original problem. |
Resources
state(infinite)— Current lifecycle phase and metadata
context(infinite)— Issue context fetched from swamp-club
classification(infinite)— Issue triage classification
plan(infinite)— Implementation plan (versioned across iterations)
feedback(infinite)— Human feedback on plan (versioned per round)
adversarialReview(infinite)— Adversarial review findings for the current plan version
codeConformanceReview(infinite)— Adversarial comparison of implemented code against the approved plan.
verificationResult(infinite)— Verification workflow result — the full checklist of steps,
attestation(infinite)— Verification attestation posted to swamp-club. Written by
pullRequest(infinite)— Pull request linked to the implementation. Single instance,
summary(infinite)— Session summary restating the original problem and delivered outcome.