@hanzlaa/rcode 3.6.14 → 3.6.16
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/AGENTS.md +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +3 -3
- package/cli/index.js +5 -1
- package/cli/lib/manifest.cjs +51 -43
- package/dist/rcode.js +32 -35
- package/package.json +3 -2
- package/rihal/bin/rihal-tools.cjs +20 -0
- package/rihal/commands/add-todo.md +1 -1
- package/rihal/commands/check-implementation-readiness.md +18 -0
- package/rihal/commands/create-architecture.md +18 -0
- package/rihal/commands/debug.md +1 -1
- package/rihal/commands/edit-prd.md +18 -0
- package/rihal/commands/execute-milestone.md +2 -2
- package/rihal/commands/memory-audit.md +1 -1
- package/rihal/commands/memory-distill.md +1 -1
- package/rihal/commands/memory-init.md +1 -1
- package/rihal/commands/memory-update.md +1 -1
- package/rihal/commands/plan-milestone.md +2 -2
- package/rihal/commands/progress.md +1 -1
- package/rihal/commands/resume-work.md +1 -1
- package/rihal/commands/retrospective.md +18 -0
- package/rihal/commands/review-edge-case-hunter.md +18 -0
- package/rihal/commands/scaffold-milestone.md +2 -2
- package/rihal/commands/scaffold-project.md +18 -0
- package/rihal/commands/validate-prd.md +18 -0
- package/rihal/references/agent-contracts.md +46 -20
- package/rihal/references/model-profile-resolution.md +41 -5
- package/rihal/references/phase-argument-parsing.md +31 -7
- package/rihal/references/revision-loop.md +36 -9
- package/rihal/references/universal-anti-patterns.md +56 -12
- package/rihal/skills/SKILLS_INDEX.md +34 -5
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/SKILL.md +1 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/SKILL.md +1 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/SKILL.md +1 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/SKILL.md +1 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +1 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/workflow.md +12 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +1 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/SKILL.md +1 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/SKILL.md +1 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/SKILL.md +1 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-correct-course/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +3 -17
- package/rihal/skills/actions/4-implementation/rihal-dev-story/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-dev-story/workflow.md +13 -0
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-retrospective/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-retrospective/workflow.md +12 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +1 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/workflow.md +12 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/SKILL.md +1 -0
- package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +1 -0
- package/rihal/skills/agents/dalil-scout/SKILL.md +1 -0
- package/rihal/skills/agents/fatima-qa/SKILL.md +1 -0
- package/rihal/skills/agents/haitham-frontend/SKILL.md +1 -0
- package/rihal/skills/agents/hanzla-engineer/SKILL.md +1 -0
- package/rihal/skills/agents/hussain-pm/SKILL.md +1 -0
- package/rihal/skills/agents/hussain-sm/SKILL.md +1 -0
- package/rihal/skills/agents/layla-designer/SKILL.md +1 -0
- package/rihal/skills/agents/majlis-council/SKILL.md +1 -0
- package/rihal/skills/agents/mariam-marketing/SKILL.md +1 -0
- package/rihal/skills/agents/nasser-eng-manager/SKILL.md +1 -0
- package/rihal/skills/agents/noor-writer/SKILL.md +1 -0
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +1 -0
- package/rihal/skills/agents/rihal-cross-platform-auditor/SKILL.md +1 -0
- package/rihal/skills/agents/rihal-dep-auditor/SKILL.md +1 -0
- package/rihal/skills/agents/rihal-deviation-analyzer/SKILL.md +1 -0
- package/rihal/skills/agents/rihal-i18n-auditor/SKILL.md +1 -0
- package/rihal/skills/agents/rihal-observability-auditor/SKILL.md +1 -0
- package/rihal/skills/agents/sadiq-analyst/SKILL.md +1 -0
- package/rihal/skills/agents/waleed-architect/SKILL.md +1 -0
- package/rihal/skills/agents/yousef-backend/SKILL.md +1 -0
- package/rihal/skills/agents/zahra-branding/SKILL.md +1 -0
- package/rihal/skills/agents/zayd-ml/SKILL.md +1 -0
- package/rihal/skills/core/rihal-init/SKILL.md +1 -1
- package/rihal/skills/core/rihal-memory-audit/SKILL.md +5 -5
- package/rihal/skills/core/rihal-memory-distill/SKILL.md +5 -5
- package/rihal/skills/core/rihal-memory-init/SKILL.md +7 -7
- package/rihal/skills/core/rihal-memory-update/SKILL.md +4 -4
- package/rihal/team.yaml +56 -0
- package/rihal/templates/UAT.md +69 -18
- package/rihal/templates/memory/INDEX.md +2 -2
- package/rihal/templates/memory/distillates/project.distillate.md +2 -2
- package/rihal/templates/memory/distillates/stack.distillate.md +2 -2
- package/rihal/templates/memory/project/stack.md +1 -1
- package/rihal/templates/summary.md +54 -37
- package/rihal/templates/verification-report.md +72 -17
- package/rihal/workflows/autonomous.md +2 -2
- package/rihal/workflows/create-prd.md +1 -1
- package/rihal/workflows/diagnose-issues.md +75 -22
- package/rihal/workflows/discuss-phase.md +1 -1
- package/rihal/workflows/edit-prd.md +1 -1
- package/rihal/workflows/health.md +6 -6
- package/rihal/workflows/help.md +0 -1
- package/rihal/workflows/memory-audit.md +2 -2
- package/rihal/workflows/memory-distill.md +2 -2
- package/rihal/workflows/memory-init.md +2 -2
- package/rihal/workflows/memory-update.md +2 -2
- package/rihal/workflows/research-phase.md +1 -1
- package/rihal/workflows/scaffold-project.md +1 -1
- package/rihal/workflows/validate-prd.md +2 -2
- package/rihal/workflows/verify-work.md +1 -1
- package/server/lib/html/client/components/App.js +56 -19
- package/server/lib/html/client/components/Sidebar.js +13 -0
- package/server/lib/html/client/components/Topbar.js +6 -3
- package/server/lib/html/client/store.js +30 -0
- package/server/lib/html/client/util.js +0 -10
- package/server/lib/html/client/views/FilesView.js +4 -1
- package/server/lib/html/client/views/KanbanView.js +15 -4
- package/server/lib/html/client/views/MemoryView.js +6 -6
- package/server/lib/html/client/views/OrchestrationView.js +12 -2
- package/server/lib/html/client/views/OverviewView.js +44 -4
- package/server/lib/html/client.js +7 -0
- package/server/lib/html/css.js +16 -0
- package/server/lib/scanner.js +7 -2
package/rihal/templates/UAT.md
CHANGED
|
@@ -1,29 +1,80 @@
|
|
|
1
|
-
# UAT —
|
|
1
|
+
# UAT.md — User Acceptance Test Template
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
**Generated:** {{date}}
|
|
3
|
+
Each phase produces a UAT.md alongside its SUMMARY.md. UAT documents how a non-developer can verify the phase delivered what it promised.
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## Frontmatter
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```yaml
|
|
8
|
+
---
|
|
9
|
+
phase: NN
|
|
10
|
+
phase_name: <slug>
|
|
11
|
+
generated: <ISO date>
|
|
12
|
+
status: pending | passed | partial | diagnosed | blocked | skipped | human_needed
|
|
13
|
+
last_run: <ISO date>
|
|
14
|
+
---
|
|
15
|
+
```
|
|
10
16
|
|
|
11
|
-
##
|
|
17
|
+
## Sections
|
|
12
18
|
|
|
13
|
-
###
|
|
19
|
+
### Phase goal (verbatim from ROADMAP.md)
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
1. {{action}}
|
|
17
|
-
2. {{action}}
|
|
21
|
+
One paragraph copied straight from the phase's roadmap entry. No paraphrase.
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
**Status:** ⏸
|
|
21
|
-
**Notes:**
|
|
23
|
+
### What to verify
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
A bullet list. Each bullet is one observable behavior:
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
- ✅ **<feature>** — open <screen / endpoint / file>, do <action>, observe <expected outcome>
|
|
28
|
+
- ✅ **<feature>** — run `<exact command>`, expect output containing `<exact substring>`
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
Every bullet must be runnable without reading the source code.
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
### Setup steps
|
|
33
|
+
|
|
34
|
+
If the verifier needs to seed data, set env vars, or start services:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# 1. install
|
|
38
|
+
npx @hanzlaa/rcode install
|
|
39
|
+
# 2. seed
|
|
40
|
+
node .rihal/bin/rihal-tools.cjs ...
|
|
41
|
+
# 3. ready
|
|
42
|
+
open http://localhost:3000/foo
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Per-criterion result
|
|
46
|
+
|
|
47
|
+
After running, fill in:
|
|
48
|
+
|
|
49
|
+
| # | Criterion | Result | Notes |
|
|
50
|
+
|---|-----------|:------:|-------|
|
|
51
|
+
| 1 | <copy from "What to verify"> | ✅ / ⚠️ / ❌ | <one line> |
|
|
52
|
+
| 2 | ... | ... | ... |
|
|
53
|
+
|
|
54
|
+
### Outstanding items
|
|
55
|
+
|
|
56
|
+
Anything that could not be verified, or where the verifier hit a blocker:
|
|
57
|
+
|
|
58
|
+
- **<criterion>**: status = `blocked` because <reason>; needs <action> from <owner>.
|
|
59
|
+
|
|
60
|
+
### Sign-off
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Verified by: <name>
|
|
64
|
+
Date: <ISO>
|
|
65
|
+
Verdict: PASSED | PARTIAL | FAILED
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Status values
|
|
69
|
+
|
|
70
|
+
- `pending` — UAT.md generated but not yet run.
|
|
71
|
+
- `passed` — every criterion green.
|
|
72
|
+
- `partial` — some criteria green, some not. Note which.
|
|
73
|
+
- `diagnosed` — failed criteria have a known cause + a fix is in flight.
|
|
74
|
+
- `blocked` — failed criteria need external work (data, infra, API access).
|
|
75
|
+
- `skipped` — verifier intentionally did not run a criterion (with reason).
|
|
76
|
+
- `human_needed` — automated check inconclusive; needs subjective human judgment.
|
|
77
|
+
|
|
78
|
+
## Audit
|
|
79
|
+
|
|
80
|
+
`/rihal:audit-uat` aggregates UAT.md files across all phases and surfaces outstanding items in one report.
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
- **`project/decisions.md`** — append every architectural choice as it's made
|
|
38
38
|
- **`milestones/current.md`** — update on milestone phase transitions
|
|
39
39
|
- **`incidents/known-issues.md`** — add when a workaround ships, remove when a real fix lands
|
|
40
|
-
- **`distillates/`** — regenerate via `/
|
|
41
|
-
- **Whole bank** — audit via `/
|
|
40
|
+
- **`distillates/`** — regenerate via `/rihal-memory-distill` when source files change
|
|
41
|
+
- **Whole bank** — audit via `/rihal-memory-audit` at every milestone close
|
|
42
42
|
|
|
43
43
|
## Constraints
|
|
44
44
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
generated: true
|
|
3
3
|
do-not-edit: true
|
|
4
|
-
regenerate-with: /
|
|
4
|
+
regenerate-with: /rihal-memory-distill
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Project Distillate — `{{PROJECT_NAME}}`
|
|
8
8
|
|
|
9
9
|
> Generated, lossless compression of `project/`, `people/`, `milestones/current.md`, and `incidents/known-issues.md`. Optimised for LLM context loading. Hand-edits are overwritten on regenerate.
|
|
10
10
|
|
|
11
|
-
_(Run `/
|
|
11
|
+
_(Run `/rihal-memory-distill` to populate.)_
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
generated: true
|
|
3
3
|
do-not-edit: true
|
|
4
|
-
regenerate-with: /
|
|
4
|
+
regenerate-with: /rihal-memory-distill
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Stack Distillate — `{{PROJECT_NAME}}`
|
|
8
8
|
|
|
9
9
|
> Generated, lossless compression of `project/stack.md` only. Useful when you need stack context but not full project history.
|
|
10
10
|
|
|
11
|
-
_(Run `/
|
|
11
|
+
_(Run `/rihal-memory-distill --target stack` to populate.)_
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Stack — `{{PROJECT_NAME}}`
|
|
2
2
|
|
|
3
|
-
Inventory of languages, frameworks, libraries, and services. Refreshed via `/
|
|
3
|
+
Inventory of languages, frameworks, libraries, and services. Refreshed via `/rihal-memory-update` when stack changes.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,60 +1,77 @@
|
|
|
1
|
+
# SUMMARY.md Template
|
|
2
|
+
|
|
3
|
+
Each plan or sprint task produces a SUMMARY.md when it completes. The summary is the unit of work's lasting record — what was done, why, what remains, what other work it affects.
|
|
4
|
+
|
|
5
|
+
## Frontmatter
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
1
8
|
---
|
|
2
|
-
phase:
|
|
3
|
-
|
|
4
|
-
|
|
9
|
+
phase: NN
|
|
10
|
+
plan: NN.M # if applicable
|
|
11
|
+
sprint: N # if applicable
|
|
12
|
+
story_id: NN.M # if dev-story produced this
|
|
13
|
+
generated: <ISO date>
|
|
14
|
+
status: complete | partial | blocked
|
|
15
|
+
verified: false # flips to true after /rihal:verify-work passes
|
|
5
16
|
---
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Sections
|
|
20
|
+
|
|
21
|
+
### One-liner
|
|
22
|
+
|
|
23
|
+
A single line describing what was accomplished. Goes into `/rihal:progress` recent-work bullets, council recaps, milestone summaries. Be specific:
|
|
24
|
+
|
|
25
|
+
> ❌ "Added some dashboard improvements"
|
|
26
|
+
> ✅ "Wired live engagement metrics to dashboard top-3 tweets card; updates every 30s via SSE"
|
|
6
27
|
|
|
7
|
-
|
|
28
|
+
### Outcomes
|
|
8
29
|
|
|
9
|
-
|
|
30
|
+
What changed as a result of this work, observable from outside:
|
|
10
31
|
|
|
11
|
-
|
|
12
|
-
**Closed:** {{closed_at}}
|
|
13
|
-
**Sprint:** SPRINT.md
|
|
32
|
+
- ...
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
### Files touched
|
|
16
35
|
|
|
17
|
-
|
|
36
|
+
```
|
|
37
|
+
src/dashboard/Card.tsx new
|
|
38
|
+
src/dashboard/index.tsx modified — added engagement subscription
|
|
39
|
+
src/lib/sse.ts new — SSE client wrapper
|
|
40
|
+
test/dashboard.test.ts new — 4 tests
|
|
41
|
+
```
|
|
18
42
|
|
|
19
|
-
|
|
43
|
+
### Decisions
|
|
20
44
|
|
|
21
|
-
|
|
22
|
-
- {{key choices and their rationale}}
|
|
45
|
+
Decisions made during execution that aren't already in `state.decisions[]`:
|
|
23
46
|
|
|
24
|
-
|
|
47
|
+
- **<decision>**: chose A over B because <one-line reason>. Tradeoff: <what we gave up>.
|
|
25
48
|
|
|
26
|
-
|
|
27
|
-
- {{anything that diverged from SPRINT.md and why}}
|
|
49
|
+
### Issues encountered
|
|
28
50
|
|
|
29
|
-
|
|
51
|
+
Problems hit during execution and how they were resolved:
|
|
30
52
|
|
|
31
|
-
|
|
32
|
-
- {{tasks pruned, escalated, or skipped}}
|
|
53
|
+
- **<problem>**: <one-line description>. Resolved by <action>. Time spent: <approx>.
|
|
33
54
|
|
|
34
|
-
|
|
55
|
+
If a problem was NOT resolved, it goes here AND becomes a follow-up filed below.
|
|
35
56
|
|
|
36
|
-
|
|
37
|
-
<!-- Example: "All service errors now wrap in ServiceError(code, message) — see auth.service.ts:42" -->
|
|
38
|
-
- {{new pattern introduced by this phase and where it lives}}
|
|
57
|
+
### Follow-ups
|
|
39
58
|
|
|
40
|
-
|
|
59
|
+
GH issues filed (or to file) for work that this story surfaced but didn't ship:
|
|
41
60
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- {{what future phases can reuse from this phase}}
|
|
61
|
+
- #N — <title>
|
|
62
|
+
- (to file) — <description>
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
### Verification
|
|
47
65
|
|
|
48
|
-
|
|
49
|
-
<!-- Example: "Database connection from Phase 3 (src/db/connection.ts)" -->
|
|
50
|
-
- {{what this phase depended on from earlier phases}}
|
|
66
|
+
How a verifier confirms this story is actually done:
|
|
51
67
|
|
|
52
|
-
|
|
68
|
+
- Run `<command>`, expect `<output>`
|
|
69
|
+
- Open `<UI element>`, click `<button>`, observe `<state change>`
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
<!-- Example: "Phase 9 (checkout flow) — depends on Cart model introduced here" -->
|
|
56
|
-
- {{phases or components that should re-verify after this phase}}
|
|
71
|
+
This block feeds into UAT.md when the phase completes.
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
### Status
|
|
59
74
|
|
|
60
|
-
|
|
75
|
+
- **complete** — all acceptance criteria green, follow-ups filed.
|
|
76
|
+
- **partial** — some AC green, others deferred. Document which AC are open.
|
|
77
|
+
- **blocked** — couldn't proceed. Owner of unblock + ETA.
|
|
@@ -1,28 +1,83 @@
|
|
|
1
|
-
# Verification Report
|
|
1
|
+
# Verification Report Template
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
**Verified:** {{date}}
|
|
5
|
-
**Verifier:** rihal-verifier
|
|
3
|
+
Used by `/rihal:verify-phase`. Goal-backward analysis of whether the phase actually delivered the goal stated in ROADMAP.md.
|
|
6
4
|
|
|
7
|
-
##
|
|
5
|
+
## Frontmatter
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
```yaml
|
|
8
|
+
---
|
|
9
|
+
phase: NN
|
|
10
|
+
phase_name: <slug>
|
|
11
|
+
verifier: <agent / human>
|
|
12
|
+
verified_at: <ISO date>
|
|
13
|
+
verdict: pass | fail | partial
|
|
14
|
+
goal_source: ROADMAP.md (commit-sha-at-phase-start)
|
|
15
|
+
---
|
|
16
|
+
```
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
## Sections
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
- {{file:line or test name proving the goal is met}}
|
|
20
|
+
### Phase goal (verbatim)
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
> <paste the goal statement from ROADMAP.md exactly as written when this phase was planned>
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|---|------|--------|----------|
|
|
20
|
-
| 1 | {{task}} | ✅ | {{evidence}} |
|
|
24
|
+
### Goal decomposition
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
The goal as one sentence is too coarse to verify against. Decompose into checkable claims:
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
1. **Claim 1**: <one observable thing the goal implies>
|
|
29
|
+
2. **Claim 2**: ...
|
|
30
|
+
3. **Claim N**: ...
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
### Evidence per claim
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
For each claim, list:
|
|
35
|
+
|
|
36
|
+
- **Source of truth**: code path / file / endpoint / behavior
|
|
37
|
+
- **Verification method**: command / test name / manual step
|
|
38
|
+
- **Result**: ✅ / ❌ / ⚠️
|
|
39
|
+
- **Notes**: anything surprising
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
| # | Claim | Method | Result | Notes |
|
|
43
|
+
|---|-------|--------|:------:|-------|
|
|
44
|
+
| 1 | ... | ... | ✅ | ... |
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Coverage gaps
|
|
48
|
+
|
|
49
|
+
What the phase goal said but no evidence-trail covered. List explicitly:
|
|
50
|
+
|
|
51
|
+
- **<claim>** has no implementation that can be pointed to. Either:
|
|
52
|
+
- The goal was aspirational and the phase didn't implement it (gap to file as follow-up)
|
|
53
|
+
- The implementation exists but no test or doc covers it (gap to file as test debt)
|
|
54
|
+
|
|
55
|
+
### Side-effect audit
|
|
56
|
+
|
|
57
|
+
What the phase changed BEYOND the goal. Often these are silent:
|
|
58
|
+
|
|
59
|
+
- New dependencies added
|
|
60
|
+
- Schema changes
|
|
61
|
+
- API contract changes
|
|
62
|
+
- File-tree changes (new dirs, deleted files)
|
|
63
|
+
|
|
64
|
+
Each side effect should be intentional and documented.
|
|
65
|
+
|
|
66
|
+
### Verdict reasoning
|
|
67
|
+
|
|
68
|
+
One paragraph explaining why the verdict (pass / fail / partial) was chosen. Include any judgment calls.
|
|
69
|
+
|
|
70
|
+
### Follow-ups
|
|
71
|
+
|
|
72
|
+
Issues filed (or to file) for gaps surfaced during verification:
|
|
73
|
+
|
|
74
|
+
- #N — <title>
|
|
75
|
+
- (to file) — <description>
|
|
76
|
+
|
|
77
|
+
## Sign-off
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Verifier: <name or agent id>
|
|
81
|
+
Date: <ISO>
|
|
82
|
+
Verdict: <verdict from frontmatter>
|
|
83
|
+
```
|
|
@@ -18,7 +18,7 @@ interpos audit (issue #221) — DO NOT regress.
|
|
|
18
18
|
2. **NEVER skip the methodology chain on greenfield projects.** Before
|
|
19
19
|
the phase loop runs, the prerequisite check (next step) MUST verify:
|
|
20
20
|
- `.planning/prd.md` exists (else halt → /rihal-create-prd)
|
|
21
|
-
- ROADMAP.md has milestone structure (else halt → /rihal-
|
|
21
|
+
- ROADMAP.md has milestone structure (else halt → /rihal-new-milestone)
|
|
22
22
|
- `.planning/epics.md` exists (else halt → /rihal-create-epics-and-stories)
|
|
23
23
|
See issue #219 + #229.
|
|
24
24
|
|
|
@@ -68,7 +68,7 @@ If `SKIP_FLAG=false` AND any prerequisite is missing, HALT with a clear message:
|
|
|
68
68
|
|
|
69
69
|
The autonomous flow assumes a project that has already gone through:
|
|
70
70
|
1. /rihal-create-prd → produces .planning/prd.md
|
|
71
|
-
2. /rihal-
|
|
71
|
+
2. /rihal-new-milestone → produces ROADMAP.md with M1..Mn
|
|
72
72
|
3. /rihal-create-epics-and-stories → produces .planning/epics.md
|
|
73
73
|
4. THEN /rihal-autonomous ← you are here
|
|
74
74
|
|
|
@@ -21,5 +21,5 @@ Skill not installed — run: npx @hanzlaa/rcode install
|
|
|
21
21
|
## On Completion
|
|
22
22
|
|
|
23
23
|
/rihal-validate-prd — validate the PRD for completeness
|
|
24
|
-
/rihal-
|
|
24
|
+
/rihal-new-milestone — build the milestone roadmap from the PRD
|
|
25
25
|
/rihal-edit-prd — revise the PRD
|
|
@@ -1,34 +1,87 @@
|
|
|
1
|
-
# Workflow: rihal-diagnose-issues
|
|
2
|
-
|
|
3
1
|
<purpose>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
Diagnose issues surfaced during /rihal:verify-work. For each failed acceptance criterion, identify root cause, classify severity, and decide whether to fix in-flight or file as follow-up.
|
|
3
|
+
|
|
4
|
+
Spawned by /rihal:verify-work when verification fails. Not typically called directly by users.
|
|
7
5
|
</purpose>
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
<required_reading>
|
|
8
|
+
@.rihal/references/output-format.md
|
|
9
|
+
@.rihal/references/common-bug-patterns.md
|
|
10
|
+
@.rihal/references/verification-patterns.md
|
|
11
|
+
</required_reading>
|
|
12
|
+
|
|
13
|
+
<process>
|
|
14
|
+
|
|
15
|
+
## 1. Receive failure list
|
|
16
|
+
|
|
17
|
+
`/rihal:verify-work` passes a structured list of failures:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
"criterion": "Auth login completes in <2s",
|
|
23
|
+
"expected": "redirect to /dashboard within 2s of submit",
|
|
24
|
+
"actual": "redirected after 8s",
|
|
25
|
+
"evidence": "browser network log shows 6s spent on /api/me"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 2. For each failure — diagnose
|
|
31
|
+
|
|
32
|
+
Parallel-spawn one investigator per failure. Each investigator:
|
|
33
|
+
|
|
34
|
+
a. **Reproduce** locally using the verification steps from UAT.md.
|
|
35
|
+
b. **Bisect** — narrow down which file/function/commit introduced the regression. Use `git log --since` + `git bisect` if needed.
|
|
36
|
+
c. **Classify** — bug / config / docs / environment / spec.
|
|
37
|
+
d. **Severity** — critical (blocks ship) / high (degrades core feature) / medium (workaround exists) / low (cosmetic).
|
|
38
|
+
e. **Root cause** — one-sentence explanation.
|
|
39
|
+
f. **Fix proposal** — one of:
|
|
40
|
+
- **In-flight** — small enough to fix in this phase before merging
|
|
41
|
+
- **Follow-up** — substantial; file an issue and proceed
|
|
42
|
+
- **Stop** — phase shouldn't ship; halt and re-plan
|
|
43
|
+
|
|
44
|
+
## 3. Aggregate diagnosis
|
|
45
|
+
|
|
46
|
+
Each investigator returns a structured diagnosis. The orchestrator collates:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Failed criteria: 3
|
|
50
|
+
Diagnosis:
|
|
51
|
+
Critical: 1 (must fix before ship)
|
|
52
|
+
High: 1 (recommended fix in-flight)
|
|
53
|
+
Medium: 1 (file as follow-up, ship anyway)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 4. Decide
|
|
57
|
+
|
|
58
|
+
- All criticals fixable in-flight → loop into rihal-code-fixer with the diagnosis bundle.
|
|
59
|
+
- Any critical not fixable in-flight → return STOP to verify-work; phase doesn't ship.
|
|
60
|
+
- Otherwise → file follow-ups, return PROCEED to verify-work.
|
|
10
61
|
|
|
11
|
-
|
|
12
|
-
- failing assertion / log line / wrong output
|
|
13
|
-
- file:line where divergence first appears
|
|
14
|
-
- last commit before symptom appeared (`git log -S<token>`)
|
|
62
|
+
## 5. Output
|
|
15
63
|
|
|
16
|
-
|
|
64
|
+
`DIAGNOSIS.md` per failure, written to `.planning/phases/<NN>/diagnosis/<criterion-slug>.md`. Each contains:
|
|
17
65
|
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
66
|
+
- Reproduction steps
|
|
67
|
+
- Bisect result
|
|
68
|
+
- Root cause
|
|
69
|
+
- Severity + classification
|
|
70
|
+
- Fix proposal + estimated effort
|
|
21
71
|
|
|
22
|
-
|
|
72
|
+
Plus an aggregate `DIAGNOSIS-INDEX.md` summarizing all failures and the orchestrator's decision.
|
|
23
73
|
|
|
24
|
-
|
|
25
|
-
hypothesis that matches all evidence.
|
|
74
|
+
</process>
|
|
26
75
|
|
|
27
|
-
##
|
|
76
|
+
## Success Criteria
|
|
28
77
|
|
|
29
|
-
|
|
30
|
-
|
|
78
|
+
- [ ] Every failed criterion has a DIAGNOSIS.md file
|
|
79
|
+
- [ ] Each DIAGNOSIS.md has reproduction + root cause + fix proposal
|
|
80
|
+
- [ ] Critical failures either get in-flight fix or halt the phase
|
|
81
|
+
- [ ] Follow-up issues filed for medium/low items proceed without blocking ship
|
|
31
82
|
|
|
32
|
-
##
|
|
83
|
+
## On Error
|
|
33
84
|
|
|
34
|
-
|
|
85
|
+
- **Cannot reproduce** — mark diagnosis status `cannot-reproduce`. Often signals environment drift between verifier and dev. File as follow-up; do not block ship if all other criticals pass.
|
|
86
|
+
- **Bisect inconclusive** — fall back to a hypothesis-driven investigation (read recent commits in the affected file, look for likely causes).
|
|
87
|
+
- **Repair budget exhausted** — STOP. Return control to user with the full diagnosis bundle.
|
|
@@ -152,7 +152,7 @@ Phase number from argument (required).
|
|
|
152
152
|
```bash
|
|
153
153
|
INIT=$(node ".rihal/bin/rihal-tools.cjs" init phase-op "${PHASE}")
|
|
154
154
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
155
|
-
AGENT_SKILLS_ADVISOR=$(node ".rihal/bin/rihal-tools.cjs" agent-skills rihal-advisor 2>/dev/null)
|
|
155
|
+
AGENT_SKILLS_ADVISOR=$(node ".rihal/bin/rihal-tools.cjs" agent-skills rihal-advisor-researcher 2>/dev/null)
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`, `response_language`.
|
|
@@ -223,16 +223,16 @@ If `ORPHANS > 0`: `⚠ WARN — ${ORPHANS} orphaned worktree-agent-* artifact(s)
|
|
|
223
223
|
|
|
224
224
|
**Action:** Count all pass/fail/warn results and display overall status.
|
|
225
225
|
|
|
226
|
-
Total: `{N}/
|
|
226
|
+
Total: `{N}/9 checks passed`
|
|
227
227
|
|
|
228
|
-
If all
|
|
228
|
+
If all 9 pass:
|
|
229
229
|
```
|
|
230
|
-
✓ All systems nominal — rihal is healthy
|
|
230
|
+
✓ All systems nominal — rihal is healthy (9/9)
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
If fewer than
|
|
233
|
+
If fewer than 9 pass:
|
|
234
234
|
```
|
|
235
|
-
⚠ {N}/
|
|
235
|
+
⚠ {N}/9 checks passed — {M} issue(s) found
|
|
236
236
|
Run: /rihal-update to repair installation issues
|
|
237
237
|
Run: /rihal-status for project-state issues
|
|
238
238
|
Run: /rihal-audit worktrees --prune to clean orphaned executor artifacts
|
|
@@ -240,7 +240,7 @@ Run: /rihal-audit worktrees --prune to clean orphaned executor artifacts
|
|
|
240
240
|
|
|
241
241
|
## Success Criteria
|
|
242
242
|
|
|
243
|
-
- [ ] All
|
|
243
|
+
- [ ] All 9 checks executed (skip state checks if no state.json)
|
|
244
244
|
- [ ] Each check result printed clearly
|
|
245
245
|
- [ ] Final summary shows pass/fail count
|
|
246
246
|
- [ ] Repair instructions shown if any checks fail
|
package/rihal/workflows/help.md
CHANGED
|
@@ -231,7 +231,6 @@ init → new-project → plan → execute → next → status → ship
|
|
|
231
231
|
| `/rihal-dev-story <file>` | Execute an approved STORY by writing tests + code per AC. |
|
|
232
232
|
| (internal) `check-implementation-readiness` | Guard called by `/rihal-plan` and `/rihal-execute` to verify PRD + architecture aligned before build. |
|
|
233
233
|
| `/rihal-create-architecture` | Write an Architecture Decision Record (ADR). |
|
|
234
|
-
| `/rihal-create-ux-design` | Realize a UX design that informs architecture and implementation. |
|
|
235
234
|
| `/rihal-correct-course` | Course-correct mid-sprint when major change is discovered. |
|
|
236
235
|
| `/rihal-sprint-planning` | Compute capacity, prioritize stories, create SPRINT.md. |
|
|
237
236
|
| `/rihal-sprint-status` | Sprint progress — stories, points, velocity, burndown. |
|
|
@@ -33,7 +33,7 @@ fi
|
|
|
33
33
|
|
|
34
34
|
## Halt conditions
|
|
35
35
|
|
|
36
|
-
- Memory Bank not initialised → instruct to run `/
|
|
36
|
+
- Memory Bank not initialised → instruct to run `/rihal-memory-init` first
|
|
37
37
|
|
|
38
38
|
---
|
|
39
39
|
|
|
@@ -77,7 +77,7 @@ For `change-records/`, `incidents/post-mortems/`, `milestones/archive/`:
|
|
|
77
77
|
For each `distillates/*.distillate.md`:
|
|
78
78
|
- Read frontmatter `source-digest`
|
|
79
79
|
- Recompute digest of current source files (per `rcode-memory-distill` rules)
|
|
80
|
-
- If mismatch, emit a `warn` finding suggesting `/
|
|
80
|
+
- If mismatch, emit a `warn` finding suggesting `/rihal-memory-distill`
|
|
81
81
|
|
|
82
82
|
### Step 8 — Render report
|
|
83
83
|
|
|
@@ -20,7 +20,7 @@ Regenerate Memory Bank distillates with lossless compression. Idempotent.
|
|
|
20
20
|
|
|
21
21
|
## Halt conditions
|
|
22
22
|
|
|
23
|
-
- `.rihal/memory/` missing → instruct to run `/
|
|
23
|
+
- `.rihal/memory/` missing → instruct to run `/rihal-memory-init` first
|
|
24
24
|
- All sources empty (only template placeholders) → warn and exit; no point distilling empty content
|
|
25
25
|
|
|
26
26
|
---
|
|
@@ -70,7 +70,7 @@ For each target distillate, write:
|
|
|
70
70
|
---
|
|
71
71
|
generated: true
|
|
72
72
|
do-not-edit: true
|
|
73
|
-
regenerate-with: /
|
|
73
|
+
regenerate-with: /rihal-memory-distill
|
|
74
74
|
source-digest: <hash>
|
|
75
75
|
generated-at: <ISO datetime>
|
|
76
76
|
source-files:
|
|
@@ -41,7 +41,7 @@ If `INDEX.md` exists:
|
|
|
41
41
|
- List every file under `.rihal/memory/`
|
|
42
42
|
- For each, count non-template lines (lines that don't start with `<!--` or contain `_(...)_` placeholders)
|
|
43
43
|
- Print which files are empty / template-only and which are populated
|
|
44
|
-
- Suggest `/
|
|
44
|
+
- Suggest `/rihal-memory-update` for surgical edits and exit
|
|
45
45
|
|
|
46
46
|
### Step 2 — Copy templates
|
|
47
47
|
|
|
@@ -90,7 +90,7 @@ Add or update the `memory_bank` block in `.rihal/state.json`:
|
|
|
90
90
|
Show:
|
|
91
91
|
- File tree of `.rihal/memory/`
|
|
92
92
|
- Files seeded vs files still empty
|
|
93
|
-
- Suggested next command: `/
|
|
93
|
+
- Suggested next command: `/rihal-memory-distill`
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
@@ -15,7 +15,7 @@ Append-only surgical update to a single Memory Bank file. Never rewrites, never
|
|
|
15
15
|
|
|
16
16
|
## Preconditions
|
|
17
17
|
|
|
18
|
-
- `.rihal/memory/` exists (run `/
|
|
18
|
+
- `.rihal/memory/` exists (run `/rihal-memory-init` first)
|
|
19
19
|
|
|
20
20
|
## Halt conditions
|
|
21
21
|
|
|
@@ -72,7 +72,7 @@ For `change-records/`:
|
|
|
72
72
|
|
|
73
73
|
### Step 5 — Suggest distillate refresh
|
|
74
74
|
|
|
75
|
-
If the change was to `project/`, `milestones/current.md`, or `incidents/`, suggest `/
|
|
75
|
+
If the change was to `project/`, `milestones/current.md`, or `incidents/`, suggest `/rihal-memory-distill` to refresh distillates. Optional, not enforced.
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
@@ -44,7 +44,7 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
|
44
44
|
# If INIT is empty or INIT.ok is false: print "Error: rihal-tools init failed." and exit.
|
|
45
45
|
# Extract: phase_dir, padded_phase, phase_number, state_path, requirements_path, context_path, response_language
|
|
46
46
|
# If response_language is set, include "Respond in {value}." in all spawned subagent prompts.
|
|
47
|
-
AGENT_SKILLS_RESEARCHER=$(node ".rihal/bin/rihal-tools.cjs" agent-skills rihal-researcher 2>/dev/null)
|
|
47
|
+
AGENT_SKILLS_RESEARCHER=$(node ".rihal/bin/rihal-tools.cjs" agent-skills rihal-phase-researcher 2>/dev/null)
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Step 4: Spawn Researcher
|