@hanzlaa/rcode 2.1.0 → 2.3.1
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/CONTRIBUTING.md +138 -0
- package/README.md +83 -19
- package/cli/install.js +687 -80
- package/cli/uninstall.js +8 -0
- package/dist/rcode.js +19777 -0
- package/package.json +17 -4
- package/rihal/DOCS-AUDIT.md +14 -0
- package/rihal/agents/rihal-code-reviewer.md +1 -1
- package/rihal/agents/rihal-codebase-mapper.md +1 -1
- package/rihal/agents/rihal-docs-auditor.md +1 -1
- package/rihal/agents/rihal-edge-case-hunter.md +1 -1
- package/rihal/agents/rihal-executor.md +1 -1
- package/rihal/agents/rihal-hussain-pm.md +1 -0
- package/rihal/agents/rihal-nyquist-auditor.md +1 -1
- package/rihal/agents/rihal-phase-researcher.md +1 -2
- package/rihal/agents/rihal-planner.md +1 -1
- package/rihal/agents/rihal-roadmapper.md +1 -0
- package/rihal/agents/rihal-security-adversary.md +1 -1
- package/rihal/agents/rihal-security-auditor.md +1 -1
- package/rihal/agents/rihal-sprint-checker.md +1 -1
- package/rihal/agents/rihal-verifier.md +1 -1
- package/rihal/bin/lib/roadmap.cjs +2 -3
- package/rihal/bin/rihal-tools.cjs +153 -36
- package/rihal/brain/sources.yaml +7 -4
- package/rihal/commands/audit.md +8 -0
- package/rihal/commands/checkpoint-preview.md +13 -0
- package/rihal/commands/config.md +4 -4
- package/rihal/commands/prfaq.md +15 -0
- package/rihal/commands/settings.md +2 -2
- package/rihal/references/agent-contracts.md +12 -0
- package/rihal/references/karpathy-guidelines-full.md +79 -0
- package/rihal/references/karpathy-guidelines.md +8 -76
- package/rihal/references/model-profile-resolution.md +8 -0
- package/rihal/references/phase-argument-parsing.md +11 -0
- package/rihal/references/revision-loop.md +11 -0
- package/rihal/references/universal-anti-patterns.md +15 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +10 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +3 -1
- package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +3 -1
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-10-complete.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +13 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +4 -2
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +10 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +3 -1
- package/rihal/skills/agents/hussain-pm/SKILL.md +8 -0
- package/rihal/skills/agents/hussain-sm/SKILL.md +8 -0
- package/rihal/templates/UAT.md +29 -0
- package/rihal/templates/milestone.md +2 -0
- package/rihal/templates/sprint.md +11 -28
- package/rihal/templates/summary.md +30 -0
- package/rihal/templates/verification-report.md +28 -0
- package/rihal/workflows/audit-milestone.md +34 -2
- package/rihal/workflows/audit.md +172 -0
- package/rihal/workflows/autonomous.md +67 -0
- package/rihal/workflows/checkpoint-preview.md +7 -0
- package/rihal/workflows/council.md +3 -1
- package/rihal/workflows/dashboard.md +2 -2
- package/rihal/workflows/debug.md +8 -1
- package/rihal/workflows/diagnose-issues.md +34 -0
- package/rihal/workflows/do.md +47 -3
- package/rihal/workflows/execute-sprint.md +11 -4
- package/rihal/workflows/execute.md +9 -3
- package/rihal/workflows/install.md +2 -2
- package/rihal/workflows/karpathy-audit.md +7 -14
- package/rihal/workflows/pause-work.md +7 -1
- package/rihal/workflows/prfaq.md +7 -0
- package/rihal/workflows/profile-user.md +2 -2
- package/rihal/workflows/progress.md +1 -1
- package/rihal/workflows/settings.md +116 -118
- package/rihal/workflows/sprint-planning.md +39 -8
- package/rihal/workflows/status.md +6 -1
- package/rihal/workflows/ui-phase.md +3 -3
- package/rihal/workflows/update.md +80 -22
- package/rihal/workflows/validate-phase.md +7 -1
- package/rihal/agents/rihal-ui-designer.md +0 -6
- package/rihal/workflows/config.md +0 -105
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Karpathy Coding Guidelines
|
|
2
|
+
|
|
3
|
+
Behavioral guidelines derived from [Andrej Karpathy's observations](https://x.com/karpathy/status/2015883857489522876) on LLM coding pitfalls. Every rihal agent that writes, reviews, or refactors code must internalize these four principles.
|
|
4
|
+
|
|
5
|
+
**Tradeoff:** These bias toward caution over speed. For trivial tasks, use judgment.
|
|
6
|
+
|
|
7
|
+
## 1. Think Before Coding
|
|
8
|
+
|
|
9
|
+
**Don't assume. Don't hide confusion. Surface tradeoffs.**
|
|
10
|
+
|
|
11
|
+
Before implementing:
|
|
12
|
+
- State assumptions explicitly. If uncertain, ask.
|
|
13
|
+
- If multiple interpretations exist, present them — don't pick silently.
|
|
14
|
+
- If a simpler approach exists, say so. Push back when warranted.
|
|
15
|
+
- If something is unclear, stop. Name what's confusing. Ask.
|
|
16
|
+
|
|
17
|
+
**Rihal application:** In Round 1 of council/chain, every agent's response must include an `## Assumptions` block listing load-bearing assumptions. rihal-planner must ask via AskUserQuestion before writing a plan when scope is ambiguous. rihal-executor must stop on Rule 4 deviations and return a checkpoint, not silently guess.
|
|
18
|
+
|
|
19
|
+
## 2. Simplicity First
|
|
20
|
+
|
|
21
|
+
**Minimum code that solves the problem. Nothing speculative.**
|
|
22
|
+
|
|
23
|
+
- No features beyond what was asked.
|
|
24
|
+
- No abstractions for single-use code.
|
|
25
|
+
- No "flexibility" or "configurability" that wasn't requested.
|
|
26
|
+
- No error handling for impossible scenarios.
|
|
27
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
28
|
+
|
|
29
|
+
Test: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
|
|
30
|
+
|
|
31
|
+
**Rihal application:** rihal-planner tasks must be single-purpose. rihal-executor must not add abstractions during task execution (deviation Rule 2 applies only to missing critical functionality, not speculative flexibility). rihal-code-review explicitly flags overengineering.
|
|
32
|
+
|
|
33
|
+
## 3. Surgical Changes
|
|
34
|
+
|
|
35
|
+
**Touch only what you must. Clean up only your own mess.**
|
|
36
|
+
|
|
37
|
+
When editing existing code:
|
|
38
|
+
- Don't "improve" adjacent code, comments, or formatting.
|
|
39
|
+
- Don't refactor things that aren't broken.
|
|
40
|
+
- Match existing style, even if you'd do it differently.
|
|
41
|
+
- If you notice unrelated dead code, mention it — don't delete it.
|
|
42
|
+
|
|
43
|
+
When your changes create orphans:
|
|
44
|
+
- Remove imports/variables/functions that YOUR changes made unused.
|
|
45
|
+
- Don't remove pre-existing dead code unless asked.
|
|
46
|
+
|
|
47
|
+
The test: Every changed line should trace directly to the user's request.
|
|
48
|
+
|
|
49
|
+
**Rihal application:** rihal-executor commits must only include files its tasks touched. The deviation scope boundary (out-of-scope warnings logged to deferred-items.md, not fixed) enforces this. rihal-code-review-fix must not change style in files it's auditing.
|
|
50
|
+
|
|
51
|
+
## 4. Goal-Driven Execution
|
|
52
|
+
|
|
53
|
+
**Define success criteria. Loop until verified.**
|
|
54
|
+
|
|
55
|
+
Transform tasks into verifiable goals:
|
|
56
|
+
- "Add validation" → "Write tests for invalid inputs, then make them pass"
|
|
57
|
+
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
|
|
58
|
+
- "Refactor X" → "Ensure tests pass before and after"
|
|
59
|
+
|
|
60
|
+
For multi-step tasks, state a brief plan:
|
|
61
|
+
```
|
|
62
|
+
1. [Step] → verify: [check]
|
|
63
|
+
2. [Step] → verify: [check]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
|
|
67
|
+
|
|
68
|
+
**Rihal application:** Every task in a SPRINT.md must have a "Done when:" clause that's externally verifiable. rihal-executor self-check loop verifies Done-when conditions were met. rihal-sprint-checker rejects plans where tasks have vague success criteria.
|
|
69
|
+
|
|
70
|
+
## Enforcement
|
|
71
|
+
|
|
72
|
+
Agents that write or modify code (rihal-executor, rihal-planner, rihal-tech-writer, rihal-codebase-mapper when producing code docs) must:
|
|
73
|
+
1. @-include this file
|
|
74
|
+
2. Apply the 4 principles as hard constraints, not suggestions
|
|
75
|
+
3. Reference the specific principle when refusing to make a change (e.g., "Declining per Karpathy #3: that's adjacent to the requested change but not part of it")
|
|
76
|
+
|
|
77
|
+
## Credit
|
|
78
|
+
|
|
79
|
+
Original principles by Andrej Karpathy. Reference implementation by Forrest Chang at github.com/forrestchang/andrej-karpathy-skills. Adapted and extended for rihal's multi-agent architecture.
|
|
@@ -1,79 +1,11 @@
|
|
|
1
|
-
# Karpathy
|
|
1
|
+
# Karpathy Guidelines — Quick Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Four hard constraints for every agent that writes, reviews, or modifies code or artifacts.
|
|
4
|
+
Full text with Rihal-specific application notes: `@.rihal/references/karpathy-guidelines-full.md`
|
|
4
5
|
|
|
5
|
-
**
|
|
6
|
+
1. **Think first (P1)** — State assumptions explicitly before acting. If scope is ambiguous, ask. Never guess silently.
|
|
7
|
+
2. **Simplicity (P2)** — Minimum code/scope that solves the problem. No speculative features, abstractions, or error handling for impossible cases.
|
|
8
|
+
3. **Surgical (P3)** — Touch only what the task requires. Don't improve adjacent code, don't refactor what isn't broken.
|
|
9
|
+
4. **Goal-driven (P4)** — Define a verifiable success criterion before starting. "Done when: X can be verified externally."
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
**Don't assume. Don't hide confusion. Surface tradeoffs.**
|
|
10
|
-
|
|
11
|
-
Before implementing:
|
|
12
|
-
- State assumptions explicitly. If uncertain, ask.
|
|
13
|
-
- If multiple interpretations exist, present them — don't pick silently.
|
|
14
|
-
- If a simpler approach exists, say so. Push back when warranted.
|
|
15
|
-
- If something is unclear, stop. Name what's confusing. Ask.
|
|
16
|
-
|
|
17
|
-
**Rihal application:** In Round 1 of council/chain, every agent's response must include an `## Assumptions` block listing load-bearing assumptions. rihal-planner must ask via AskUserQuestion before writing a plan when scope is ambiguous. rihal-executor must stop on Rule 4 deviations and return a checkpoint, not silently guess.
|
|
18
|
-
|
|
19
|
-
## 2. Simplicity First
|
|
20
|
-
|
|
21
|
-
**Minimum code that solves the problem. Nothing speculative.**
|
|
22
|
-
|
|
23
|
-
- No features beyond what was asked.
|
|
24
|
-
- No abstractions for single-use code.
|
|
25
|
-
- No "flexibility" or "configurability" that wasn't requested.
|
|
26
|
-
- No error handling for impossible scenarios.
|
|
27
|
-
- If you write 200 lines and it could be 50, rewrite it.
|
|
28
|
-
|
|
29
|
-
Test: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
|
|
30
|
-
|
|
31
|
-
**Rihal application:** rihal-planner tasks must be single-purpose. rihal-executor must not add abstractions during task execution (deviation Rule 2 applies only to missing critical functionality, not speculative flexibility). rihal-code-review explicitly flags overengineering.
|
|
32
|
-
|
|
33
|
-
## 3. Surgical Changes
|
|
34
|
-
|
|
35
|
-
**Touch only what you must. Clean up only your own mess.**
|
|
36
|
-
|
|
37
|
-
When editing existing code:
|
|
38
|
-
- Don't "improve" adjacent code, comments, or formatting.
|
|
39
|
-
- Don't refactor things that aren't broken.
|
|
40
|
-
- Match existing style, even if you'd do it differently.
|
|
41
|
-
- If you notice unrelated dead code, mention it — don't delete it.
|
|
42
|
-
|
|
43
|
-
When your changes create orphans:
|
|
44
|
-
- Remove imports/variables/functions that YOUR changes made unused.
|
|
45
|
-
- Don't remove pre-existing dead code unless asked.
|
|
46
|
-
|
|
47
|
-
The test: Every changed line should trace directly to the user's request.
|
|
48
|
-
|
|
49
|
-
**Rihal application:** rihal-executor commits must only include files its tasks touched. The deviation scope boundary (out-of-scope warnings logged to deferred-items.md, not fixed) enforces this. rihal-code-review-fix must not change style in files it's auditing.
|
|
50
|
-
|
|
51
|
-
## 4. Goal-Driven Execution
|
|
52
|
-
|
|
53
|
-
**Define success criteria. Loop until verified.**
|
|
54
|
-
|
|
55
|
-
Transform tasks into verifiable goals:
|
|
56
|
-
- "Add validation" → "Write tests for invalid inputs, then make them pass"
|
|
57
|
-
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
|
|
58
|
-
- "Refactor X" → "Ensure tests pass before and after"
|
|
59
|
-
|
|
60
|
-
For multi-step tasks, state a brief plan:
|
|
61
|
-
```
|
|
62
|
-
1. [Step] → verify: [check]
|
|
63
|
-
2. [Step] → verify: [check]
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
|
|
67
|
-
|
|
68
|
-
**Rihal application:** Every task in a SPRINT.md must have a "Done when:" clause that's externally verifiable. rihal-executor self-check loop verifies Done-when conditions were met. rihal-sprint-checker rejects plans where tasks have vague success criteria.
|
|
69
|
-
|
|
70
|
-
## Enforcement
|
|
71
|
-
|
|
72
|
-
Agents that write or modify code (rihal-executor, rihal-planner, rihal-tech-writer, rihal-codebase-mapper when producing code docs) must:
|
|
73
|
-
1. @-include this file
|
|
74
|
-
2. Apply the 4 principles as hard constraints, not suggestions
|
|
75
|
-
3. Reference the specific principle when refusing to make a change (e.g., "Declining per Karpathy #3: that's adjacent to the requested change but not part of it")
|
|
76
|
-
|
|
77
|
-
## Credit
|
|
78
|
-
|
|
79
|
-
Original principles by Andrej Karpathy. Reference implementation by Forrest Chang at github.com/forrestchang/andrej-karpathy-skills. Adapted and extended for rihal's multi-agent architecture.
|
|
11
|
+
When refusing a change, cite the principle: `"Declining per Karpathy P3 — that's adjacent to the requested change."`
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Model Profile Resolution
|
|
2
|
+
|
|
3
|
+
Workflows pick a model via `node .rihal/bin/rihal-tools.cjs resolve-model
|
|
4
|
+
<role>`, which reads `.rihal/config.yaml` `model_profile` and returns the
|
|
5
|
+
concrete model id for that role per `rihal/config/model-profiles.json`.
|
|
6
|
+
|
|
7
|
+
If `model_profile` is unset, default is `balanced`. Unknown profile falls
|
|
8
|
+
back to `balanced` with a stderr warning.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Phase Argument Parsing
|
|
2
|
+
|
|
3
|
+
Workflows accept a phase argument in two forms:
|
|
4
|
+
|
|
5
|
+
- **Numeric**: `01`, `2`, `02.1` — resolved via
|
|
6
|
+
`node .rihal/bin/rihal-tools.cjs init phase-op "$ARG"` to the matching
|
|
7
|
+
phase directory under `.planning/phases/`.
|
|
8
|
+
- **Path**: a direct `.planning/phases/<slug>/PLAN.md` path — used as-is.
|
|
9
|
+
|
|
10
|
+
If the resolver returns `phase_found: false`, workflows must STOP with a
|
|
11
|
+
"phase not found" message rather than fabricating a target.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Plan Revision Loop
|
|
2
|
+
|
|
3
|
+
When `workflow.plan_checker` is enabled (`/rihal:settings`), `/rihal:plan`
|
|
4
|
+
runs the rihal-plan-checker after the planner. Findings drive a bounded
|
|
5
|
+
revision loop:
|
|
6
|
+
|
|
7
|
+
1. Planner produces PLAN.md.
|
|
8
|
+
2. Plan-checker scores against goal-backward criteria.
|
|
9
|
+
3. If BLOCK / FLAG: planner revises with the findings as added input.
|
|
10
|
+
4. Up to 2 revision rounds. After that, surface to user for manual
|
|
11
|
+
confirmation rather than loop indefinitely.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Universal Anti-Patterns (Discuss-Phase)
|
|
2
|
+
|
|
3
|
+
Common failure modes the discuss workflow checks for:
|
|
4
|
+
|
|
5
|
+
- **Solution-first framing**: jumping to implementation before constraints
|
|
6
|
+
are explicit.
|
|
7
|
+
- **Hidden binary choice**: presenting a "decision" that has only one
|
|
8
|
+
viable option.
|
|
9
|
+
- **Unowned action**: a "we should X" with no owner or deadline.
|
|
10
|
+
- **Sunk-cost continuation**: defending an existing plan instead of
|
|
11
|
+
evaluating fresh evidence.
|
|
12
|
+
- **Scope inflation**: bundling new work into the current decision.
|
|
13
|
+
|
|
14
|
+
Discuss-phase flags any of these and asks for explicit framing before
|
|
15
|
+
proceeding.
|
|
@@ -3,6 +3,16 @@ name: rihal-prfaq
|
|
|
3
3
|
description: Working Backwards PRFAQ challenge to forge product concepts. Use when the user requests to 'create a PRFAQ', 'work backwards', or 'run the PRFAQ challenge'.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## Do NOT use this skill for
|
|
7
|
+
|
|
8
|
+
- **Refining an existing PRD** — use `rihal-create-prd` or `rihal-edit-prd`.
|
|
9
|
+
- **Brainstorming raw ideas** before there's a concept — use `rihal-brainstorming` first; PRFAQ assumes a candidate concept exists.
|
|
10
|
+
- **Sprint or phase planning** — use `rihal-sprint-planning` / `rihal-create-milestone`.
|
|
11
|
+
- **Pure market research with no product hypothesis** — use a research workflow.
|
|
12
|
+
- **Single-question Q&A** — PRFAQ runs a multi-stage gauntlet; for a one-off answer, just answer.
|
|
13
|
+
|
|
14
|
+
If the user asks to "validate" or "polish" an existing PRD, redirect to `rihal-validate-prd`.
|
|
15
|
+
|
|
6
16
|
## Workflow
|
|
7
17
|
|
|
8
18
|
|
|
@@ -15,9 +15,11 @@ Follow the instructions in ./workflow.md.
|
|
|
15
15
|
## Output Format
|
|
16
16
|
|
|
17
17
|
- Produces .rihal/phases/{phase}/epics.md with hierarchical structure
|
|
18
|
-
- Each epic has: Title | Goal | Stories (list) | Priority | Estimate
|
|
18
|
+
- Each epic has: Title | Goal | Assumptions | Stories (list) | Priority | Estimate
|
|
19
19
|
- Each story is independently testable and under 4-hour estimate
|
|
20
20
|
- Do NOT create epics larger than 10 stories — split further
|
|
21
|
+
- Every epic must include an `Assumptions` line — at minimum one entry; "none" is not acceptable
|
|
22
|
+
- Every story must have a one-line verifiable AC before being listed — vague stories get flagged and blocked
|
|
21
23
|
|
|
22
24
|
## Examples
|
|
23
25
|
|
|
@@ -15,10 +15,12 @@ Follow the instructions in ./workflow.md.
|
|
|
15
15
|
## Output Format
|
|
16
16
|
|
|
17
17
|
- Output: ROADMAP.md in `{planning_artifacts}/`
|
|
18
|
-
- Structure: per milestone — Name, Window (dates), Goal (one sentence), Acceptance criteria, Kill criteria (binary), Phases (stub list), then a trailing Backlog / parking lot section
|
|
18
|
+
- Structure: per milestone — Name, Window (dates), Goal (one sentence), Assumptions, Acceptance criteria, Kill criteria (binary), Phases (stub list), then a trailing Backlog / parking lot section
|
|
19
19
|
- Each kill criterion must be binary (number + threshold), not adjectival
|
|
20
20
|
- Every milestone has an explicit window with start + end dates
|
|
21
|
+
- Every milestone must include an `Assumptions` block — decisions that, if wrong, invalidate this milestone's scope
|
|
21
22
|
- Do NOT include: unquantified success language ("grow the user base"), open-ended milestones without dates, or more than 6 active milestones in one roadmap (split into v1/v2 if needed)
|
|
23
|
+
- If a milestone goal cannot be expressed as a single verifiable sentence, split it into two milestones
|
|
22
24
|
|
|
23
25
|
## Examples
|
|
24
26
|
|
|
@@ -21,6 +21,19 @@ Follow the instructions in ./workflow.md.
|
|
|
21
21
|
- Every section has explicit owner and deadline
|
|
22
22
|
- Do NOT include: vague verbs ("optimize"), unquantified metrics, or requirements without owners
|
|
23
23
|
|
|
24
|
+
## Fast-path detection
|
|
25
|
+
|
|
26
|
+
If `$ARGUMENTS` or the opening message contains ALL FOUR of these fields, skip the discovery interview and go straight to drafting:
|
|
27
|
+
|
|
28
|
+
| Field | Signal words |
|
|
29
|
+
|-------|-------------|
|
|
30
|
+
| Product / feature name | explicit name or noun |
|
|
31
|
+
| Problem statement | "problem is", "users can't", "currently X fails" |
|
|
32
|
+
| Target user | "for X users", "persona is", "audience is" |
|
|
33
|
+
| Scope signal | "must have", "v1 only", "just need", "MVP" |
|
|
34
|
+
|
|
35
|
+
When fast-pathing: confirm detected fields in one line ("Got it — building {name} for {user} to solve {problem}. Starting PRD draft."), then generate without asking further questions. If any of the four are absent, run the normal interview.
|
|
36
|
+
|
|
24
37
|
## Examples
|
|
25
38
|
|
|
26
39
|
### Happy Path
|
|
@@ -15,10 +15,12 @@ Follow the instructions in ./workflow.md.
|
|
|
15
15
|
## Output Format
|
|
16
16
|
|
|
17
17
|
- Story file at .rihal/phases/{phase}/stories/story-{id}.md
|
|
18
|
-
- Fixed sections: Goal | Context | Tasks (checklist) | Acceptance Criteria | Dependencies | File List (empty) | Dev Agent Record (empty)
|
|
18
|
+
- Fixed sections: Goal | Assumptions | Context | Tasks (checklist) | Acceptance Criteria | Dependencies | File List (empty) | Dev Agent Record (empty)
|
|
19
19
|
- Each task is ≤4 hours, in execution order
|
|
20
|
-
- Acceptance criteria in Given/When/Then
|
|
20
|
+
- Acceptance criteria in Given/When/Then — no criterion is valid unless a test can be written against it
|
|
21
|
+
- `## Assumptions` block is mandatory: list every assumption that, if wrong, would change the story scope
|
|
21
22
|
- Do NOT include implementation details in the story — those emerge during dev
|
|
23
|
+
- If AC cannot be stated in Given/When/Then, stop and ask the user to clarify before generating the story
|
|
22
24
|
|
|
23
25
|
## Examples
|
|
24
26
|
|
|
@@ -3,6 +3,16 @@ name: rihal-checkpoint-preview
|
|
|
3
3
|
description: 'LLM-assisted human-in-the-loop review. Make sense of a change, focus attention where it matters, test. Use when the user says "checkpoint", "human review", or "walk me through this change".'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## Do NOT use this skill for
|
|
7
|
+
|
|
8
|
+
- **Automated code review without a human** — use `/rihal:karpathy-audit` or a code-reviewer agent directly.
|
|
9
|
+
- **Approving a deploy or merge** — this skill explains a change; it does not authorize git push, deploys, or PR merges.
|
|
10
|
+
- **Bug investigation** from scratch — use `/rihal:debug` or the diagnose-issues workflow.
|
|
11
|
+
- **Architecture review of an undelivered design** — this skill reviews delivered code/diffs, not specs.
|
|
12
|
+
- **Sprint retros or milestone closure** — use `rihal-retrospective` or `rihal-complete-milestone`.
|
|
13
|
+
|
|
14
|
+
If the user has not produced a diff or change to review, ask them to do so first instead of invoking this skill.
|
|
15
|
+
|
|
6
16
|
## Workflow
|
|
7
17
|
|
|
8
18
|
|
|
@@ -15,10 +15,12 @@ Follow the instructions in ./workflow.md.
|
|
|
15
15
|
## Output Format
|
|
16
16
|
|
|
17
17
|
- Output: .rihal/phases/{phase}/sprint-{N}.md
|
|
18
|
-
- Fixed structure: Sprint Goal (one sentence) | Duration | Stories (with owners) | Capacity Used/Available | Risks | Definition of Done
|
|
18
|
+
- Fixed structure: Sprint Goal (one sentence) | Assumptions | Duration | Stories (with owners) | Capacity Used/Available | Risks | Definition of Done
|
|
19
19
|
- Stories ranked by priority from epics.md
|
|
20
20
|
- Leave 20% capacity buffer
|
|
21
21
|
- Do NOT commit to stories without explicit owners
|
|
22
|
+
- Sprint Goal must be one verifiable sentence — if it cannot be verified at sprint end without interpretation, rewrite it
|
|
23
|
+
- `Assumptions` block required: list capacity assumptions, any known blockers assumed absent, any dependencies assumed resolved
|
|
22
24
|
|
|
23
25
|
## Examples
|
|
24
26
|
|
|
@@ -16,6 +16,14 @@ description: >
|
|
|
16
16
|
|
|
17
17
|
# Hussain (PM) — Product Manager
|
|
18
18
|
|
|
19
|
+
## Planning Quality Rules (Karpathy-adapted)
|
|
20
|
+
|
|
21
|
+
Apply these as hard constraints when writing any PRD, story, epic, or scope definition:
|
|
22
|
+
|
|
23
|
+
- **P1 — Think first:** Every PRD section must declare load-bearing assumptions explicitly before stating requirements. If scope is ambiguous, ask — do not guess silently.
|
|
24
|
+
- **P2 — Simplicity:** Scope only what was asked. No speculative features, no "nice to have" requirements that weren't requested by the user or stakeholder.
|
|
25
|
+
- **P4 — Goal-driven:** Every requirement must have a testable acceptance criterion. "System should handle X" is not a criterion — "Given Y, when Z, then the system returns W" is.
|
|
26
|
+
|
|
19
27
|
## Overview
|
|
20
28
|
|
|
21
29
|
This skill embodies Hussain (حسين) in his Product Manager hat. It drives PRD creation through user interviews and requirements discovery, cuts scope ruthlessly, and ships the smallest thing that validates the assumption. Hussain does not fill templates — he interrogates until the problem is crystal clear.
|
|
@@ -15,6 +15,14 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
# Hussain (SM) — Scrum Master
|
|
17
17
|
|
|
18
|
+
## Sprint Quality Rules (Karpathy-adapted)
|
|
19
|
+
|
|
20
|
+
Apply these as hard constraints when preparing stories and planning sprints:
|
|
21
|
+
|
|
22
|
+
- **P1 — Think first:** Before committing stories to a sprint, surface capacity assumptions explicitly. Never assume velocity or team availability — ask.
|
|
23
|
+
- **P2 — Simplicity:** Each story must be independently deliverable. No story that bundles 2+ concerns. If a story needs a sub-story to make sense, split it.
|
|
24
|
+
- **P4 — Goal-driven:** Every story must have a Definition of Done that can be verified without talking to anyone. "Works correctly" is not a DoD — "all AC pass + no regression in test suite" is.
|
|
25
|
+
|
|
18
26
|
## Overview
|
|
19
27
|
|
|
20
28
|
This skill embodies Hussain (حسين) in his Scrum Master hat. It prepares stories with full context for the dev agent, plans sprints, runs retros, reports status, and course-corrects when things go sideways. Every story that reaches Hanzla is dev-ready — no ambiguity allowed.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# UAT — {{phase_name}}
|
|
2
|
+
|
|
3
|
+
**Phase:** {{phase_id}}
|
|
4
|
+
**Generated:** {{date}}
|
|
5
|
+
|
|
6
|
+
## How to use
|
|
7
|
+
|
|
8
|
+
For each scenario below, mark status: ✅ pass | ❌ fail | ⏸ skipped |
|
|
9
|
+
🔍 needs-human. Add notes inline.
|
|
10
|
+
|
|
11
|
+
## Scenarios
|
|
12
|
+
|
|
13
|
+
### Scenario 1: {{golden path title}}
|
|
14
|
+
|
|
15
|
+
**Steps:**
|
|
16
|
+
1. {{action}}
|
|
17
|
+
2. {{action}}
|
|
18
|
+
|
|
19
|
+
**Expected:** {{outcome}}
|
|
20
|
+
**Status:** ⏸
|
|
21
|
+
**Notes:**
|
|
22
|
+
|
|
23
|
+
### Scenario 2: {{edge case title}}
|
|
24
|
+
|
|
25
|
+
(Repeat as needed.)
|
|
26
|
+
|
|
27
|
+
## Outstanding items
|
|
28
|
+
|
|
29
|
+
Items left as ⏸ or 🔍 carry forward to the next milestone audit.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Milestone Template
|
|
2
2
|
|
|
3
|
+
<!-- P2: Omit any section with nothing substantive. Empty sections are noise. Omit STATE.md blockers/workstreams if none active. Omit REQUIREMENTS.md out-of-scope if it doesn't constrain execution. -->
|
|
4
|
+
|
|
3
5
|
Use this template when starting a new milestone with `/rihal:new-milestone`.
|
|
4
6
|
|
|
5
7
|
## ROADMAP.md
|
|
@@ -1,70 +1,53 @@
|
|
|
1
1
|
# Sprint {sprint_id} — {sprint_goal}
|
|
2
2
|
|
|
3
|
+
<!-- P2: Omit Dependencies and Risks sections if empty. Omit Retrospective until sprint is complete. -->
|
|
4
|
+
|
|
3
5
|
**Phase:** {phase_number} — {phase_name}
|
|
4
6
|
**Status:** {status}
|
|
5
7
|
**Velocity target:** {velocity_target} points
|
|
6
8
|
**Started:** {started_at}
|
|
7
9
|
|
|
8
|
-
---
|
|
9
|
-
|
|
10
10
|
## Sprint Goal
|
|
11
11
|
|
|
12
12
|
{sprint_goal}
|
|
13
13
|
|
|
14
|
-
---
|
|
15
|
-
|
|
16
14
|
## Stories
|
|
17
15
|
|
|
18
|
-
| ID | Title | Points | Status |
|
|
19
|
-
|
|
20
|
-
| {story_id} | {title} | {points} | {status} | {
|
|
21
|
-
|
|
22
|
-
---
|
|
16
|
+
| ID | Title | Points | Status | Done when |
|
|
17
|
+
|----|-------|--------|--------|-----------|
|
|
18
|
+
| {story_id} | {title} | {points} | {status} | {verifiable_ac} |
|
|
23
19
|
|
|
24
20
|
## Capacity
|
|
25
21
|
|
|
26
22
|
- **Velocity target:** {velocity_target} points
|
|
27
|
-
- **Average velocity (last 3):** {avg_velocity} points
|
|
28
23
|
- **Total committed:** {total_points} points
|
|
29
24
|
- **Buffer:** {buffer_points} points ({buffer_pct}%)
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
<!-- Omit if no cross-story dependencies exist -->
|
|
33
27
|
## Dependencies
|
|
34
28
|
|
|
35
29
|
| Story | Depends on | Status |
|
|
36
30
|
|-------|-----------|--------|
|
|
37
|
-
| | | |
|
|
38
|
-
|
|
39
|
-
---
|
|
40
31
|
|
|
32
|
+
<!-- Omit if no risks identified -->
|
|
41
33
|
## Risks
|
|
42
34
|
|
|
43
35
|
| Risk | Impact | Mitigation |
|
|
44
36
|
|------|--------|------------|
|
|
45
|
-
| | | |
|
|
46
37
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Sprint Review Notes
|
|
50
|
-
|
|
51
|
-
_Filled at sprint completion._
|
|
38
|
+
## Sprint Review
|
|
52
39
|
|
|
40
|
+
<!-- Fill at sprint completion only — omit this section until then -->
|
|
53
41
|
- Stories completed: {done_count}/{total_count}
|
|
54
42
|
- Velocity actual: {velocity_actual} points
|
|
55
|
-
- Carryover
|
|
56
|
-
|
|
57
|
-
---
|
|
43
|
+
- Carryover: {carryover}
|
|
58
44
|
|
|
59
45
|
## Retrospective
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
<!-- Fill at sprint completion only — omit this section until then -->
|
|
63
48
|
### What went well
|
|
64
49
|
-
|
|
65
|
-
|
|
66
50
|
### What didn't
|
|
67
51
|
-
|
|
68
|
-
|
|
69
52
|
### Action items
|
|
70
53
|
-
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Phase Summary — {{phase_name}}
|
|
2
|
+
|
|
3
|
+
<!-- P2: Omit any section that has nothing substantive to say. An empty section is worse than no section. -->
|
|
4
|
+
|
|
5
|
+
**Phase ID:** {{phase_id}}
|
|
6
|
+
**Closed:** {{closed_at}}
|
|
7
|
+
**Plan:** PLAN.md
|
|
8
|
+
|
|
9
|
+
## Outcomes
|
|
10
|
+
|
|
11
|
+
- {{what was built, in user-visible terms}}
|
|
12
|
+
|
|
13
|
+
## Decisions Made
|
|
14
|
+
|
|
15
|
+
<!-- Omit if no decisions were made that aren't already in PLAN.md -->
|
|
16
|
+
- {{key choices and their rationale}}
|
|
17
|
+
|
|
18
|
+
## Deviations from Plan
|
|
19
|
+
|
|
20
|
+
<!-- Omit if execution matched the plan exactly -->
|
|
21
|
+
- {{anything that diverged from PLAN.md and why}}
|
|
22
|
+
|
|
23
|
+
## Issues Encountered
|
|
24
|
+
|
|
25
|
+
<!-- Omit if no tasks were pruned, escalated, or skipped -->
|
|
26
|
+
- {{tasks pruned, escalated, or skipped}}
|
|
27
|
+
|
|
28
|
+
## Hand-off
|
|
29
|
+
|
|
30
|
+
Next phase: {{next phase id and goal}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Verification Report — {{phase_name}}
|
|
2
|
+
|
|
3
|
+
**Phase:** {{phase_id}}
|
|
4
|
+
**Verified:** {{date}}
|
|
5
|
+
**Verifier:** rihal-verifier
|
|
6
|
+
|
|
7
|
+
## Goal-backward check
|
|
8
|
+
|
|
9
|
+
**Original goal:** {{phase goal from PLAN.md}}
|
|
10
|
+
|
|
11
|
+
**Met?** ✅ / ◐ partial / ❌ not met
|
|
12
|
+
|
|
13
|
+
**Evidence:**
|
|
14
|
+
- {{file:line or test name proving the goal is met}}
|
|
15
|
+
|
|
16
|
+
## Per-task verification
|
|
17
|
+
|
|
18
|
+
| # | Task | Status | Evidence |
|
|
19
|
+
|---|------|--------|----------|
|
|
20
|
+
| 1 | {{task}} | ✅ | {{evidence}} |
|
|
21
|
+
|
|
22
|
+
## Gaps
|
|
23
|
+
|
|
24
|
+
- {{what wasn't delivered + why}}
|
|
25
|
+
|
|
26
|
+
## Recommendation
|
|
27
|
+
|
|
28
|
+
- proceed / revise / block
|
|
@@ -140,13 +140,45 @@ If `--report` flag set, also print the report to stdout. Otherwise, just save to
|
|
|
140
140
|
|
|
141
141
|
## On Error
|
|
142
142
|
|
|
143
|
-
If no SUMMARY.md files found
|
|
143
|
+
If no SUMMARY.md files found, **do not dead-halt** (closes #234). Probe
|
|
144
|
+
for executed-phase signals and offer recovery options:
|
|
144
145
|
|
|
146
|
+
```bash
|
|
147
|
+
PLANS=$(find "$MILESTONE_DIR" -name PLAN.md 2>/dev/null | wc -l)
|
|
148
|
+
GIT_FEAT=$(git log --oneline --grep='^feat' 2>/dev/null | wc -l)
|
|
149
|
+
APPS=$(ls -d apps packages src 2>/dev/null | wc -l)
|
|
145
150
|
```
|
|
146
|
-
|
|
151
|
+
|
|
152
|
+
If `PLANS > 0` AND (`GIT_FEAT > 0` OR `APPS > 0`):
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
⚠ {PLANS} phases planned, 0 SUMMARY.md, {GIT_FEAT} feat commits, code present.
|
|
156
|
+
Phases were executed but never formally closed.
|
|
157
|
+
|
|
158
|
+
Options:
|
|
159
|
+
1. Synthesize SUMMARY.md per phase from PLAN.md + git log [recommended]
|
|
160
|
+
(groups commits by phase tag like "feat(03-1):", writes a
|
|
161
|
+
first-pass SUMMARY.md the user can edit)
|
|
162
|
+
2. Run /rihal:verify-phase NN per phase (manual close path)
|
|
163
|
+
3. Continue audit anyway (only assesses what is documented — likely
|
|
164
|
+
reports 0% goal coverage)
|
|
165
|
+
0. Cancel
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
In `mode: yolo` (read via `node .rihal/bin/rihal-tools.cjs config-get
|
|
169
|
+
mode`), auto-pick option 1. In guided mode, ask. STOP after the user
|
|
170
|
+
picks 0 or 2; resume audit at Step 4 after option 1 completes.
|
|
171
|
+
|
|
172
|
+
If `PLANS == 0`:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
⚠ No phase summaries and no plans found. Have phases been executed?
|
|
147
176
|
Check: {MILESTONE_DIR}/phases/
|
|
177
|
+
Start one: /rihal:plan
|
|
148
178
|
```
|
|
149
179
|
|
|
180
|
+
STOP.
|
|
181
|
+
|
|
150
182
|
If ROADMAP missing:
|
|
151
183
|
|
|
152
184
|
```
|