@hanzlaa/rcode 4.7.3 → 4.9.0
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/CLAUDE.md +1 -1
- package/CONTRIBUTING.md +3 -0
- package/README.md +7 -5
- package/cli/github-sync.js +17 -201
- package/cli/install.js +16 -13
- package/cli/lib/config.cjs +1 -1
- package/cli/lib/github-sync-discover.cjs +304 -0
- package/cli/lib/namespace-migrate.cjs +16 -1
- package/cli/uninstall.js +7 -2
- package/dist/rcode.js +197 -197
- package/package.json +1 -1
- package/rcode/agents/rcode-code-reviewer.md +1 -1
- package/rcode/agents/rcode-docs-auditor.md +1 -1
- package/rcode/agents/rcode-edge-case-hunter.md +1 -1
- package/rcode/agents/rcode-haitham.md +1 -1
- package/rcode/agents/rcode-hanzla.md +1 -1
- package/rcode/agents/rcode-hussain-pm.md +1 -1
- package/rcode/agents/rcode-nyquist-auditor.md +1 -1
- package/rcode/agents/rcode-omar.md +1 -1
- package/rcode/agents/rcode-remediation-planner.md +1 -1
- package/rcode/agents/rcode-security-adversary.md +1 -1
- package/rcode/agents/rcode-security-auditor.md +1 -1
- package/rcode/agents/rcode-sprint-checker.md +1 -1
- package/rcode/agents/rcode-verifier.md +1 -1
- package/rcode/agents/rcode-waleed.md +1 -1
- package/rcode/agents/rcode-yousef.md +1 -1
- package/rcode/agents/rules/planner/task-templates.md +24 -22
- package/rcode/agents/rules/verifier/verification-report.md +2 -2
- package/rcode/bin/lib/roadmap.cjs +80 -4
- package/rcode/bin/rcode-tools.cjs +124 -1
- package/rcode/brain/best-practices/state-sync-rule.md +1 -1
- package/rcode/references/council-protocol.md +9 -4
- package/rcode/references/execute-auto-copy-learnings.md +15 -0
- package/rcode/references/execute-close-parent-artifacts.md +49 -0
- package/rcode/references/execute-interactive-mode.md +44 -0
- package/rcode/references/execute-notify-webhooks.md +22 -0
- package/rcode/references/execution-protocol.md +11 -11
- package/rcode/references/git-preflight.md +7 -4
- package/rcode/references/output-format.md +5 -5
- package/rcode/references/plan-gaps-mode.md +89 -0
- package/rcode/references/plan-thinking-partner.md +20 -0
- package/rcode/references/plan-windows-troubleshooting.md +25 -0
- package/rcode/references/planner-playbook.md +23 -29
- package/rcode/skills/_shared/state-sync-rule.md +1 -1
- package/rcode/skills/actions/1-analysis/rcode-document-project/SKILL.md +2 -0
- package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +2 -0
- package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/SKILL.md +11 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/SKILL.md +2 -0
- package/rcode/skills/actions/2-plan/rcode-create-story/SKILL.md +11 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/SKILL.md +2 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/SKILL.md +2 -0
- package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/SKILL.md +2 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-checkpoint-preview/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-code-review/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-correct-course/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-debug/SKILL.md +1 -1
- package/rcode/skills/actions/4-implementation/rcode-dev-story/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-retrospective/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-sprint-planning/SKILL.md +3 -2
- package/rcode/skills/actions/4-implementation/rcode-sprint-status/SKILL.md +2 -0
- package/rcode/skills/agents/haitham-frontend/SKILL.md +6 -0
- package/rcode/skills/agents/hanzla-engineer/SKILL.md +6 -0
- package/rcode/skills/agents/hussain-pm/SKILL.md +1 -1
- package/rcode/skills/agents/hussain-sm/SKILL.md +3 -3
- package/rcode/skills/agents/majlis-council/references.md +17 -7
- package/rcode/skills/agents/raees-orchestrator/SKILL.md +13 -11
- package/rcode/skills/agents/yousef-backend/SKILL.md +6 -0
- package/rcode/templates/github/epic-template.md +1 -1
- package/rcode/templates/github/feature-template.md +1 -1
- package/rcode/templates/github/task-template.md +1 -1
- package/rcode/templates/sprint.md +14 -3
- package/rcode/templates/verification-report.md +7 -4
- package/rcode/workflows/add-phase.md +33 -14
- package/rcode/workflows/code-review-fix.md +5 -5
- package/rcode/workflows/code-review.md +1 -1
- package/rcode/workflows/council.md +1 -0
- package/rcode/workflows/create-epics-and-stories.md +12 -6
- package/rcode/workflows/dev-story.md +12 -14
- package/rcode/workflows/do.md +12 -9
- package/rcode/workflows/execute-sprint.md +7 -4
- package/rcode/workflows/execute-waves.md +38 -2
- package/rcode/workflows/execute.md +42 -138
- package/rcode/workflows/init.md +10 -2
- package/rcode/workflows/lens-audit.md +7 -7
- package/rcode/workflows/plan-research-validation.md +10 -5
- package/rcode/workflows/plan-spawn-planner.md +9 -14
- package/rcode/workflows/plan.md +27 -138
- package/rcode/workflows/quick.md +1 -1
- package/rcode/workflows/scaffold-skill.md +19 -1
- package/rcode/workflows/secure-phase.md +7 -1
- package/rcode/workflows/sprint-planning.md +14 -37
- package/rcode/workflows/validate-phase.md +7 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# execute.md — close_parent_artifacts (decimal/polish phases only)
|
|
2
|
+
|
|
3
|
+
Extracted from `execute.md`'s `close_parent_artifacts` step. Only loaded when `PHASE_NUMBER` contains a decimal (gap-closure phases like `4.1`, `03.1`) — see the conditional include at that point in `execute.md`.
|
|
4
|
+
|
|
5
|
+
For decimal/polish phases only (X.Y pattern): close the feedback loop by resolving parent UAT and debug artifacts.
|
|
6
|
+
|
|
7
|
+
**1. Detect decimal phase and derive parent:**
|
|
8
|
+
```bash
|
|
9
|
+
# Check if phase_number contains a decimal
|
|
10
|
+
if [[ "$PHASE_NUMBER" == *.* ]]; then
|
|
11
|
+
PARENT_PHASE="${PHASE_NUMBER%%.*}"
|
|
12
|
+
fi
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**2. Find parent UAT file:**
|
|
16
|
+
```bash
|
|
17
|
+
PARENT_INFO=$(node ".rcode/bin/rcode-tools.cjs" find-phase "${PARENT_PHASE}" --raw)
|
|
18
|
+
# Extract directory from PARENT_INFO JSON, then find UAT file in that directory
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**If no parent UAT found:** Skip this step (gap-closure may have been triggered by VERIFICATION.md instead).
|
|
22
|
+
|
|
23
|
+
**3. Update UAT gap statuses:**
|
|
24
|
+
|
|
25
|
+
Read the parent UAT file's `## Gaps` section. For each gap entry with `status: failed`:
|
|
26
|
+
- Update to `status: resolved`
|
|
27
|
+
|
|
28
|
+
**4. Update UAT frontmatter:**
|
|
29
|
+
|
|
30
|
+
If all gaps now have `status: resolved`:
|
|
31
|
+
- Update frontmatter `status: diagnosed` → `status: resolved`
|
|
32
|
+
- Update frontmatter `updated:` timestamp
|
|
33
|
+
|
|
34
|
+
**5. Resolve referenced debug sessions:**
|
|
35
|
+
|
|
36
|
+
For each gap that has a `debug_session:` field:
|
|
37
|
+
- Read the debug session file
|
|
38
|
+
- Update frontmatter `status:` → `resolved`
|
|
39
|
+
- Update frontmatter `updated:` timestamp
|
|
40
|
+
- Move to resolved directory:
|
|
41
|
+
```bash
|
|
42
|
+
mkdir -p .planning/debug/resolved
|
|
43
|
+
mv .planning/debug/{slug}.md .planning/debug/resolved/
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**6. Commit updated artifacts:**
|
|
47
|
+
```bash
|
|
48
|
+
node ".rcode/bin/rcode-tools.cjs" commit "docs(phase-${PARENT_PHASE}): resolve UAT gaps and debug sessions after ${PHASE_NUMBER} gap closure" --files .planning/phases/*${PARENT_PHASE}*/*-UAT.md .planning/debug/resolved/*.md
|
|
49
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# execute.md — Interactive Execution Mode
|
|
2
|
+
|
|
3
|
+
Extracted from `execute.md`'s `check_interactive_mode` step. Only loaded when the `--interactive` flag is present — see the conditional include at that point in `execute.md`.
|
|
4
|
+
|
|
5
|
+
Interactive mode executes plans sequentially **inline** (no subagent spawning) with user
|
|
6
|
+
checkpoints between tasks. The user can review, modify, or redirect work at any point.
|
|
7
|
+
|
|
8
|
+
**Interactive execution flow:**
|
|
9
|
+
|
|
10
|
+
1. Load plan inventory as normal (discover_and_group_plans)
|
|
11
|
+
2. For each plan (sequentially, ignoring wave grouping):
|
|
12
|
+
|
|
13
|
+
a. **Present the plan to the user:**
|
|
14
|
+
```
|
|
15
|
+
## Plan {plan_id}: {plan_name}
|
|
16
|
+
|
|
17
|
+
Objective: {from plan file}
|
|
18
|
+
Tasks: {task_count}
|
|
19
|
+
|
|
20
|
+
Options:
|
|
21
|
+
- Execute (proceed with all tasks)
|
|
22
|
+
- Review first (show task breakdown before starting)
|
|
23
|
+
- Skip (move to next plan)
|
|
24
|
+
- Stop (end execution, save progress)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
b. **If "Review first":** Read and display the full plan file. Ask again: Execute, Modify, Skip.
|
|
28
|
+
|
|
29
|
+
c. **If "Execute":** Read and follow `.rcode/workflows/execute-sprint.md` **inline**
|
|
30
|
+
(do NOT spawn a subagent). Execute tasks one at a time.
|
|
31
|
+
|
|
32
|
+
d. **After each task:** Pause briefly. If the user intervenes (types anything), stop and address
|
|
33
|
+
their feedback before continuing. Otherwise proceed to next task.
|
|
34
|
+
|
|
35
|
+
e. **After plan complete:** Show results, commit, create SUMMARY.md, then present next plan.
|
|
36
|
+
**Overwrite guard:** If the SUMMARY.md file already exists from a previous run, delete it first with `rm -f <path>` before writing the new version. Never append to or skip an existing SUMMARY.md — always overwrite with the current sprint's completion data.
|
|
37
|
+
|
|
38
|
+
3. After all plans: proceed to verification (same as normal mode).
|
|
39
|
+
|
|
40
|
+
**Benefits of interactive mode:**
|
|
41
|
+
- No subagent overhead — dramatically lower token usage
|
|
42
|
+
- User catches mistakes early — saves costly verification cycles
|
|
43
|
+
- Maintains rcode's planning/tracking structure
|
|
44
|
+
- Best for: small phases, bug fixes, verification gaps, learning rcode
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# execute.md — notify_on_completion (webhook notifications)
|
|
2
|
+
|
|
3
|
+
Extracted from `execute.md`'s `notify_on_completion` step. Only loaded when a webhook URL is configured — see the conditional include at that point in `execute.md`.
|
|
4
|
+
|
|
5
|
+
**Post phase completion to configured webhooks (Slack / Discord / MS Teams).**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node ".rcode/bin/rcode-tools.cjs" notify send \
|
|
9
|
+
--title "Phase ${phase_number} complete — ${phase_name}" \
|
|
10
|
+
--body "$(basename "$PWD") · $(git rev-parse --short HEAD) · ${incomplete_count:-0} plan(s) remaining" \
|
|
11
|
+
--event "execute-done" 2>/dev/null || true
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Users configure webhooks by editing `.rcode/config.yaml`:
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
slack_webhook_url: "https://hooks.slack.com/services/..."
|
|
18
|
+
discord_webhook_url: "https://discord.com/api/webhooks/..."
|
|
19
|
+
teams_webhook_url: "https://outlook.office.com/webhook/..."
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then verify with `/rcode-notify-test`.
|
|
@@ -10,13 +10,13 @@ Every plan file must have this frontmatter and structure:
|
|
|
10
10
|
|
|
11
11
|
```markdown
|
|
12
12
|
---
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
phase: "8" # phase ID (no leading zeros — issue #652)
|
|
14
|
+
plan_number: 1 # plan ID within phase (no leading zeros — issue #652)
|
|
15
|
+
wave: 1 # auto-derived from depends_on
|
|
16
|
+
depends_on: [] # list of other plan IDs like ["8-1"]
|
|
17
|
+
files_modified: [] # files this plan touches
|
|
18
|
+
autonomous: true # whether the plan runs without checkpoints
|
|
19
|
+
requirements: [] # requirement IDs mapped to this plan, if any
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
## Objective
|
|
@@ -41,10 +41,10 @@ type: checkpoint:human-verify
|
|
|
41
41
|
|
|
42
42
|
**Hierarchical ID format:**
|
|
43
43
|
- Milestone: `M{N}` (e.g., M1, M2)
|
|
44
|
-
- Phase: `{
|
|
45
|
-
- Decimal phase (inserted): `{
|
|
46
|
-
- Plan within phase: `{
|
|
47
|
-
- Task within plan: `{
|
|
44
|
+
- Phase: `{N}` — no leading zeros (issue #652), e.g. 1, 2, 72
|
|
45
|
+
- Decimal phase (inserted): `{N.M}` (e.g., 2.1, 72.3)
|
|
46
|
+
- Plan within phase: `{N.M}` (e.g., 1.2)
|
|
47
|
+
- Task within plan: `{N.M.T}` (e.g., 1.2.3)
|
|
48
48
|
|
|
49
49
|
**Task types:**
|
|
50
50
|
- `auto` — executor runs without pausing
|
|
@@ -14,13 +14,16 @@ Run these read-only commands in order. Any failure halts the workflow with the f
|
|
|
14
14
|
# Check 1: working tree clean
|
|
15
15
|
DIRTY=$(git status --porcelain 2>/dev/null)
|
|
16
16
|
|
|
17
|
-
# Check 2: not on a protected branch
|
|
17
|
+
# Check 2: not on a protected branch (skipped entirely when `git.branching_strategy`
|
|
18
|
+
# config is `none` — committing directly to main/master is the deliberately configured
|
|
19
|
+
# workflow in that case)
|
|
18
20
|
BRANCH=$(git branch --show-current 2>/dev/null)
|
|
21
|
+
BRANCHING_STRATEGY=$(node .rcode/bin/rcode-tools.cjs config-get git.branching_strategy 2>/dev/null)
|
|
19
22
|
PROTECTED="main master develop v2-prototype"
|
|
20
23
|
|
|
21
24
|
# Check 3: branch follows naming convention
|
|
22
|
-
# Allowed: feat/foo-bar, fix/123-baz, issue-123-name, task-123-slug
|
|
23
|
-
BRANCH_OK=$(echo "$BRANCH" | grep -qE '^((feat|fix|docs|chore|refactor|test|perf|style|build|ci)/[a-z0-9][a-z0-9-]*|(issue|task)-[0-9]+-[a-z0-9-]+)$' && echo yes || echo no)
|
|
25
|
+
# Allowed: feat/foo-bar, fix/123-baz, issue-123-name, task-123-slug, 8-1-aria (phase-plan-slug)
|
|
26
|
+
BRANCH_OK=$(echo "$BRANCH" | grep -qE '^((feat|fix|docs|chore|refactor|test|perf|style|build|ci)/[a-z0-9][a-z0-9-]*|(issue|task)-[0-9]+-[a-z0-9-]+|[0-9]+-[0-9]+-[a-z0-9-]+)$' && echo yes || echo no)
|
|
24
27
|
|
|
25
28
|
# Check 4: scope drift — files touched that don't belong to the active task
|
|
26
29
|
# The workflow MUST pass $TASK_SCOPE_GLOB (e.g. ".planning/phases/8-*/" or "src/auth/")
|
|
@@ -35,7 +38,7 @@ fi
|
|
|
35
38
|
The workflow MUST stop and print the banner below if ANY of:
|
|
36
39
|
|
|
37
40
|
- `DIRTY` is non-empty AND user did not pass `--allow-dirty`
|
|
38
|
-
- `BRANCH` is in `$PROTECTED` AND user did not pass `--on-main`
|
|
41
|
+
- `BRANCH` is in `$PROTECTED` AND `BRANCHING_STRATEGY` is not `none` AND user did not pass `--on-main`
|
|
39
42
|
- `BRANCH_OK` is `no` AND user did not pass `--allow-dirty` (branch-name lint is advisory if working tree is dirty AND user accepted the dirty override)
|
|
40
43
|
- `OUT_OF_SCOPE` is non-empty AND user did not pass `--allow-scope-drift`
|
|
41
44
|
|
|
@@ -42,7 +42,7 @@ Use for major workflow transitions.
|
|
|
42
42
|
|
|
43
43
|
```
|
|
44
44
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
-
|
|
45
|
+
rcode ► {STAGE NAME}
|
|
46
46
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
47
47
|
```
|
|
48
48
|
|
|
@@ -69,7 +69,7 @@ Use this when a router command dispatches to another command:
|
|
|
69
69
|
|
|
70
70
|
```
|
|
71
71
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
72
|
-
|
|
72
|
+
rcode ► ROUTING
|
|
73
73
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
74
74
|
|
|
75
75
|
Input: {user's question or intent}
|
|
@@ -328,7 +328,7 @@ Use standard markdown pipe tables with status symbols:
|
|
|
328
328
|
**Majlis banner** (multi-agent council):
|
|
329
329
|
```
|
|
330
330
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
331
|
-
|
|
331
|
+
rcode ► MAJLIS CONVENING
|
|
332
332
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
333
333
|
```
|
|
334
334
|
|
|
@@ -354,7 +354,7 @@ the banner, not inside it.
|
|
|
354
354
|
|
|
355
355
|
```
|
|
356
356
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
357
|
-
|
|
357
|
+
rcode ► PLANNING SPRINT 01.1
|
|
358
358
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
359
359
|
التخطيط للسباق 01.1 — يرجى الانتظار
|
|
360
360
|
```
|
|
@@ -389,7 +389,7 @@ translated prose goes outside the art, on its own line(s).
|
|
|
389
389
|
|
|
390
390
|
- Varying box/banner widths within same output
|
|
391
391
|
- Mixing banner styles (`===`, `---`, `***`)
|
|
392
|
-
- Skipping `
|
|
392
|
+
- Skipping `rcode ►` prefix in stage banners
|
|
393
393
|
- Random emoji (`🚀`, `✨`, `💫`) outside the approved set
|
|
394
394
|
- Missing Next Up block after workflow completions
|
|
395
395
|
- Hardcoding references to other methodologies in rcode's UX
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# plan.md — `--gaps` Mode (Handle `--gaps` Mode)
|
|
2
|
+
|
|
3
|
+
Extracted from `plan.md` step 3.6. Only loaded when `GAPS_MODE=true` — see the conditional include at that point in `plan.md`.
|
|
4
|
+
|
|
5
|
+
**Skip unless:** `GAPS_MODE=true`.
|
|
6
|
+
|
|
7
|
+
**Purpose:** Read `NNN-VERIFICATION.md`, extract failing/partial gaps, count existing plan files, and prepare a `gap_list` payload to feed the planner. On completion, control flow continues at step 8 (skipping CONTEXT.md gating, research, and validation-strategy creation).
|
|
8
|
+
|
|
9
|
+
**Step 1: Locate VERIFICATION.md**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
PHASE_DIR=$(node ".rcode/bin/rcode-tools.cjs" roadmap get-phase "${PHASE}" --pick dir 2>/dev/null || echo "")
|
|
13
|
+
# Fallback if --pick dir not supported. TODO(#118): expose roadmap --pick dir cleanly.
|
|
14
|
+
if [[ -z "$PHASE_DIR" ]]; then
|
|
15
|
+
PHASE_DIR=$(ls -d .planning/phases/${padded_phase}-* 2>/dev/null | head -1)
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
VERIFICATION_FILE=$(ls "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**If `VERIFICATION_FILE` is empty:**
|
|
22
|
+
```
|
|
23
|
+
Error: No VERIFICATION.md found for Phase {X}. Gap-closure planning requires the phase to have run through the verifier first.
|
|
24
|
+
|
|
25
|
+
Try:
|
|
26
|
+
/rcode-execute {X} ${RCODE_WS} # run or re-run execution + verification
|
|
27
|
+
```
|
|
28
|
+
Exit workflow.
|
|
29
|
+
|
|
30
|
+
**Step 2: Extract gaps from VERIFICATION.md**
|
|
31
|
+
|
|
32
|
+
Parse the file for gap entries with `status: gap_found` or `status: partial`. Inspect these sections:
|
|
33
|
+
- `## Automated Gap` (or `## Automated Gaps`)
|
|
34
|
+
- `## Human Verification Required`
|
|
35
|
+
- Any findings block that includes a `status:` field set to `gap_found` or `partial`
|
|
36
|
+
|
|
37
|
+
Collect into `GAP_LIST` (an ordered list where each entry has: id, title, expected, actual, status, source_section, severity if present).
|
|
38
|
+
|
|
39
|
+
If `GAP_LIST` is empty, display:
|
|
40
|
+
```
|
|
41
|
+
Phase {X} VERIFICATION.md contains no gap_found or partial items — nothing to close.
|
|
42
|
+
Report: {VERIFICATION_FILE}
|
|
43
|
+
```
|
|
44
|
+
Exit workflow.
|
|
45
|
+
|
|
46
|
+
**Step 3: Determine next plan number**
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
EXISTING_PLAN_COUNT=$(ls "${PHASE_DIR}"/*-SPRINT.md 2>/dev/null | wc -l | tr -d ' ')
|
|
50
|
+
# Issue #652 — no leading zeros in planning artifacts. Phase 8 not 08, plan 2 not 02.
|
|
51
|
+
NEXT_PLAN_NUMBER=$((EXISTING_PLAN_COUNT + 1))
|
|
52
|
+
PADDED_PHASE="${PHASE}"
|
|
53
|
+
GAP_PLAN_FILENAME="${PADDED_PHASE}-${NEXT_PLAN_NUMBER}-SPRINT.md"
|
|
54
|
+
GAP_PLAN_PATH="${PHASE_DIR}/${GAP_PLAN_FILENAME}"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If `EXISTING_PLAN_COUNT == 0`, there is no prior execution to reference. Display a warning but proceed — the planner can still close verification gaps.
|
|
58
|
+
|
|
59
|
+
**Step 4: Gather prior plans for planner context**
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
EXISTING_PLAN_FILES=$(ls "${PHASE_DIR}"/*-SPRINT.md 2>/dev/null | tr '\n' ' ')
|
|
63
|
+
EXISTING_SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null | tr '\n' ' ')
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Step 5: Display banner**
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
70
|
+
rcode ► GAP-CLOSURE PLANNING — Phase {X}
|
|
71
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
72
|
+
|
|
73
|
+
Verification report: {VERIFICATION_FILE}
|
|
74
|
+
Gaps to close: {count(GAP_LIST)}
|
|
75
|
+
Existing plans: {EXISTING_PLAN_COUNT}
|
|
76
|
+
New plan file: {GAP_PLAN_FILENAME}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Step 6: Skip ahead**
|
|
80
|
+
|
|
81
|
+
Control flow jumps directly to step 8 (Spawn rcode-planner). Steps 4 (CONTEXT.md), 5 (Research), and 5.5 (Validation) are ALL skipped when `GAPS_MODE=true`.
|
|
82
|
+
|
|
83
|
+
Step 8 will consume these variables when filling the planner prompt:
|
|
84
|
+
- `GAP_LIST` — serialized list of gaps (id, title, expected, actual, status)
|
|
85
|
+
- `GAP_PLAN_PATH` — exact output path the planner must write
|
|
86
|
+
- `EXISTING_PLAN_FILES` / `EXISTING_SUMMARY_FILES` — prior phase context
|
|
87
|
+
- `VERIFICATION_FILE` — authoritative source-of-truth
|
|
88
|
+
|
|
89
|
+
After the planner returns, the existing plan-checker / revision loop (step 10 onward) runs unchanged — gap plans are verified just like normal plans.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# plan.md — Thinking Partner for Architectural Tradeoffs
|
|
2
|
+
|
|
3
|
+
Extracted from `plan.md` step 11. Only loaded when `features.thinking_partner` is enabled — see the conditional include at that point in `plan.md`.
|
|
4
|
+
|
|
5
|
+
If `features.thinking_partner` is enabled, scan the checker's issues for architectural tradeoff keywords
|
|
6
|
+
("architecture", "approach", "strategy", "pattern", "vs", "alternative"). If found:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
The sprint-checker flagged an architectural decision point:
|
|
10
|
+
{issue description}
|
|
11
|
+
|
|
12
|
+
Brief analysis:
|
|
13
|
+
- Option A: {approach_from_plan} — {pros/cons}
|
|
14
|
+
- Option B: {alternative_approach} — {pros/cons}
|
|
15
|
+
- Recommendation: {choice} aligned with {phase_goal}
|
|
16
|
+
|
|
17
|
+
Apply this to the revision? [Yes] / [No, I'll decide]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
If yes: include the recommendation in the revision prompt. If no: proceed to revision loop as normal.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# plan.md — Windows Troubleshooting
|
|
2
|
+
|
|
3
|
+
Extracted from `plan.md`'s `<windows_troubleshooting>` block. Only loaded on Windows — see the conditional include at that point in `plan.md`.
|
|
4
|
+
|
|
5
|
+
**Windows users:** If sprint-plan freezes during agent spawning (common on Windows due to
|
|
6
|
+
stdio deadlocks with MCP servers — see Claude Code issue anthropics/claude-code#28126):
|
|
7
|
+
|
|
8
|
+
1. **Force-kill:** Close the terminal (Ctrl+C may not work)
|
|
9
|
+
2. **Clean up orphaned processes:**
|
|
10
|
+
```powershell
|
|
11
|
+
# Kill orphaned node processes from stale MCP servers
|
|
12
|
+
Get-Process node -ErrorAction SilentlyContinue | Where-Object {$_.StartTime -lt (Get-Date).AddHours(-1)} | Stop-Process -Force
|
|
13
|
+
```
|
|
14
|
+
3. **Clean up stale task directories:**
|
|
15
|
+
```powershell
|
|
16
|
+
# Remove stale subagent task dirs (Claude Code never cleans these on crash)
|
|
17
|
+
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\tasks\*" -ErrorAction SilentlyContinue
|
|
18
|
+
```
|
|
19
|
+
4. **Reduce MCP server count:** Temporarily disable non-essential MCP servers in settings.json
|
|
20
|
+
5. **Retry:** Restart Claude Code and run `/rcode-plan` again
|
|
21
|
+
|
|
22
|
+
If freezes persist, try `--skip-research` to reduce the agent chain from 3 to 2 agents:
|
|
23
|
+
```
|
|
24
|
+
/rcode-plan N --skip-research
|
|
25
|
+
```
|
|
@@ -160,42 +160,36 @@ Sprint-checker enforces this — see `rcode-sprint-checker.md` Mandatory Output
|
|
|
160
160
|
|
|
161
161
|
```markdown
|
|
162
162
|
---
|
|
163
|
-
|
|
163
|
+
phase: {phase}
|
|
164
|
+
plan_number: {N}
|
|
165
|
+
wave: {N}
|
|
166
|
+
depends_on: []
|
|
167
|
+
autonomous: true|false
|
|
168
|
+
files_modified: [...]
|
|
169
|
+
requirements: [...]
|
|
170
|
+
must_haves: {truths, artifacts, key_links}
|
|
164
171
|
---
|
|
165
172
|
|
|
166
|
-
<objective>
|
|
167
|
-
[What this plan accomplishes]
|
|
168
|
-
Purpose: [Why this matters]
|
|
169
|
-
Output: [Artifacts created]
|
|
170
|
-
</objective>
|
|
171
|
-
|
|
173
|
+
<objective>...</objective>
|
|
172
174
|
<execution_context>
|
|
173
|
-
@.rcode/workflows/execute.md
|
|
175
|
+
@.rcode/workflows/execute-sprint.md
|
|
174
176
|
@.rcode/templates/summary.md
|
|
175
177
|
</execution_context>
|
|
176
|
-
|
|
177
|
-
<context>
|
|
178
|
-
@.planning/PROJECT.md
|
|
179
|
-
@.planning/ROADMAP.md
|
|
180
|
-
@.planning/STATE.md
|
|
181
|
-
[Only prior SUMMARY refs if genuinely needed]
|
|
182
|
-
</context>
|
|
183
|
-
|
|
178
|
+
<context>...</context>
|
|
184
179
|
<tasks>
|
|
185
|
-
|
|
180
|
+
<task id="{phase}.{plan}.{N}" type="auto">
|
|
181
|
+
<title>...</title>
|
|
182
|
+
<read_first>...</read_first>
|
|
183
|
+
<files>...</files>
|
|
184
|
+
<action>...</action>
|
|
185
|
+
<verify><automated>...</automated></verify>
|
|
186
|
+
<done>...</done>
|
|
187
|
+
<evidence>...</evidence>
|
|
188
|
+
</task>
|
|
186
189
|
</tasks>
|
|
187
|
-
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
</verification>
|
|
191
|
-
|
|
192
|
-
<success_criteria>
|
|
193
|
-
[Measurable completion]
|
|
194
|
-
</success_criteria>
|
|
195
|
-
|
|
196
|
-
<output>
|
|
197
|
-
Create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
|
|
198
|
-
</output>
|
|
190
|
+
<verification>...</verification>
|
|
191
|
+
<success_criteria>...</success_criteria>
|
|
192
|
+
<output>Create `.planning/phases/{phase-dir}/{phase}-{plan}-SUMMARY.md`</output>
|
|
199
193
|
```
|
|
200
194
|
|
|
201
195
|
## Common Planning Mistakes to Avoid
|
|
@@ -8,7 +8,7 @@ Immediately after appending content to any of:
|
|
|
8
8
|
|
|
9
9
|
- `.planning/ROADMAP.md` — milestones and phases
|
|
10
10
|
- `.planning/epics.md` — epics and stories
|
|
11
|
-
- `.
|
|
11
|
+
- `.planning/phases/{phase-dir}/{phase}-{plan}-SPRINT.md` — sprint commitments
|
|
12
12
|
|
|
13
13
|
Call the state-sync helper:
|
|
14
14
|
|
|
@@ -16,6 +16,8 @@ triggers:
|
|
|
16
16
|
- "create LLM-friendly docs"
|
|
17
17
|
user-invocable: true
|
|
18
18
|
---
|
|
19
|
+
|
|
20
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
19
21
|
@.rcode/references/karpathy-guidelines.md
|
|
20
22
|
|
|
21
23
|
|
|
@@ -11,6 +11,8 @@ triggers:
|
|
|
11
11
|
- "forge a product idea"
|
|
12
12
|
user-invocable: true
|
|
13
13
|
---
|
|
14
|
+
|
|
15
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
14
16
|
@.rcode/references/karpathy-guidelines.md
|
|
15
17
|
|
|
16
18
|
|
|
@@ -27,8 +27,19 @@ triggers:
|
|
|
27
27
|
- "تحليل وثيقة المتطلبات"
|
|
28
28
|
user-invocable: true
|
|
29
29
|
---
|
|
30
|
+
|
|
31
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
30
32
|
@.rcode/references/karpathy-guidelines.md
|
|
31
33
|
|
|
34
|
+
> **Note (experimental, no execution consumer):** the epics/stories/dev-story pipeline this
|
|
35
|
+
> skill is part of is not wired to `/rcode-execute` today — `rcode-executor` only reads
|
|
36
|
+
> `*-SPRINT.md` files (see `rcode/agents/rcode-executor.md`). The only way to "run" a story
|
|
37
|
+
> produced here is the manual `/rcode {dev-prompt-file}` invocation documented in
|
|
38
|
+
> `rcode/workflows/dev-story.md`, which has none of `/rcode-execute`'s atomic-commit,
|
|
39
|
+
> checkpoint, wave, or verification machinery. Treat this pipeline as experimental /
|
|
40
|
+
> unsupported for production execution until a decision is made to either wire it to
|
|
41
|
+
> `/rcode-execute` or deprecate it in favor of the SPRINT.md pipeline (see
|
|
42
|
+
> `AUDIT-redundant-work.md` finding 2).
|
|
32
43
|
|
|
33
44
|
## Overview
|
|
34
45
|
|
|
@@ -29,6 +29,8 @@ triggers:
|
|
|
29
29
|
- "صمم المتطلبات"
|
|
30
30
|
user-invocable: true
|
|
31
31
|
---
|
|
32
|
+
|
|
33
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
32
34
|
@.rcode/references/karpathy-guidelines.md
|
|
33
35
|
|
|
34
36
|
|
|
@@ -27,8 +27,19 @@ triggers:
|
|
|
27
27
|
- "جهّز القصة للتنفيذ"
|
|
28
28
|
user-invocable: true
|
|
29
29
|
---
|
|
30
|
+
|
|
31
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
30
32
|
@.rcode/references/karpathy-guidelines.md
|
|
31
33
|
|
|
34
|
+
> **Note (experimental, no execution consumer):** the epics/stories/dev-story pipeline this
|
|
35
|
+
> skill is part of is not wired to `/rcode-execute` today — `rcode-executor` only reads
|
|
36
|
+
> `*-SPRINT.md` files (see `rcode/agents/rcode-executor.md`). The only way to "run" a story
|
|
37
|
+
> produced here is the manual `/rcode {dev-prompt-file}` invocation documented in
|
|
38
|
+
> `rcode/workflows/dev-story.md`, which has none of `/rcode-execute`'s atomic-commit,
|
|
39
|
+
> checkpoint, wave, or verification machinery. Treat this pipeline as experimental /
|
|
40
|
+
> unsupported for production execution until a decision is made to either wire it to
|
|
41
|
+
> `/rcode-execute` or deprecate it in favor of the SPRINT.md pipeline (see
|
|
42
|
+
> `AUDIT-redundant-work.md` finding 2).
|
|
32
43
|
|
|
33
44
|
## Overview
|
|
34
45
|
|
|
@@ -16,6 +16,8 @@ triggers:
|
|
|
16
16
|
- "change the scope in the PRD"
|
|
17
17
|
user-invocable: true
|
|
18
18
|
---
|
|
19
|
+
|
|
20
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
19
21
|
@.rcode/references/karpathy-guidelines.md
|
|
20
22
|
|
|
21
23
|
|
|
@@ -16,6 +16,8 @@ triggers:
|
|
|
16
16
|
- "audit the PRD"
|
|
17
17
|
user-invocable: true
|
|
18
18
|
---
|
|
19
|
+
|
|
20
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
19
21
|
@.rcode/references/karpathy-guidelines.md
|
|
20
22
|
|
|
21
23
|
|
|
@@ -17,6 +17,8 @@ triggers:
|
|
|
17
17
|
- "can we start building"
|
|
18
18
|
user-invocable: true
|
|
19
19
|
---
|
|
20
|
+
|
|
21
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
20
22
|
@.rcode/references/karpathy-guidelines.md
|
|
21
23
|
|
|
22
24
|
|
|
@@ -20,6 +20,8 @@ triggers:
|
|
|
20
20
|
decision to use X"
|
|
21
21
|
user-invocable: true
|
|
22
22
|
---
|
|
23
|
+
|
|
24
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
23
25
|
@.rcode/references/karpathy-guidelines.md
|
|
24
26
|
|
|
25
27
|
|
|
@@ -12,6 +12,8 @@ triggers:
|
|
|
12
12
|
user-invocable: true
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
16
|
+
|
|
15
17
|
## Overview
|
|
16
18
|
|
|
17
19
|
Checkpoint preview skill for rcode.
|
|
@@ -29,6 +29,8 @@ triggers:
|
|
|
29
29
|
- "جودة الكود"
|
|
30
30
|
user-invocable: true
|
|
31
31
|
---
|
|
32
|
+
|
|
33
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
32
34
|
@.rcode/references/karpathy-guidelines.md
|
|
33
35
|
|
|
34
36
|
|
|
@@ -18,6 +18,8 @@ triggers:
|
|
|
18
18
|
- "change story mid-way"
|
|
19
19
|
user-invocable: true
|
|
20
20
|
---
|
|
21
|
+
|
|
22
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
21
23
|
@.rcode/references/karpathy-guidelines.md
|
|
22
24
|
|
|
23
25
|
|
|
@@ -29,8 +29,8 @@ triggers:
|
|
|
29
29
|
- "تتبّع السبب"
|
|
30
30
|
user-invocable: false
|
|
31
31
|
---
|
|
32
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
32
33
|
@.rcode/references/karpathy-guidelines.md
|
|
33
|
-
|
|
34
34
|
## The Iron Law
|
|
35
35
|
|
|
36
36
|
```
|
|
@@ -17,6 +17,8 @@ triggers:
|
|
|
17
17
|
- "implement .rcode/phases/{phase}/stories/{file}"
|
|
18
18
|
user-invocable: true
|
|
19
19
|
---
|
|
20
|
+
|
|
21
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
20
22
|
@.rcode/references/karpathy-guidelines.md
|
|
21
23
|
|
|
22
24
|
|
|
@@ -16,6 +16,8 @@ triggers:
|
|
|
16
16
|
- "extract learnings from this sprint"
|
|
17
17
|
user-invocable: true
|
|
18
18
|
---
|
|
19
|
+
|
|
20
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
19
21
|
@.rcode/references/karpathy-guidelines.md
|
|
20
22
|
|
|
21
23
|
|
|
@@ -28,6 +28,8 @@ triggers:
|
|
|
28
28
|
- "add rcode to existing project"
|
|
29
29
|
user-invocable: true
|
|
30
30
|
---
|
|
31
|
+
|
|
32
|
+
<!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
|
|
31
33
|
@.rcode/references/karpathy-guidelines.md
|
|
32
34
|
|
|
33
35
|
|
|
@@ -40,8 +40,9 @@ Follow the instructions in ./workflow.md.
|
|
|
40
40
|
|
|
41
41
|
## Output Format
|
|
42
42
|
|
|
43
|
-
- Output:
|
|
44
|
-
- Fixed structure:
|
|
43
|
+
- Output: sprint-status.yaml (path from {status_file}, per workflow.md step 4) — an epic/story status tracker, NOT a SPRINT.md
|
|
44
|
+
- Fixed structure: generated/last_updated/project metadata + development_status (epic -> stories -> retrospective, ordered)
|
|
45
|
+
- Distinct from `/rcode-sprint-planning` the slash command (`rcode/workflows/sprint-planning.md`), which writes a SPRINT.md via a separate in-line flow
|
|
45
46
|
- Stories ranked by priority from epics.md
|
|
46
47
|
- Leave 20% capacity buffer
|
|
47
48
|
- Do NOT commit to stories without explicit owners
|