@hanzlaa/rcode 2.1.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 +120 -0
- package/CLAUDE.md +120 -0
- package/CONTRIBUTING.md +298 -0
- package/README.md +436 -0
- package/cli/config.js +142 -0
- package/cli/context.js +213 -0
- package/cli/dashboard.js +38 -0
- package/cli/digest.js +66 -0
- package/cli/doctor.js +283 -0
- package/cli/github-sync.js +1016 -0
- package/cli/index.js +113 -0
- package/cli/install.js +946 -0
- package/cli/lib/config.cjs +334 -0
- package/cli/lib/fsutil.cjs +76 -0
- package/cli/lib/github.cjs +365 -0
- package/cli/lib/manifest.cjs +240 -0
- package/cli/lib/memory-bank.cjs +348 -0
- package/cli/lib/model-profiles.cjs +169 -0
- package/cli/lib/prompts.cjs +355 -0
- package/cli/postinstall.js +32 -0
- package/cli/set-mode.js +94 -0
- package/cli/set-profile.js +80 -0
- package/cli/show-model.js +82 -0
- package/cli/team.js +35 -0
- package/cli/tiers.js +49 -0
- package/cli/uninstall.js +600 -0
- package/cli/update.js +373 -0
- package/package.json +60 -0
- package/rihal/agents/rihal-advisor-researcher.md +116 -0
- package/rihal/agents/rihal-ahmed.md +66 -0
- package/rihal/agents/rihal-architect.md +79 -0
- package/rihal/agents/rihal-assumptions-analyzer.md +117 -0
- package/rihal/agents/rihal-code-fixer.md +74 -0
- package/rihal/agents/rihal-code-reviewer.md +75 -0
- package/rihal/agents/rihal-codebase-mapper.md +170 -0
- package/rihal/agents/rihal-debugger.md +140 -0
- package/rihal/agents/rihal-deviation-analyzer.md +74 -0
- package/rihal/agents/rihal-docs-auditor.md +77 -0
- package/rihal/agents/rihal-edge-case-hunter.md +75 -0
- package/rihal/agents/rihal-executor.md +113 -0
- package/rihal/agents/rihal-fatima.md +68 -0
- package/rihal/agents/rihal-haitham.md +75 -0
- package/rihal/agents/rihal-hanzla.md +59 -0
- package/rihal/agents/rihal-hussain-pm.md +82 -0
- package/rihal/agents/rihal-integration-checker.md +455 -0
- package/rihal/agents/rihal-khalid.md +59 -0
- package/rihal/agents/rihal-layla.md +57 -0
- package/rihal/agents/rihal-mariam.md +58 -0
- package/rihal/agents/rihal-nasser.md +57 -0
- package/rihal/agents/rihal-noor.md +60 -0
- package/rihal/agents/rihal-nyquist-auditor.md +182 -0
- package/rihal/agents/rihal-omar.md +57 -0
- package/rihal/agents/rihal-phase-researcher.md +84 -0
- package/rihal/agents/rihal-planner.md +176 -0
- package/rihal/agents/rihal-profiler.md +74 -0
- package/rihal/agents/rihal-project-researcher.md +80 -0
- package/rihal/agents/rihal-remediation-planner.md +78 -0
- package/rihal/agents/rihal-research-synthesizer.md +253 -0
- package/rihal/agents/rihal-roadmapper.md +73 -0
- package/rihal/agents/rihal-sadiq.md +72 -0
- package/rihal/agents/rihal-security-adversary.md +82 -0
- package/rihal/agents/rihal-security-auditor.md +78 -0
- package/rihal/agents/rihal-sprint-checker.md +124 -0
- package/rihal/agents/rihal-tech-writer.md +80 -0
- package/rihal/agents/rihal-ui-auditor.md +81 -0
- package/rihal/agents/rihal-ui-designer.md +6 -0
- package/rihal/agents/rihal-ux-designer.md +83 -0
- package/rihal/agents/rihal-verifier.md +124 -0
- package/rihal/agents/rihal-waleed.md +60 -0
- package/rihal/agents/rihal-yousef.md +78 -0
- package/rihal/agents/rihal-zahra.md +62 -0
- package/rihal/agents/rihal-zayd.md +78 -0
- package/rihal/agents/rules/codebase-mapper/detailed-guide.md +615 -0
- package/rihal/agents/rules/debugger/checkpoint-recovery.md +272 -0
- package/rihal/agents/rules/debugger/debug-session-state.md +261 -0
- package/rihal/agents/rules/debugger/hypothesis-templates.md +330 -0
- package/rihal/agents/rules/debugger/investigation-protocol.md +298 -0
- package/rihal/agents/rules/debugger/scientific-method.md +317 -0
- package/rihal/agents/rules/executor/authentication-gates.md +202 -0
- package/rihal/agents/rules/executor/deviation-rules.md +191 -0
- package/rihal/agents/rules/executor/execution-flow.md +116 -0
- package/rihal/agents/rules/executor/self-check.md +241 -0
- package/rihal/agents/rules/executor/stub-detection.md +267 -0
- package/rihal/agents/rules/executor/summary-creation.md +76 -0
- package/rihal/agents/rules/executor/task-commit-protocol.md +283 -0
- package/rihal/agents/rules/executor/tdd-flow.md +294 -0
- package/rihal/agents/rules/phase-researcher/detailed-guide.md +628 -0
- package/rihal/agents/rules/planner/common-patterns.md +373 -0
- package/rihal/agents/rules/planner/dependency-analysis.md +195 -0
- package/rihal/agents/rules/planner/goal-backward-thinking.md +220 -0
- package/rihal/agents/rules/planner/sprint-verification.md +202 -0
- package/rihal/agents/rules/planner/task-templates.md +296 -0
- package/rihal/agents/rules/project-researcher/detailed-guide.md +589 -0
- package/rihal/agents/rules/roadmapper/detailed-guide.md +620 -0
- package/rihal/agents/rules/sprint-checker/dimensions.md +414 -0
- package/rihal/agents/rules/sprint-checker/process.md +377 -0
- package/rihal/agents/rules/verifier/anti-patterns.md +94 -0
- package/rihal/agents/rules/verifier/artifact-verification.md +69 -0
- package/rihal/agents/rules/verifier/behavioral-spot-checks.md +49 -0
- package/rihal/agents/rules/verifier/context-loading.md +84 -0
- package/rihal/agents/rules/verifier/data-flow-trace.md +65 -0
- package/rihal/agents/rules/verifier/gap-output.md +51 -0
- package/rihal/agents/rules/verifier/key-links.md +56 -0
- package/rihal/agents/rules/verifier/requirements-coverage.md +28 -0
- package/rihal/agents/rules/verifier/verification-report.md +131 -0
- package/rihal/bin/lib/code-references.cjs +196 -0
- package/rihal/bin/lib/config.cjs +146 -0
- package/rihal/bin/lib/council-panel.cjs +501 -0
- package/rihal/bin/lib/roadmap.cjs +256 -0
- package/rihal/bin/lib/verify.cjs +118 -0
- package/rihal/bin/rihal-hooks.cjs +204 -0
- package/rihal/bin/rihal-tools.cjs +3554 -0
- package/rihal/brain/README.md +38 -0
- package/rihal/brain/best-practices/no-autonomous-bypass.md +37 -0
- package/rihal/brain/best-practices/research-citation-rule.md +39 -0
- package/rihal/brain/best-practices/state-sync-rule.md +43 -0
- package/rihal/brain/sources.yaml +59 -0
- package/rihal/commands/add-phase.md +18 -0
- package/rihal/commands/add-tests.md +18 -0
- package/rihal/commands/add-todo.md +8 -0
- package/rihal/commands/analyze-dependencies.md +11 -0
- package/rihal/commands/audit-fix.md +14 -0
- package/rihal/commands/audit-milestone.md +12 -0
- package/rihal/commands/audit-uat.md +18 -0
- package/rihal/commands/autonomous.md +19 -0
- package/rihal/commands/brainstorm.md +11 -0
- package/rihal/commands/chain.md +8 -0
- package/rihal/commands/check-implementation-readiness.md +8 -0
- package/rihal/commands/check-todos.md +18 -0
- package/rihal/commands/cleanup.md +18 -0
- package/rihal/commands/code-review-fix.md +14 -0
- package/rihal/commands/code-review.md +14 -0
- package/rihal/commands/complete-milestone.md +12 -0
- package/rihal/commands/config.md +8 -0
- package/rihal/commands/correct-course.md +8 -0
- package/rihal/commands/council.md +25 -0
- package/rihal/commands/create-epics-and-stories.md +8 -0
- package/rihal/commands/create-story.md +8 -0
- package/rihal/commands/dashboard.md +10 -0
- package/rihal/commands/debug.md +8 -0
- package/rihal/commands/decisions.md +10 -0
- package/rihal/commands/dev-story.md +8 -0
- package/rihal/commands/diff.md +10 -0
- package/rihal/commands/discuss-phase-power.md +11 -0
- package/rihal/commands/discuss-phase.md +19 -0
- package/rihal/commands/discuss.md +23 -0
- package/rihal/commands/do.md +22 -0
- package/rihal/commands/docs-update.md +14 -0
- package/rihal/commands/document-project.md +8 -0
- package/rihal/commands/enable-hooks.md +11 -0
- package/rihal/commands/execute-sprint.md +13 -0
- package/rihal/commands/execute.md +19 -0
- package/rihal/commands/explore.md +14 -0
- package/rihal/commands/export-to-github.md +11 -0
- package/rihal/commands/forensics.md +11 -0
- package/rihal/commands/from-template.md +11 -0
- package/rihal/commands/health.md +10 -0
- package/rihal/commands/help.md +8 -0
- package/rihal/commands/import.md +12 -0
- package/rihal/commands/inbox.md +12 -0
- package/rihal/commands/init.md +14 -0
- package/rihal/commands/insert-phase.md +11 -0
- package/rihal/commands/install.md +10 -0
- package/rihal/commands/karpathy-audit.md +12 -0
- package/rihal/commands/list-plans.md +11 -0
- package/rihal/commands/list-workspaces.md +10 -0
- package/rihal/commands/map-codebase.md +14 -0
- package/rihal/commands/milestone-summary.md +11 -0
- package/rihal/commands/new-milestone.md +12 -0
- package/rihal/commands/new-project-research.md +11 -0
- package/rihal/commands/new-project-roadmap.md +11 -0
- package/rihal/commands/new-project.md +13 -0
- package/rihal/commands/new-workspace.md +12 -0
- package/rihal/commands/next.md +19 -0
- package/rihal/commands/note.md +12 -0
- package/rihal/commands/notify-test.md +10 -0
- package/rihal/commands/pause-work.md +8 -0
- package/rihal/commands/plan-milestone-gaps.md +18 -0
- package/rihal/commands/plan.md +19 -0
- package/rihal/commands/plant-seed.md +18 -0
- package/rihal/commands/pr-branch.md +18 -0
- package/rihal/commands/profile-user.md +8 -0
- package/rihal/commands/progress.md +19 -0
- package/rihal/commands/quick.md +14 -0
- package/rihal/commands/remove-phase.md +18 -0
- package/rihal/commands/remove-workspace.md +11 -0
- package/rihal/commands/replay.md +11 -0
- package/rihal/commands/report.md +10 -0
- package/rihal/commands/rerun.md +11 -0
- package/rihal/commands/research-phase.md +18 -0
- package/rihal/commands/resume-work.md +8 -0
- package/rihal/commands/review-adversarial.md +8 -0
- package/rihal/commands/review-edge-case-hunter.md +8 -0
- package/rihal/commands/review.md +18 -0
- package/rihal/commands/scan.md +14 -0
- package/rihal/commands/secure-phase.md +14 -0
- package/rihal/commands/session-report.md +10 -0
- package/rihal/commands/settings.md +8 -0
- package/rihal/commands/ship.md +18 -0
- package/rihal/commands/show.md +10 -0
- package/rihal/commands/sprint-planning.md +20 -0
- package/rihal/commands/sprint-status.md +21 -0
- package/rihal/commands/stats.md +10 -0
- package/rihal/commands/status.md +21 -0
- package/rihal/commands/ui-phase.md +8 -0
- package/rihal/commands/ui-review.md +8 -0
- package/rihal/commands/undo.md +14 -0
- package/rihal/commands/update.md +11 -0
- package/rihal/commands/validate-phase.md +18 -0
- package/rihal/commands/verify-phase.md +18 -0
- package/rihal/commands/verify-work.md +19 -0
- package/rihal/commands/why.md +10 -0
- package/rihal/commands/workstream.md +11 -0
- package/rihal/config/model-profiles.json +226 -0
- package/rihal/config/model-profiles.schema.json +36 -0
- package/rihal/config.yaml +39 -0
- package/rihal/digests/README.md +50 -0
- package/rihal/digests/fatima.md +24 -0
- package/rihal/digests/hussain-pm.md +24 -0
- package/rihal/digests/mariam.md +24 -0
- package/rihal/digests/sadiq.md +24 -0
- package/rihal/digests/waleed.md +24 -0
- package/rihal/modules/core.yaml +101 -0
- package/rihal/modules/discovery.yaml +50 -0
- package/rihal/modules/execution.yaml +66 -0
- package/rihal/references/brain-methods.csv +9 -0
- package/rihal/references/checklist-architect.md +146 -0
- package/rihal/references/checklist-change.md +136 -0
- package/rihal/references/checklist-pm.md +154 -0
- package/rihal/references/checklist-po-master.md +100 -0
- package/rihal/references/checklist-story-dod.md +75 -0
- package/rihal/references/checklist-story-draft.md +53 -0
- package/rihal/references/checkpoints-index.md +53 -0
- package/rihal/references/checkpoints.md +778 -0
- package/rihal/references/codebase-grounding.md +76 -0
- package/rihal/references/command-redirect-format.md +62 -0
- package/rihal/references/commit-conventions.md +125 -0
- package/rihal/references/common-bug-patterns-index.md +44 -0
- package/rihal/references/common-bug-patterns.md +621 -0
- package/rihal/references/context-budget.md +104 -0
- package/rihal/references/continuation-format.md +249 -0
- package/rihal/references/council-protocol.md +91 -0
- package/rihal/references/domain-probes.md +213 -0
- package/rihal/references/elicitation-methods.csv +16 -0
- package/rihal/references/execution-protocol.md +155 -0
- package/rihal/references/gate-prompts.md +212 -0
- package/rihal/references/gates.md +127 -0
- package/rihal/references/git-integration.md +159 -0
- package/rihal/references/git-planning-commit.md +185 -0
- package/rihal/references/karpathy-guidelines.md +79 -0
- package/rihal/references/model-profiles.md +90 -0
- package/rihal/references/no-unauthorized-git-ops.md +73 -0
- package/rihal/references/output-format.md +319 -0
- package/rihal/references/output-realism.md +52 -0
- package/rihal/references/project-types.yaml +270 -0
- package/rihal/references/questioning.md +163 -0
- package/rihal/references/response-style.md +81 -0
- package/rihal/references/state-schema.md +366 -0
- package/rihal/references/tdd.md +263 -0
- package/rihal/references/thinking-models-debug.md +126 -0
- package/rihal/references/thinking-models-planning.md +127 -0
- package/rihal/references/ui-brand.md +254 -0
- package/rihal/references/verification-patterns-index.md +76 -0
- package/rihal/references/verification-patterns.md +612 -0
- package/rihal/references/workstream-flag.md +166 -0
- package/rihal/skills/SKILLS_INDEX.md +114 -0
- package/rihal/skills/_shared/no-autonomous-bypass.md +37 -0
- package/rihal/skills/_shared/research-citation-rule.md +39 -0
- package/rihal/skills/_shared/state-sync-rule.md +43 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/SKILL.md +31 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/domain-steps/step-01-init.md +137 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/domain-steps/step-02-domain-analysis.md +229 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/domain-steps/step-03-competitive-landscape.md +238 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/domain-steps/step-04-regulatory-focus.md +206 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/domain-steps/step-05-technical-trends.md +234 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/domain-steps/step-06-research-synthesis.md +444 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/research.template.md +29 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/workflow.md +49 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/SKILL.md +30 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/research.template.md +29 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/steps/step-01-init.md +184 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/steps/step-02-customer-behavior.md +239 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/steps/step-03-customer-pain-points.md +251 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/steps/step-04-customer-decisions.md +261 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/steps/step-05-competitive-analysis.md +173 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/steps/step-06-research-completion.md +478 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/workflow.md +49 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/SKILL.md +31 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/research.template.md +29 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/technical-steps/step-01-init.md +137 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/technical-steps/step-02-technical-overview.md +239 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/technical-steps/step-03-integration-patterns.md +248 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/technical-steps/step-04-architectural-patterns.md +202 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/technical-steps/step-05-implementation-research.md +233 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/technical-steps/step-06-research-synthesis.md +487 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/workflow.md +50 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/SKILL.md +30 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/checklist.md +245 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/documentation-requirements.csv +12 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/instructions.md +128 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/deep-dive-template.md +345 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/index-template.md +169 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/project-overview-template.md +103 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/project-scan-report-schema.json +160 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/source-tree-template.md +135 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflow.md +27 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/deep-dive-instructions.md +299 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/deep-dive-workflow.md +34 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/full-scan-instructions.md +1107 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/full-scan-workflow.md +34 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +120 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/agents/artifact-analyzer.md +60 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/agents/web-researcher.md +49 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/assets/prfaq-template.md +62 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/references/customer-faq.md +55 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/references/internal-faq.md +51 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/references/press-release.md +60 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/references/verdict.md +79 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/rihal-manifest.json +16 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/SKILL.md +112 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/agents/artifact-analyzer.md +60 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/agents/opportunity-reviewer.md +44 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/agents/skeptic-reviewer.md +44 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/agents/web-researcher.md +49 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/prompts/contextual-discovery.md +57 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/prompts/draft-and-review.md +86 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/prompts/finalize.md +75 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/prompts/guided-elicitation.md +70 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/resources/brief-template.md +60 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/rihal-manifest.json +17 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +30 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-01-validate-prerequisites.md +255 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-02-design-epics.md +212 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-04-final-validation.md +131 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/templates/epics-template.md +61 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/workflow.md +54 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +39 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/README.md +30 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-01-init.md +62 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-02-outcomes.md +64 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-03-sequencing.md +65 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-04-windows.md +60 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-05-kill-criteria.md +59 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-06-phase-stubs.md +56 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-07-backlog.md +44 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-08-write-roadmap.md +58 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-09-state-sync.md +62 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-10-complete.md +56 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/workflow.md +93 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +40 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/data/domain-complexity.csv +15 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/data/prd-purpose.md +197 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/data/project-types.csv +11 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-01-init.md +178 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-01b-continue.md +161 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02-discovery.md +208 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02b-vision.md +142 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02c-executive-summary.md +158 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-03-success.md +214 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-04-journeys.md +201 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-05-domain.md +194 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-06-innovation.md +211 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-07-project-type.md +222 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-08-scoping.md +216 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-09-functional.md +219 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-10-nonfunctional.md +230 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-11-polish.md +221 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-12-complete.md +115 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/templates/prd-template.md +10 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/workflow.md +64 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +31 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/checklist.md +357 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/discover-inputs.md +88 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/template.md +49 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/workflow.md +380 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/SKILL.md +31 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-01-init.md +135 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-01b-continue.md +127 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-02-discovery.md +190 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-03-core-experience.md +217 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-04-emotional-response.md +220 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-05-inspiration.md +235 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-06-design-system.md +253 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-07-defining-experience.md +255 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-08-visual-foundation.md +225 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-09-design-directions.md +225 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-10-user-journeys.md +242 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-11-component-strategy.md +249 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-12-ux-patterns.md +238 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-13-responsive-accessibility.md +265 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-14-complete.md +171 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/ux-design-template.md +13 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/workflow.md +36 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/SKILL.md +30 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-01-discovery.md +242 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-01b-legacy-conversion.md +204 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-02-review.md +245 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-03-edit.md +250 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-04-complete.md +165 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/workflow.md +63 -0
- package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +169 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/SKILL.md +29 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/data/domain-complexity.csv +15 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/data/prd-purpose.md +197 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/data/project-types.csv +11 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-01-discovery.md +221 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-02-format-detection.md +188 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-02b-parity-check.md +206 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-03-density-validation.md +171 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +211 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-05-measurability-validation.md +225 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-06-traceability-validation.md +214 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +202 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +240 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-09-project-type-validation.md +260 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-10-smart-validation.md +206 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +261 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-12-completeness-validation.md +239 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-13-report-complete.md +229 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/workflow.md +62 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/SKILL.md +30 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-01-document-discovery.md +179 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-02-prd-analysis.md +168 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +169 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-04-ux-alignment.md +129 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-05-epic-quality-review.md +241 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-06-final-assessment.md +126 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/templates/readiness-report-template.md +4 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/workflow.md +49 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/SKILL.md +32 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/architecture-decision-template.md +12 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/data/domain-complexity.csv +13 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/data/project-types.csv +7 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-01-init.md +153 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-01b-continue.md +173 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-02-context.md +224 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-03-starter.md +329 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-04-decisions.md +318 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-05-patterns.md +359 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-06-structure.md +379 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-07-validation.md +359 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-08-complete.md +76 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/workflow.md +38 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/SKILL.md +31 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/project-context-template.md +21 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/steps/step-01-discover.md +186 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/steps/step-02-generate.md +321 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/steps/step-03-complete.md +278 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/workflow.md +43 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +48 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/generate-trail.md +38 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/step-01-orientation.md +105 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/step-02-walkthrough.md +89 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/step-03-detail-pass.md +106 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/step-04-testing.md +74 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/step-05-wrapup.md +24 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +31 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/steps/step-01-gather-context.md +62 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/steps/step-02-review.md +34 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/steps/step-03-triage.md +49 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/steps/step-04-present.md +129 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/workflow.md +55 -0
- package/rihal/skills/actions/4-implementation/rihal-correct-course/SKILL.md +29 -0
- package/rihal/skills/actions/4-implementation/rihal-correct-course/checklist.md +288 -0
- package/rihal/skills/actions/4-implementation/rihal-correct-course/workflow.md +267 -0
- package/rihal/skills/actions/4-implementation/rihal-dev-story/SKILL.md +36 -0
- package/rihal/skills/actions/4-implementation/rihal-dev-story/checklist.md +80 -0
- package/rihal/skills/actions/4-implementation/rihal-dev-story/workflow.md +450 -0
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/SKILL.md +31 -0
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/checklist.md +33 -0
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/workflow.md +136 -0
- package/rihal/skills/actions/4-implementation/rihal-retrospective/SKILL.md +30 -0
- package/rihal/skills/actions/4-implementation/rihal-retrospective/workflow.md +1479 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/SKILL.md +77 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-01-target.md +17 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-02-safety.md +35 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-03-clone.md +50 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-04-post-setup.md +44 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +35 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/checklist.md +43 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/sprint-status-template.yaml +56 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/workflow.md +284 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/SKILL.md +30 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/workflow.md +261 -0
- package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +121 -0
- package/rihal/skills/agents/fatima-qa/SKILL.md +106 -0
- package/rihal/skills/agents/fatima-qa/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/haitham-frontend/SKILL.md +120 -0
- package/rihal/skills/agents/hanzla-engineer/SKILL.md +109 -0
- package/rihal/skills/agents/hanzla-engineer/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/hussain-pm/SKILL.md +107 -0
- package/rihal/skills/agents/hussain-pm/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/hussain-sm/SKILL.md +104 -0
- package/rihal/skills/agents/hussain-sm/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/layla-designer/SKILL.md +96 -0
- package/rihal/skills/agents/layla-designer/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/majlis-council/SKILL.md +179 -0
- package/rihal/skills/agents/mariam-marketing/SKILL.md +133 -0
- package/rihal/skills/agents/nasser-eng-manager/SKILL.md +125 -0
- package/rihal/skills/agents/noor-writer/SKILL.md +104 -0
- package/rihal/skills/agents/noor-writer/explain-concept.md +20 -0
- package/rihal/skills/agents/noor-writer/mermaid-gen.md +20 -0
- package/rihal/skills/agents/noor-writer/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/noor-writer/validate-doc.md +19 -0
- package/rihal/skills/agents/noor-writer/write-document.md +20 -0
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +154 -0
- package/rihal/skills/agents/sadiq-analyst/SKILL.md +106 -0
- package/rihal/skills/agents/sadiq-analyst/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/waleed-architect/SKILL.md +106 -0
- package/rihal/skills/agents/waleed-architect/skill-manifest.yaml +11 -0
- package/rihal/skills/agents/yousef-backend/SKILL.md +136 -0
- package/rihal/skills/agents/zahra-branding/SKILL.md +141 -0
- package/rihal/skills/agents/zayd-ml/SKILL.md +124 -0
- package/rihal/skills/core/module-help.csv +11 -0
- package/rihal/skills/core/module.yaml +25 -0
- package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +155 -0
- package/rihal/skills/core/rihal-advanced-elicitation/methods.csv +51 -0
- package/rihal/skills/core/rihal-advanced-elicitation/rihal-advanced-elicitation/SKILL.md +148 -0
- package/rihal/skills/core/rihal-advanced-elicitation/rihal-advanced-elicitation/methods.csv +51 -0
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +82 -0
- package/rihal/skills/core/rihal-brainstorming/brain-methods.csv +62 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-01-session-setup.md +214 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-01b-continue.md +124 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-02a-user-selected.md +229 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-02b-ai-recommended.md +239 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-02c-random-selection.md +211 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-02d-progressive-flow.md +266 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-03-technique-execution.md +401 -0
- package/rihal/skills/core/rihal-brainstorming/steps/step-04-idea-organization.md +305 -0
- package/rihal/skills/core/rihal-brainstorming/template.md +15 -0
- package/rihal/skills/core/rihal-brainstorming/workflow.md +53 -0
- package/rihal/skills/core/rihal-clone-website/SKILL.md +395 -0
- package/rihal/skills/core/rihal-distillator/SKILL.md +205 -0
- package/rihal/skills/core/rihal-distillator/agents/distillate-compressor.md +116 -0
- package/rihal/skills/core/rihal-distillator/agents/round-trip-reconstructor.md +68 -0
- package/rihal/skills/core/rihal-distillator/resources/compression-rules.md +51 -0
- package/rihal/skills/core/rihal-distillator/resources/distillate-format-reference.md +227 -0
- package/rihal/skills/core/rihal-distillator/resources/splitting-strategy.md +78 -0
- package/rihal/skills/core/rihal-distillator/scripts/analyze_sources.py +300 -0
- package/rihal/skills/core/rihal-distillator/scripts/tests/test_analyze_sources.py +204 -0
- package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +108 -0
- package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +193 -0
- package/rihal/skills/core/rihal-help/SKILL.md +91 -0
- package/rihal/skills/core/rihal-index-docs/SKILL.md +80 -0
- package/rihal/skills/core/rihal-init/SKILL.md +119 -0
- package/rihal/skills/core/rihal-init/resources/core-module.yaml +25 -0
- package/rihal/skills/core/rihal-init/scripts/rihal_init.py +593 -0
- package/rihal/skills/core/rihal-init/scripts/tests/test_rihal_init.py +329 -0
- package/rihal/skills/core/rihal-party-mode/SKILL.md +77 -0
- package/rihal/skills/core/rihal-party-mode/steps/step-01-agent-loading.md +138 -0
- package/rihal/skills/core/rihal-party-mode/steps/step-02-discussion-orchestration.md +187 -0
- package/rihal/skills/core/rihal-party-mode/steps/step-03-graceful-exit.md +167 -0
- package/rihal/skills/core/rihal-party-mode/workflow.md +190 -0
- package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +55 -0
- package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +81 -0
- package/rihal/skills/core/rihal-shard-doc/SKILL.md +119 -0
- package/rihal/skills/core/rihal-shard-doc/rihal-shard-doc/SKILL.md +122 -0
- package/rihal/team.yaml +343 -0
- package/rihal/templates/UI-SPEC.md +127 -0
- package/rihal/templates/documentation-requirements.csv +11 -0
- package/rihal/templates/github/bug-template.md +53 -0
- package/rihal/templates/github/epic-template.md +57 -0
- package/rihal/templates/github/feature-template.md +55 -0
- package/rihal/templates/github/task-template.md +52 -0
- package/rihal/templates/milestone.md +147 -0
- package/rihal/templates/projects/api-backend/PROJECT.md +37 -0
- package/rihal/templates/projects/api-backend/REQUIREMENTS.md +38 -0
- package/rihal/templates/projects/api-backend/ROADMAP.md +92 -0
- package/rihal/templates/projects/api-backend/template.yaml +17 -0
- package/rihal/templates/projects/mobile-app/PROJECT.md +37 -0
- package/rihal/templates/projects/mobile-app/REQUIREMENTS.md +32 -0
- package/rihal/templates/projects/mobile-app/ROADMAP.md +93 -0
- package/rihal/templates/projects/mobile-app/template.yaml +17 -0
- package/rihal/templates/projects/saas-b2b/PROJECT.md +40 -0
- package/rihal/templates/projects/saas-b2b/REQUIREMENTS.md +38 -0
- package/rihal/templates/projects/saas-b2b/ROADMAP.md +95 -0
- package/rihal/templates/projects/saas-b2b/template.yaml +18 -0
- package/rihal/templates/settings-hooks.json +36 -0
- package/rihal/templates/sprint.md +70 -0
- package/rihal/workflows/add-phase.md +112 -0
- package/rihal/workflows/add-tests.md +351 -0
- package/rihal/workflows/add-todo.md +181 -0
- package/rihal/workflows/analyze-dependencies.md +138 -0
- package/rihal/workflows/audit-fix.md +190 -0
- package/rihal/workflows/audit-milestone.md +155 -0
- package/rihal/workflows/audit-uat.md +109 -0
- package/rihal/workflows/autonomous.md +992 -0
- package/rihal/workflows/brainstorm.md +203 -0
- package/rihal/workflows/chain.md +188 -0
- package/rihal/workflows/check-implementation-readiness.md +193 -0
- package/rihal/workflows/check-todos.md +177 -0
- package/rihal/workflows/cleanup.md +152 -0
- package/rihal/workflows/code-review-fix.md +529 -0
- package/rihal/workflows/code-review.md +566 -0
- package/rihal/workflows/complete-milestone.md +836 -0
- package/rihal/workflows/config.md +105 -0
- package/rihal/workflows/correct-course.md +190 -0
- package/rihal/workflows/council.md +565 -0
- package/rihal/workflows/create-epics-and-stories.md +373 -0
- package/rihal/workflows/create-story.md +297 -0
- package/rihal/workflows/dashboard.md +102 -0
- package/rihal/workflows/debug.md +256 -0
- package/rihal/workflows/decisions.md +107 -0
- package/rihal/workflows/dev-story.md +432 -0
- package/rihal/workflows/diff.md +74 -0
- package/rihal/workflows/discuss-phase-power.md +325 -0
- package/rihal/workflows/discuss-phase.md +1201 -0
- package/rihal/workflows/discuss.md +227 -0
- package/rihal/workflows/do.md +175 -0
- package/rihal/workflows/docs-update.md +261 -0
- package/rihal/workflows/document-project.md +180 -0
- package/rihal/workflows/enable-hooks.md +102 -0
- package/rihal/workflows/execute-sprint.md +514 -0
- package/rihal/workflows/execute.md +1478 -0
- package/rihal/workflows/explore.md +171 -0
- package/rihal/workflows/export-to-github.md +174 -0
- package/rihal/workflows/forensics.md +201 -0
- package/rihal/workflows/from-template.md +173 -0
- package/rihal/workflows/health.md +194 -0
- package/rihal/workflows/help.md +318 -0
- package/rihal/workflows/import.md +306 -0
- package/rihal/workflows/inbox.md +418 -0
- package/rihal/workflows/init.md +245 -0
- package/rihal/workflows/insert-phase.md +116 -0
- package/rihal/workflows/install.md +85 -0
- package/rihal/workflows/karpathy-audit.md +409 -0
- package/rihal/workflows/list-plans.md +146 -0
- package/rihal/workflows/list-workspaces.md +115 -0
- package/rihal/workflows/map-codebase.md +449 -0
- package/rihal/workflows/milestone-summary.md +206 -0
- package/rihal/workflows/new-milestone.md +616 -0
- package/rihal/workflows/new-project-research.md +262 -0
- package/rihal/workflows/new-project-roadmap.md +446 -0
- package/rihal/workflows/new-project.md +1503 -0
- package/rihal/workflows/new-workspace.md +167 -0
- package/rihal/workflows/next.md +162 -0
- package/rihal/workflows/note.md +156 -0
- package/rihal/workflows/notify-test.md +113 -0
- package/rihal/workflows/pause-work.md +243 -0
- package/rihal/workflows/plan-milestone-gaps.md +273 -0
- package/rihal/workflows/plan.md +1262 -0
- package/rihal/workflows/plant-seed.md +169 -0
- package/rihal/workflows/pr-branch.md +129 -0
- package/rihal/workflows/profile-user.md +162 -0
- package/rihal/workflows/progress.md +184 -0
- package/rihal/workflows/quick.md +105 -0
- package/rihal/workflows/remove-phase.md +155 -0
- package/rihal/workflows/remove-workspace.md +158 -0
- package/rihal/workflows/replay.md +160 -0
- package/rihal/workflows/rerun.md +77 -0
- package/rihal/workflows/research-phase.md +82 -0
- package/rihal/workflows/resume-work.md +326 -0
- package/rihal/workflows/review-adversarial.md +180 -0
- package/rihal/workflows/review-edge-case-hunter.md +214 -0
- package/rihal/workflows/review.md +281 -0
- package/rihal/workflows/scan.md +135 -0
- package/rihal/workflows/secure-phase.md +196 -0
- package/rihal/workflows/session-report.md +187 -0
- package/rihal/workflows/settings.md +185 -0
- package/rihal/workflows/ship.md +237 -0
- package/rihal/workflows/show.md +63 -0
- package/rihal/workflows/sprint-planning.md +166 -0
- package/rihal/workflows/sprint-status.md +124 -0
- package/rihal/workflows/stats.md +141 -0
- package/rihal/workflows/status.md +116 -0
- package/rihal/workflows/ui-phase.md +148 -0
- package/rihal/workflows/ui-review.md +130 -0
- package/rihal/workflows/undo.md +426 -0
- package/rihal/workflows/update.md +185 -0
- package/rihal/workflows/validate-phase.md +174 -0
- package/rihal/workflows/verify-phase.md +375 -0
- package/rihal/workflows/verify-work.md +717 -0
- package/rihal/workflows/why.md +130 -0
- package/rihal/workflows/workstream.md +197 -0
- package/server/dashboard.js +632 -0
|
@@ -0,0 +1,992 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
|
|
3
|
+
Drive milestone phases autonomously — all remaining phases, a range via `--from N`/`--to N`, or a single phase via `--only N`. For each incomplete phase: discuss → plan → execute using Skill() flat invocations. Pauses only for explicit user decisions (grey area acceptance, blockers, validation requests). Re-reads ROADMAP.md after each phase to catch dynamically inserted phases.
|
|
4
|
+
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<required_reading>
|
|
8
|
+
|
|
9
|
+
@.rihal/references/output-format.md
|
|
10
|
+
@.rihal/references/workstream-flag.md
|
|
11
|
+
@.rihal/references/output-realism.md
|
|
12
|
+
|
|
13
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
14
|
+
|
|
15
|
+
</required_reading>
|
|
16
|
+
|
|
17
|
+
<output_format>
|
|
18
|
+
|
|
19
|
+
Open with banner:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
23
|
+
RIHAL ► AUTONOMOUS
|
|
24
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Per-phase banners:
|
|
28
|
+
- `RIHAL ► AUTONOMOUS ▸ Phase {N}/{T}: {Name} [████░░░░] {P}%`
|
|
29
|
+
- `RIHAL ► AUTONOMOUS ▸ LIFECYCLE`
|
|
30
|
+
- `RIHAL ► AUTONOMOUS ▸ COMPLETE 🎉`
|
|
31
|
+
- `RIHAL ► AUTONOMOUS ▸ STOPPED` on blocker
|
|
32
|
+
- `RIHAL ► AUTONOMOUS ▸ --to ${TO_PHASE} REACHED` on range completion
|
|
33
|
+
- `RIHAL ► AUTONOMOUS ▸ PHASE ${ONLY_PHASE} COMPLETE ✓` on --only
|
|
34
|
+
|
|
35
|
+
Use TaskCreate: one entry per phase in `todo_phases`. Mark in_progress one at a time; mark completed immediately after each phase finishes.
|
|
36
|
+
|
|
37
|
+
</output_format>
|
|
38
|
+
|
|
39
|
+
<process>
|
|
40
|
+
|
|
41
|
+
<step name="initialize" priority="first">
|
|
42
|
+
|
|
43
|
+
## 1. Initialize
|
|
44
|
+
|
|
45
|
+
Parse `$ARGUMENTS` for `--from N`, `--to N`, `--only N`, and `--interactive` flags:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
FROM_PHASE=""
|
|
49
|
+
if echo "$ARGUMENTS" | grep -qE '\-\-from\s+[0-9]'; then
|
|
50
|
+
FROM_PHASE=$(echo "$ARGUMENTS" | grep -oE '\-\-from\s+[0-9]+\.?[0-9]*' | awk '{print $2}')
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
TO_PHASE=""
|
|
54
|
+
if echo "$ARGUMENTS" | grep -qE '\-\-to\s+[0-9]'; then
|
|
55
|
+
TO_PHASE=$(echo "$ARGUMENTS" | grep -oE '\-\-to\s+[0-9]+\.?[0-9]*' | awk '{print $2}')
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
ONLY_PHASE=""
|
|
59
|
+
if echo "$ARGUMENTS" | grep -qE '\-\-only\s+[0-9]'; then
|
|
60
|
+
ONLY_PHASE=$(echo "$ARGUMENTS" | grep -oE '\-\-only\s+[0-9]+\.?[0-9]*' | awk '{print $2}')
|
|
61
|
+
FROM_PHASE="$ONLY_PHASE"
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
INTERACTIVE=""
|
|
65
|
+
if echo "$ARGUMENTS" | grep -q '\-\-interactive'; then
|
|
66
|
+
INTERACTIVE="true"
|
|
67
|
+
fi
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
When `--only` is set, also set `FROM_PHASE` to the same value so existing filter logic applies.
|
|
71
|
+
|
|
72
|
+
When `--interactive` is set, discuss runs inline with questions (not auto-answered), while plan and execute are dispatched as background agents. This keeps the main context lean — only discuss conversations accumulate — while preserving user input on all design decisions.
|
|
73
|
+
|
|
74
|
+
Bootstrap via rihal-tools init + state:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
INIT=$(node .rihal/bin/rihal-tools.cjs init milestone-op 2>/dev/null || node .rihal/bin/rihal-tools.cjs init)
|
|
78
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
79
|
+
STATE=$(node .rihal/bin/rihal-tools.cjs state read 2>/dev/null || echo '{}')
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `roadmap_exists`, `state_exists`, `commit_docs`.
|
|
83
|
+
|
|
84
|
+
**If `roadmap_exists` is false:** Error — "No ROADMAP.md found. Run `/rihal:new-milestone` first."
|
|
85
|
+
**If `state_exists` is false:** Error — "No STATE.md found. Run `/rihal:new-milestone` first."
|
|
86
|
+
|
|
87
|
+
Display startup banner:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
91
|
+
RIHAL ► AUTONOMOUS
|
|
92
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
93
|
+
|
|
94
|
+
Milestone: {milestone_version} — {milestone_name}
|
|
95
|
+
Phases: {phase_count} total, {completed_phases} complete
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
If `ONLY_PHASE` is set, display: `Single phase mode: Phase ${ONLY_PHASE}`
|
|
99
|
+
Else if `FROM_PHASE` is set, display: `Starting from phase ${FROM_PHASE}`
|
|
100
|
+
If `TO_PHASE` is set, display: `Stopping after phase ${TO_PHASE}`
|
|
101
|
+
If `INTERACTIVE` is set, display: `Mode: Interactive (discuss inline, plan+execute in background)`
|
|
102
|
+
|
|
103
|
+
</step>
|
|
104
|
+
|
|
105
|
+
<step name="discover_phases">
|
|
106
|
+
|
|
107
|
+
## 2. Discover Phases
|
|
108
|
+
|
|
109
|
+
Parse ROADMAP.md directly (rihal-tools does not expose `roadmap analyze`):
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
cat .planning/ROADMAP.md
|
|
113
|
+
# For per-phase detail, inspect .planning/phases/<phase_slug>/ directory for PLAN.md, SPRINT.md, SUMMARY.md presence
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Build an internal `phases` array with: `number`, `name`, `goal`, `disk_status` (complete if SUMMARY.md exists, partial if PLAN.md exists without SUMMARY.md, planned if neither), `has_ui_hint`.
|
|
117
|
+
|
|
118
|
+
**Filter to incomplete phases:** Keep only phases where `disk_status !== "complete"`.
|
|
119
|
+
|
|
120
|
+
**Apply `--from N` filter:** If `FROM_PHASE` was provided, additionally filter out phases where `number < FROM_PHASE` (use numeric comparison — handles decimal phases like "5.1").
|
|
121
|
+
|
|
122
|
+
**Apply `--to N` filter:** If `TO_PHASE` was provided, additionally filter out phases where `number > TO_PHASE` (use numeric comparison). This limits execution to phases up through the target phase.
|
|
123
|
+
|
|
124
|
+
**Apply `--only N` filter:** If `ONLY_PHASE` was provided, additionally filter OUT phases where `number != ONLY_PHASE`. This means the phase list will contain exactly one phase (or zero if already complete).
|
|
125
|
+
|
|
126
|
+
**If `TO_PHASE` is set and no phases remain:**
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
All phases through ${TO_PHASE} are already completed. Nothing to do.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Exit cleanly.
|
|
133
|
+
|
|
134
|
+
**If `ONLY_PHASE` is set and no phases remain:**
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Phase ${ONLY_PHASE} is already complete. Nothing to do.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Exit cleanly.
|
|
141
|
+
|
|
142
|
+
**Sort by `number`** in numeric ascending order.
|
|
143
|
+
|
|
144
|
+
**If no incomplete phases remain:**
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
148
|
+
RIHAL ► AUTONOMOUS ▸ COMPLETE 🎉
|
|
149
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
150
|
+
|
|
151
|
+
All phases complete! Nothing left to do.
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Exit cleanly.
|
|
155
|
+
|
|
156
|
+
**Display phase plan:**
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
## Phase Plan
|
|
160
|
+
|
|
161
|
+
| # | Phase | Status |
|
|
162
|
+
|---|-------|--------|
|
|
163
|
+
| 5 | Skill Scaffolding & Phase Discovery | In Progress |
|
|
164
|
+
| 6 | Smart Discuss | Not Started |
|
|
165
|
+
| 7 | Auto-Chain Refinements | Not Started |
|
|
166
|
+
| 8 | Lifecycle Orchestration | Not Started |
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
For each phase, extract `phase_name`, `goal`, `success_criteria` by reading its section in ROADMAP.md. Store for use in execute_phase and transition messages.
|
|
170
|
+
|
|
171
|
+
Use TaskCreate to register a task per incomplete phase.
|
|
172
|
+
|
|
173
|
+
</step>
|
|
174
|
+
|
|
175
|
+
<step name="execute_phase">
|
|
176
|
+
|
|
177
|
+
## 3. Execute Phase
|
|
178
|
+
|
|
179
|
+
For the current phase, display the progress banner:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
183
|
+
RIHAL ► AUTONOMOUS ▸ Phase {N}/{T}: {Name} [████░░░░] {P}%
|
|
184
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Where N = current phase number (from the ROADMAP, e.g., 63), T = total milestone phases (from `phase_count` parsed in initialize step, e.g., 67). **Important:** T must be `phase_count` (the total number of phases in this milestone), NOT the count of remaining/incomplete phases. P = percentage of all milestone phases completed so far — (number of phases with SUMMARY.md / T × 100). Use █ for filled and ░ for empty segments in the progress bar (8 characters wide).
|
|
188
|
+
|
|
189
|
+
**Alternative display when phase numbers exceed total** (multi-milestone projects where phases are numbered globally): If N > T, use the format `Phase {N} ({position}/{T})` where `position` is the 1-based index among incomplete phases being processed. This prevents confusing displays like "Phase 63/5".
|
|
190
|
+
|
|
191
|
+
### 3a. Smart Discuss
|
|
192
|
+
|
|
193
|
+
Check if CONTEXT.md already exists for this phase:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
PHASE_SLUG="<zero-padded-phase-number>-<phase-slug>"
|
|
197
|
+
PHASE_DIR=".planning/phases/${PHASE_SLUG}"
|
|
198
|
+
HAS_CONTEXT=$([ -f "${PHASE_DIR}/${PADDED_PHASE}-CONTEXT.md" ] || [ -f "${PHASE_DIR}/CONTEXT.md" ] && echo true || echo false)
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**If has_context is true:** Skip discuss — context already gathered. Display:
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Phase ${PHASE_NUM}: Context exists — skipping discuss.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Proceed to 3b.
|
|
208
|
+
|
|
209
|
+
**If has_context is false:** Check if discuss is disabled via settings:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
SKIP_DISCUSS=$(node .rihal/bin/rihal-tools.cjs config 2>/dev/null | grep -oE '"skip_discuss"[^,}]*' | grep -oE 'true|false' || echo "false")
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**If SKIP_DISCUSS is `true`:** Skip discuss entirely — the ROADMAP phase description is the spec. Display:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
Phase ${PHASE_NUM}: Discuss skipped (workflow.skip_discuss=true) — using ROADMAP phase goal as spec.
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Write a minimal CONTEXT.md so downstream plan-phase has valid input. Extract `goal` and `requirements` from ROADMAP.md for this phase. Write `${PHASE_DIR}/${PADDED_PHASE}-CONTEXT.md` with:
|
|
222
|
+
|
|
223
|
+
```markdown
|
|
224
|
+
# Phase {PHASE_NUM}: {Phase Name} - Context
|
|
225
|
+
|
|
226
|
+
**Gathered:** {date}
|
|
227
|
+
**Status:** Ready for planning
|
|
228
|
+
**Mode:** Auto-generated (discuss skipped via workflow.skip_discuss)
|
|
229
|
+
|
|
230
|
+
<domain>
|
|
231
|
+
## Phase Boundary
|
|
232
|
+
|
|
233
|
+
{goal from ROADMAP phase description}
|
|
234
|
+
|
|
235
|
+
</domain>
|
|
236
|
+
|
|
237
|
+
<decisions>
|
|
238
|
+
## Implementation Decisions
|
|
239
|
+
|
|
240
|
+
### Claude's Discretion
|
|
241
|
+
All implementation choices are at Claude's discretion — discuss phase was skipped per user setting. Use ROADMAP phase goal, success criteria, and codebase conventions to guide decisions.
|
|
242
|
+
|
|
243
|
+
</decisions>
|
|
244
|
+
|
|
245
|
+
<code_context>
|
|
246
|
+
## Existing Code Insights
|
|
247
|
+
|
|
248
|
+
Codebase context will be gathered during plan-phase research.
|
|
249
|
+
|
|
250
|
+
</code_context>
|
|
251
|
+
|
|
252
|
+
<specifics>
|
|
253
|
+
## Specific Ideas
|
|
254
|
+
|
|
255
|
+
No specific requirements — discuss phase skipped. Refer to ROADMAP phase description and success criteria.
|
|
256
|
+
|
|
257
|
+
</specifics>
|
|
258
|
+
|
|
259
|
+
<deferred>
|
|
260
|
+
## Deferred Ideas
|
|
261
|
+
|
|
262
|
+
None — discuss phase skipped.
|
|
263
|
+
|
|
264
|
+
</deferred>
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Commit the minimal context (guarded for gitignored `.planning/`):
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
git add "${PHASE_DIR}/${PADDED_PHASE}-CONTEXT.md" 2>/dev/null \
|
|
271
|
+
&& git commit -m "docs(${PADDED_PHASE}): auto-generated context (discuss skipped)" 2>/dev/null \
|
|
272
|
+
|| echo "ℹ .planning/ gitignored — context written, not committed"
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Proceed to 3b.
|
|
276
|
+
|
|
277
|
+
**If SKIP_DISCUSS is `false` (or unset):**
|
|
278
|
+
|
|
279
|
+
**IMPORTANT — Discuss must be single-pass in autonomous mode.**
|
|
280
|
+
The discuss step in autonomous mode MUST NOT loop. If CONTEXT.md already exists after discuss completes, do NOT re-invoke discuss for the same phase. The has_context check below is authoritative.
|
|
281
|
+
|
|
282
|
+
**If `INTERACTIVE` is set:** Run the standard discuss-phase skill inline (asks interactive questions, waits for user answers):
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
Skill(skill="rihal:discuss-phase", args="${PHASE_NUM}")
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**If `INTERACTIVE` is NOT set:** Execute the smart_discuss step for this phase (batch table proposals, auto-optimized — see smart_discuss step below).
|
|
289
|
+
|
|
290
|
+
After discuss completes (either mode), verify context was written by checking for CONTEXT.md. If not present → go to handle_blocker: "Discuss for phase ${PHASE_NUM} did not produce CONTEXT.md."
|
|
291
|
+
|
|
292
|
+
### 3a.5. UI Design Contract (Frontend Phases)
|
|
293
|
+
|
|
294
|
+
Check if this phase has frontend indicators and whether a UI-SPEC already exists:
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
PHASE_SECTION=$(sed -n "/^## Phase ${PHASE_NUM}/,/^## Phase /p" .planning/ROADMAP.md)
|
|
298
|
+
echo "$PHASE_SECTION" | grep -iE "UI|interface|frontend|component|layout|page|screen|view|form|dashboard|widget" > /dev/null 2>&1
|
|
299
|
+
HAS_UI=$?
|
|
300
|
+
UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
301
|
+
UI_PHASE_CFG=$(node .rihal/bin/rihal-tools.cjs config 2>/dev/null | grep -oE '"ui_phase"[^,}]*' | grep -oE 'true|false' || echo "true")
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**If `HAS_UI` is 0 (frontend indicators found) AND `UI_SPEC_FILE` is empty AND `UI_PHASE_CFG` is not `false`:**
|
|
305
|
+
|
|
306
|
+
Display:
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
Phase ${PHASE_NUM}: Frontend phase detected — generating UI design contract...
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
Skill(skill="rihal:ui-phase", args="${PHASE_NUM}")
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Verify UI-SPEC was created. If still empty after ui-phase, display a non-blocking warning and proceed to 3b.
|
|
317
|
+
|
|
318
|
+
**Otherwise:** Skip silently to 3b.
|
|
319
|
+
|
|
320
|
+
### 3b. Plan
|
|
321
|
+
|
|
322
|
+
**If `INTERACTIVE` is set:** Dispatch plan as a background Task agent to keep the main context lean:
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
Task(
|
|
326
|
+
description="Plan phase ${PHASE_NUM}: ${PHASE_NAME}",
|
|
327
|
+
subagent_type="rihal-planner",
|
|
328
|
+
run_in_background=true,
|
|
329
|
+
prompt="Run plan-phase for phase ${PHASE_NUM}: Skill(skill=\"rihal:plan\", args=\"${PHASE_NUM}\")"
|
|
330
|
+
)
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Store the agent task_id. After discuss for the next phase completes (or if no next phase), wait for the plan agent to finish before proceeding to execute.
|
|
334
|
+
|
|
335
|
+
**If `INTERACTIVE` is NOT set (default):** Run plan inline as before.
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
Skill(skill="rihal:plan", args="${PHASE_NUM}")
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Verify plan produced output — check `${PHASE_DIR}` for `*-PLAN.md` or `SPRINT.md`. If none → go to handle_blocker: "Plan phase ${PHASE_NUM} did not produce any plans."
|
|
342
|
+
|
|
343
|
+
### 3c. Execute
|
|
344
|
+
|
|
345
|
+
**If `INTERACTIVE` is set:** Wait for the plan agent to complete (if not already), verify plans exist, then dispatch execute as a background agent:
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
Task(
|
|
349
|
+
description="Execute phase ${PHASE_NUM}: ${PHASE_NAME}",
|
|
350
|
+
subagent_type="rihal-executor",
|
|
351
|
+
run_in_background=true,
|
|
352
|
+
prompt="Run execute-phase for phase ${PHASE_NUM}: Skill(skill=\"rihal:execute\", args=\"${PHASE_NUM} --no-transition\")"
|
|
353
|
+
)
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Store the agent task_id. The workflow can now start discussing the next phase while this phase executes in the background. Before starting post-execution routing for this phase, wait for the execute agent to complete.
|
|
357
|
+
|
|
358
|
+
**If `INTERACTIVE` is NOT set (default):** Run execute inline as before.
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
Skill(skill="rihal:execute", args="${PHASE_NUM} --no-transition")
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### 3c.5. Code Review and Fix
|
|
365
|
+
|
|
366
|
+
Auto-invoke code review and fix chain. Autonomous mode chains both review and fix.
|
|
367
|
+
|
|
368
|
+
**Config gate:**
|
|
369
|
+
```bash
|
|
370
|
+
CODE_REVIEW_ENABLED=$(node .rihal/bin/rihal-tools.cjs config 2>/dev/null | grep -oE '"code_review"[^,}]*' | grep -oE 'true|false' || echo "true")
|
|
371
|
+
```
|
|
372
|
+
If `"false"`: display "Code review skipped (workflow.code_review=false)" and proceed to 3d.
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
Skill(skill="rihal:code-review", args="${PHASE_NUM}")
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Parse status from REVIEW.md frontmatter. If "clean" or "skipped": proceed to 3d. If findings found: auto-invoke:
|
|
379
|
+
```
|
|
380
|
+
Skill(skill="rihal:code-review-fix", args="${PHASE_NUM} --auto")
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
**Error handling:** If either Skill fails, catch the error, display as non-blocking, and proceed to 3d.
|
|
384
|
+
|
|
385
|
+
### 3d. Post-Execution Routing
|
|
386
|
+
|
|
387
|
+
**If `INTERACTIVE` is set:** Wait for the execute agent to complete before reading verification results.
|
|
388
|
+
|
|
389
|
+
After execute returns, read the verification result:
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
VERIFY_STATUS=$(grep "^status:" "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**If VERIFY_STATUS is empty** (no VERIFICATION.md or no status field):
|
|
396
|
+
|
|
397
|
+
Go to handle_blocker: "Execute phase ${PHASE_NUM} did not produce verification results."
|
|
398
|
+
|
|
399
|
+
**If `passed`:**
|
|
400
|
+
|
|
401
|
+
Display:
|
|
402
|
+
```
|
|
403
|
+
Phase ${PHASE_NUM} ✅ ${PHASE_NAME} — Verification passed
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Proceed to iterate step.
|
|
407
|
+
|
|
408
|
+
**If `human_needed`:**
|
|
409
|
+
|
|
410
|
+
Read the human_verification section from VERIFICATION.md to get the count and items requiring manual testing.
|
|
411
|
+
|
|
412
|
+
Display the items, then ask user via AskUserQuestion:
|
|
413
|
+
- **question:** "Phase ${PHASE_NUM} has items needing manual verification. Validate now or continue to next phase?"
|
|
414
|
+
- **options:** "Validate now" / "Continue without validation"
|
|
415
|
+
|
|
416
|
+
On **"Validate now"**: Present the specific items from VERIFICATION.md. After user reviews, ask:
|
|
417
|
+
- **question:** "Validation result?"
|
|
418
|
+
- **options:** "All good — continue" / "Found issues"
|
|
419
|
+
|
|
420
|
+
On "All good — continue": Display `Phase ${PHASE_NUM} ✅ Human validation passed` and proceed to iterate step.
|
|
421
|
+
|
|
422
|
+
On "Found issues": Go to handle_blocker with the user's reported issues as the description.
|
|
423
|
+
|
|
424
|
+
On **"Continue without validation"**: Display `Phase ${PHASE_NUM} ⏭ Human validation deferred` and proceed to iterate step.
|
|
425
|
+
|
|
426
|
+
**If `gaps_found`:**
|
|
427
|
+
|
|
428
|
+
Read gap summary from VERIFICATION.md (score and missing items). Display:
|
|
429
|
+
```
|
|
430
|
+
⚠ Phase ${PHASE_NUM}: ${PHASE_NAME} — Gaps Found
|
|
431
|
+
Score: {N}/{M} must-haves verified
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Ask user via AskUserQuestion:
|
|
435
|
+
- **question:** "Gaps found in phase ${PHASE_NUM}. How to proceed?"
|
|
436
|
+
- **options:** "Run gap closure" / "Continue without fixing" / "Stop autonomous mode"
|
|
437
|
+
|
|
438
|
+
On **"Run gap closure"**: Execute gap closure cycle (limit: 1 attempt):
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
Skill(skill="rihal:plan", args="${PHASE_NUM} --gaps")
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Verify gap plans were created. If none → go to handle_blocker: "Gap closure planning for phase ${PHASE_NUM} did not produce plans."
|
|
445
|
+
|
|
446
|
+
Re-execute:
|
|
447
|
+
```
|
|
448
|
+
Skill(skill="rihal:execute", args="${PHASE_NUM} --no-transition")
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Re-read verification status. If `passed` or `human_needed`: route normally. If still `gaps_found` after this retry: ask via AskUserQuestion:
|
|
452
|
+
- **options:** "Continue anyway" / "Stop autonomous mode"
|
|
453
|
+
|
|
454
|
+
This limits gap closure to 1 automatic retry to prevent infinite loops.
|
|
455
|
+
|
|
456
|
+
On **"Continue without fixing"**: Display `Phase ${PHASE_NUM} ⏭ Gaps deferred` and proceed to iterate step.
|
|
457
|
+
|
|
458
|
+
On **"Stop autonomous mode"**: Go to handle_blocker with "User stopped — gaps remain in phase ${PHASE_NUM}".
|
|
459
|
+
|
|
460
|
+
### 3d.5. UI Review (Frontend Phases)
|
|
461
|
+
|
|
462
|
+
> Run after any successful execution routing (passed, human_needed accepted, or gaps deferred/accepted) — before proceeding to the iterate step.
|
|
463
|
+
|
|
464
|
+
```bash
|
|
465
|
+
UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
466
|
+
UI_REVIEW_CFG=$(node .rihal/bin/rihal-tools.cjs config 2>/dev/null | grep -oE '"ui_review"[^,}]*' | grep -oE 'true|false' || echo "true")
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**If `UI_SPEC_FILE` is not empty AND `UI_REVIEW_CFG` is not `false`:**
|
|
470
|
+
|
|
471
|
+
Display:
|
|
472
|
+
|
|
473
|
+
```
|
|
474
|
+
Phase ${PHASE_NUM}: Frontend phase with UI-SPEC — running UI review audit...
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
```
|
|
478
|
+
Skill(skill="rihal:ui-review", args="${PHASE_NUM}")
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
Display the review result summary (score from UI-REVIEW.md if produced). Continue to iterate step regardless of score — UI review is advisory, not blocking.
|
|
482
|
+
|
|
483
|
+
**Otherwise:** Skip silently to iterate step.
|
|
484
|
+
|
|
485
|
+
</step>
|
|
486
|
+
|
|
487
|
+
<step name="smart_discuss">
|
|
488
|
+
|
|
489
|
+
## Smart Discuss
|
|
490
|
+
|
|
491
|
+
Run smart discuss for the current phase. Proposes grey area answers in batch tables — the user accepts or overrides per area. Produces identical CONTEXT.md output to regular discuss-phase.
|
|
492
|
+
|
|
493
|
+
**Inputs:** `PHASE_NUM` from execute_phase. Resolve phase paths:
|
|
494
|
+
|
|
495
|
+
```bash
|
|
496
|
+
PHASE_NUM="${PHASE_NUM}"
|
|
497
|
+
PADDED_PHASE=$(printf "%02d" "${PHASE_NUM%.*}")
|
|
498
|
+
PHASE_DIR=".planning/phases/${PADDED_PHASE}-${PHASE_SLUG}"
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
### Sub-step 1: Load prior context
|
|
504
|
+
|
|
505
|
+
Read project-level and prior phase context to avoid re-asking decided questions.
|
|
506
|
+
|
|
507
|
+
**Read project files:**
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
cat .planning/PROJECT.md 2>/dev/null || true
|
|
511
|
+
cat .planning/REQUIREMENTS.md 2>/dev/null || true
|
|
512
|
+
cat .planning/STATE.md 2>/dev/null || true
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
Extract from these:
|
|
516
|
+
- **PROJECT.md** — Vision, principles, non-negotiables, user preferences
|
|
517
|
+
- **REQUIREMENTS.md** — Acceptance criteria, constraints, must-haves vs nice-to-haves
|
|
518
|
+
- **STATE.md** — Current progress, decisions logged so far
|
|
519
|
+
|
|
520
|
+
**Read all prior CONTEXT.md files:**
|
|
521
|
+
|
|
522
|
+
```bash
|
|
523
|
+
(find .planning/phases -name "*-CONTEXT.md" -o -name "CONTEXT.md" 2>/dev/null || true) | sort
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
For each CONTEXT.md where phase number < current phase:
|
|
527
|
+
- Read the `<decisions>` section — these are locked preferences
|
|
528
|
+
- Read `<specifics>` — particular references or "I want it like X" moments
|
|
529
|
+
- Note patterns (e.g., "user consistently prefers minimal UI", "user rejected verbose output")
|
|
530
|
+
|
|
531
|
+
**Build internal prior_decisions context** (do not write to file).
|
|
532
|
+
|
|
533
|
+
If no prior context exists, continue without — expected for early phases.
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
### Sub-step 2: Scout Codebase
|
|
538
|
+
|
|
539
|
+
Lightweight codebase scan to inform grey area identification. Keep under ~5% context.
|
|
540
|
+
|
|
541
|
+
**Check for existing codebase maps:**
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
ls .planning/codebase/*.md 2>/dev/null || true
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
**If codebase maps exist:** Read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type).
|
|
548
|
+
|
|
549
|
+
**If no codebase maps, do targeted grep:**
|
|
550
|
+
|
|
551
|
+
```bash
|
|
552
|
+
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10 || true
|
|
553
|
+
ls src/components/ src/hooks/ src/lib/ src/utils/ 2>/dev/null || true
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
Read the 3-5 most relevant files to understand existing patterns.
|
|
557
|
+
|
|
558
|
+
**Build internal codebase_context** (do not write to file):
|
|
559
|
+
- **Reusable assets** — existing components, hooks, utilities usable in this phase
|
|
560
|
+
- **Established patterns** — how the codebase does state management, styling, data fetching
|
|
561
|
+
- **Integration points** — where new code connects (routes, nav, providers)
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
### Sub-step 3: Analyze Phase and Generate Proposals
|
|
566
|
+
|
|
567
|
+
Extract `goal`, `requirements`, `success_criteria` from ROADMAP.md for this phase.
|
|
568
|
+
|
|
569
|
+
**Infrastructure detection — check FIRST:**
|
|
570
|
+
|
|
571
|
+
A phase is pure infrastructure when ALL are true:
|
|
572
|
+
1. Goal keywords match: "scaffolding", "plumbing", "setup", "configuration", "migration", "refactor", "rename", "restructure", "upgrade", "infrastructure"
|
|
573
|
+
2. AND success criteria are all technical: "file exists", "test passes", "config valid", "command runs"
|
|
574
|
+
3. AND no user-facing behavior is described (no "users can", "displays", "shows", "presents")
|
|
575
|
+
|
|
576
|
+
**If infrastructure-only:** Skip Sub-step 4. Jump directly to Sub-step 5 with minimal CONTEXT.md. Display:
|
|
577
|
+
|
|
578
|
+
```
|
|
579
|
+
Phase ${PHASE_NUM}: Infrastructure phase — skipping discuss, writing minimal context.
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
**If NOT infrastructure — generate grey area proposals:**
|
|
583
|
+
|
|
584
|
+
Determine domain type from the phase goal:
|
|
585
|
+
- Something users **SEE** → visual: layout, interactions, states, density
|
|
586
|
+
- Something users **CALL** → interface: contracts, responses, errors, auth
|
|
587
|
+
- Something users **RUN** → execution: invocation, output, behavior modes, flags
|
|
588
|
+
- Something users **READ** → content: structure, tone, depth, flow
|
|
589
|
+
- Something being **ORGANIZED** → organization: criteria, grouping, exceptions, naming
|
|
590
|
+
|
|
591
|
+
Check prior_decisions — skip grey areas already decided in prior phases.
|
|
592
|
+
|
|
593
|
+
Generate **3-4 grey areas** with **~4 questions each**. For each question:
|
|
594
|
+
- **Pre-select a recommended answer** based on: prior decisions, codebase patterns, domain conventions, ROADMAP success criteria
|
|
595
|
+
- Generate **1-2 alternatives** per question
|
|
596
|
+
- **Annotate** with prior decision context and code context
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
### Sub-step 4: Present Proposals Per Area
|
|
601
|
+
|
|
602
|
+
Present grey areas **one at a time**. For each area (M of N), display a table:
|
|
603
|
+
|
|
604
|
+
```
|
|
605
|
+
### Grey Area {M}/{N}: {Area Name}
|
|
606
|
+
|
|
607
|
+
| # | Question | ✅ Recommended | Alternative(s) |
|
|
608
|
+
|---|----------|---------------|-----------------|
|
|
609
|
+
| 1 | {question} | {answer} — {rationale} | {alt1}; {alt2} |
|
|
610
|
+
| 2 | {question} | {answer} — {rationale} | {alt1} |
|
|
611
|
+
| 3 | {question} | {answer} — {rationale} | {alt1}; {alt2} |
|
|
612
|
+
| 4 | {question} | {answer} — {rationale} | {alt1} |
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
Then prompt via **AskUserQuestion**:
|
|
616
|
+
- **header:** "Area {M}/{N}"
|
|
617
|
+
- **question:** "Accept these answers for {Area Name}?"
|
|
618
|
+
- **options:** Build dynamically — always "Accept all" first, then "Change Q1" through "Change QN" for each question (up to 4), then "Discuss deeper" last. Cap at 6 explicit options max.
|
|
619
|
+
|
|
620
|
+
**On "Accept all":** Record all recommended answers. Move to next area.
|
|
621
|
+
|
|
622
|
+
**On "Change QN":** Use AskUserQuestion with the alternatives for that specific question:
|
|
623
|
+
- **options:** List the 1-2 alternatives plus "You decide" (maps to Claude's Discretion)
|
|
624
|
+
|
|
625
|
+
Record the user's choice. Re-display updated table. Re-present acceptance prompt.
|
|
626
|
+
|
|
627
|
+
**On "Discuss deeper":** Switch to interactive mode — ask questions one at a time using AskUserQuestion with 2-3 concrete options per question plus "You decide". After 4 questions, prompt:
|
|
628
|
+
- **options:** "More questions" / "Next area"
|
|
629
|
+
|
|
630
|
+
**On "Other" (free text):** Interpret as a change request or general feedback. Incorporate, re-display, re-present.
|
|
631
|
+
|
|
632
|
+
**Scope creep handling:** If user mentions something outside the phase domain:
|
|
633
|
+
|
|
634
|
+
```
|
|
635
|
+
"{Feature} sounds like a new capability — that belongs in its own phase.
|
|
636
|
+
I'll note it as a deferred idea.
|
|
637
|
+
|
|
638
|
+
Back to {current area}: {return to current question}"
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
Track deferred ideas internally for inclusion in CONTEXT.md.
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
|
|
645
|
+
### Sub-step 5: Write CONTEXT.md
|
|
646
|
+
|
|
647
|
+
After all areas are resolved (or infrastructure skip), write the CONTEXT.md file.
|
|
648
|
+
|
|
649
|
+
**File path:** `${PHASE_DIR}/${PADDED_PHASE}-CONTEXT.md`
|
|
650
|
+
|
|
651
|
+
Use **exactly** this structure:
|
|
652
|
+
|
|
653
|
+
```markdown
|
|
654
|
+
# Phase {PHASE_NUM}: {Phase Name} - Context
|
|
655
|
+
|
|
656
|
+
**Gathered:** {date}
|
|
657
|
+
**Status:** Ready for planning
|
|
658
|
+
|
|
659
|
+
<domain>
|
|
660
|
+
## Phase Boundary
|
|
661
|
+
|
|
662
|
+
{Domain boundary statement from analysis}
|
|
663
|
+
|
|
664
|
+
</domain>
|
|
665
|
+
|
|
666
|
+
<decisions>
|
|
667
|
+
## Implementation Decisions
|
|
668
|
+
|
|
669
|
+
### {Area 1 Name}
|
|
670
|
+
- {Accepted/chosen answer for Q1}
|
|
671
|
+
- {Accepted/chosen answer for Q2}
|
|
672
|
+
|
|
673
|
+
### {Area 2 Name}
|
|
674
|
+
- {Accepted/chosen answer for Q1}
|
|
675
|
+
|
|
676
|
+
### Claude's Discretion
|
|
677
|
+
{Any "You decide" answers collected}
|
|
678
|
+
|
|
679
|
+
</decisions>
|
|
680
|
+
|
|
681
|
+
<code_context>
|
|
682
|
+
## Existing Code Insights
|
|
683
|
+
|
|
684
|
+
### Reusable Assets
|
|
685
|
+
- {From codebase scout}
|
|
686
|
+
|
|
687
|
+
### Established Patterns
|
|
688
|
+
- {From codebase scout}
|
|
689
|
+
|
|
690
|
+
### Integration Points
|
|
691
|
+
- {From codebase scout}
|
|
692
|
+
|
|
693
|
+
</code_context>
|
|
694
|
+
|
|
695
|
+
<specifics>
|
|
696
|
+
## Specific Ideas
|
|
697
|
+
|
|
698
|
+
{Any specific references from discussion}
|
|
699
|
+
{If none: "No specific requirements — open to standard approaches"}
|
|
700
|
+
|
|
701
|
+
</specifics>
|
|
702
|
+
|
|
703
|
+
<deferred>
|
|
704
|
+
## Deferred Ideas
|
|
705
|
+
|
|
706
|
+
{Ideas captured but out of scope}
|
|
707
|
+
{If none: "None — discussion stayed within phase scope"}
|
|
708
|
+
|
|
709
|
+
</deferred>
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
Write the file.
|
|
713
|
+
|
|
714
|
+
**Commit (guarded):**
|
|
715
|
+
|
|
716
|
+
```bash
|
|
717
|
+
git add "${PHASE_DIR}/${PADDED_PHASE}-CONTEXT.md" 2>/dev/null \
|
|
718
|
+
&& git commit -m "docs(${PADDED_PHASE}): smart discuss context" 2>/dev/null \
|
|
719
|
+
|| echo "ℹ .planning/ gitignored — context written, not committed"
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
Display confirmation:
|
|
723
|
+
|
|
724
|
+
```
|
|
725
|
+
Created: {path}
|
|
726
|
+
Decisions captured: {count} across {area_count} areas
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
</step>
|
|
730
|
+
|
|
731
|
+
<step name="iterate">
|
|
732
|
+
|
|
733
|
+
## 4. Iterate
|
|
734
|
+
|
|
735
|
+
**If `ONLY_PHASE` is set:** Do not iterate. Proceed directly to lifecycle step (which exits cleanly per single-phase mode).
|
|
736
|
+
|
|
737
|
+
**If `TO_PHASE` is set and current phase number >= `TO_PHASE`:**
|
|
738
|
+
|
|
739
|
+
```
|
|
740
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
741
|
+
RIHAL ► AUTONOMOUS ▸ --to ${TO_PHASE} REACHED
|
|
742
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
743
|
+
|
|
744
|
+
Completed through phase ${TO_PHASE} as requested.
|
|
745
|
+
Remaining phases were not executed.
|
|
746
|
+
|
|
747
|
+
Resume with: /rihal:autonomous --from ${next_incomplete_phase}
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
Proceed directly to lifecycle step (which handles partial completion). Exit cleanly.
|
|
751
|
+
|
|
752
|
+
**Otherwise:** After each phase completes, re-read ROADMAP.md to catch phases inserted mid-execution (decimal phases like 5.1):
|
|
753
|
+
|
|
754
|
+
```bash
|
|
755
|
+
cat .planning/ROADMAP.md
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
Re-filter incomplete phases using the same logic as discover_phases.
|
|
759
|
+
|
|
760
|
+
Read STATE.md fresh:
|
|
761
|
+
|
|
762
|
+
```bash
|
|
763
|
+
cat .planning/STATE.md
|
|
764
|
+
node .rihal/bin/rihal-tools.cjs state read
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
Check for blockers in the Blockers/Concerns section. If blockers are found, go to handle_blocker.
|
|
768
|
+
|
|
769
|
+
If incomplete phases remain: proceed to next phase, loop back to execute_phase.
|
|
770
|
+
|
|
771
|
+
**Interactive mode overlap:** When `INTERACTIVE` is set, the iterate step enables pipeline parallelism:
|
|
772
|
+
1. After discuss completes for Phase N, dispatch plan+execute as background agents
|
|
773
|
+
2. Immediately start discuss for Phase N+1 while Phase N builds
|
|
774
|
+
3. Before starting plan for Phase N+1, wait for Phase N's execute agent to complete and handle its post-execution routing
|
|
775
|
+
|
|
776
|
+
This means the user is always answering discuss questions (lightweight, interactive) while the heavy work runs in the background.
|
|
777
|
+
|
|
778
|
+
If all phases complete, proceed to lifecycle step.
|
|
779
|
+
|
|
780
|
+
</step>
|
|
781
|
+
|
|
782
|
+
<step name="lifecycle">
|
|
783
|
+
|
|
784
|
+
## 5. Lifecycle
|
|
785
|
+
|
|
786
|
+
**If `ONLY_PHASE` is set:** Skip lifecycle. Display:
|
|
787
|
+
|
|
788
|
+
```
|
|
789
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
790
|
+
RIHAL ► AUTONOMOUS ▸ PHASE ${ONLY_PHASE} COMPLETE ✓
|
|
791
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
792
|
+
|
|
793
|
+
Phase ${ONLY_PHASE}: ${PHASE_NAME} — Done
|
|
794
|
+
Mode: Single phase (--only)
|
|
795
|
+
|
|
796
|
+
Lifecycle skipped — run /rihal:autonomous without --only
|
|
797
|
+
after all phases complete to trigger audit/complete/cleanup.
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
Exit cleanly.
|
|
801
|
+
|
|
802
|
+
**Otherwise:** After all phases complete, run the milestone lifecycle sequence: audit → complete → cleanup.
|
|
803
|
+
|
|
804
|
+
Display lifecycle transition banner:
|
|
805
|
+
|
|
806
|
+
```
|
|
807
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
808
|
+
RIHAL ► AUTONOMOUS ▸ LIFECYCLE
|
|
809
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
810
|
+
|
|
811
|
+
All phases complete → Starting lifecycle: audit → complete → cleanup
|
|
812
|
+
Milestone: {milestone_version} — {milestone_name}
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
### 5a. Audit
|
|
816
|
+
|
|
817
|
+
```
|
|
818
|
+
Skill(skill="rihal:audit-milestone")
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
After audit completes, detect the result:
|
|
822
|
+
|
|
823
|
+
```bash
|
|
824
|
+
AUDIT_FILE=".planning/v${milestone_version}-MILESTONE-AUDIT.md"
|
|
825
|
+
[ -f "$AUDIT_FILE" ] || AUDIT_FILE=".planning/MILESTONE-AUDIT.md"
|
|
826
|
+
AUDIT_STATUS=$(grep "^status:" "${AUDIT_FILE}" 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
**If AUDIT_STATUS is empty:** Go to handle_blocker: "Audit did not produce results — audit file missing or malformed."
|
|
830
|
+
|
|
831
|
+
**If `passed`:**
|
|
832
|
+
|
|
833
|
+
```
|
|
834
|
+
Audit ✅ passed — proceeding to complete milestone
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
Proceed to 5b.
|
|
838
|
+
|
|
839
|
+
**If `gaps_found`:**
|
|
840
|
+
|
|
841
|
+
Read the gaps summary from the audit file. Display:
|
|
842
|
+
```
|
|
843
|
+
⚠ Audit: Gaps Found
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
Ask user via AskUserQuestion:
|
|
847
|
+
- **question:** "Milestone audit found gaps. How to proceed?"
|
|
848
|
+
- **options:** "Continue anyway — accept gaps" / "Stop — fix gaps manually"
|
|
849
|
+
|
|
850
|
+
On **"Continue anyway"**: Display `Audit ⏭ Gaps accepted` and proceed to 5b.
|
|
851
|
+
|
|
852
|
+
On **"Stop"**: Go to handle_blocker.
|
|
853
|
+
|
|
854
|
+
**If `tech_debt`:**
|
|
855
|
+
|
|
856
|
+
Show the summary, then ask user via AskUserQuestion:
|
|
857
|
+
- **options:** "Continue with tech debt" / "Stop — address debt first"
|
|
858
|
+
|
|
859
|
+
On **"Continue with tech debt"**: Proceed to 5b.
|
|
860
|
+
|
|
861
|
+
On **"Stop"**: Go to handle_blocker.
|
|
862
|
+
|
|
863
|
+
### 5b. Complete Milestone
|
|
864
|
+
|
|
865
|
+
```
|
|
866
|
+
Skill(skill="rihal:complete-milestone", args="${milestone_version}")
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
After complete-milestone returns, verify archive output:
|
|
870
|
+
|
|
871
|
+
```bash
|
|
872
|
+
ls .planning/milestones/v${milestone_version}-ROADMAP.md 2>/dev/null || true
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
If the archive file does not exist, go to handle_blocker: "Complete milestone did not produce expected archive files."
|
|
876
|
+
|
|
877
|
+
### 5c. Cleanup
|
|
878
|
+
|
|
879
|
+
```
|
|
880
|
+
Skill(skill="rihal:cleanup")
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
Cleanup shows its own dry-run and asks user for approval internally — this is an acceptable pause since it's an explicit decision about file deletion.
|
|
884
|
+
|
|
885
|
+
### 5d. Final Completion
|
|
886
|
+
|
|
887
|
+
```
|
|
888
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
889
|
+
RIHAL ► AUTONOMOUS ▸ COMPLETE 🎉
|
|
890
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
891
|
+
|
|
892
|
+
Milestone: {milestone_version} — {milestone_name}
|
|
893
|
+
Status: Complete ✅
|
|
894
|
+
Lifecycle: audit ✅ → complete ✅ → cleanup ✅
|
|
895
|
+
|
|
896
|
+
Ship it! 🚀
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
</step>
|
|
900
|
+
|
|
901
|
+
<step name="handle_blocker">
|
|
902
|
+
|
|
903
|
+
## 6. Handle Blocker
|
|
904
|
+
|
|
905
|
+
When any phase operation fails or a blocker is detected, present 3 options via AskUserQuestion:
|
|
906
|
+
|
|
907
|
+
**Prompt:** "Phase {N} ({Name}) encountered an issue: {description}"
|
|
908
|
+
|
|
909
|
+
**Options:**
|
|
910
|
+
1. **"Fix and retry"** — Re-run the failed step (discuss, plan, or execute) for this phase
|
|
911
|
+
2. **"Skip this phase"** — Mark phase as skipped, continue to the next incomplete phase
|
|
912
|
+
3. **"Stop autonomous mode"** — Display summary of progress so far and exit cleanly
|
|
913
|
+
|
|
914
|
+
**On "Fix and retry":** Loop back to the failed step. If the same step fails again after retry, re-present these options.
|
|
915
|
+
|
|
916
|
+
**On "Skip this phase":** Log `Phase {N} ⏭ {Name} — Skipped by user`. Record in state:
|
|
917
|
+
|
|
918
|
+
```bash
|
|
919
|
+
node .rihal/bin/rihal-tools.cjs state add-decision "Skipped phase ${PHASE_NUM} in autonomous mode"
|
|
920
|
+
```
|
|
921
|
+
|
|
922
|
+
Proceed to iterate.
|
|
923
|
+
|
|
924
|
+
**On "Stop autonomous mode":**
|
|
925
|
+
|
|
926
|
+
```
|
|
927
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
928
|
+
RIHAL ► AUTONOMOUS ▸ STOPPED
|
|
929
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
930
|
+
|
|
931
|
+
Completed: {list of completed phases}
|
|
932
|
+
Skipped: {list of skipped phases}
|
|
933
|
+
Remaining: {list of remaining phases}
|
|
934
|
+
|
|
935
|
+
Resume with: /rihal:autonomous ${ONLY_PHASE ? "--only " + ONLY_PHASE : "--from " + next_phase}${TO_PHASE ? " --to " + TO_PHASE : ""}
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
Record blocker in state:
|
|
939
|
+
|
|
940
|
+
```bash
|
|
941
|
+
node .rihal/bin/rihal-tools.cjs state add-blocker "Autonomous mode stopped at phase ${PHASE_NUM}: ${DESCRIPTION}"
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
</step>
|
|
945
|
+
|
|
946
|
+
</process>
|
|
947
|
+
|
|
948
|
+
<success_criteria>
|
|
949
|
+
- [ ] All incomplete phases executed in order (smart discuss → ui-phase → plan → execute → ui-review each)
|
|
950
|
+
- [ ] Smart discuss proposes grey area answers in tables, user accepts or overrides per area
|
|
951
|
+
- [ ] Progress banners displayed between phases
|
|
952
|
+
- [ ] Execute invoked with --no-transition (autonomous manages transitions)
|
|
953
|
+
- [ ] Post-execution verification reads VERIFICATION.md and routes on status
|
|
954
|
+
- [ ] Passed verification → automatic continue to next phase
|
|
955
|
+
- [ ] Human-needed verification → user prompted to validate or skip
|
|
956
|
+
- [ ] Gaps-found → user offered gap closure, continue, or stop
|
|
957
|
+
- [ ] Gap closure limited to 1 retry (prevents infinite loops)
|
|
958
|
+
- [ ] Plan and execute failures route to handle_blocker
|
|
959
|
+
- [ ] ROADMAP.md re-read after each phase (catches inserted phases)
|
|
960
|
+
- [ ] STATE.md checked for blockers before each phase
|
|
961
|
+
- [ ] Blockers handled via user choice (retry / skip / stop)
|
|
962
|
+
- [ ] Final completion or stop summary displayed
|
|
963
|
+
- [ ] After all phases complete, lifecycle step is invoked (not manual suggestion)
|
|
964
|
+
- [ ] Lifecycle transition banner displayed before audit
|
|
965
|
+
- [ ] Audit invoked via Skill(skill="rihal:audit-milestone")
|
|
966
|
+
- [ ] Audit result routing: passed → auto-continue, gaps_found → user decides, tech_debt → user decides
|
|
967
|
+
- [ ] Complete-milestone invoked via Skill() with ${milestone_version} arg
|
|
968
|
+
- [ ] Cleanup invoked via Skill() — internal confirmation is acceptable
|
|
969
|
+
- [ ] Final completion banner displayed after lifecycle
|
|
970
|
+
- [ ] Progress bar uses phase number / total milestone phases, with fallback when phase numbers exceed total
|
|
971
|
+
- [ ] Frontend phases get UI-SPEC generated before planning (step 3a.5) if not already present
|
|
972
|
+
- [ ] Frontend phases get UI review audit after successful execution (step 3d.5) if UI-SPEC exists
|
|
973
|
+
- [ ] UI phase and UI review respect workflow.ui_phase and workflow.ui_review config toggles
|
|
974
|
+
- [ ] UI review is advisory (non-blocking)
|
|
975
|
+
- [ ] `--only N` restricts execution to exactly one phase
|
|
976
|
+
- [ ] `--only N` skips lifecycle step
|
|
977
|
+
- [ ] `--only N` exits cleanly after single phase completes
|
|
978
|
+
- [ ] `--only N` on already-complete phase exits with message
|
|
979
|
+
- [ ] `--to N` stops execution after phase N completes
|
|
980
|
+
- [ ] `--to N` filters out phases with number > N during discovery
|
|
981
|
+
- [ ] `--to N` displays "Stopping after phase N" in startup banner
|
|
982
|
+
- [ ] `--to N` on already completed target exits with "already completed" message
|
|
983
|
+
- [ ] `--to N` compatible with `--from N`
|
|
984
|
+
- [ ] `--to N` skips lifecycle when not all milestone phases complete
|
|
985
|
+
- [ ] `--interactive` runs discuss inline (asks questions, waits for user)
|
|
986
|
+
- [ ] `--interactive` dispatches plan and execute as background agents
|
|
987
|
+
- [ ] `--interactive` enables pipeline parallelism: discuss Phase N+1 while Phase N builds
|
|
988
|
+
- [ ] `--interactive` main context only accumulates discuss conversations
|
|
989
|
+
- [ ] `--interactive` waits for background agents before post-execution routing
|
|
990
|
+
- [ ] `--interactive` compatible with `--only`, `--from`, and `--to` flags
|
|
991
|
+
- [ ] No `git push` issued by the workflow (per AGENTS.md)
|
|
992
|
+
</success_criteria>
|