@bonesofspring/ai-rules 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +114 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +64 -5
- package/presets/claude/go/agents/build-verifier.md +9 -2
- package/presets/claude/go/agents/code-reviewer.md +8 -1
- package/presets/claude/go/agents/feature-developer.md +8 -1
- package/presets/claude/go/agents/task-analyst.md +8 -1
- package/presets/claude/go/agents/task-router.md +33 -5
- package/presets/claude/go/commands/task.md +8 -6
- package/presets/claude/go/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/go/team/README.md +13 -2
- package/presets/claude/ios-swift/agents/build-verifier.md +8 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +9 -14
- package/presets/claude/ios-swift/agents/feature-developer.md +8 -1
- package/presets/claude/ios-swift/agents/task-analyst.md +8 -1
- package/presets/claude/ios-swift/agents/task-router.md +31 -3
- package/presets/claude/ios-swift/commands/task.md +8 -6
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +177 -54
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +33 -2
- package/presets/claude/ios-swift/team/README.md +13 -2
- package/presets/claude/java/agents/build-verifier.md +8 -1
- package/presets/claude/java/agents/code-reviewer.md +8 -1
- package/presets/claude/java/agents/feature-developer.md +8 -1
- package/presets/claude/java/agents/task-analyst.md +8 -1
- package/presets/claude/java/agents/task-router.md +31 -3
- package/presets/claude/java/commands/task.md +8 -6
- package/presets/claude/java/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/java/team/README.md +13 -2
- package/presets/claude/mcp-ts/agents/build-verifier.md +9 -2
- package/presets/claude/mcp-ts/agents/feature-developer.md +7 -1
- package/presets/claude/mcp-ts/agents/task-analyst.md +8 -1
- package/presets/claude/mcp-ts/agents/task-router.md +33 -5
- package/presets/claude/mcp-ts/commands/task.md +8 -6
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +181 -39
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/mcp-ts/team/README.md +13 -2
- package/presets/claude/next/agents/accessibility-reviewer.md +6 -12
- package/presets/claude/next/agents/api-contract-reviewer.md +6 -12
- package/presets/claude/next/agents/build-verifier.md +8 -12
- package/presets/claude/next/agents/ci-investigator.md +7 -13
- package/presets/claude/next/agents/code-reviewer.md +9 -14
- package/presets/claude/next/agents/debugger.md +6 -12
- package/presets/claude/next/agents/feature-developer.md +8 -1
- package/presets/claude/next/agents/migration-specialist.md +6 -12
- package/presets/claude/next/agents/performance-auditor.md +5 -11
- package/presets/claude/next/agents/qa-tester.md +6 -12
- package/presets/claude/next/agents/security-reviewer.md +6 -12
- package/presets/claude/next/agents/solution-architect.md +6 -12
- package/presets/claude/next/agents/task-analyst.md +10 -16
- package/presets/claude/next/agents/task-router.md +31 -3
- package/presets/claude/next/agents/tech-writer.md +6 -13
- package/presets/claude/next/agents/unit-test-generator.md +6 -10
- package/presets/claude/next/agents/unit-test-healer.md +6 -10
- package/presets/claude/next/agents/unit-test-planner.md +5 -11
- package/presets/claude/next/commands/task.md +8 -6
- package/presets/claude/next/hooks/chain-team-phases.sh +197 -54
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +29 -4
- package/presets/claude/next/team/README.md +15 -3
- package/presets/claude/next/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/claude/next/team/fixtures/bugfix-standard.json +10 -0
- package/presets/claude/next/team/fixtures/feature-full.json +10 -0
- package/presets/claude/next/team/fixtures/feature-light.json +10 -0
- package/presets/claude/php-hexagonal/agents/build-verifier.md +9 -2
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +8 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +8 -1
- package/presets/claude/php-hexagonal/agents/task-analyst.md +8 -1
- package/presets/claude/php-hexagonal/agents/task-router.md +31 -3
- package/presets/claude/php-hexagonal/commands/task.md +8 -6
- package/presets/claude/php-hexagonal/hooks/README.md +1 -1
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/php-hexagonal/team/README.md +13 -2
- package/presets/claude/php-laravel/agents/build-verifier.md +9 -2
- package/presets/claude/php-laravel/agents/code-reviewer.md +8 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +8 -1
- package/presets/claude/php-laravel/agents/task-analyst.md +8 -1
- package/presets/claude/php-laravel/agents/task-router.md +31 -3
- package/presets/claude/php-laravel/commands/task.md +8 -6
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/php-laravel/team/README.md +13 -2
- package/presets/cursor/go/agents/build-verifier.md +8 -1
- package/presets/cursor/go/agents/code-reviewer.md +8 -1
- package/presets/cursor/go/agents/feature-developer.md +8 -1
- package/presets/cursor/go/agents/task-analyst.md +8 -1
- package/presets/cursor/go/agents/task-router.md +31 -3
- package/presets/cursor/go/commands/task.md +8 -6
- package/presets/cursor/go/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/go/team/README.md +13 -2
- package/presets/cursor/ios-swift/agents/build-verifier.md +8 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +9 -14
- package/presets/cursor/ios-swift/agents/feature-developer.md +8 -1
- package/presets/cursor/ios-swift/agents/task-analyst.md +8 -1
- package/presets/cursor/ios-swift/agents/task-router.md +31 -3
- package/presets/cursor/ios-swift/commands/task.md +8 -6
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +195 -54
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +23 -2
- package/presets/cursor/ios-swift/team/README.md +13 -2
- package/presets/cursor/java/agents/build-verifier.md +8 -1
- package/presets/cursor/java/agents/code-reviewer.md +8 -1
- package/presets/cursor/java/agents/feature-developer.md +8 -1
- package/presets/cursor/java/agents/task-analyst.md +8 -1
- package/presets/cursor/java/agents/task-router.md +31 -3
- package/presets/cursor/java/commands/task.md +8 -6
- package/presets/cursor/java/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/java/team/README.md +13 -2
- package/presets/cursor/mcp-ts/agents/build-verifier.md +8 -1
- package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -1
- package/presets/cursor/mcp-ts/agents/task-analyst.md +8 -1
- package/presets/cursor/mcp-ts/agents/task-router.md +31 -3
- package/presets/cursor/mcp-ts/commands/task.md +8 -6
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +181 -39
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/mcp-ts/team/README.md +13 -2
- package/presets/cursor/next/agents/accessibility-reviewer.md +7 -14
- package/presets/cursor/next/agents/api-contract-reviewer.md +7 -14
- package/presets/cursor/next/agents/build-verifier.md +8 -13
- package/presets/cursor/next/agents/ci-investigator.md +7 -14
- package/presets/cursor/next/agents/code-reviewer.md +9 -14
- package/presets/cursor/next/agents/debugger.md +6 -12
- package/presets/cursor/next/agents/feature-developer.md +8 -1
- package/presets/cursor/next/agents/migration-specialist.md +7 -14
- package/presets/cursor/next/agents/performance-auditor.md +6 -13
- package/presets/cursor/next/agents/qa-tester.md +6 -13
- package/presets/cursor/next/agents/security-reviewer.md +7 -14
- package/presets/cursor/next/agents/solution-architect.md +6 -12
- package/presets/cursor/next/agents/task-analyst.md +10 -16
- package/presets/cursor/next/agents/task-router.md +31 -3
- package/presets/cursor/next/agents/tech-writer.md +6 -13
- package/presets/cursor/next/agents/unit-test-generator.md +6 -11
- package/presets/cursor/next/agents/unit-test-healer.md +6 -11
- package/presets/cursor/next/agents/unit-test-planner.md +6 -13
- package/presets/cursor/next/commands/task.md +8 -6
- package/presets/cursor/next/hooks/chain-team-phases.sh +197 -54
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/next/team/README.md +16 -4
- package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/cursor/next/team/fixtures/bugfix-standard.json +10 -0
- package/presets/cursor/next/team/fixtures/feature-full.json +10 -0
- package/presets/cursor/next/team/fixtures/feature-light.json +10 -0
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +8 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +8 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +8 -1
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +8 -1
- package/presets/cursor/php-hexagonal/agents/task-router.md +31 -3
- package/presets/cursor/php-hexagonal/commands/task.md +8 -6
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/php-hexagonal/team/README.md +13 -2
- package/presets/cursor/php-laravel/agents/build-verifier.md +8 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +8 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +8 -1
- package/presets/cursor/php-laravel/agents/task-analyst.md +8 -1
- package/presets/cursor/php-laravel/agents/task-router.md +31 -3
- package/presets/cursor/php-laravel/commands/task.md +8 -6
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/php-laravel/team/README.md +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### Agent artifact contracts
|
|
6
|
+
|
|
7
|
+
- New shared-core schema SoT: `presets/_shared/core/agent-team/agent-artifact-contracts.md` — per-slug `artifact-manifest.json` (schema v1) as context index + completion receipts; markdown remains narrative evidence.
|
|
8
|
+
- Agents upsert only owned manifest entries/receipts; the orchestration runtime/hook is the sole writer of `status.json` lifecycle fields and `metrics.json`.
|
|
9
|
+
- All seven Cursor/Claude stack team docs and existing task-router, task-analyst, feature-developer, build-verifier, and code-reviewer prompts declare authoritative inputs, owned outputs, and terminal receipt outcomes (orchestration runtime/hook remains the sole writer of `status.json` / `metrics.json`; hook instrumentation for metrics and receipt reconciliation is covered below).
|
|
10
|
+
- Added mirrored Next `artifact-manifest.example.json` fixtures and the `apply-agent-team-p0` dogfood pilot. Existing tasks without a manifest fall back to `brief.md`, `decomposition.md`, and `pipeline.json` and report the gap.
|
|
11
|
+
|
|
12
|
+
### Agent-team routing rubric
|
|
13
|
+
|
|
14
|
+
- New agent-team pipelines retain top-level `profile` and emit a structured `routingDecision` with `complexity`, `riskFlags`, auditable `routingReasons`, `estimatedWorkPackages`, and `openDecisionCount`.
|
|
15
|
+
- Updated all seven Cursor routers and seven Claude twins with shared low/moderate/high heuristics and concrete risk signals. Next light/standard/full fixtures demonstrate the contract; existing pipelines without the optional block remain valid.
|
|
16
|
+
|
|
5
17
|
### Agent-task metrics
|
|
6
18
|
|
|
7
19
|
- Added local schema-v1 `metrics.json` ledgers for agent-team pipelines: append-only task, attempt, retry, skip, completion, and human-gate lifecycle events. Allowlisted identifiers/timestamps/outcomes only (no prompts, secrets, file paths/contents, or remote telemetry). Shared-core policy: `presets/_shared/core/agent-team/agent-task-metrics.md` (requestable via orchestrator; no new always-on rule).
|
package/package.json
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Agent artifact contracts
|
|
2
|
+
|
|
3
|
+
Each pipeline slug has one context index and receipt ledger:
|
|
4
|
+
|
|
5
|
+
- Cursor: `.cursor/team/tasks/<slug>/artifact-manifest.json`
|
|
6
|
+
- Claude: `.claude/team/tasks/<slug>/artifact-manifest.json`
|
|
7
|
+
|
|
8
|
+
Markdown remains the narrative evidence. The manifest identifies authoritative inputs and outputs; it does not duplicate report contents or replace `pipeline.json`, `status.json`, or `metrics.json`.
|
|
9
|
+
|
|
10
|
+
## Schema v1
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"schemaVersion": 1,
|
|
15
|
+
"slug": "example-slug",
|
|
16
|
+
"updatedAt": "2026-07-31T12:00:00.000Z",
|
|
17
|
+
"artifacts": [
|
|
18
|
+
{
|
|
19
|
+
"id": "analysis",
|
|
20
|
+
"producer": "task-analyst",
|
|
21
|
+
"status": "completed",
|
|
22
|
+
"authoritativePaths": ["brief.md", "decomposition.md"],
|
|
23
|
+
"acceptanceCriteriaIds": ["AC-1"],
|
|
24
|
+
"taskIds": ["T1"],
|
|
25
|
+
"timestamps": {
|
|
26
|
+
"createdAt": "2026-07-31T11:55:00.000Z",
|
|
27
|
+
"updatedAt": "2026-07-31T12:00:00.000Z",
|
|
28
|
+
"completedAt": "2026-07-31T12:00:00.000Z"
|
|
29
|
+
},
|
|
30
|
+
"receipt": {
|
|
31
|
+
"outcome": "completed",
|
|
32
|
+
"summary": "Acceptance criteria and implementation tasks are ready.",
|
|
33
|
+
"evidencePaths": ["brief.md", "decomposition.md"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Required fields
|
|
41
|
+
|
|
42
|
+
| Location | Field | Contract |
|
|
43
|
+
|----------|-------|----------|
|
|
44
|
+
| root | `schemaVersion` | Integer `1` |
|
|
45
|
+
| root | `slug` | Matches the task directory |
|
|
46
|
+
| root | `updatedAt` | ISO 8601 timestamp of the latest manifest update |
|
|
47
|
+
| artifact | `id` | Stable, slug-local kebab-case identifier |
|
|
48
|
+
| artifact | `producer` | Agent or orchestrator role that owns this entry |
|
|
49
|
+
| artifact | `status` | `planned` \| `in_progress` \| `completed` \| `blocked` \| `superseded` |
|
|
50
|
+
| artifact | `authoritativePaths` | Non-empty paths relative to the slug directory; the current sources of truth |
|
|
51
|
+
| artifact | `acceptanceCriteriaIds` | Explicit IDs from `brief.md`; `[]` only when the task has no applicable AC |
|
|
52
|
+
| artifact | `taskIds` | Explicit IDs from `decomposition.md`; `[]` only when no decomposition task applies |
|
|
53
|
+
| artifact | `timestamps` | `createdAt`, `updatedAt`, and `completedAt` for terminal entries; ISO 8601 |
|
|
54
|
+
| artifact | `receipt` | Required when `status` is terminal (`completed`, `blocked`, or `superseded`) |
|
|
55
|
+
|
|
56
|
+
Unknown fields are ignored in schema v1 for forward compatibility. Producers must preserve entries and fields they do not own.
|
|
57
|
+
|
|
58
|
+
## Context index conventions
|
|
59
|
+
|
|
60
|
+
1. Before work, read the manifest first, then only the listed authoritative inputs needed by the current pipeline step.
|
|
61
|
+
2. Pipeline steps may declare `artifactInputIds: string[]` and, for a single producer, `artifactOutputId: string`. Parallel steps use `artifactOutputIds: Record<agent, id>` so every producer has a distinct entry. The hook includes these assignments in the handoff.
|
|
62
|
+
3. When these optional fields are omitted, use the default producer → entry map below. Repeated checkpoints for the same producer must set distinct output IDs; the fallback default is only safe when that producer has one active checkpoint in the pipeline.
|
|
63
|
+
4. If the manifest is absent or unreadable, fall back to `brief.md`, `decomposition.md`, and `pipeline.json`, then report the gap.
|
|
64
|
+
5. `authoritativePaths` points to current files, not globs and not historical alternatives. Mark an old entry `superseded` before replacing its authority.
|
|
65
|
+
6. Every applicable acceptance criterion and decomposition task ID is traceable to at least one terminal entry.
|
|
66
|
+
7. The manifest contains no prompts, secrets, report bodies, model claims, durations, or remote telemetry.
|
|
67
|
+
|
|
68
|
+
## Completion receipts
|
|
69
|
+
|
|
70
|
+
A producer finishes its step by upserting only its owned artifact entry and terminal receipt:
|
|
71
|
+
|
|
72
|
+
- `outcome`: `completed` | `blocked` | `changes_requested` | `validation_failed`
|
|
73
|
+
- `attemptId`: optional stable attempt ID supplied by the hook; when present it must match the active attempt
|
|
74
|
+
- `summary`: one short factual sentence
|
|
75
|
+
- `evidencePaths`: authoritative files that support the outcome
|
|
76
|
+
|
|
77
|
+
`changes_requested` and `validation_failed` use artifact `status: "blocked"` while retaining their distinct receipt outcome. A later successful attempt updates the same owned entry to `completed`; timestamps and evidence must reflect the latest result. Do not infer success from a Markdown filename alone.
|
|
78
|
+
|
|
79
|
+
`blocked` is terminal for the producer attempt but non-advancing for the pipeline: the hook persists `status.state` / `phase` as `blocked` and emits no next-agent handoff. A receipt must either carry the active `attemptId` or belong to the step's assigned output entry. Its terminal timestamp must be at or after the active attempt's `startedAt`; otherwise the hook keeps the attempt active in `awaiting_artifact_receipt` and does not advance or retry.
|
|
80
|
+
|
|
81
|
+
## Ownership and writes
|
|
82
|
+
|
|
83
|
+
- Agents own their output artifacts and their manifest entries/receipts. They merge by stable `id` and preserve all foreign entries.
|
|
84
|
+
- The router owns `pipeline.json` and its routing manifest entry. The analyst owns analysis entries; implementers own implementation entries; reviewers and verifiers own their report entries.
|
|
85
|
+
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but do not rewrite `pipelineIndex`, `currentAgent`, `state`, gates, retry fields, active attempts, timestamps, or metrics.
|
|
86
|
+
- On `subagentStop`, the hook reconciles the completing producer's attempt-bound or assigned-output receipt and maps `completed` / `blocked` / `changes_requested` / `validation_failed` onto `status.state` before metrics terminal events and retry/advance logic. Tasks without a readable manifest retain the host-completion fallback. Parent orchestrators must not start the next step until reconciliation lands.
|
|
87
|
+
- A producer never edits another producer's receipt. Corrections create a new owned entry or supersede an earlier entry owned by the same producer.
|
|
88
|
+
- Parallel producers need distinct entry IDs. Their parent/orchestrator serializes manifest merges; agents must not use the shared manifest as a concurrency lock.
|
|
89
|
+
|
|
90
|
+
## Default producer → entry map
|
|
91
|
+
|
|
92
|
+
| Producer | Default entry `id` | Typical authoritative paths |
|
|
93
|
+
|----------|--------------------|-----------------------------|
|
|
94
|
+
| `task-router` | `routing` | `pipeline.json` |
|
|
95
|
+
| `task-analyst` | `analysis` | `brief.md`, `decomposition.md` |
|
|
96
|
+
| `solution-architect` | `architecture` | `architecture.md` |
|
|
97
|
+
| `migration-specialist` | `migration-plan` | `migration-plan.md` |
|
|
98
|
+
| `debugger` | `debug` | `debug-report.md` |
|
|
99
|
+
| `ci-investigator` | `ci` | `ci-report.md` |
|
|
100
|
+
| `feature-developer` | `implementation` | `implementation.md` (+ changed code/tests as listed) |
|
|
101
|
+
| `build-verifier` | `validation` | `validation-report.md` |
|
|
102
|
+
| `code-reviewer` | `review` | `review.md` |
|
|
103
|
+
| `security-reviewer` | `security-review` | `security-review.md` |
|
|
104
|
+
| `accessibility-reviewer` | `a11y-review` | `a11y-review.md` |
|
|
105
|
+
| `performance-auditor` | `perf-report` | `perf-report.md` |
|
|
106
|
+
| `api-contract-reviewer` | `api-contract-review` | `api-contract-review.md` |
|
|
107
|
+
| `qa-tester` / unit or e2e planners | stack-native test IDs | plan/spec paths named in the agent prompt |
|
|
108
|
+
| `tech-writer` | `documentation` | `documentation.md` |
|
|
109
|
+
|
|
110
|
+
Use these defaults unless a step's `artifactOutputId` / `artifactOutputIds` assigns a distinct owned ID (parallel reviewers must not share one `id`). `artifactInputIds` defaults to the applicable authoritative entries already present in the manifest.
|
|
111
|
+
|
|
112
|
+
## Minimal terminal handoff
|
|
113
|
+
|
|
114
|
+
Report the owned entry ID, outcome, authoritative paths, covered AC/task IDs, and remaining gaps. The hook advances pipeline state from the terminal receipt; the agent receipt is evidence that drives the state transition, not a substitute for writing `status.json`.
|
|
@@ -28,7 +28,7 @@ Roster of specialists is **stack-specific** (agent names and write scopes differ
|
|
|
28
28
|
|
|
29
29
|
**Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write team artifacts. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true`.
|
|
30
30
|
|
|
31
|
-
Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md
|
|
31
|
+
Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`; schema SoT: **agent-artifact-contracts**.
|
|
32
32
|
|
|
33
33
|
## Dynamic pipeline
|
|
34
34
|
|
|
@@ -54,12 +54,60 @@ flowchart TD
|
|
|
54
54
|
|
|
55
55
|
**Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
|
|
56
56
|
|
|
57
|
+
## Routing decision contract
|
|
58
|
+
|
|
59
|
+
Keep top-level `profile` (`light` | `standard` | `full`) and add a top-level `routingDecision` object:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"profile": "standard",
|
|
64
|
+
"routingDecision": {
|
|
65
|
+
"complexity": "moderate",
|
|
66
|
+
"riskFlags": ["behavior-regression"],
|
|
67
|
+
"routingReasons": [
|
|
68
|
+
"The failure needs root-cause analysis before a bounded fix.",
|
|
69
|
+
"Behavior changes require validation and independent review."
|
|
70
|
+
],
|
|
71
|
+
"estimatedWorkPackages": 1,
|
|
72
|
+
"openDecisionCount": 0
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
| Field | Contract |
|
|
78
|
+
|-------|----------|
|
|
79
|
+
| `complexity` | `low` \| `moderate` \| `high`; classify scope and coordination, not perceived coding difficulty |
|
|
80
|
+
| `riskFlags` | Array of concrete signals such as `public-contract`, `cross-layer`, `security-sensitive`, `migration`, `destructive`, `concurrency-state`, `external-dependency`, `unclear-acceptance-criteria`, `broad-test-surface`, `behavior-regression` |
|
|
81
|
+
| `routingReasons` | Non-empty, auditable facts from the request; each reason explains a profile, gate, specialist, skip, or checkpoint choice |
|
|
82
|
+
| `estimatedWorkPackages` | Integer ≥1; count meaningful independently verifiable delivery scopes, not files or agents |
|
|
83
|
+
| `openDecisionCount` | Integer ≥0; unresolved product/architecture/contract choices at routing time |
|
|
84
|
+
|
|
85
|
+
Rubric:
|
|
86
|
+
|
|
87
|
+
- `low`: one bounded scope, explicit acceptance criteria, reversible change, no risk flags or open decisions. Use `light` only when stack verification policy permits.
|
|
88
|
+
- `moderate`: several files or adjacent concerns, a regression/refactor with known boundaries, or one contained risk flag. Usually `standard`.
|
|
89
|
+
- `high`: cross-layer/public-contract work, migration/destructive/security/concurrency risk, broad test surface, multiple work packages, or unclear acceptance criteria. Usually `full`.
|
|
90
|
+
- Increase the profile when risk, open decisions, or required checkpoints demand it; do not lower complexity merely because the implementation is familiar.
|
|
91
|
+
- Do not write generic reasons such as “standard by default.” Name the observed signal and the routing consequence.
|
|
92
|
+
|
|
93
|
+
Existing pipelines without `routingDecision` remain valid; routers emit it for new pipelines. The block is documentary routing evidence in P0 and does not change hook behavior.
|
|
94
|
+
|
|
57
95
|
## Metrics lifecycle
|
|
58
96
|
|
|
59
|
-
For local metrics policy and the `metrics.json` ledger, see **agent-task-metrics**. The
|
|
97
|
+
For local metrics policy and the `metrics.json` ledger, see **agent-task-metrics**. The orchestration runtime records `task_started` and one `attempt_started` before each invocation; the hook records host-clock terminal and human-gate events. Keep active attempt identities in `status.json.activeAttempts` so parallel completions can be bound safely.
|
|
60
98
|
|
|
61
99
|
Do not calculate durations in agents. For parallel steps, never attribute a stop using `currentAgent` alone: use a stable runtime identity, the sole active attempt, or an explicit receipt marked with fallback confidence.
|
|
62
100
|
|
|
101
|
+
## Artifact context index and receipts
|
|
102
|
+
|
|
103
|
+
Each slug has one `artifact-manifest.json`: `.cursor/team/tasks/<slug>/` or `.claude/team/tasks/<slug>/`. The full schema and completion conventions live in **agent-artifact-contracts**.
|
|
104
|
+
|
|
105
|
+
- Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
|
|
106
|
+
- Markdown remains detailed evidence; the manifest points to authoritative paths and records producer, status, timestamps, outcome, and evidence paths.
|
|
107
|
+
- Agents upsert only entries they own and preserve foreign entries. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
|
|
108
|
+
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite unrelated state, gate, retry, attempt, timestamp, or metrics fields.
|
|
109
|
+
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
110
|
+
|
|
63
111
|
## status.json (pipeline mode)
|
|
64
112
|
|
|
65
113
|
```json
|
|
@@ -72,10 +120,19 @@ Do not calculate durations in agents. For parallel steps, never attribute a stop
|
|
|
72
120
|
"state": "in_progress",
|
|
73
121
|
"awaitingHumanGate": false,
|
|
74
122
|
"activeAttempts": {},
|
|
75
|
-
"lastCompletedAttempt": null
|
|
123
|
+
"lastCompletedAttempt": null,
|
|
124
|
+
"parallelCompleted": [],
|
|
125
|
+
"parallelOutcomes": {}
|
|
76
126
|
}
|
|
77
127
|
```
|
|
78
128
|
|
|
129
|
+
| Field | Meaning |
|
|
130
|
+
|-------|---------|
|
|
131
|
+
| `activeAttempts` | Transient timing bridge keyed by `attemptId` |
|
|
132
|
+
| `lastCompletedAttempt` | Diagnostic pointer to the latest finished attempt |
|
|
133
|
+
| `parallelCompleted` | Agents that have stopped in the current parallel step |
|
|
134
|
+
| `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step advances or retries |
|
|
135
|
+
|
|
79
136
|
| state | Meaning |
|
|
80
137
|
|-------|---------|
|
|
81
138
|
| `in_progress` | Current step running |
|
|
@@ -84,6 +141,8 @@ Do not calculate durations in agents. For parallel steps, never attribute a stop
|
|
|
84
141
|
| `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
|
|
85
142
|
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
86
143
|
|
|
144
|
+
On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt (`completed` \| `changes_requested` \| `validation_failed`) when agents left lifecycle fields untouched. Parent orchestrators must wait for that handoff before invoking the next step.
|
|
145
|
+
|
|
87
146
|
## Pipeline step options
|
|
88
147
|
|
|
89
148
|
| Field | Use |
|
|
@@ -99,7 +158,7 @@ Do not calculate durations in agents. For parallel steps, never attribute a stop
|
|
|
99
158
|
2. Read `pipeline.json` before every subagent invocation.
|
|
100
159
|
3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
|
|
101
160
|
4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
|
|
102
|
-
5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`).
|
|
161
|
+
5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`) and update the producer-owned terminal receipt in `artifact-manifest.json`.
|
|
103
162
|
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
|
|
104
163
|
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
105
164
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
@@ -124,7 +183,7 @@ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
|
|
|
124
183
|
- **`strong`** → **never** pass `fast`; rely on agent pin or parent Max model.
|
|
125
184
|
3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
|
|
126
185
|
|
|
127
|
-
After each agent completes,
|
|
186
|
+
After each agent completes, verify its terminal manifest receipt, then let the orchestration runtime/hook reconcile `status.json` (`completed`, a blocking outcome, or `awaiting_approval`) from that receipt. Do not ask the agent to mutate shared lifecycle fields, and do not invoke the next specialist until the hook has written the handoff / updated `status.json`.
|
|
128
187
|
|
|
129
188
|
## Legacy mode
|
|
130
189
|
|
|
@@ -12,8 +12,8 @@ You are the build verifier for **Go hexagonal** services (and for **ai-rules pre
|
|
|
12
12
|
1. Run from module root: `go test ./...`, `go vet ./...`.
|
|
13
13
|
2. If present: `golangci-lint` / `staticcheck` per repo docs (`go-tooling`, `post-change-test`).
|
|
14
14
|
3. Optional `-race` when concurrency touched.
|
|
15
|
-
4. Write `.
|
|
16
|
-
5. On failure:
|
|
15
|
+
4. Write `.claude/team/tasks/<slug>/validation-report.md` with commands + results.
|
|
16
|
+
5. On failure: emit receipt outcome `validation_failed` — do **not** patch production code (developer retries).
|
|
17
17
|
|
|
18
18
|
**Never** require Playwright, XCUITest, `lint:js`/`lint:css`, or `xcodebuild`/`SwiftLint` as the Go gate.
|
|
19
19
|
|
|
@@ -33,3 +33,10 @@ Document PASS/FAIL in `validation-report.md`.
|
|
|
33
33
|
2. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
34
34
|
3. **No react-performance on ios/go/java:** skill directory / required handoff must be absent under ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel → **FAIL** (leakage). Prefer `check:preset-leakage`.
|
|
35
35
|
4. **Rule eval (WARN):** `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` should exist for maintainers; smoke optional. Hard fail only when the opt-in eval job runs — not part of default `check:preset-structure`.
|
|
36
|
+
|
|
37
|
+
## Artifact contract
|
|
38
|
+
|
|
39
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation evidence, pipeline scope, and changed files.
|
|
40
|
+
- **Owned outputs:** `validation-report.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign entries.
|
|
41
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `validation_failed`. Bind it to the supplied `attemptId` when present.
|
|
42
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -33,8 +33,15 @@ Apply skill `code-review` and `code-review-mr.mdc`. Weigh `architecture-boundari
|
|
|
33
33
|
|
|
34
34
|
## Artifact
|
|
35
35
|
|
|
36
|
-
Write `.claude/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHANGES, findings by severity, AC coverage. Update
|
|
36
|
+
Write `.claude/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHANGES, findings by severity, AC coverage. Update the owned terminal receipt accordingly.
|
|
37
37
|
|
|
38
38
|
## Design guidance
|
|
39
39
|
|
|
40
40
|
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
41
|
+
|
|
42
|
+
## Artifact contract
|
|
43
|
+
|
|
44
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation, validation evidence, and the scoped git diff.
|
|
45
|
+
- **Owned outputs:** `review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign entries.
|
|
46
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
|
|
47
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -36,7 +36,7 @@ Implement Go features following hexagonal boundaries.
|
|
|
36
36
|
|
|
37
37
|
When editing ai-rules `presets/**/go/**`, keep Cursor/Claude twins in sync and preserve chain fork ≠ next/ios-swift.
|
|
38
38
|
|
|
39
|
-
Update `.claude/team/tasks/<slug>/implementation.md` and
|
|
39
|
+
Update `.claude/team/tasks/<slug>/implementation.md` and the owned implementation receipt.
|
|
40
40
|
|
|
41
41
|
## Design guidance
|
|
42
42
|
|
|
@@ -45,3 +45,10 @@ Update `.claude/team/tasks/<slug>/implementation.md` and `status.json`.
|
|
|
45
45
|
## Anti-sycophancy discipline
|
|
46
46
|
|
|
47
47
|
- When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
|
|
48
|
+
|
|
49
|
+
## Artifact contract
|
|
50
|
+
|
|
51
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
|
|
52
|
+
- **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign entries.
|
|
53
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
54
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -18,8 +18,15 @@ Use domain, application/ports, driving/driven adapters, composition root — not
|
|
|
18
18
|
|
|
19
19
|
## Gates
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Emit an analysis receipt; the runtime applies any configured human gate.
|
|
22
22
|
|
|
23
23
|
## Design guidance (optional)
|
|
24
24
|
|
|
25
25
|
- Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
|
|
26
|
+
|
|
27
|
+
## Artifact contract
|
|
28
|
+
|
|
29
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
30
|
+
- **Owned outputs:** `brief.md` and `decomposition.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign entries.
|
|
31
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
32
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -10,7 +10,7 @@ You are a task router for a **Go hexagonal backend** agent team. You **do not**
|
|
|
10
10
|
## Inputs
|
|
11
11
|
|
|
12
12
|
- User task description (from `/task` or orchestrator).
|
|
13
|
-
- Optional: existing files under `.
|
|
13
|
+
- Optional: existing files under `.claude/team/tasks/<slug>/`.
|
|
14
14
|
- Pipeline JSON schema — **`agents/README.md`**.
|
|
15
15
|
|
|
16
16
|
## Intent detection
|
|
@@ -39,6 +39,27 @@ You are a task router for a **Go hexagonal backend** agent team. You **do not**
|
|
|
39
39
|
|
|
40
40
|
**Never skip `build-verifier`** after developer when Go sources changed.
|
|
41
41
|
|
|
42
|
+
## Routing decision rubric
|
|
43
|
+
|
|
44
|
+
Keep top-level `profile` and emit this top-level object in every new `pipeline.json`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
"routingDecision": {
|
|
48
|
+
"complexity": "low | moderate | high",
|
|
49
|
+
"riskFlags": [],
|
|
50
|
+
"routingReasons": ["Concrete request signal and its routing consequence."],
|
|
51
|
+
"estimatedWorkPackages": 1,
|
|
52
|
+
"openDecisionCount": 0
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- `low`: one bounded layer/file set, explicit AC, reversible, no risk flags/open decisions → `light` when verification policy permits.
|
|
57
|
+
- `moderate`: adjacent concerns or a regression/refactor with known boundaries → usually `standard`.
|
|
58
|
+
- `high`: cross-layer/public contract, security, migration/destructive or concurrency/state risk, broad integration-test surface, unclear AC, or multiple work packages → usually `full`.
|
|
59
|
+
- Use concrete flags: `public-contract`, `cross-layer`, `security-sensitive`, `migration`, `destructive`, `concurrency-state`, `external-dependency`, `unclear-acceptance-criteria`, `broad-test-surface`, `behavior-regression`.
|
|
60
|
+
- `routingReasons` must be non-empty and explain profile, gates, specialists, skips, or checkpoints; never write “standard by default.”
|
|
61
|
+
- `estimatedWorkPackages` is an integer ≥1; `openDecisionCount` is an integer ≥0. Do not lower complexity because implementation is familiar.
|
|
62
|
+
|
|
42
63
|
## Model tiers (`steps[].model`)
|
|
43
64
|
|
|
44
65
|
Optional: `"model": "cheap" | "standard" | "strong"`. Same policy as other presets:
|
|
@@ -47,7 +68,7 @@ Optional: `"model": "cheap" | "standard" | "strong"`. Same policy as other prese
|
|
|
47
68
|
- `full` / `spike` / security|perf specialists → `strong` on architect, migration, security, perf steps
|
|
48
69
|
- never `strong` on build-verifier / tech-writer / task-router
|
|
49
70
|
|
|
50
|
-
Fixtures: `.
|
|
71
|
+
Fixtures: `.claude/team/fixtures/` (feature-full, feature-light, bugfix-standard).
|
|
51
72
|
|
|
52
73
|
## humanGates (defaults)
|
|
53
74
|
|
|
@@ -62,12 +83,19 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
|
|
|
62
83
|
|
|
63
84
|
## Output
|
|
64
85
|
|
|
65
|
-
Write `.
|
|
86
|
+
Write `.claude/team/tasks/<slug>/pipeline.json` and initialize the routing entry in `artifact-manifest.json`; set `.claude/team/active-task.json`. The orchestration runtime creates and owns `status.json`.
|
|
66
87
|
|
|
67
88
|
## Handoff
|
|
68
89
|
|
|
69
90
|
Intent + steps table + skipped + gates → invoke `steps[0].agent` (unless retro).
|
|
70
91
|
|
|
71
|
-
##
|
|
92
|
+
## Runtime initialization
|
|
93
|
+
|
|
94
|
+
Return the routing receipt to the orchestrator. The orchestration runtime/hook exclusively initializes and updates `status.json`, `metrics.json`, attempt identities, and gate lifecycle; the router does not write those shared runtime files.
|
|
95
|
+
|
|
96
|
+
## Artifact contract
|
|
72
97
|
|
|
73
|
-
|
|
98
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
99
|
+
- **Owned outputs:** `pipeline.json` and the routing manifest entry; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign entries.
|
|
100
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
101
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -24,14 +24,16 @@ description: Route a natural-language task through the agent-team pipeline: task
|
|
|
24
24
|
|
|
25
25
|
## Алгоритм
|
|
26
26
|
|
|
27
|
-
1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit) — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
|
|
27
|
+
1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit); runtime/hook владеет `status.json` — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
|
|
28
28
|
2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
|
|
29
29
|
3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
|
|
30
30
|
4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
|
|
31
|
-
5. **Старт** —
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
31
|
+
5. **Старт** — после router:
|
|
32
|
+
- подтверди `pipeline.json` и `active-task.json`;
|
|
33
|
+
- **не** пиши lifecycle-поля `status.json` / `metrics.json` сам — их владеет orchestration runtime/hook (см. **agent-artifact-contracts**). Если `status.json` отсутствует, допустим только минимальный bootstrap (`slug`, `intent`, `pipelineIndex: 0`, `currentAgent: steps[0]`, `state: in_progress`) — **не** увеличивай `pipelineIndex` вручную;
|
|
34
|
+
- вызови subagent для `pipeline.steps[0].agent` (slug, пути к артефактам, scope).
|
|
35
|
+
6. **После каждого агента** — дождись hook handoff / reconciliation terminal receipt → `status.state`; не запускай следующий шаг, пока `status.json` не отражает handoff (или пока нет `followup_message` от hook).
|
|
36
|
+
7. **Human gate** — если после текущего шага есть gate в `humanGates` (`after:<agent>`), после завершения агента **остановись** и попроси `/task-continue <slug>` (или `/feature-continue <slug>`).
|
|
35
37
|
|
|
36
38
|
## Не делать
|
|
37
39
|
|
|
@@ -50,4 +52,4 @@ description: Route a natural-language task through the agent-team pipeline: task
|
|
|
50
52
|
|
|
51
53
|
## Metrics
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
Runtime/hook owns `metrics.json` and `status.json` attempt ledgers. Before the first invocation ensure `task_started` and one `activeAttempts[attemptId]` + `attempt_started` exist (router/runtime bootstrap — parent must not invent parallel indices). On `/task-continue`, run the installed chain hook `end_human_gate` action (or wrapper) so `human_gate_ended` lands before the next attempt. Do not calculate durations in agents.
|