# IT Partner Guide — VSG Build OS v2.6.0

For the technical partner supporting an SME-led build.

## What this is

A versioned standard for how projects are built here: shared rules, records,
automated guards, and review points. It is deliberately opinionated so that
projects started months apart look the same.

The SME does discovery, priorities, and acceptance. Claude does implementation.
You hold technical authority at defined points. It is not a substitute for your
judgment — it is the structure that tells you where your judgment is required.

## Your non-waivable review

These cannot be self-merged, including by the project owner:

| Category | Why |
|---|---|
| Authentication and permissions | UI-only enforcement looks correct and isn't |
| Data model and migrations | Passes tests, destroys production |
| Integrations and external inputs | Trust boundary |
| Personal data handling | RA 10173 exposure |
| Production configuration and deployment | Blast radius |
| New dependencies | Supply chain, licensing, maintenance |

Everything else may be self-merged after automated review.

Record sign-off on the pull request. If you decline, say what would need to change.

### Your queue is visible from the start

`docs/build/BACKLOG.md` is generated from the approved brief before any code is
written, and every Structural row is listed in its **Awaiting IT sign-off** table at
that moment. You can see the whole sign-off load for the project on day one instead
of meeting it one pull request at a time.

Expect it to look heavy early. Setup and Stage 0 — identity, authentication,
permissions, scoping, audit, environments, CI — are almost entirely Structural by
design. That weight is real, and it was always there; the backlog only makes it
countable.

Tiers in the backlog are a plan, not a ruling. `claim-task` re-checks the tier when
the work is actually claimed and may raise it, never lower it silently.

Plans that touch the data model, migrations, a shared entity, or an integration are
also checked against the portfolio architecture standard
(`Bell-Kenz-Pharma-Inc/BK-Portfolio-Architecture-Standards`) before the SME sees
them. An ownership or contract conflict cannot be waived by the SME — it reaches you
or the portfolio owner, and the outcome is recorded in `DECISIONS.md`.

## What is automated, and what isn't

Hooks block deterministically: commits on protected branches, force pushes and
history rewrites, credential-shaped files and inline keys, commits with a failing
fast suite, and oversized files.

Hooks catch nothing about correctness. Wrong business logic, a permission model
that is coherent but wrong, a migration that is valid and destructive — those
reach you. Claude reviewing Claude catches style and obvious defects, not design
errors. Assume the automated layer has removed noise, not risk.

## The standard stack

Laravel · MySQL · React Native · React · REST · Sanctum, recorded in
`.buildos.json` and `.buildos/rules/tech-stack.md`. Claude will not propose
alternatives; if a project needs one, it comes to you as a Structural decision.

One thing is open for you to settle at the first project: whether the web frontend
is a separate React SPA against the Laravel API, or Inertia inside Laravel. Your
answer becomes the standard for every project after.

## Setup you should verify

- `.buildos.json` — `commands.fastTests` is set and actually runs
- Hooks are executable (`chmod +x .claude/hooks/*.sh`) and `python3` is available
- Branch protection on `main` at the GitHub level, not only in the hook
- `.env` and credential patterns are gitignored
- Environments separated; development cannot reach production data
- `commands.fastTests` set (`php artisan test` for Laravel, `npm test` for React/RN)

The hook layer is a safety net, not a security boundary. Enforce at the platform
level too.

## Batch runs

The `run-tasks` skill runs several already-decided tasks unattended, then stops for
SME review. It loops the normal claim/ship cycle — every hook, gate, and reviewer
agent runs per task. Nothing is relaxed for batching.

What constrains it:

- **Refuses to start** if `commands.fastTests` is blank, and dry-runs the suite
  before task one. Unattended work with nothing verifying it does not run.
- **Structural tier never qualifies.** Nor does anything needing a new dependency,
  a schema change, or touching auth, permissions, or patient data.
- **Every task must already be a logged decision.** The batch executes decisions,
  it does not make them. A backlog row carries a `Decision` column naming the
  `DECISIONS.md` row that authorises it. A blank column fails the condition, and so
  does a cell citing a decision that does not exist or does not cover the task. Rows
  filed automatically by `sync` during a session start blank on purpose — they are
  real work nobody has yet agreed to, and they cannot be batched until the SME
  confirms them and the decision is logged.
- **Dependencies are walked before any agent runs.** A task whose `Depends on` names
  another task in the same batch, or a row **not yet merged**, stops the run at
  pre-flight. An open pull request does not clear a dependency — the dependent branch
  would be cut from a `main` that lacks the work. Missing dependency IDs and cycles
  stop it too.
- **A tier raised mid-run halts the run.** The fence read the plan; `claim-task` sees
  the actual work. A row plan-tiered Standard that turns out Structural stops
  everything rather than proceeding on a premise the SME approved in error.
- **Tasks must be independent**, checked before the run starts. All branch from one
  captured `main` commit; PRs are opened, never merged, so `main` does not move
  mid-run.
- **Any halt stops the whole run**, not just the task. Completed work is left
  intact; nothing is unwound.
- **Two failed attempts, not three** — tighter than the general stuck rule, because
  nobody is watching.

Everything still arrives as a pull request. Structural work cannot enter a batch, so
your sign-off gate is unaffected.

`check-connections` runs after each task and standalone. It traces the Laravel/React
boundary — response shape against client expectations, through to the consuming
screen — which no reviewer agent covers, since each reviews a side rather than the
crossing. It may not edit a test or weaken a check to pass; that is a stop.

## Escalations you should expect

Claude stops and escalates after three failed attempts at the same fix, rather
than continuing to iterate. When that reaches you, the record of what was tried
is in `docs/build/PROJECT_STATUS.md`.

Inside a batch run the threshold is two, and the record is in
`docs/build/RUN_REPORTS.md`.

## Overriding a hook

Legitimate occasionally. The correct sequence: understand exactly what is blocked,
get the project owner's agreement in the session, disable the specific hook,
perform the action, re-enable it, and record it in `DECISIONS.md`. A hook that is
routinely disabled is a hook that is wrong — say so and change the standard.

## Changing the standard

Version-controlled in the VSG Build OS template repository. Improvements belong
upstream so every project gets them, not patched locally in one project. Local
divergence defeats the point.

This is now enforced rather than merely stated. `.buildos/MANIFEST.json` records
three ownership classes:

| Class | Examples | On update |
|---|---|---|
| Build OS owned | `CLAUDE.md`, `.buildos/`, `.claude/` | Replaced wholesale |
| Project owned | `docs/build/`, source, `prototype/` | Never touched |
| Field-merged | `.buildos.json` only | Merged field by field |

`.buildos.json` is field-merged because it holds kit settings (stack, brand, git,
secret patterns) alongside project settings (`project`, `commands`, `currentTask`).
Replacing it wholesale would blank `commands.fastTests` and silently disarm the
pre-commit test hook — the reason this class exists.

The `update-build-os` skill compares the project's version against `updateSource`,
shows every file it would replace **including any modified locally**, and changes
nothing until approved. Work lands on a branch as a pull request.

A locally modified kit file surfacing during an update is a signal: someone fixed
something in the wrong place. Get it upstream before it is overwritten.

Releasing a version bumps the stamp in five places together — `.buildos.json`,
`CLAUDE.md`, `README.md`, `START_HERE.md`, `IT_PARTNER.md` — plus `buildOsVersion`
in the manifest. `.buildos.json` is the authority; the documents are stamps. A new
kit file missing from the manifest never reaches existing projects.
