Blueprint: software factory
A software factory for a code repository: tasks, decisions, bugs; code norms and standards; Claude Code gates; role agents (executor, reviewer, tester) on a harness; a nightly run of tests and checks with an alarm on failure, and a scheduled review of new commits, report only.
About the package
A software factory for one code repository. Installed into a new folder or into an existing repository:
shtuk init <folder> --blueprint <path>/blueprint-software-factory --defaults
shtuk install <path>/blueprint-software-factory --dir <repository> --defaults --fact stack.language=python --fact factory.test="pytest -q"
init takes only an empty folder. In an existing repository use install: answers are given with --fact, and unanswered ones take the defaults with --defaults.
How the factory works is on the page Software factory.
What is inside
basic: tasks, decisions, questions to the owner, bugs, norms.quality,risks,testing: the Quality layer: benefit, indicators, sets, runs (/quality/runs, kindQualityRun), risks and quality tests.code-lib,code-pragmatic,code-refactoring,code-deep-modules: code norms;code-unixandcode-functional-coreare installed separately if they suit the project.std-conventional-commits,std-semver,std-keep-a-changelog,std-editorconfig,std-owasp-secrets: repository standards.hooks,gate,taskstart,human-gate: Claude Code in the project: a summary at the start, the "done" gate, and nothing goes outside until a person says "yes".agents,automations,runs,alarms,harness, the harness package,schedule: scheduled agents, a run log and alarms.- Own pages: three agents, four actions and four automations, and the collection Reviews.
Start questions
| Fact | Question | Default |
|---|---|---|
stack.language | main language | typescript |
factory.test | test command | auto: by language |
factory.branch | main branch | main |
factory.harness | agent harness | claude (Claude Code, haiku) |
factory.strictness | strictness of code norms and standards | observe |
The tool writes the language, the branch and the strictness into the header of the factory page, and the agent harness, itself, with the marks {{fact:...}}; after that they are edited there. setup (on install) writes the test command there too (auto: by language); sets the harness model for the agents; sets mode of the norms of the code-* and std-* packages by the strictness; puts the Review kind into the placement map; and appends to .gitignore what is missing there: .env, .env.*, !.env.example (norm SCR-R03), .shtukbase/state/, runs/logs/. To repeat: shtuk run blueprint-software-factory setup.
Actions
nightly: the tests (the command from the factory page) and all project checks (the same asshtuk check). A failure raises the alarmnightlyin /alarms and exits with code 1; when everything is green, the open alarm is closed.review: the commits of the branch since the last review: a prompt made from the code norms (code-lib review) and the changed code goes to the reviewer agent; its answer is a record in Reviews. The review does not touch the code or the branch.
Boundary
Nothing goes outside: the agents have no network, and git push and publications are held by the "Human approves" gate. Agents on the Claude Code harness are started in --restricted mode: without a command line, so the nightly run runs the tests, not an agent. The owner turns the schedule on in the system: shtuk run schedule cron or launchd.
Actions 3
| Name | What it does | File | When |
|---|---|---|---|
| setup | Write the answers to the start questions: test command, agent model, strictness of code norms and standards | actions/setup.ts | after install |
| nightly | Nightly run: tests and checks; a failure raises an alarm in /alarms, green closes the alarm | actions/nightly.ts | shtuk run |
| review | Review of new commits of the branch by the reviewer agent; a report in /work/reviews, the code is not changed | actions/review.ts | shtuk run |
shtuk check runs the checks; shtuk run blueprint-software-factory <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.
Start questions 5
| Question | Fact | Options | Default |
|---|---|---|---|
| The main language of the code. | stack.language | typescriptpythonrustgoother | typescript |
| The test command from the repository root (auto: by language: bun test, python3 -m unittest, cargo test, go test ./..., make test). | factory.test | free answer | auto |
| The main branch that the review looks at. | factory.branch | free answer | main |
| Which harness the agents run on. | factory.harness | claudecodexhermes | claude |
| Strictness of the code norms and standards: observe prints findings, enforce makes shtuk check fail. | factory.strictness | observeenforce | observe |
What it includes 26
Pages 13
They go into the project at these paths.
- /actions/
- The executor takes a task Action
- Nightly run of tests and checks Action
- Review of new commits Action
- The tester analyzes a failed run Action
- /agents/
- Task executor Worker
- Commit reviewer Worker
- Tester Worker
- /automations/
- The executor takes a task (by hand) Automation
- Nightly run of tests and checks Automation
- Review of new commits on weekdays Automation
- The tester analyzes a failed nightly run Automation
- /base/
- Software factory page
- /work/
- Reviews collection
Package files 6
They go into .shtukbase/packages/blueprint-software-factory/; actions run from there.