Software Factory
Security Notice
This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.
A fully generic, model-driven state machine for guiding agents through a software development lifecycle. The entire machine — stages, transitions, gates, required artifacts, review skills, agent commands, system prompts — lives in the model definition's globalArguments as data. The engine ships no lifecycle concepts: adversarial review, comprehensive testing, release, and UAT stages are expressible (see examples/), never assumed.
How it works
An instance is a factory serving many work items concurrently — every method takes workItem, and all run data is namespaced per work item:
swamp model create @swamp/software-factory my-factory
swamp model edit my-factory # fill globalArguments: stages
swamp model method run my-factory start --input workItem=ISSUE-42The driver loop is the same for every factory: status returns a
self-describing packet (current stage, work spec with run-data bindings
resolved, per-gate transition readiness, context manifest); the driver does
the stage's work, records products, and advances. Gates are hard
enforcement — evaluated in pre-flight checks and re-validated inside
advance.
Methods
start— validate the graph and start a work item at the initial stage (refuses to restart; resume withstatus)status— the driver's entrypoint: what a work item requires right now, or a factory-wide overview of all runsrecord_artifact/record_evidence— versioned, schema-validated work products; opaque external factsresolve_findings— resolution notes on kind: findings artifactsapprove/reject— human gate decisions, cycle-scopedadvance— move along a gated transitionsummary— full implementation history of a work item as markdown, rendered statically from the run data (no LLM); also persisted via the @swamp/software-factory/work-item-summary reportvalidate/describe— definition lint; Mermaid + tablesreset— destructive restart, requires confirm=reset
Gates
artifact-exists, artifact-fresh (subject-version + recordedThisCycle), findings-clear, human-approval, evidence-recorded (cycle-scoped, field matching), cooldown, max-cycles (routing), cel (CEL predicates over run data), workflow-succeeded (verified against swamp's own workflow run records, not driver attestation).
Every stage carries maxCycles (default 5): entries past the limit park the run for an explicit human cycle-override approval.
Run data
All resources are versioned, immutable, and namespaced per work item:
state-<workItem>, artifact-<workItem>-<name>,
evidence-<workItem>-<name>, approval-<workItem>-<gateId>, and an
append-only journal-<workItem>.
| Argument | Type | Description |
|---|---|---|
| confirm | string | Must be the literal string 'reset' |
| Argument | Type | Description |
|---|---|---|
| name | string | Artifact name declared on the current stage |
| payload | union | JSON object payload (or a JSON string) |
| note? | string |
| Argument | Type | Description |
|---|---|---|
| name | string | Evidence name declared on the current stage |
| payload | union | JSON object payload (or a JSON string) |
| Argument | Type | Description |
|---|---|---|
| artifact | string | |
| resolutions | array |
| Argument | Type | Description |
|---|---|---|
| gateId | string | |
| actor | string | Who approved (a human identity) |
| note? | string |
| Argument | Type | Description |
|---|---|---|
| gateId | string | |
| actor | string | |
| note | string | Why this was rejected |
| Argument | Type | Description |
|---|---|---|
| transition | string |
Resources
Linear implementation history of a factory work item, rendered statically from its recorded run data
- 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