Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ Pipeline control:

| Role | Agent file | Writes |
| ------------ | ------------------------ | -------------------------- |
| Orchestrator | `agents/orchestrator.md` | — (routes work) |
| Orchestrator | `agents/orchestrator.md` | `.team/07-build.md` (aggregation) |
| Analyst | `agents/analyst.md` | `.team/01-research.md` |
| PM | `agents/pm.md` | `.team/02-prd.md` |
| PO | `agents/po.md` | `.team/03-backlog.md` |
| UX Designer | `agents/ux.md` | `.team/04-ux.md` |
| Brand | `agents/brand.md` | `.team/05-brand.md` |
| Architect | `agents/architect.md` | `.team/06-architecture.md` |
| Frontend | `agents/fe.md` | `.team/07-build.md` |
| Backend | `agents/be.md` | `.team/07-build.md` |
| Frontend | `agents/fe.md` | `.team/07-build-fe.md` |
| Backend | `agents/be.md` | `.team/07-build-be.md` |
| QA | `agents/qa.md` | `.team/08-qa.md` |
| Security | `agents/security.md` | `.team/09-security.md` |
| Docs | `agents/docs.md` | `.team/10-docs.md` |
Expand Down Expand Up @@ -245,6 +245,8 @@ Every stage writes a markdown artifact:
12-launch.md
```

The build stage also writes intermediate `.team/07-build-fe.md` and `.team/07-build-be.md`; the orchestrator consolidates them into `07-build.md`.

Project-local agent memory also lives under `.team/`:

```
Expand Down
8 changes: 5 additions & 3 deletions README.tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ Boru hattı kontrolü:

| Rol | Ajan dosyası | Yazdığı çıktı |
| -------------- | ------------------------ | -------------------------- |
| Orkestratör | `agents/orchestrator.md` | — (işi dağıtır) |
| Orkestratör | `agents/orchestrator.md` | `.team/07-build.md` (birleştirme) |
| Analist | `agents/analyst.md` | `.team/01-research.md` |
| PM | `agents/pm.md` | `.team/02-prd.md` |
| PO | `agents/po.md` | `.team/03-backlog.md` |
| UX Tasarımcısı | `agents/ux.md` | `.team/04-ux.md` |
| Marka | `agents/brand.md` | `.team/05-brand.md` |
| Mimar | `agents/architect.md` | `.team/06-architecture.md` |
| Frontend | `agents/fe.md` | `.team/07-build.md` |
| Backend | `agents/be.md` | `.team/07-build.md` |
| Frontend | `agents/fe.md` | `.team/07-build-fe.md` |
| Backend | `agents/be.md` | `.team/07-build-be.md` |
| QA | `agents/qa.md` | `.team/08-qa.md` |
| Güvenlik | `agents/security.md` | `.team/09-security.md` |
| Doküman | `agents/docs.md` | `.team/10-docs.md` |
Expand Down Expand Up @@ -245,6 +245,8 @@ Her aşama bir markdown artefaktı yazar:
12-launch.md
```

Build aşaması ayrıca ara çıktı olarak `.team/07-build-fe.md` ve `.team/07-build-be.md` üretir; orkestratör bunları `07-build.md` içinde birleştirir.

Proje-yerel ajan hafızası da `.team/` altında bulunur:

```
Expand Down
4 changes: 3 additions & 1 deletion agents/be.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ Your process:
1. Read architecture from .team/06-architecture.md
2. Implement backend API and database
3. Write tests for backend code
4. Write to .team/07-build.md
4. Write your backend report to .team/07-build-be.md

Rules:
- Code and comments in English
- Follow existing project conventions
- Write tests for your code
- Do not design architecture; implement what architect specifies
- Do not write `.team/07-build.md`; the orchestrator consolidates the specialist reports
- Keep to the backend scope the orchestrator assigned; do not change shared contracts or frontend-owned files

## Memory

