Skip to content

About

pstack Factory: a verified, tool-first agent build loop

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

pstack Factory

A local, evidence-driven workflow for scoped agent work. It combines a pinned pstack guidance catalog, shared budget and launch controls, structured tool adapters, and executable verification with source-bound receipts. Python 3.11+ and Git are required. Runtime code uses the standard library; development checks require pytest 9+ (including its subtest reports).

From this checkout, install dependencies and the repository-local skill links first:

python -m pip install . "pytest>=9,<10"
python pstack/install_native.py
python3 pstack/budget.py show
python3 pstack/catalog.py lookup architect
python3 pstack/check_integrity.py
python3 pstack/check_installation.py
flock /tmp/factory-pstack-tests.lock python3 -m pytest -q

Both Claude Code and Codex read the same repository policy and guidance. Native entries live in .claude/skills/; .agents/skills/ contains relative links for Codex. Start with /poteto-mode and use /pstack-setup for budget changes. Default: small budget, medium effort, at most three workers including the parent, one retry total, Standard speed. Explicit task limits and owner gates take priority. No model decides PASS.

Verify a committed extraction

After the parent has initialized and committed this tree, run from its root with a clean worktree. Outputs are ignored and must be fresh:

python3 loop/factory_verify.py run pstack/extraction.recipe.json --repo . --out .scratch/extraction-raw
python3 pstack/check_evidence.py seal .scratch/extraction-raw --recipe pstack/extraction.recipe.json --repo . --out .scratch/extraction-bundle
python3 pstack/check_evidence.py check .scratch/extraction-bundle --repo .

The recipe runs source integrity, native installation, rendered catalog validation, the full suite with exact JUnit/subtest accounting, the 32 TOOL coverage map, and a fresh synthetic toy rehearsal. It attests those local checks, not live external integrations. For the 32 TOOL rows, the existing tests/pstack/stack_suite.py and stack_coverage.py preserve the frozen proof-node inventory and actual subtest accounting. See verification details.

A new self-contained toy rehearsal needs no historical checkout or provider facts:

python3 pstack/fresh_toy.py --out .scratch/fresh-toy-1 --plan
python3 pstack/fresh_toy.py --out .scratch/fresh-toy-1

The first command prints the plan without writing. The second creates and commits only a disposable local synthetic toy fixture under that fresh output directory, executes positive and negative behavior checks, runs generic and product recipes, and validates sealed evidence. It makes no network/model calls or publication claims. It is separate from the historical guarded-toy provenance regression fixture.

Dependency boundaries

  • pstack/: shared tools, policies, adapters, catalog and immutable upstream pin. Keep pstack/upstream/ byte-for-byte intact; manifest.json, UPSTREAM_COMMIT and UPSTREAM_VERSION anchor its integrity.
  • loop/: deterministic receipt runner plus an optional host prerequisite doctor.
  • factory/: release-preparation gate engine and shared implementation imports. It is retained with its tests and prompts; local checks do not run a release loop.
  • tests/: regression suite, synthetic fixtures, exact coverage mapping, and relocated historical checker/recipe fixtures under tests/evidence/. These fixtures contain no retained run output and are not fresh receipts.
  • docs/, prompts/, native skills: operating contracts and required guidance. Historical run archives, deployment wrappers, global agent configuration, and delivered toy projects are excluded from this extraction.

External adapters (search-first, release-check, readtrial, offload, t3ctl, agentbench) are optional host installations, not vendored dependencies. Inspect python3 pstack/adapters.py doctor for availability. Missing tools stay unavailable; source installation alone proves no provider or product behavior. Model dispatch requires a host that enforces the shared launch guard; standalone model operations remain blocked. The host doctor also checks the original operator's optional Cloudflare/service-tier setup; it is not a portable core acceptance check.

Keep credentials, private terms, backlog and raw evidence outside the repository. Portable pstack/config.json is the documented exception for repository budget policy. Publication and owner final-test approval remain owner actions.

Attribution and license

The pinned pstack originates from Lauren Tan's cursor/plugins pstack v0.15.25, commit e5136d82418d2db3165ea1050d17577cd618cc05. Its original license and attribution remain in pstack/upstream/LICENSE and pstack/UPSTREAM_NOTES.md. The root MIT license is retained unchanged. Suggested license for the extraction: retain MIT; the owner must decide before publication. See pstack's guide and the receipt runner.

Public source setup

The export stores ordinary files. Create repository-local native skill links before using the shared agent entry points or running tests; global settings are untouched. Receipt input globs hash the canonical .claude/skills sources. Installation checks validate the generated native links separately.

python -m pip install . "pytest>=9,<10"
python pstack/install_native.py
python pstack/check_installation.py

Limitations

This is a local workflow toolkit. Optional adapters need separate tools and explicit configuration. Offline rehearsals exercise synthetic local behavior; they do not prove provider, account, browser or deployment behavior. Models do not approve owner gates.

License suggestion

Retain the existing MIT license and all pinned upstream notices. The repository owner must approve this license and the exact export before any public publication.

About

pstack Factory: a verified, tool-first agent build loop

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages