Skip to content

Commit b9160ba

Browse files
authored
Merge pull request #275 from Fr-e-d/contrib/sync-1777587433
sync: update 2 file(s) in core/
2 parents 4d9f937 + 6325405 commit b9160ba

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

.gaai/core/skills/discovery/generate-stories/SKILL.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,20 @@ Stories are the **contract between Discovery and Delivery**. They must be the ma
8989

9090
12. **MANDATORY — Register in backlog.** After writing all story files, add each story to `contexts/backlog/active.backlog.yaml` with:
9191
- `id`, `epic`, `title` (from story frontmatter)
92-
- `status: refined` (if validated) or `status: draft` (if pending validation)
92+
- **`status` per gate state — STRICT**:
93+
- `status: draft` if EITHER `validate-artefacts` OR Reviewer Tier 2 has not yet returned PASS (cycle 1 or 2) for this specific story. This is the default for any story registered before its own gates have completed.
94+
- `status: refined` ONLY after BOTH gates have returned PASS. Promote `draft → refined` as a separate backlog write (not bundled with the initial registration).
95+
- **Never register as `refined` "for now" while still iterating** — the delivery daemon polls `active.backlog.yaml` for `refined` items and dispatches them immediately, snapshotting whatever is in the worktree at dispatch time. Refined-while-iterating creates a race condition where un-reviewed cycle-0 drafts (with potentially CRITICAL-severity factual errors) can be picked up before cycle-1 corrections land.
96+
- **For batch Discovery (multiple stories drafted together):** register all as `draft` initially. Run gates per story (the sequencing rule of step 10 still applies). Promote each to `refined` individually once its own cycle ends in PASS. Never bulk-promote at the end of a batch.
9397
- `priority` (derived from Epic priority or explicit input)
9498
- `artefact` path pointing to the story file
9599
- `dependencies` (from story frontmatter `depends_on` or Epic execution order)
96-
- `notes` (source context — e.g., Discovery session date, governing DEC)
100+
- `notes` (source context — e.g., Discovery session date, governing DEC ; include gate trail once available)
97101

98102
**A story that exists only as an artefact file but is not in the backlog is invisible to Delivery and will never be executed.** This step is non-negotiable.
99103

104+
**Rationale (2026-04-30):** E134S03 + E134S04 had to be rolled back from `in_progress` (with abandoned worktree containing cycle-0 CRITICAL-error spec) because Discovery registered them as `refined` while still iterating Reviewer cycle-1 corrections. The daemon picked up the un-reviewed drafts and started implementing architecturally wrong code (proposed a redundant CLI surface that already existed, referenced a non-existent artefact name). See commit `4f99ad40` for incident audit trail. The fix is strict adherence to the `draft → refined` lifecycle defined in `base.rules.md` § Backlog State Lifecycle — this clause makes the timing explicit at skill level.
105+
100106
**CRITICAL — Backlog YAML write safety (MUST follow):**
101107
- **Match native indentation.** Before appending, check the existing format: `grep -m1 "^- id:" <backlog>`. Use the same indent level (typically 0-space: `- id:` with 2-space properties).
102108
- **Never use `yaml.dump()`** to rewrite the file. It destroys comments, changes quotes, and alters indentation. Use line-by-line append or the scheduler (`backlog-scheduler.sh --set-status`, `--set-field`).

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
---
99

10+
## [2.22.0] - 2026-05-01
11+
12+
### Changed
13+
- chore(skill): clarify generate-stories §12 draft→refined lifecycle (E134S03/S04 incident)
14+
- fix(monitor): sub-agent / spawned model wins in display
15+
- fix(workflow): remove --log-file flag from nested-claude-spawn invocation
16+
- fix(monitor): filter raw NDJSON lines from top banner
17+
- chore: bump local VERSION to v2.22.0 [sync]
18+
- chore: reconcile stale in_progress + add GLM baseline analyzer
19+
- fix(delivery-loop): preamble fires on env-driven default secondary routing
20+
- chore: bump local VERSION to v2.23.0 [sync]
21+
- feat(scripts): observe-secondary.sh — live R1-R5 compliance + outcomes
22+
- fix(daemon-monitor): cap activity line at 280 chars to prevent heredoc flooding
23+
- feat(delivery-loop): NOTES.md self-bootstrapping + artefact-first-class path
24+
- chore: bump local VERSION to v2.26.0 [sync]
25+
- feat(delivery-loop): upgrade GLM context-discipline preamble per Anthropic guidance
26+
- chore: bump local VERSION to v2.25.0 [sync]
27+
- feat(delivery-loop): GLM context-discipline preamble for secondary routing
28+
- fix(analyzer): surface stdout terminal_reason + jq capture no-match handling
29+
- chore: bump local VERSION to v2.24.0 [sync]
30+
- fix(scripts): clean routing summary in fail-debug analyzer
31+
- feat(E107bS04): severity-weighted tie-breaker — top 5 by severity (#582)
32+
- chore: bump local VERSION to v2.28.0 [sync]
33+
- feat(scripts): minimal fail-debug analyzer
34+
- chore: bump local VERSION to v2.27.0 [sync]
35+
- feat(nested-claude-spawn): forensic dump on EXIT_CODE_NON_ZERO catch-all
36+
- fix(daemon-monitor): persist max-rank phase across tail-window refreshes
37+
- fix(scheduler): make YAML parser indent-aware
38+
- feat(daemon): add --exit-when-idle auto-stop when backlog drained
39+
- feat(E107bS08): User-skip telemetry — count + skip reason (#557)
40+
- fix(workflow): restore secondary path — strengthen CLI invocation mandate + remove orphan Task spawn instruction
41+
- fix(impl-routing): apply Claude Code proxy / gateway compat flags for secondary path
42+
- fix(impl-routing): add Haiku model mapping for secondary path Task sub-agents
43+
- fix(impl-routing): apply Z.AI-recommended CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000
44+
- fix(impl-routing): apply Z.AI-recommended API_TIMEOUT_MS=3000000 for secondary path
45+
- feat(E107bS09): streaming progress UX during Q&A (#543)
46+
- fix(monitor): monotone phase state machine + tighten nested regex + (sub) model annotation
47+
- feat(monitor): add WORKING fallback phase for active coding without specific marker
48+
- fix(monitor): render model id as-is instead of short-label formatting
49+
- feat(monitor): show active model on Phase line + double-space emoji gap
50+
- feat(E107bS05): abort-safe handler — Stage 4 pre-loop skip option (#518)
51+
- feat(E107bS03): ambiguity detector — heuristic + AST signal severity scoring (#516)
52+
- feat(E107bS02): qa-loop-ui skill — sequential Q&A loop with skip, skip-all, partial-answer preservation (#514)
53+
- feat(E107bS01): smart-question-generator skill — ranked questions from ambiguity feed (#500)
54+
- chore(daemon): add agent_exit phase logging for DEC-72 wrapper audit trail
55+
56+
1057
## [2.22.0] - 2026-04-30
1158

1259
### Changed

0 commit comments

Comments
 (0)