Skip to content

Commit e83c2a5

Browse files
authored
fix: align story lifecycle release rules (#670)
1 parent 29ff84e commit e83c2a5

6 files changed

Lines changed: 105 additions & 8 deletions

File tree

.claude/rules/story-lifecycle.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ Draft → Ready → InProgress → InReview → Done
1616
|--------|---------|-------|--------|
1717
| Draft | @sm creates story | @sm | Story file created |
1818
| Ready | @po validates (GO) | @po | **MUST update status field in story file from Draft → Ready** |
19-
| InProgress | @dev starts implementation | @dev | Update status field |
20-
| InReview | @dev completes, @qa reviews | @qa | Update status field |
21-
| Done | @qa PASS, @devops pushes | @devops | Update status field |
19+
| InProgress | @dev starts implementation; @qa FAIL returns story | @dev / @qa | **MUST update status field: Ready → InProgress on dev start, or InReview → InProgress on QA FAIL** |
20+
| InReview | @dev completes implementation | @dev | **MUST update status field from InProgress → InReview before QA handoff** |
21+
| Done | @qa PASS, CONCERNS, or WAIVED | @qa | **MUST update status field from InReview → Done before @devops push** |
2222

2323
**CRITICAL:** The `Draft → Ready` transition is the responsibility of @po during `*validate-story-draft`. When verdict is GO (including conditional GO after fixes are applied), @po MUST update the story's Status field to `Ready` and log the transition in the Change Log. A story left in `Draft` after a GO verdict is a process violation.
2424

25+
**CRITICAL:** The `Ready → InProgress` and `InProgress → InReview` transitions are the responsibility of @dev during `*dev-develop-story`. @dev MUST log both transitions in the Change Log using the mandatory status-transition block in `dev-develop-story.md`.
26+
27+
**CRITICAL:** The `InReview → Done` and `InReview → InProgress` transitions are the responsibility of @qa during `*qa-gate`. PASS, CONCERNS, and WAIVED move the story to `Done`; FAIL returns it to `InProgress`. @qa MUST update the story status and Change Log before reporting the gate result.
28+
29+
**CRITICAL:** @devops does not change story status. @devops push/PR/release authority starts only after the story already reflects the QA gate outcome.
30+
2531
## Phase 1: Create (@sm)
2632

2733
**Task:** `create-next-story.md`
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# STORY-123.14: Alinhar ownership de lifecycle com QA gate
2+
3+
## Status
4+
5+
Done
6+
7+
## Story
8+
9+
Como operador do ciclo de desenvolvimento AIOX, quero que a regra `story-lifecycle.md` atribua as transições finais de status ao agente correto, para que `@devops` não seja tratado como responsável por mutar story status depois do QA gate.
10+
11+
## Acceptance Criteria
12+
13+
- [x] AC1. `@dev` aparece como responsável por `Ready → InProgress` e `InProgress → InReview`.
14+
- [x] AC2. `@qa` aparece como responsável por `InReview → Done` em PASS/CONCERNS/WAIVED.
15+
- [x] AC3. `@qa` aparece como responsável por `InReview → InProgress` em FAIL.
16+
- [x] AC4. A regra deixa explícito que `@devops` só atua depois que o status já reflete o resultado do QA gate.
17+
- [x] AC5. A versão do pacote é atualizada para publicação patch.
18+
19+
## Tasks
20+
21+
- [x] Corrigir `.claude/rules/story-lifecycle.md`.
22+
- [x] Bump de patch para `@aiox-squads/core@5.1.10`.
23+
- [x] Validar markdown/rules e pacote antes do PR.
24+
25+
## Dev Notes
26+
27+
- Esta story completa a parte única do PR histórico #543 que não foi coberta pelo recorte #656.
28+
- #656 já incorporou os task files procedurais; este ajuste alinha a regra contextual com o comportamento imperativo atual.
29+
30+
## Validation
31+
32+
- `git diff --check` -> PASS.
33+
- `node -e "..."` version assertion -> PASS (`package.json`, `package-lock.json` root and package entry all `5.1.10`).
34+
- Lifecycle rule assertion script -> PASS.
35+
- `npm run validate:manifest` -> PASS.
36+
- `npm run validate:semantic-lint` -> PASS.
37+
- `npm run validate:publish` -> PASS.
38+
- `npm run lint -- --quiet` -> PASS.
39+
- `npm run typecheck` -> PASS.
40+
- `npm test -- tests/synapse/generate-constitution.test.js --runInBand --forceExit` -> PASS, 1 suite / 29 tests.
41+
- `npm run test:ci` -> PASS, 315 suites / 7.846 tests, 149 skipped.
42+
43+
## File List
44+
45+
- `.claude/rules/story-lifecycle.md`
46+
- `docs/stories/epic-123/STORY-123.14-story-lifecycle-qa-ownership.md`
47+
- `package.json`
48+
- `package-lock.json`
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# STORY-123.15: Alinhar package completeness ao contrato Pro atual
2+
3+
## Status
4+
5+
Done
6+
7+
## Story
8+
9+
Como release manager do AIOX Core, quero que o validador de completude do pacote reflita o contrato atual de publicação, para que ele não bloqueie falsamente releases que incluem o runtime de entitlement Pro exigido pelo próprio publish safety gate.
10+
11+
## Acceptance Criteria
12+
13+
- [x] AC1. `scripts/validate-package-completeness.js` não trata `pro/` como leak genérico.
14+
- [x] AC2. O validador exige `pro/license/license-api.js`, alinhado ao `validate:publish`.
15+
- [x] AC3. O validador continua bloqueando conteúdo local/private como `.env`, `.git/`, `node_modules/`, `.aiox/` e `tests/`.
16+
- [x] AC4. O script passa localmente junto com `validate:publish`.
17+
18+
## Tasks
19+
20+
- [x] Atualizar `scripts/validate-package-completeness.js`.
21+
- [x] Rodar `node scripts/validate-package-completeness.js`.
22+
- [x] Rodar `npm run validate:publish`.
23+
24+
## Dev Notes
25+
26+
- `validate:publish` já exige `pro/` populado e `pro/license/license-api.js` presente. O validador de completude estava herdando um contrato antigo e acusava falso leak.
27+
- Este ajuste não amplia o conteúdo publicado; apenas alinha o script ao `files[]` atual de `package.json`.
28+
29+
## Validation
30+
31+
- `node -c scripts/validate-package-completeness.js` -> PASS.
32+
- `node scripts/validate-package-completeness.js` -> PASS, 30/30 checks.
33+
- `npm run validate:publish` -> PASS.
34+
- `npm run validate:semantic-lint` -> PASS.
35+
- `npm run lint -- --quiet` -> PASS.
36+
- `npm run typecheck` -> PASS.
37+
- `npm run test:ci` -> PASS, 315 suites / 7.846 tests, 149 skipped.
38+
39+
## File List
40+
41+
- `scripts/validate-package-completeness.js`
42+
- `docs/stories/epic-123/STORY-123.15-package-completeness-pro-contract.md`

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aiox-squads/core",
3-
"version": "5.1.9",
3+
"version": "5.1.10",
44
"description": "Synkra AIOX: AI-Orchestrated System for Full Stack Development - Core Framework",
55
"bin": {
66
"aiox": "bin/aiox.js",

scripts/validate-package-completeness.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Validate Package Completeness for npm Publishing
44
*
55
* Ensures the npm tarball contains all critical files and excludes
6-
* private content before publishing. Runs as prepublishOnly hook.
6+
* local/private development content before publishing.
77
*
88
* @script scripts/validate-package-completeness.js
99
* @story INS-2 - Release Pipeline: Preview to Latest
@@ -44,13 +44,14 @@ const REQUIRED_PATHS = [
4444
'.aiox-core/constitution.md',
4545
'.aiox-core/development/agents/',
4646
'.aiox-core/development/tasks/',
47+
// Pro entitlement runtime is intentionally shipped with core.
48+
'pro/license/license-api.js',
4749
];
4850

4951
/**
5052
* Paths that MUST NOT appear in the tarball (leak prevention).
5153
*/
5254
const EXCLUDED_PATHS = [
53-
'pro/',
5455
'.env',
5556
'.git/',
5657
'node_modules/',

0 commit comments

Comments
 (0)