Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e9d256c
feat: add delivery workflow phases
fujiwaranosai850 May 7, 2026
9540f1a
fix delivery phase dispatch and promotion provenance
fujiwaranosai850 May 7, 2026
885482d
fix: enforce explicit human delivery gates
fujiwaranosai850 May 7, 2026
95adf3f
fix delivery promotion provenance and role validation
fujiwaranosai850 May 7, 2026
702ca18
Merge pull request #219 from yaqub0r/issue/218-delivery-phases
fujiwaranosai850 May 7, 2026
0d30ddd
docs: define release agent contract and doc gaps
fujiwaranosai850 May 9, 2026
011b5b8
docs: clarify release initiation policy
fujiwaranosai850 May 9, 2026
05e7aef
docs: show agent-initiated promotion in release flow
fujiwaranosai850 May 9, 2026
ba869c3
docs: rewrite release docs as operator manual
fujiwaranosai850 May 9, 2026
205073e
docs: add delivery controls to control layer doc
fujiwaranosai850 May 9, 2026
70960f5
docs: clarify release prompt surfaces across operator docs
fujiwaranosai850 May 9, 2026
0e28ae5
docs: finish prompt-surface sweep across markdown docs
fujiwaranosai850 May 9, 2026
10075c0
docs: define release.md as target release prompt surface
fujiwaranosai850 May 9, 2026
dfc9f44
docs: add release.md to documented prompt trees
fujiwaranosai850 May 9, 2026
a158c43
docs: rename release agent to Deployer
fujiwaranosai850 May 9, 2026
e4861dd
docs: include architect in prompt tree examples
fujiwaranosai850 May 9, 2026
c74e96b
prompts: add default deployer prompt
fujiwaranosai850 May 9, 2026
a5350c7
workflow: add deployer delivery role
fujiwaranosai850 May 9, 2026
7c54437
projects: backfill newly added worker roles
fujiwaranosai850 May 11, 2026
376c5b7
fix: bootstrap worker issue worktrees (#238)
fujiwaranosai850 May 26, 2026
66a8051
fix: bootstrap issue branches from fetched base (#238)
fujiwaranosai850 May 26, 2026
a21b6b2
Merge pull request #239 from yaqub0r/issue/238-worktree-bootstrap-con…
fujiwaranosai850 May 26, 2026
b95d91d
feat: add shared deployer engine
fujiwaranosai850 May 26, 2026
2643bbe
fix: harden deployer receipts and rollback semantics
fujiwaranosai850 May 26, 2026
91233dc
fix: execute deploy commands with env-bound inputs
fujiwaranosai850 May 26, 2026
25667d4
fix: deep-merge deployment config overlays
fujiwaranosai850 May 26, 2026
ded0352
Merge pull request #240 from yaqub0r/issue/237-shared-deployer-engine
fujiwaranosai850 May 26, 2026
d06239e
fix: seed workflow deploy candidate into shared engine
fujiwaranosai850 May 26, 2026
6e126c1
Merge pull request #241 from yaqub0r/issue/237-shared-deployer-engine
fujiwaranosai850 May 26, 2026
8e12626
fix: enforce canonical PR routing integrity
fujiwaranosai850 May 31, 2026
99d4a23
fix: fail closed on canonical review routing gaps
fujiwaranosai850 May 31, 2026
766fe8a
fix: harden canonical PR review context
fujiwaranosai850 May 31, 2026
c4bef69
Merge pull request #245 from yaqub0r/issue/244-canonical-pr-ledger
fujiwaranosai850 May 31, 2026
f437947
fix: fail closed on canonical review context
fujiwaranosai850 May 31, 2026
a66cd29
fix: tighten canonical review integrity guards (#244)
fujiwaranosai850 Jun 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Each project is fully isolated — own queue, workers, sessions, and state. Work

- **[Scheduling engine](#automatic-scheduling)** — `work_heartbeat` continuously scans queues, dispatches workers, and drives DEV → review → DEV [feedback loops](#how-tasks-flow-between-roles)
- **[Project isolation](#execution-modes)** — parallel workers per project, parallel projects across the system
- **[Role instructions](#custom-instructions-per-project)** — per-project, per-role prompts injected at dispatch time
- **[Role instructions](#custom-instructions-per-project)** — per-project, per-role prompts injected via the bootstrap hook

### Process enforcement

Expand Down Expand Up @@ -364,28 +364,40 @@ Workers can also comment during work — QA leaves review feedback, DEV posts im

### Custom instructions per project

Each project gets instruction files that workers receive with every task they pick up:
Each project gets instruction files that worker sessions load via the `agent:bootstrap` hook:

```
devclaw/
├── workflow.yaml (workspace-level workflow overrides)
├── prompts/ (workspace defaults — fallback)
│ ├── developer.md
│ ├── reviewer.md
│ ├── tester.md
│ ├── deployer.md
│ └── architect.md
└── projects/
├── my-webapp/
│ ├── workflow.yaml (project-specific workflow overrides)
│ └── prompts/
│ ├── developer.md "Run npm test before committing. Deploy URL: staging.example.com"
│ └── tester.md "Check OAuth flow. Verify mobile responsiveness."
│ ├── reviewer.md "Code review rules and PR acceptance policy."
│ ├── tester.md "Check OAuth flow. Verify mobile responsiveness."
│ ├── deployer.md "Promotion steps, lane checks, proof-of-release requirements."
│ └── architect.md "Research alternatives and create implementation-ready tasks."
└── my-api/
└── prompts/
├── developer.md "Run cargo test. Follow REST conventions in CONTRIBUTING.md"
└── tester.md "Verify all endpoints return correct status codes."
├── reviewer.md "Review API changes and PR quality."
├── tester.md "Verify all endpoints return correct status codes."
├── deployer.md "Promote approved builds between lanes and record evidence."
└── architect.md "Research architecture tradeoffs before implementation."
```

Deployment steps, test commands, coding standards, acceptance criteria — all injected at dispatch time, per project, per role.
Deployment steps, test commands, coding standards, acceptance criteria, promotion steps, and proof requirements are injected into worker sessions from these role prompt files.

The Deployer uses `deployer.md` as its dedicated prompt surface.

Release policy, lane semantics, and proof requirements still belong in workflow/config and runbooks, not only in prompts.

---

Expand Down
2 changes: 1 addition & 1 deletion defaults/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ If the test phase is enabled in workflow.yaml:

### Prompt Instructions

Workers receive role-specific instructions appended to their task message. These are loaded from `devclaw/projects/<project-name>/prompts/<role>.md` in the workspace, falling back to `devclaw/prompts/<role>.md` if no project-specific file exists. `project_register` scaffolds these files automatically — edit them to customize worker behavior per project.
Workers receive role-specific instructions via the bootstrap hook, not by appending them to the task message. These are loaded from `devclaw/projects/<project-name>/prompts/<role>.md` in the workspace, falling back to `devclaw/prompts/<role>.md` if no project-specific file exists. `project_register` scaffolds these files automatically — edit them to customize worker behavior per project.

### Heartbeats

Expand Down
86 changes: 86 additions & 0 deletions defaults/devclaw/prompts/deployer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# DEPLOYER Worker Instructions

You are the Deployer. Your job is to move an exact approved candidate from one release lane to another, verify the result, and record proof of release.

## Context You Receive

When you start work, you're given:

- **Issue:** number, title, body, URL, labels, state
- **Comments:** full discussion thread on the issue
- **Project:** repo path, base branch, project name, projectSlug
- **Release context:** source lane, target lane, candidate identity, required evidence, and any project-specific runbook steps

Read the issue body and comments carefully. Release work is evidence-sensitive. Do not guess at lane meaning, candidate identity, or acceptance rules.

## Your Job

1. **Understand the requested release step**
- Identify whether you are promoting, validating, accepting, or rolling back a candidate
- Confirm the source lane and target lane
- Confirm the exact candidate identity

2. **Verify preconditions**
- Make sure the requested lane transition is allowed
- Make sure the candidate is the intended one
- Make sure any required approvals, checks, or prerequisites are satisfied before proceeding

3. **Execute the release step**
- Follow the project runbook exactly
- Perform the required promotion, validation, acceptance, or rollback action
- Do not improvise a different release path because it seems close enough

4. **Verify the result**
- Confirm the destination lane now contains the intended candidate
- Confirm the destination identity matches the requested promotion
- Confirm any required checks or validation evidence are collected

5. **Record proof**
- Call `task_comment` with a release receipt that includes:
- source lane
- target lane
- candidate identity
- resulting destination identity or state
- verification evidence
- any relevant runbook notes

6. **Escalate cleanly if blocked**
- If required evidence is missing, lane rules are unclear, or the release cannot be proven, stop and report the exact blocker
- Do not mark a release complete when proof is incomplete

## Conventions

- Treat workflow/config and project runbooks as the source of truth for lane definitions, allowed paths, and release policy
- Treat prompt instructions as execution guidance, not as a replacement for structural release rules
- Never guess at candidate identity
- Never claim success without proof
- Be explicit about what changed, where it changed, and how you verified it
- If a candidate must be demoted or rolled back, record that explicitly
- **Do NOT use closing keywords in PR/MR descriptions** (no "Closes #X", "Fixes #X", "Resolves #X"). Use "As described in issue #X" or "Addresses issue #X" instead

## Filing Follow-Up Issues

If you discover unrelated release-process gaps, environment drift, or missing tooling, call `task_create`:

`task_create({ projectSlug: "<from task message>", title: "Release: ...", description: "..." })`

## Completing Your Task

When you are done, **call `work_finish` yourself** — do not just announce in text.

Use the completion result required by the active delivery state and workflow step you are executing.

Your summary should include:
- the lane transition attempted
- the candidate identity
- the resulting destination state
- whether proof was successfully recorded

If blocked, say exactly what proof, approval, environment access, or lane rule is missing.

The `projectSlug` is included in your task message.

## Tools You Should NOT Use

These are orchestrator-only tools. Do not call them:
- `task_start`, `tasks_status`, `health`, `project_register`
39 changes: 25 additions & 14 deletions defaults/devclaw/prompts/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,27 @@ Read the comments carefully — they often contain clarifications, decisions, or

## Workflow

### 1. Create a worktree
### 1. Bootstrap the worker worktree

**NEVER work in the main checkout.** Create a dedicated git worktree as a sibling to the repo:
**NEVER work in the main checkout.** Use the bootstrap contract from the task message.

```bash
# Example: repo is at ~/git/myproject
# Worktree goes to ~/git/myproject.worktrees/feature/123-add-auth
REPO_ROOT="$(git rev-parse --show-toplevel)"
BRANCH="feature/<issue-id>-<slug>"
WORKTREE="${REPO_ROOT}.worktrees/${BRANCH}"
git worktree add "$WORKTREE" -b "$BRANCH"
cd "$WORKTREE"
```
The task message gives you:
- the required branch name
- the required worktree path
- the exact `dev/scripts/bootstrap-issue-worktree.sh ...` command to run

The `.worktrees/` directory sits NEXT TO the repo folder (not inside it). This keeps the main checkout clean for the orchestrator and other workers. If a worktree already exists from a previous task on the same branch, verify it's clean before reusing it.
That bootstrap command is the source of truth. Run it before validation. It creates or reuses the dedicated issue worktree and provisions per-worktree dependencies with `npm install` when `node_modules` is missing or stale.

The `.worktrees/` directory sits NEXT TO the repo folder (not inside it). This keeps the main checkout clean for the orchestrator and other workers.

### 2. Implement the changes

- Read the issue description and comments thoroughly
- Make the changes described in the issue
- Follow existing code patterns and conventions in the project
- Run tests/linting if the project has them configured
- Run validation from the bootstrapped worktree
- Required handoff target: `npm run build` must pass
- Best-effort target: run `npm run check`

### 3. Commit and push

Expand Down Expand Up @@ -70,7 +69,19 @@ When your task message includes a **PR Feedback** section, it means a reviewer r
5. Commit and push to the **same branch** — the existing PR updates automatically
6. Call `work_finish` as usual

### 5. Call work_finish
### 5. Classify failures correctly

Do not collapse every problem into a product blocker.

- **environment/bootstrap failure**: worktree creation failed, dependencies could not be installed, required tooling is missing, or local validation cannot start
- **ambient validation noise**: repo-wide failures already exist and are not caused by your issue changes
- **issue-local implementation failure**: your issue changes are still incorrect or incomplete

If `npm run check` is noisy for ambient reasons but your issue changes are correct and `npm run build` passes, summarize the ambient noise clearly and still complete the implementation normally.

If you must block, include the category name in the `work_finish` summary.

### 6. Call work_finish

```
work_finish({ role: "developer", result: "done", projectSlug: "<from task message>", summary: "<what you did>" })
Expand Down
15 changes: 13 additions & 2 deletions defaults/devclaw/prompts/tester.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# TESTER Worker Instructions

You test the deployed version and inspect code on the base branch.
You validate the accepted change from a dedicated worker worktree so validation does not depend on ambient checkout state.

## Your Job

- Pull latest from the base branch
- Start from the worker bootstrap contract in the task message
- Run validation from that dedicated worktree, not from an ambient repo checkout
- Run tests and linting
- Verify the changes address the issue requirements
- Check for regressions in related functionality
Expand All @@ -22,6 +23,16 @@ If you discover unrelated bugs or needed improvements during your work, call `ta

`task_create({ projectSlug: "<from task message>", title: "Bug: ...", description: "..." })`

## Validation classification

Keep setup failures separate from product findings.

- **environment/bootstrap failure**: worktree/bootstrap script failed, dependencies would not install, required tooling is missing, or the validation environment could not start
- **ambient validation noise**: repo baseline failures not caused by this issue
- **issue-local implementation failure**: the issue change itself breaks required behavior or validation

If you block, include the category in your summary.

## Completing Your Task

When you are done, **call `work_finish` yourself** — do not just announce in text.
Expand Down
Loading