Expand Down
4 changes: 3 additions & 1 deletion agents/fe.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ Your process:
2. Read UX design from .team/04-ux.md
3. Implement frontend components
4. Write tests for frontend components
5. Write to .team/07-build.md
5. Write your frontend report to .team/07-build-fe.md

Rules:
- Code and comments in English
- Follow existing project conventions
- Write tests for your components
- Do not design architecture; implement what architect specifies
- Do not write `.team/07-build.md`; the orchestrator consolidates the specialist reports
- Keep to the frontend scope the orchestrator assigned; do not change shared contracts or backend-owned files

## Memory

Expand Down
19 changes: 19 additions & 0 deletions agents/orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,25 @@ Communication rules:

Current pipeline stages: research → prd → backlog → ux → brand → architecture → build → qa → security → docs → release → launch

## Build stage

Frontend and backend can run in parallel. Give each specialist a disjoint file scope; shared contracts and types stay with the architect's contract and get a single owner.

Each specialist writes its own report:
- `fe` → `.team/07-build-fe.md`
- `be` → `.team/07-build-be.md`

Wait for every specialist requested for the build. If one fails, is cancelled, or does not produce a report, the build stage is incomplete: say what remains and do not write `.team/07-build.md` as complete.

When all requested specialists finish successfully, read their reports and write the consolidated `.team/07-build.md`:
- what was built, per ticket and acceptance criterion;
- tests and evidence from each specialist;
- links to the source reports;
- known gaps, shortcuts and risks;
- an explicit statement that every requested specialist completed.

Aggregation must be idempotent: rerunning it must not duplicate sections or drop a specialist.

## Memory lifecycle

Read `skills/team-memory/SKILL.md` before seeding, dispatching or compacting memory.
Expand Down
4 changes: 2 additions & 2 deletions commands/build.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: build
description: "Run the build stage: call the frontend and backend agents according to the brief of the build stage in team.yaml, and write the output to .team/07-build.md."
description: "Run the build stage: call the frontend and backend agents according to the brief in team.yaml. Each writes a specialist report; consolidate them into .team/07-build.md only after every requested specialist finishes successfully."
agent: orchestrator
---

Run the build stage: call the frontend and backend agents according to the brief of the build stage in team.yaml, and write the output to .team/07-build.md.
Run the build stage: call the frontend and backend agents according to the brief in team.yaml. Each writes a specialist report; consolidate them into .team/07-build.md only after every requested specialist finishes successfully.

