Implement Project

Phase 3 / construction. Pick the next unblocked activity from the .network slot in .aiarch/state/project.json and execute it thro…

mixofreality-studio updated 1mo ago
Claude CodeGeneric
View source ↗
# Implement Project

> Phase 3 / construction. Pick the next unblocked activity from the `.network` slot in `.aiarch/state/project.json` and execute it through the right role agent, gated by the chosen hand-off model. Loop until blocked, complete, or interrupted.
>
> **archistrator is a single Go server repo. State is git-as-DB:** all project
> state lives in typed slots in `.aiarch/state/project.json`, NOT in
> `methodpoc/designs/<product>/*.md` files. Components live under
> `server/internal/<layer>/<pkg>/`. Markdown/DSL is render-on-read.

**Skill reference:** Invoke `the-method` skill. This command orchestrates the Phase 3 sub-skills:

- [[the-method-handoff]] — chosen ONCE at Phase 3 start; sets the contract-design + review ownership model for the project
- [[the-method-service-contract]] — invoked per `detailed-design` activity
- [[the-method-project-tracking]] — invoked weekly during construction
- [[the-method-scope-change]] — event-triggered (and entry point for `/sdp-review`)

## Usage

/implement-project [--once|--loop]


- `--once` (default): pick and execute one activity, then stop.
- `--loop`: keep picking activities until blocked or complete. Pause for user
  review after each completion. Weekly tracking and scope-change events fire
  inline.

## Prerequisites

- The `.network` slot must be committed with a chosen option set (management has committed).
- The Phase-2 project-design standard check must have passed (recorded against `.sdpReview`).
- The `.systemDesign` architecture artifact is committed.

## Workflow

### Step 0: Pick the hand-off model (ONE-TIME at Phase 3 start)

Skip if the `.handoff` slot is already committed.

Invoke [[the-method-handoff]] via `system-architect`:

> Pick the construction hand-off model for this project per Löwy ch. 14 §5:
>
>   - **Senior hand-off** (default): architect designs detailed contracts;
>     senior reviews and amends; junior implements.
>   - **Senior-as-junior-architect hand-off**: senior designs contracts
>     under architect mentorship; architect reviews contracts; senior
>     reviews junior implementation. Mentorship goal.
>   - **Junior hand-off** (avoid unless trivial): junior designs and
>     implements; architect reviews everything.
>
> Document the choice + rationale in the `.handoff` slot of
> `.aiarch/state/project.json`. State explicitly who designs contracts and who
> reviews implementation, per activity type.

This decision threads through every per-activity step below.

### Step 1: Load context

Dispatch `project-manager`:

> Load the `.network` slot from `.aiarch/state/project.json`.
>
> Verify:
>   - the network's chosen option is set (not null)
>   - the network's start date is set
>   - The system design is complete: the `.systemDesign` artifact is committed
>   - The hand-off model is set: the `.handoff` slot is committed
>
> Also load:
>   - `.systemDesign` (architecture context)
>   - `.planningAssumptions` (constraints)
>   - `.handoff` (contract-design ownership)

### Step 2: Pick next activity

Per the `project-manager` agent's picking algorithm:

runnable = activities where status == "not-started" AND all dependencies are status == "done"

if runnable is empty: if every activity is status == "done": report "PROJECT COMPLETE — schedule debrief" stop else: report "BLOCKED — investigate" list activities with status == "in-progress" or "blocked" stop

next = runnable sorted by float_days ascending (critical path first) then by id ascending (deterministic tie-break)


Record the activity as started in `.activityConstruction[next.id]` (the
`RecordPhaseStarted` verb sets it in-progress with `startedAt = today`).
**Commit before dispatching the role agent.**

### Step 3: Dispatch by activity type

#### If `next.type == "detailed-design"`

Invoke [[the-method-service-contract]]. The hand-off model from Step 0 determines who designs:

- **senior hand-off** → architect designs the contract; senior reviews and amends.
- **senior-as-junior-architect** → senior designs the contract under architect mentorship; architect reviews.
- **junior hand-off** → junior designs the contract; architect reviews.

The designer is dispatched first; the reviewer is dispatched on completion. Output is the typed contract committed to `.serviceContracts[<component>]` (there is no `designs/.../contracts/<component>.md` file; markdown is render-on-read). Walk the Appendix B contract design rules and the Appendix C §6 standard check (3–5 ops per contract, max 12, reject ≥20).

#### If `next.type == "construction"`

Dispatch the implementer (`junior-developer` by default; `senior-developer` if the activity carries a `role: senior-developer` override):

> Implement `<next.component>` against its service contract in
> `.aiarch/state/project.json` → `.serviceContracts["<next.component>"]`
> (in a CI run, pre-extracted to `service-contract.json` at the repo root).
> Activity: `<next.id> — <next.name>`. Duration estimate:
> `<next.duration_days>` days. Component package:
> `server/internal/<layer>/<pkg>/`.
>
> System context: the committed `.systemDesign` artifact.
>
> Execute the activity. Verify with `GOWORK=off go build/vet/test` under
> `server/`. Put completion notes (what was built, any contract deviation,
> test results) in the **PR body + commit messages**; the activity record
> in `.activityConstruction[<next.id>]` captures phase exits and build status.

On completion the senior (per the hand-off model) reviews the construction via [[the-method-review-routing]]. Architect reviews are escalated for failed reviews or material design questions.

#### Other activity types

| `next.type` | Agent | Notes |
|---|---|---|
| `integration` | `system-architect` | Integration across components / layer boundaries; integration note → `.phaseArtifacts.integrationNote` |
| `quality` / testing | `test-engineer` / `software-tester` | Outputs → `.testingState` (see [[

Maintain Implement Project?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Implement Project on getagentictools](https://getagentictools.com/loops/mixofreality-studio-implement-project?ref=badge)
npx agentictools info loops/mixofreality-studio-implement-project

The second line is the CLI lookup for this page — handy in READMEs and docs.