valent-pipeline 0.2.19 → 0.2.20
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/package.json +1 -1
- package/pipeline/docs/lead-lifecycle.md +1 -1
- package/pipeline/prompts/knowledge.md +2 -0
- package/pipeline/prompts/lead.md +16 -3
- package/pipeline/steps/orchestration/sprint-execute.md +3 -2
- package/pipeline/steps/orchestration/sprint-size.md +17 -14
- package/skills/valent-run-epic/SKILL.md +1 -1
- package/skills/valent-run-project/SKILL.md +1 -1
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@ The lead watches the board, not the work. It reads the shared task list to track
|
|
|
71
71
|
|
|
72
72
|
### Heartbeat Timer
|
|
73
73
|
|
|
74
|
-
At the start of Phase 2, the lead creates a `CronCreate` job that fires every 4 minutes (aligned within Claude's 5-minute prompt cache TTL for near-zero token cost). Each heartbeat triggers a liveness check: call `TaskList`, verify at least one non-Knowledge agent is `in_progress`. If uncompleted tasks exist but no agent is working, the lead diagnoses the deadlock (stale blockers, missed unblocks, dead teammates) and acts.
|
|
74
|
+
At the start of Phase 2, the lead creates a `CronCreate` job that fires every 4 minutes (aligned within Claude's 5-minute prompt cache TTL for near-zero token cost). Each heartbeat triggers a liveness check: call `TaskList`, verify at least one non-Knowledge agent is `in_progress`. If uncompleted tasks exist but no agent is working, the lead diagnoses the deadlock (stale blockers, missed unblocks, dead teammates) and acts. A separate 4-minute keep-alive ping is created for the Knowledge agent to prevent its prompt cache from expiring during idle periods. Both cron jobs are deleted during Phase 3 teardown.
|
|
75
75
|
|
|
76
76
|
### What the Lead Watches
|
|
77
77
|
|
|
@@ -50,6 +50,8 @@ Verify ChromaDB at `{chromadb_host}` using v2 API. Base path: `{chromadb_host}/a
|
|
|
50
50
|
## Query Handling
|
|
51
51
|
|
|
52
52
|
For each incoming query:
|
|
53
|
+
|
|
54
|
+
0. If query is `cache-keepalive`: respond `[KNOWLEDGE-RESPONSE] ack` and stop. This is a prompt cache keep-alive ping — do not search.
|
|
53
55
|
1. Search correction directives for relevant entries
|
|
54
56
|
2. Search curated knowledge files for matching sections
|
|
55
57
|
3. If database connected (SQLite mode): query using the CLI tool and read stdout for results:
|
package/pipeline/prompts/lead.md
CHANGED
|
@@ -445,6 +445,19 @@ CronCreate:
|
|
|
445
445
|
|
|
446
446
|
This fires every 4 minutes — aligned to stay within Claude's 5-minute prompt cache TTL so each heartbeat is near-zero cost. Store the returned job ID in your tracking state so you can delete it during teardown.
|
|
447
447
|
|
|
448
|
+
### Knowledge Cache Keep-Alive
|
|
449
|
+
|
|
450
|
+
Knowledge is a long-lived reactive agent that can sit idle for extended periods between queries. To prevent its prompt cache from expiring (5-minute TTL), create a separate recurring ping:
|
|
451
|
+
|
|
452
|
+
```
|
|
453
|
+
CronCreate:
|
|
454
|
+
cron: "*/4 * * * *"
|
|
455
|
+
prompt: "[KNOWLEDGE-QUERY] cache-keepalive"
|
|
456
|
+
recurring: true
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
Send this to Knowledge's inbox (not to Lead). Knowledge will respond with a no-op `[KNOWLEDGE-RESPONSE]` — the round-trip keeps the cache warm. Store the job ID alongside the heartbeat job ID and delete both during teardown.
|
|
460
|
+
|
|
448
461
|
### Heartbeat Liveness Check
|
|
449
462
|
|
|
450
463
|
When you receive a `[HEARTBEAT]` message:
|
|
@@ -611,7 +624,7 @@ All agent outputs persist in `{story_output_dir}`: handoff files, reviews, bug r
|
|
|
611
624
|
JUDGE writes `story-report.md` as part of its SHIP verdict (Step 14b). Verify the file exists in `{story_output_dir}`. If missing (JUDGE error), write it yourself using the template at `.valent-pipeline/templates/story-report.template.md`.
|
|
612
625
|
|
|
613
626
|
### Step 4: Tear Down Heartbeat and Teammates
|
|
614
|
-
Delete the heartbeat cron
|
|
627
|
+
Delete the heartbeat and Knowledge cache keep-alive cron jobs using `CronDelete` with their stored job IDs. Then tear down all per-story teammates. Send `shutdown_request` to each individually.
|
|
615
628
|
|
|
616
629
|
**Knowledge Agent exception:** If `{is_epic_run}` is true, do NOT tear down the Knowledge Agent. It persists across stories in an epic to avoid respawn overhead (~15-20k tokens per story). It will receive a `[STORY-RESET]` at the next story's kick-off. Tear down Knowledge only at epic completion (final story in the epic).
|
|
617
630
|
|
|
@@ -697,14 +710,14 @@ Read each orchestration step file in sequence:
|
|
|
697
710
|
|
|
698
711
|
1. `.valent-pipeline/steps/orchestration/sprint-init.md` — compute velocity, resolve candidates, set sprint state
|
|
699
712
|
2. `.valent-pipeline/steps/orchestration/sprint-groom.md` — spawn Phase 1 agents, pipeline stories through REQS → UXA → QA-A → READINESS (assembly-line parallelism), rework loop, index to SQLite
|
|
700
|
-
3. `.valent-pipeline/steps/orchestration/sprint-size.md` — spawn BEND/FEND with
|
|
713
|
+
3. `.valent-pipeline/steps/orchestration/sprint-size.md` — spawn BEND/FEND with estimate step first, assign Fibonacci points, agents persist into execution
|
|
701
714
|
4. `.valent-pipeline/steps/orchestration/sprint-plan.md` — greedy packing by priority, write sprint plan + status YAML, validate, kill Phase 1 agents
|
|
702
715
|
5. `.valent-pipeline/steps/orchestration/sprint-execute.md` — execute stories sequentially with budget enforcement, Phase 2 agents per story, update status YAML in real-time
|
|
703
716
|
6. `.valent-pipeline/steps/orchestration/sprint-review.md` — diff planned vs actuals, record calibration data, trigger retrospective, check for next sprint
|
|
704
717
|
|
|
705
718
|
**Key differences from story mode:**
|
|
706
719
|
- Phase 1 agents (REQS, UXA, QA-A, READINESS) stay alive during grooming batch, killed before execution
|
|
707
|
-
- Phase 2 agents
|
|
720
|
+
- Phase 2 agents: BEND/FEND persist from sizing into story 1, then killed and respawned fresh for story 2+. CRITIC, QA-B, JUDGE spawned fresh per story.
|
|
708
721
|
- Grooming indexes to `artifacts_working` table; execution queries `artifacts` (main table)
|
|
709
722
|
- Budget enforcement: check cumulative execution time before each story start
|
|
710
723
|
- Retrospective fires at sprint boundary, not story count
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Condition:** Only execute in sprint mode (`{is_sprint_mode}` is true).
|
|
4
4
|
|
|
5
|
-
Execute sprint stories sequentially.
|
|
5
|
+
Execute sprint stories sequentially. BEND/FEND persist from the sizing phase into story 1. CRITIC, QA-B, and JUDGE are spawned fresh for story 1. For story 2+, all Phase 2 agents are spawned fresh and killed after each.
|
|
6
6
|
|
|
7
7
|
## For Each Sprint Story (Sequential)
|
|
8
8
|
|
|
@@ -22,7 +22,8 @@ For each story in sprint order:
|
|
|
22
22
|
1. Update story status to `development` in both `{backlog_path}` and `sprint-{n}-status.yaml`
|
|
23
23
|
2. Execute the standard story flow:
|
|
24
24
|
- Create story branch
|
|
25
|
-
-
|
|
25
|
+
- **Story 1:** BEND/FEND already alive from sizing — spawn only CRITIC, QA-B, JUDGE fresh. Send implementation context to existing BEND/FEND.
|
|
26
|
+
- **Story 2+:** Spawn all Phase 2 agents fresh per the task graph (BEND, FEND, CRITIC, QA-B, JUDGE)
|
|
26
27
|
- Agents query Knowledge/SQLite for grooming context (NOT in-context from Phase 1)
|
|
27
28
|
- Monitor execution, handle rejections, gate verdicts
|
|
28
29
|
- On JUDGE SHIP: merge branch, record actuals
|
|
@@ -2,33 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
**Condition:** Only execute in sprint mode (`{is_sprint_mode}` is true).
|
|
4
4
|
|
|
5
|
-
## Step 1: Spawn
|
|
5
|
+
## Step 1: Spawn BEND/FEND
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Scan groomed stories' `testing_profiles` in `{backlog_path}`:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- Spawn BEND if any groomed story has `api` or `data-pipeline` in `testing_profiles`
|
|
10
|
+
- Spawn FEND if any groomed story has `ui` in `testing_profiles`
|
|
10
11
|
|
|
11
|
-
Pass `{estimation_model}` and `{correction_directives}` (calibration directives) in the spawn context.
|
|
12
|
+
Spawn with their normal prompt template and pass `.valent-pipeline/steps/{agent}/estimate.md` as the first step. Pass `{estimation_model}` and `{correction_directives}` (calibration directives) in the spawn context.
|
|
13
|
+
|
|
14
|
+
These agents persist into execution — they are NOT killed after sizing.
|
|
12
15
|
|
|
13
16
|
## Step 2: Size Each Groomed Story
|
|
14
17
|
|
|
15
18
|
For each story with status `groomed`:
|
|
16
19
|
|
|
17
20
|
1. Update status to `sizing` in `{backlog_path}`
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
|
|
21
|
+
2. Read story's `testing_profiles` from `{backlog_path}`
|
|
22
|
+
3. Dispatch based on profiles:
|
|
23
|
+
- `[api]` or `[data-pipeline]`: send story context to BEND only
|
|
24
|
+
- `[ui]` only: send story context to FEND only
|
|
25
|
+
- `[api, ui]` (fullstack): send story context to both BEND and FEND
|
|
26
|
+
4. Agents write estimation files (`bend-estimation.md` and/or `fend-estimation.md`)
|
|
21
27
|
5. **Record points:**
|
|
22
|
-
- Backend-only: `story_points = BEND estimate`
|
|
23
|
-
-
|
|
28
|
+
- Backend-only (`[api]`): `story_points = BEND estimate`
|
|
29
|
+
- Frontend-only (`[ui]`): `story_points = FEND estimate`
|
|
30
|
+
- Fullstack (`[api, ui]`): `story_points = BEND estimate + FEND estimate`
|
|
24
31
|
- Data-pipeline: `story_points = BEND estimate`
|
|
25
32
|
6. Update story's `story_points` field in `{backlog_path}`
|
|
26
33
|
|
|
27
|
-
## Step 3:
|
|
28
|
-
|
|
29
|
-
In epic/project mode: kill BEND and FEND after sizing all stories. They will be respawned fresh per story during execution (each story needs clean code context).
|
|
30
|
-
|
|
31
|
-
## Step 4: Update Sprint State
|
|
34
|
+
## Step 3: Update Sprint State
|
|
32
35
|
|
|
33
36
|
Update `pipeline-state.json`: `current_sprint.phase = "planning"`.
|
|
34
37
|
|
|
@@ -97,7 +97,7 @@ Phase 1 agents (REQS, UXA, QA-A, READINESS) stay alive across the grooming batch
|
|
|
97
97
|
|
|
98
98
|
Read and follow `.valent-pipeline/steps/orchestration/sprint-size.md`.
|
|
99
99
|
|
|
100
|
-
BEND/FEND estimate Fibonacci points per story.
|
|
100
|
+
BEND/FEND estimate Fibonacci points per story (filtered by `testing_profiles`). Agents persist into story 1 execution.
|
|
101
101
|
|
|
102
102
|
#### 4f. Sprint Planning
|
|
103
103
|
|
|
@@ -111,7 +111,7 @@ Phase 1 agents (REQS, UXA, QA-A, READINESS) stay alive across the grooming batch
|
|
|
111
111
|
|
|
112
112
|
Read and follow `.valent-pipeline/steps/orchestration/sprint-size.md`.
|
|
113
113
|
|
|
114
|
-
BEND/FEND estimate Fibonacci points per story.
|
|
114
|
+
BEND/FEND estimate Fibonacci points per story (filtered by `testing_profiles`). Agents persist into story 1 execution.
|
|
115
115
|
|
|
116
116
|
#### 4f. Sprint Planning
|
|
117
117
|
|