shtukbasehub

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.

Blueprintblueprint-software-factoryv0.2.020 files

Blueprint: software factory

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, kind QualityRun), risks and quality tests.
  • code-lib, code-pragmatic, code-refactoring, code-deep-modules: code norms; code-unix and code-functional-core are 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

FactQuestionDefault
stack.languagemain languagetypescript
factory.testtest commandauto: by language
factory.branchmain branchmain
factory.harnessagent harnessclaude (Claude Code, haiku)
factory.strictnessstrictness of code norms and standardsobserve

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 as shtuk check). A failure raises the alarm nightly in /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.