ShtukbaseStandard

Blueprint: software factory

blueprint-software-factory · version 0.2.0
Blueprintsblueprintincludes 26

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, 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.

Actions 3

NameWhat it doesFileWhen
setupWrite the answers to the start questions: test command, agent model, strictness of code norms and standardsactions/setup.ts
after install
nightlyNightly run: tests and checks; a failure raises an alarm in /alarms, green closes the alarmactions/nightly.ts
shtuk run
reviewReview of new commits of the branch by the reviewer agent; a report in /work/reviews, the code is not changedactions/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

QuestionFactOptionsDefault
The main language of the code.stack.languagetypescriptpythonrustgoothertypescript
The test command from the repository root (auto: by language: bun test, python3 -m unittest, cargo test, go test ./..., make test).factory.testfree answerauto
The main branch that the review looks at.factory.branchfree answermain
Which harness the agents run on.factory.harnessclaudecodexhermesclaude
Strictness of the code norms and standards: observe prints findings, enforce makes shtuk check fail.factory.strictnessobserveenforceobserve

What it includes 26

Pages 13

They go into the project at these paths.

Package files 6

They go into .shtukbase/packages/blueprint-software-factory/; actions run from there.