AIWS (AI Software Factory) drives AI agents through explicit phases: analysis, design with a test specification, small task-by-task implementation with unit tests, then review. Every step is limited to its write scope, every output lives in git, and people approve the decisions that matter.
Workflow
A deterministic orchestrator decides which phase may run; the AI never changes state on its own. People step in at two gates only: approving the design and merging the PR.
blocked
Architecture
Switching AI tools does not mean rewriting the process: adding Codex or Gemini is just another adapter.
Agents, skills, workflow, contracts and policies as Markdown/YAML in aiws/, neutral to any AI. Owned and reviewed by people, like code.
The aiws CLI owns state.yaml, runs phases, validates contracts, enforces diff-scope, runs the real build and tests, and commits with traceability trailers.
claude runs Claude Code headless with limited permissions; scripted runs deterministically for token-free tests. V2: Codex, Gemini and cross-model review.
Enforcement
Four independent layers. If one is bypassed, the next one still blocks.
Agents of a locked phase are never called. Approvals are bound to content hashes; retries are capped.
Each headless run gets only the tools it needs; shell access is derived from the project's own build and test commands.
PreToolUse blocks out-of-scope writes, secret reads and any attempt by the AI to approve itself, including nested shells.
After every run, any file changed outside the scope is reverted and the run fails, however it was written.
Any language
The orchestrator assumes no stack. aiws detect inspects every source-* folder and proposes build and test commands; add as many sides as you need (fe, be, mobile, worker...).
.cbl, .frm) feeds discovery.TC-3 attached through @DisplayName, [Trait], pytest.mark, t.Run...International standards
The project's own conventions come first, then the language's official style guide. Renaming, moving or reformatting outside the approved design is reported by the reviewer.
| Area | Standard |
|---|---|
| Acceptance criteria | Given/When/Then (Gherkin); requirement quality per ISO/IEC/IEEE 29148 |
| Test specification | ISO/IEC/IEEE 29119-3; ISTQB test design techniques (partitioning, boundary values, decision tables) |
| Unit test | Arrange-Act-Assert; framework naming; TC ids through standard metadata |
| Code | Google Java Style, .NET conventions, PEP 8, Effective Go, PSR-12, Effective Dart… |
| API | OpenAPI 3.x, RFC 9110, errors as RFC 9457 Problem Details, ISO 8601 timestamps |
| Security | OWASP Top 10 / ASVS |
| Commit | Conventional Commits with git trailers REQ-ID · Task · Tests · AIWS-Run |
Traceability
Only consistent ids, commit trailers and evidence files in the repository. aiws trace builds the matrix; an AC without a test or a test without a commit blocks the review phase.
# git log -1
feat(REQ-001): T1 BE - setNickname
REQ-ID: REQ-001
Task: T1
Tests: TC-1, TC-2
AIWS-Run: run-0005
| AC | Test case | Task | Commit | Result |
|---|---|---|---|---|
| AC-1 | TC-1 | T1 | 882be59 | pass |
| AC-2 | TC-2 | T1 | 882be59 | pass |
| AC-3 | TC-3, TC-4, TC-9 | T1 | 882be59 | pass |
| AC-8 | TC-14 | T2 | 9019a59 | pass |
| AC-9 | TC-15…17 | T2 | 9019a59 | pass |
Real run
A small frontend + backend requirement run from discovery to knowledge update, headless, with the guard hook enabled.
Get started
Requires Node.js ≥ 22, Git and a signed-in Claude Code. Put your code into source-fe/, source-be/ and source-legacy/, then:
approve, reject, answer, resume) refuse to run inside an AI session.aiws new --worktree.scripted adapter runs the whole workflow deterministically.# install the CLI $ cd aiws/adapters/cli && npm install && npm link # detect stacks, generate Claude config, map the system $ aiws detect --write $ aiws sync claude $ aiws discover # one requirement $ aiws new REQ-001 $ aiws run REQ-001 # stops at the design gate $ aiws approve REQ-001 design $ aiws run REQ-001 # stops at the PR gate $ aiws approve REQ-001 pr # after the merge $ aiws run REQ-001 && aiws trace REQ-001