$ARGUMENTS
2 changes: 1 addition & 1 deletion docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OpenCode Team defines 14 agent roles in `agents/*.md`. Every role uses `mode: al
- **`@agent-name`** to mention one directly
- the orchestrator can launch it as a subagent through the `task` tool

The orchestrator is the default agent. It routes an idea through the pipeline and asks for approval at each gate. A specialist owns one stage and writes that stage's artifact.
The orchestrator is the default agent. It routes an idea through the pipeline and asks for approval at each gate. A specialist owns one stage and writes that stage's artifact. In the build stage, `fe` and `be` write specialist reports and the orchestrator consolidates them into `.team/07-build.md`.

## Direct invocation

Expand Down
2 changes: 2 additions & 0 deletions docs/pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ OpenCode Team runs an idea-to-launch pipeline with 12 stages. Each stage is a ga
| release | devops | `.team/11-release.md` | Yes |
| launch | marketing | `.team/12-launch.md` | Yes |

The build stage has two writers: `fe` writes `.team/07-build-fe.md` and `be` writes `.team/07-build-be.md`. The orchestrator consolidates both into `.team/07-build.md` only after every requested specialist finishes successfully.

## Profiles

`team.yaml` defines two profiles. The orchestrator picks `new` in an empty directory and `change` in an existing repository, unless you say otherwise.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The 19 slash commands defined in `commands/*.md`. Edit the command file, not thi
| `/architecture` | Design the technical architecture. Write the output to .team/06-architecture.md. First read .team/02-prd.md and .team/04-ux.md. | `architect` |
| `/backlog` | Break the PRD down into work items. Write the output to .team/03-backlog.md. First read .team/02-prd.md. | `po` |
| `/brand` | With the team-brand skill: concept -> SVG -> test -> color -> favicon set -> guidelines. | `brand` |
| `/build` | Run the build stage: call the frontend and backend agents according to the brief of the build stage in team.yaml, and write the output to .team/07-build.md. | `orchestrator` |
| `/build` | Run the build stage: call the frontend and backend agents according to the brief in team.yaml. Each writes a specialist report; consolidate them into .team/07-build.md only after every requested specialist finishes successfully. | `orchestrator` |
| `/docs` | Write technical documentation. Write the output to .team/10-docs.md. | `docs` |
| `/launch` | Write the marketing and launch plan. Write the output to .team/12-launch.md. | `marketing` |
| `/memory` | Inspect, seed, or compact project-local agent memory. | `orchestrator` |
Expand Down
19 changes: 19 additions & 0 deletions scripts/validate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@ def check(errors, path, ok, msg)
end
end

# --- one writer per stage artifact ---
# Write paths live in prose. Flag two roles being told to write the same .team
# artifact; parallel specialists would otherwise overwrite each other.
writes = Hash.new { |h, k| h[k] = [] }
Dir[File.join(ROOT, "agents/*.md")].sort.each do |path|
role = File.basename(path, ".md")
File.readlines(path).each do |line|
next if line.match?(/do not write/i)
next unless line.match?(/\bwrite\b/i)

line.scan(/\.team\/\d{2}-[a-z-]+\.md/i) { |artifact| writes[artifact] << role }
end
end
writes.each do |artifact, roles|
next if roles.uniq.size < 2

errors << "agents/*.md: #{roles.uniq.join(", ")} all write #{artifact}; use one writer per artifact"
end

# --- skills ---
skills.each do |path|
rel = path.sub("#{ROOT}/", "")
Expand Down
4 changes: 3 additions & 1 deletion skills/team-build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ The build is done only when all of these are true:

## Handoff to QA

After implementation and tests are green, write `.team/07-build.md`:
After implementation and tests are green, write your specialist report — `.team/07-build-fe.md` for frontend, `.team/07-build-be.md` for backend:

- What was built, per ticket and per acceptance criterion.
- Tests added, with the criterion each one covers.
- Exact commands run and their exact output (or "not run").
- Known gaps, shortcuts and risks.

The orchestrator consolidates the specialist reports into `.team/07-build.md` after every requested specialist has completed successfully. Do not write the consolidated report yourself.

Then hand off to the **QA stage**: the `qa` agent ([agents/qa.md](../../agents/qa.md)) reads `.team/06-architecture.md` and `.team/07-build.md`, follows the `team-qa` skill ([SKILL.md](../team-qa/SKILL.md)), and independently verifies the acceptance criteria. Do not report the QA stage as passed from the build stage; only QA can do that.

> Adapted from the MIT-licensed test-driven development skill by Matt Pocock. See THIRD_PARTY_NOTICES.md.
5 changes: 4 additions & 1 deletion team.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ stages:
support: [be]
brief: >
Implement the approved architecture. Tests are written first. Frontend and
backend work can run in parallel; merge once both are done.
backend work can run in parallel. Each specialist writes its own report
(.team/07-build-fe.md, .team/07-build-be.md); the orchestrator consolidates
them into .team/07-build.md only after every requested specialist finishes
successfully.

- id: qa
title: Testing and quality assurance
Expand Down
2 changes: 1 addition & 1 deletion team/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ research → prd → backlog → ux → brand → architecture → build → qa

## Artifacts

Every stage writes one markdown file into `.team/`:
Every stage writes one markdown file into `.team/`. The build stage additionally produces `fe` and `be` specialist reports (`.team/07-build-fe.md`, `.team/07-build-be.md`), which the orchestrator consolidates into `.team/07-build.md`.

```
.team/01-research.md
Expand Down
Loading