@hanzlaa/rcode 3.6.15 → 4.0.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 +4 -4
- package/CLAUDE.md +3 -3
- package/CONTRIBUTING.md +86 -68
- package/README.md +114 -93
- package/cli/agent.js +8 -8
- package/cli/config.js +13 -13
- package/cli/context.js +23 -23
- package/cli/dashboard.js +5 -5
- package/cli/digest.js +11 -11
- package/cli/doctor.js +22 -22
- package/cli/generate-command-skills.cjs +39 -37
- package/cli/github-sync.js +33 -27
- package/cli/index.js +23 -23
- package/cli/install.js +485 -262
- package/cli/lib/config.cjs +9 -9
- package/cli/lib/fsutil.cjs +3 -3
- package/cli/lib/github.cjs +11 -6
- package/cli/lib/manifest.cjs +37 -37
- package/cli/lib/memory-bank.cjs +23 -18
- package/cli/lib/model-profiles.cjs +7 -7
- package/cli/lib/prompts.cjs +2 -2
- package/cli/lib/schemas.cjs +10 -10
- package/cli/nuke.js +42 -42
- package/cli/postinstall.js +14 -14
- package/cli/set-mode.js +10 -10
- package/cli/set-profile.js +5 -5
- package/cli/show-model.js +1 -1
- package/cli/team.js +5 -5
- package/cli/tiers.js +10 -10
- package/cli/uninstall.js +136 -136
- package/cli/update.js +52 -52
- package/dist/rcode.js +341 -21639
- package/package.json +4 -6
- package/rcode/DOCS-AUDIT.md +14 -0
- package/rcode/agents/rcode-advisor-researcher.md +93 -0
- package/rcode/agents/rcode-ahmed.md +10 -0
- package/rcode/agents/rcode-assumptions-analyzer.md +49 -0
- package/rcode/agents/rcode-code-fixer.md +57 -0
- package/rcode/agents/rcode-code-reviewer.md +57 -0
- package/rcode/agents/rcode-codebase-mapper.md +78 -0
- package/rcode/agents/rcode-cross-platform-auditor.md +15 -0
- package/rcode/agents/rcode-debugger.md +37 -0
- package/rcode/agents/rcode-dep-auditor.md +15 -0
- package/rcode/agents/rcode-deviation-analyzer.md +75 -0
- package/rcode/agents/rcode-docs-auditor.md +31 -0
- package/rcode/agents/rcode-edge-case-hunter.md +95 -0
- package/rcode/agents/rcode-executor.md +27 -0
- package/rcode/agents/rcode-fatima.md +19 -0
- package/rcode/agents/rcode-haitham.md +99 -0
- package/rcode/agents/rcode-hanzla.md +18 -0
- package/rcode/agents/rcode-hussain-pm.md +19 -0
- package/rcode/agents/rcode-i18n-auditor.md +16 -0
- package/rcode/agents/rcode-integration-checker.md +61 -0
- package/rcode/agents/rcode-khalid.md +99 -0
- package/rcode/agents/rcode-layla.md +10 -0
- package/rcode/agents/rcode-mariam.md +18 -0
- package/rcode/agents/rcode-nasser.md +10 -0
- package/rcode/agents/rcode-noor.md +11 -0
- package/rcode/agents/rcode-nyquist-auditor.md +24 -0
- package/rcode/agents/rcode-observability-auditor.md +16 -0
- package/rcode/agents/rcode-omar.md +96 -0
- package/rcode/agents/rcode-phase-researcher.md +96 -0
- package/rcode/agents/rcode-planner.md +32 -0
- package/rcode/agents/rcode-profiler.md +98 -0
- package/rcode/agents/rcode-project-researcher.md +94 -0
- package/rcode/agents/rcode-remediation-planner.md +56 -0
- package/rcode/agents/rcode-research-synthesizer.md +45 -0
- package/rcode/agents/rcode-roadmapper.md +48 -0
- package/rcode/agents/rcode-sadiq.md +18 -0
- package/rcode/agents/rcode-security-adversary.md +98 -0
- package/rcode/agents/rcode-security-auditor.md +100 -0
- package/rcode/agents/rcode-sprint-checker.md +31 -0
- package/rcode/agents/rcode-ui-auditor.md +100 -0
- package/rcode/agents/rcode-ux-designer.md +57 -0
- package/rcode/agents/rcode-verifier.md +40 -0
- package/rcode/agents/rcode-waleed.md +20 -0
- package/rcode/agents/rcode-yousef.md +97 -0
- package/rcode/agents/rcode-zahra.md +63 -0
- package/rcode/agents/rcode-zayd.md +79 -0
- package/rcode/agents/rules/codebase-mapper/detailed-guide.md +615 -0
- package/rcode/agents/rules/debugger/checkpoint-recovery.md +272 -0
- package/rcode/agents/rules/debugger/debug-session-state.md +261 -0
- package/rcode/agents/rules/debugger/investigation-protocol.md +298 -0
- package/rcode/agents/rules/debugger/scientific-method.md +317 -0
- package/rcode/agents/rules/executor/authentication-gates.md +202 -0
- package/rcode/agents/rules/executor/deviation-rules.md +191 -0
- package/rcode/agents/rules/executor/execution-flow.md +116 -0
- package/rcode/agents/rules/executor/self-check.md +241 -0
- package/rcode/agents/rules/executor/stub-detection.md +267 -0
- package/rcode/agents/rules/executor/summary-creation.md +76 -0
- package/rcode/agents/rules/executor/task-commit-protocol.md +309 -0
- package/rcode/agents/rules/executor/tdd-flow.md +294 -0
- package/rcode/agents/rules/phase-researcher/detailed-guide.md +628 -0
- package/rcode/agents/rules/planner/goal-backward-thinking.md +220 -0
- package/rcode/agents/rules/planner/task-templates.md +296 -0
- package/rcode/agents/rules/project-researcher/detailed-guide.md +589 -0
- package/rcode/agents/rules/roadmapper/detailed-guide.md +620 -0
- package/rcode/agents/rules/sprint-checker/dimensions.md +414 -0
- package/rcode/agents/rules/sprint-checker/process.md +377 -0
- package/rcode/agents/rules/verifier/anti-patterns.md +94 -0
- package/rcode/agents/rules/verifier/artifact-verification.md +69 -0
- package/rcode/agents/rules/verifier/context-loading.md +84 -0
- package/rcode/agents/rules/verifier/gap-output.md +51 -0
- package/rcode/agents/rules/verifier/key-links.md +56 -0
- package/rcode/agents/rules/verifier/requirements-coverage.md +28 -0
- package/rcode/agents/rules/verifier/verification-report.md +131 -0
- package/rcode/bin/lib/config.cjs +158 -0
- package/rcode/bin/lib/council-panel.cjs +663 -0
- package/rcode/bin/lib/roadmap.cjs +359 -0
- package/rcode/bin/rcode-hooks.cjs +711 -0
- package/rcode/bin/rcode-tools.cjs +7366 -0
- package/rcode/brain/README.md +38 -0
- package/rcode/brain/best-practices/no-autonomous-bypass.md +37 -0
- package/rcode/brain/best-practices/no-theoretical-suggestions.md +56 -0
- package/rcode/brain/best-practices/research-citation-rule.md +39 -0
- package/rcode/brain/best-practices/state-sync-rule.md +43 -0
- package/rcode/brain/sources.yaml +62 -0
- package/rcode/commands/add-phase.md +18 -0
- package/rcode/commands/add-tests.md +18 -0
- package/rcode/commands/add-todo.md +8 -0
- package/rcode/commands/analyze-dependencies.md +11 -0
- package/rcode/commands/audit-fix.md +14 -0
- package/rcode/commands/audit-milestone.md +12 -0
- package/rcode/commands/audit-uat.md +18 -0
- package/rcode/commands/audit.md +8 -0
- package/rcode/commands/autonomous.md +19 -0
- package/rcode/commands/brainstorm.md +11 -0
- package/rcode/commands/capture.md +12 -0
- package/rcode/commands/chain.md +8 -0
- package/rcode/commands/check-implementation-readiness.md +18 -0
- package/rcode/commands/check-todos.md +18 -0
- package/rcode/commands/checkpoint-preview.md +13 -0
- package/rcode/commands/cleanup.md +18 -0
- package/rcode/commands/code-review.md +14 -0
- package/rcode/commands/complete-milestone.md +12 -0
- package/rcode/commands/config.md +8 -0
- package/rcode/commands/correct-course.md +8 -0
- package/rcode/commands/council.md +25 -0
- package/rcode/commands/create-architecture.md +18 -0
- package/rcode/commands/create-epics-and-stories.md +8 -0
- package/rcode/commands/create-prd.md +18 -0
- package/rcode/commands/create-story.md +8 -0
- package/rcode/commands/dashboard.md +10 -0
- package/rcode/commands/debug.md +8 -0
- package/rcode/commands/decisions.md +10 -0
- package/rcode/commands/dev-story.md +8 -0
- package/rcode/commands/diagnose-issues.md +18 -0
- package/rcode/commands/diff.md +10 -0
- package/rcode/commands/discuss-phase-power.md +18 -0
- package/rcode/commands/discuss-phase.md +19 -0
- package/rcode/commands/discuss.md +23 -0
- package/rcode/commands/do.md +22 -0
- package/rcode/commands/docs-update.md +14 -0
- package/rcode/commands/document-project.md +8 -0
- package/rcode/commands/edit-prd.md +18 -0
- package/rcode/commands/enable-hooks.md +11 -0
- package/rcode/commands/execute-milestone.md +18 -0
- package/rcode/commands/execute-sprint.md +13 -0
- package/rcode/commands/execute.md +19 -0
- package/rcode/commands/explore.md +14 -0
- package/rcode/commands/export-to-github.md +11 -0
- package/rcode/commands/feature-drift.md +18 -0
- package/rcode/commands/forensics.md +11 -0
- package/rcode/commands/from-template.md +11 -0
- package/rcode/commands/health.md +10 -0
- package/rcode/commands/help.md +8 -0
- package/rcode/commands/import.md +12 -0
- package/rcode/commands/inbox.md +12 -0
- package/rcode/commands/init.md +14 -0
- package/rcode/commands/insert-phase.md +11 -0
- package/rcode/commands/install.md +10 -0
- package/rcode/commands/karpathy-audit.md +18 -0
- package/rcode/commands/lens-audit.md +70 -0
- package/rcode/commands/list-plans.md +11 -0
- package/rcode/commands/list-workspaces.md +10 -0
- package/rcode/commands/map-codebase.md +14 -0
- package/rcode/commands/memory-audit.md +10 -0
- package/rcode/commands/memory-distill.md +11 -0
- package/rcode/commands/memory-init.md +12 -0
- package/rcode/commands/memory-update.md +12 -0
- package/rcode/commands/milestone-summary.md +11 -0
- package/rcode/commands/new-milestone.md +12 -0
- package/rcode/commands/new-project-research.md +18 -0
- package/rcode/commands/new-project-roadmap.md +18 -0
- package/rcode/commands/new-project.md +13 -0
- package/rcode/commands/new-workspace.md +12 -0
- package/rcode/commands/next.md +19 -0
- package/rcode/commands/note.md +12 -0
- package/rcode/commands/notify-test.md +10 -0
- package/rcode/commands/pause-work.md +8 -0
- package/rcode/commands/phase.md +11 -0
- package/rcode/commands/plan-milestone-gaps.md +18 -0
- package/rcode/commands/plan-milestone.md +18 -0
- package/rcode/commands/plan.md +19 -0
- package/rcode/commands/plant-seed.md +18 -0
- package/rcode/commands/pr-branch.md +18 -0
- package/rcode/commands/prfaq.md +15 -0
- package/rcode/commands/profile-user.md +8 -0
- package/rcode/commands/progress.md +18 -0
- package/rcode/commands/quick.md +14 -0
- package/rcode/commands/remove-phase.md +18 -0
- package/rcode/commands/remove-workspace.md +11 -0
- package/rcode/commands/replay.md +11 -0
- package/rcode/commands/rerun.md +11 -0
- package/rcode/commands/research-phase.md +18 -0
- package/rcode/commands/resume-work.md +8 -0
- package/rcode/commands/retrospective.md +18 -0
- package/rcode/commands/review-edge-case-hunter.md +18 -0
- package/rcode/commands/review-fix.md +14 -0
- package/rcode/commands/review.md +18 -0
- package/rcode/commands/scaffold-milestone.md +18 -0
- package/rcode/commands/scaffold-project.md +18 -0
- package/rcode/commands/scaffold-skill.md +18 -0
- package/rcode/commands/scan.md +14 -0
- package/rcode/commands/secure-phase.md +14 -0
- package/rcode/commands/session-report.md +10 -0
- package/rcode/commands/settings.md +8 -0
- package/rcode/commands/ship.md +30 -0
- package/rcode/commands/show.md +10 -0
- package/rcode/commands/sprint-planning.md +20 -0
- package/rcode/commands/sprint-status.md +21 -0
- package/rcode/commands/stats.md +10 -0
- package/rcode/commands/status.md +21 -0
- package/rcode/commands/ui-phase.md +8 -0
- package/rcode/commands/ui-review.md +8 -0
- package/rcode/commands/undo.md +14 -0
- package/rcode/commands/update.md +11 -0
- package/rcode/commands/validate-phase.md +18 -0
- package/rcode/commands/validate-prd.md +18 -0
- package/rcode/commands/verify-phase.md +18 -0
- package/rcode/commands/verify-work.md +19 -0
- package/rcode/commands/why.md +10 -0
- package/rcode/commands/workstream.md +11 -0
- package/rcode/config/model-profiles.json +226 -0
- package/rcode/config/model-profiles.schema.json +36 -0
- package/rcode/config.yaml +39 -0
- package/rcode/digests/README.md +50 -0
- package/rcode/digests/fatima.md +24 -0
- package/rcode/digests/hussain-pm.md +24 -0
- package/rcode/digests/mariam.md +24 -0
- package/rcode/digests/sadiq.md +24 -0
- package/rcode/digests/waleed.md +24 -0
- package/rcode/modules/core.yaml +101 -0
- package/rcode/modules/discovery.yaml +50 -0
- package/rcode/modules/execution.yaml +66 -0
- package/rcode/references/REFERENCES_INDEX.md +109 -0
- package/rcode/references/agent-contracts.md +48 -0
- package/rcode/references/agent-shared-rules.md +81 -0
- package/rcode/references/assumptions-analyzer-playbook.md +82 -0
- package/rcode/references/auditor-shared-checklists.md +91 -0
- package/rcode/references/auto-init-guard.md +117 -0
- package/rcode/references/checkpoints-index.md +53 -0
- package/rcode/references/code-fixer-playbook.md +71 -0
- package/rcode/references/code-reviewer-playbook.md +71 -0
- package/rcode/references/codebase-mapping-process.md +176 -0
- package/rcode/references/command-redirect-format.md +62 -0
- package/rcode/references/commit-conventions.md +125 -0
- package/rcode/references/common-bug-patterns-index.md +44 -0
- package/rcode/references/context-budget.md +104 -0
- package/rcode/references/continuation-format.md +248 -0
- package/rcode/references/council-protocol.md +91 -0
- package/rcode/references/debugger-playbook.md +127 -0
- package/rcode/references/design-tokens.md +98 -0
- package/rcode/references/dispatch-banner.md +157 -0
- package/rcode/references/docs-auditor-playbook.md +148 -0
- package/rcode/references/execution-protocol.md +155 -0
- package/rcode/references/executor-playbook.md +119 -0
- package/rcode/references/gate-prompts.md +212 -0
- package/rcode/references/gates.md +127 -0
- package/rcode/references/git-integration.md +159 -0
- package/rcode/references/git-planning-commit.md +185 -0
- package/rcode/references/git-preflight.md +117 -0
- package/rcode/references/integration-verification-playbook.md +392 -0
- package/rcode/references/iterative-retrieval.md +85 -0
- package/rcode/references/karpathy-guidelines-full.md +79 -0
- package/rcode/references/karpathy-guidelines.md +11 -0
- package/rcode/references/model-profile-resolution.md +44 -0
- package/rcode/references/model-profiles.md +90 -0
- package/rcode/references/no-unauthorized-git-ops.md +73 -0
- package/rcode/references/nyquist-auditor-playbook.md +157 -0
- package/rcode/references/output-format.md +398 -0
- package/rcode/references/output-realism.md +52 -0
- package/rcode/references/persona-engineer-shared.md +61 -0
- package/rcode/references/phase-argument-parsing.md +35 -0
- package/rcode/references/phase-id-conventions.md +101 -0
- package/rcode/references/planner-playbook.md +217 -0
- package/rcode/references/remediation-planner-playbook.md +75 -0
- package/rcode/references/research-synthesis-playbook.md +205 -0
- package/rcode/references/researcher-shared.md +87 -0
- package/rcode/references/response-style.md +81 -0
- package/rcode/references/revision-loop.md +38 -0
- package/rcode/references/roadmapper-playbook.md +82 -0
- package/rcode/references/sprint-checker-playbook.md +128 -0
- package/rcode/references/state-schema.md +366 -0
- package/rcode/references/ui-brand.md +254 -0
- package/rcode/references/universal-anti-patterns.md +59 -0
- package/rcode/references/ux-designer-playbook.md +74 -0
- package/rcode/references/verb-dictionary.md +186 -0
- package/rcode/references/verification-patterns-index.md +76 -0
- package/rcode/references/verification-patterns.md +612 -0
- package/rcode/references/verifier-playbook.md +104 -0
- package/rcode/references/workstream-flag.md +166 -0
- package/rcode/skills/SKILLS_INDEX.md +143 -0
- package/rcode/skills/_shared/no-autonomous-bypass.md +37 -0
- package/rcode/skills/_shared/research-citation-rule.md +39 -0
- package/rcode/skills/_shared/state-sync-rule.md +43 -0
- package/rcode/skills/actions/1-analysis/rcode-document-project/SKILL.md +45 -0
- package/rcode/skills/actions/1-analysis/rcode-document-project/templates/index-template.md +169 -0
- package/rcode/skills/actions/1-analysis/rcode-document-project/templates/project-overview-template.md +103 -0
- package/rcode/skills/actions/1-analysis/rcode-document-project/templates/source-tree-template.md +135 -0
- package/rcode/skills/actions/1-analysis/rcode-document-project/workflow.md +27 -0
- package/rcode/skills/actions/1-analysis/rcode-document-project/workflows/deep-dive-workflow.md +34 -0
- package/rcode/skills/actions/1-analysis/rcode-document-project/workflows/full-scan-workflow.md +34 -0
- package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +145 -0
- package/rcode/skills/actions/1-analysis/rcode-product-brief/SKILL.md +123 -0
- package/rcode/skills/actions/1-analysis/rcode-product-brief/rcode-manifest.json +17 -0
- package/rcode/skills/actions/1-analysis/research/rcode-domain-research/SKILL.md +46 -0
- package/rcode/skills/actions/1-analysis/research/rcode-domain-research/workflow.md +49 -0
- package/rcode/skills/actions/1-analysis/research/rcode-market-research/SKILL.md +45 -0
- package/rcode/skills/actions/1-analysis/research/rcode-market-research/workflow.md +49 -0
- package/rcode/skills/actions/1-analysis/research/rcode-technical-research/SKILL.md +48 -0
- package/rcode/skills/actions/1-analysis/research/rcode-technical-research/workflow.md +50 -0
- package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/SKILL.md +58 -0
- package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/steps/step-02-design-epics.md +212 -0
- package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
- package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/steps/step-04-final-validation.md +143 -0
- package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/workflow.md +66 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/SKILL.md +63 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/README.md +30 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-03-sequencing.md +65 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-05-kill-criteria.md +59 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-06-phase-stubs.md +56 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-07-backlog.md +44 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-08-write-roadmap.md +58 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-09-state-sync.md +62 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-10-complete.md +56 -0
- package/rcode/skills/actions/2-plan/rcode-create-milestone/workflow.md +93 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/SKILL.md +80 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/data/prd-purpose.md +197 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/data/project-types.csv +11 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-02-discovery.md +208 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-02b-vision.md +142 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-02c-executive-summary.md +158 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-03-success.md +214 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-04-journeys.md +201 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-05-domain.md +194 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-06-innovation.md +211 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-07-project-type.md +222 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-08-scoping.md +216 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-09-functional.md +219 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-10-nonfunctional.md +230 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-11-polish.md +221 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-12-complete.md +115 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/workflow.md +64 -0
- package/rcode/skills/actions/2-plan/rcode-create-story/SKILL.md +59 -0
- package/rcode/skills/actions/2-plan/rcode-create-story/workflow.md +380 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/SKILL.md +47 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-02-discovery.md +190 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-03-core-experience.md +217 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-04-emotional-response.md +220 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-05-inspiration.md +235 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-06-design-system.md +253 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-07-defining-experience.md +255 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-08-visual-foundation.md +225 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-09-design-directions.md +225 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-10-user-journeys.md +242 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-11-component-strategy.md +249 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-12-ux-patterns.md +238 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-13-responsive-accessibility.md +265 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-14-complete.md +171 -0
- package/rcode/skills/actions/2-plan/rcode-create-ux-design/workflow.md +36 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/SKILL.md +45 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-01-discovery.md +242 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-01b-legacy-conversion.md +204 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-02-review.md +245 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-03-edit.md +250 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-04-complete.md +165 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/workflow.md +63 -0
- package/rcode/skills/actions/2-plan/rcode-frontend-design/SKILL.md +96 -0
- package/rcode/skills/actions/2-plan/rcode-frontend-design/references.md +79 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/SKILL.md +45 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/data/prd-purpose.md +197 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/data/project-types.csv +11 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-01-discovery.md +221 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-02-format-detection.md +188 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-02b-parity-check.md +206 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-03-density-validation.md +171 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +261 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-13-report-complete.md +229 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/workflow.md +62 -0
- package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/SKILL.md +46 -0
- package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/steps/step-06-final-assessment.md +126 -0
- package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/workflow.md +49 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/SKILL.md +50 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-02-context.md +224 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-03-starter.md +329 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-04-decisions.md +318 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-05-patterns.md +359 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-06-structure.md +379 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-07-validation.md +359 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-08-complete.md +76 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/workflow.md +38 -0
- package/rcode/skills/actions/3-solutioning/rcode-generate-project-context/SKILL.md +47 -0
- package/rcode/skills/actions/3-solutioning/rcode-generate-project-context/steps/step-02-generate.md +321 -0
- package/rcode/skills/actions/3-solutioning/rcode-generate-project-context/workflow.md +43 -0
- package/rcode/skills/actions/4-implementation/rcode-browser-verify/SKILL.md +73 -0
- package/rcode/skills/actions/4-implementation/rcode-checkpoint-preview/SKILL.md +75 -0
- package/rcode/skills/actions/4-implementation/rcode-ci/SKILL.md +115 -0
- package/rcode/skills/actions/4-implementation/rcode-code-review/SKILL.md +59 -0
- package/rcode/skills/actions/4-implementation/rcode-code-review/steps/step-02-review.md +38 -0
- package/rcode/skills/actions/4-implementation/rcode-code-review/workflow.md +55 -0
- package/rcode/skills/actions/4-implementation/rcode-correct-course/SKILL.md +46 -0
- package/rcode/skills/actions/4-implementation/rcode-correct-course/workflow.md +267 -0
- package/rcode/skills/actions/4-implementation/rcode-debug/SKILL.md +199 -0
- package/rcode/skills/actions/4-implementation/rcode-dev-story/SKILL.md +80 -0
- package/rcode/skills/actions/4-implementation/rcode-dev-story/workflow.md +537 -0
- package/rcode/skills/actions/4-implementation/rcode-git-flow/SKILL.md +93 -0
- package/rcode/skills/actions/4-implementation/rcode-harden/SKILL.md +98 -0
- package/rcode/skills/actions/4-implementation/rcode-incremental/SKILL.md +53 -0
- package/rcode/skills/actions/4-implementation/rcode-migrate/SKILL.md +93 -0
- package/rcode/skills/actions/4-implementation/rcode-perf/SKILL.md +99 -0
- package/rcode/skills/actions/4-implementation/rcode-prove-it/SKILL.md +67 -0
- package/rcode/skills/actions/4-implementation/rcode-qa-generate-e2e-tests/SKILL.md +47 -0
- package/rcode/skills/actions/4-implementation/rcode-qa-generate-e2e-tests/checklist.md +33 -0
- package/rcode/skills/actions/4-implementation/rcode-qa-generate-e2e-tests/workflow.md +136 -0
- package/rcode/skills/actions/4-implementation/rcode-retrospective/SKILL.md +45 -0
- package/rcode/skills/actions/4-implementation/rcode-retrospective/workflow.md +1491 -0
- package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +91 -0
- package/rcode/skills/actions/4-implementation/rcode-scaffold-project/steps/step-03-clone.md +50 -0
- package/rcode/skills/actions/4-implementation/rcode-scaffold-project/steps/step-04-post-setup.md +44 -0
- package/rcode/skills/actions/4-implementation/rcode-source-truth/SKILL.md +79 -0
- package/rcode/skills/actions/4-implementation/rcode-sprint-planning/SKILL.md +63 -0
- package/rcode/skills/actions/4-implementation/rcode-sprint-planning/checklist.md +43 -0
- package/rcode/skills/actions/4-implementation/rcode-sprint-planning/workflow.md +296 -0
- package/rcode/skills/actions/4-implementation/rcode-sprint-status/SKILL.md +48 -0
- package/rcode/skills/actions/4-implementation/rcode-sprint-status/workflow.md +214 -0
- package/rcode/skills/actions/4-implementation/rcode-trim/SKILL.md +76 -0
- package/rcode/skills/agents/ahmed-hassani-director/SKILL.md +156 -0
- package/rcode/skills/agents/dalil-scout/SKILL.md +135 -0
- package/rcode/skills/agents/dalil-scout/references.md +67 -0
- package/rcode/skills/agents/fatima-qa/SKILL.md +158 -0
- package/rcode/skills/agents/fatima-qa/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/haitham-frontend/SKILL.md +151 -0
- package/rcode/skills/agents/hanzla-engineer/SKILL.md +159 -0
- package/rcode/skills/agents/hanzla-engineer/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/hussain-pm/SKILL.md +167 -0
- package/rcode/skills/agents/hussain-pm/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/hussain-sm/SKILL.md +141 -0
- package/rcode/skills/agents/hussain-sm/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/layla-designer/SKILL.md +125 -0
- package/rcode/skills/agents/layla-designer/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/majlis-council/SKILL.md +116 -0
- package/rcode/skills/agents/majlis-council/references.md +90 -0
- package/rcode/skills/agents/mariam-marketing/SKILL.md +188 -0
- package/rcode/skills/agents/nasser-eng-manager/SKILL.md +162 -0
- package/rcode/skills/agents/noor-writer/SKILL.md +134 -0
- package/rcode/skills/agents/noor-writer/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/raees-orchestrator/SKILL.md +122 -0
- package/rcode/skills/agents/raees-orchestrator/references.md +47 -0
- package/rcode/skills/agents/rcode-cross-platform-auditor/SKILL.md +163 -0
- package/rcode/skills/agents/rcode-dep-auditor/SKILL.md +152 -0
- package/rcode/skills/agents/rcode-deviation-analyzer/SKILL.md +79 -0
- package/rcode/skills/agents/rcode-i18n-auditor/SKILL.md +153 -0
- package/rcode/skills/agents/rcode-observability-auditor/SKILL.md +157 -0
- package/rcode/skills/agents/sadiq-analyst/SKILL.md +163 -0
- package/rcode/skills/agents/sadiq-analyst/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/waleed-architect/SKILL.md +154 -0
- package/rcode/skills/agents/waleed-architect/skill-manifest.yaml +11 -0
- package/rcode/skills/agents/yousef-backend/SKILL.md +164 -0
- package/rcode/skills/agents/zahra-branding/SKILL.md +179 -0
- package/rcode/skills/agents/zayd-ml/SKILL.md +155 -0
- package/rcode/skills/core/module-help.csv +11 -0
- package/rcode/skills/core/module.yaml +25 -0
- package/rcode/skills/core/rcode-advanced-elicitation/SKILL.md +69 -0
- package/rcode/skills/core/rcode-auth-audit/SKILL.md +95 -0
- package/rcode/skills/core/rcode-brainstorming/SKILL.md +116 -0
- package/rcode/skills/core/rcode-brainstorming/steps/step-03-technique-execution.md +401 -0
- package/rcode/skills/core/rcode-brainstorming/workflow.md +53 -0
- package/rcode/skills/core/rcode-client-gate/SKILL.md +93 -0
- package/rcode/skills/core/rcode-clone-website/SKILL.md +87 -0
- package/rcode/skills/core/rcode-deploy-unify/SKILL.md +89 -0
- package/rcode/skills/core/rcode-distillator/SKILL.md +65 -0
- package/rcode/skills/core/rcode-distillator/references.md +118 -0
- package/rcode/skills/core/rcode-distillator/resources/distillate-format-reference.md +227 -0
- package/rcode/skills/core/rcode-distillator/scripts/analyze_sources.py +300 -0
- package/rcode/skills/core/rcode-editorial-review-prose/SKILL.md +127 -0
- package/rcode/skills/core/rcode-editorial-review-structure/SKILL.md +75 -0
- package/rcode/skills/core/rcode-editorial-review-structure/references.md +110 -0
- package/rcode/skills/core/rcode-help/SKILL.md +127 -0
- package/rcode/skills/core/rcode-incident-record/SKILL.md +163 -0
- package/rcode/skills/core/rcode-index-docs/SKILL.md +105 -0
- package/rcode/skills/core/rcode-init/SKILL.md +134 -0
- package/rcode/skills/core/rcode-init/resources/core-module.yaml +25 -0
- package/rcode/skills/core/rcode-init/scripts/__pycache__/rcode_init.cpython-38.pyc +0 -0
- package/rcode/skills/core/rcode-init/scripts/rcode_init.py +593 -0
- package/rcode/skills/core/rcode-init/scripts/tests/__pycache__/test_rcode_init.cpython-38.pyc +0 -0
- package/rcode/skills/core/rcode-init/scripts/tests/test_rcode_init.py +329 -0
- package/rcode/skills/core/rcode-memory-audit/SKILL.md +107 -0
- package/rcode/skills/core/rcode-memory-distill/SKILL.md +89 -0
- package/rcode/skills/core/rcode-memory-init/SKILL.md +91 -0
- package/rcode/skills/core/rcode-memory-update/SKILL.md +87 -0
- package/rcode/skills/core/rcode-mvp-graduate/SKILL.md +118 -0
- package/rcode/skills/core/rcode-ocr-consistency/SKILL.md +108 -0
- package/rcode/skills/core/rcode-party-mode/SKILL.md +98 -0
- package/rcode/skills/core/rcode-party-mode/steps/step-01-agent-loading.md +138 -0
- package/rcode/skills/core/rcode-party-mode/steps/step-02-discussion-orchestration.md +187 -0
- package/rcode/skills/core/rcode-party-mode/steps/step-03-graceful-exit.md +167 -0
- package/rcode/skills/core/rcode-party-mode/workflow.md +190 -0
- package/rcode/skills/core/rcode-rebrand/SKILL.md +135 -0
- package/rcode/skills/core/rcode-review-adversarial-general/SKILL.md +74 -0
- package/rcode/skills/core/rcode-review-edge-case-hunter/SKILL.md +122 -0
- package/rcode/skills/core/rcode-shard-doc/SKILL.md +157 -0
- package/rcode/skills/core/rcode-theme-system/SKILL.md +115 -0
- package/rcode/skills/rcode-init/SKILL.md +134 -0
- package/rcode/state.json +21 -0
- package/rcode/team.yaml +523 -0
- package/rcode/templates/RESEARCH.md +84 -0
- package/rcode/templates/UAT.md +80 -0
- package/rcode/templates/VALIDATION.md +45 -0
- package/rcode/templates/github/bug-template.md +53 -0
- package/rcode/templates/github/epic-template.md +57 -0
- package/rcode/templates/github/feature-template.md +55 -0
- package/rcode/templates/github/task-template.md +52 -0
- package/rcode/templates/memory/INDEX.md +47 -0
- package/rcode/templates/memory/distillates/project.distillate.md +11 -0
- package/rcode/templates/memory/distillates/stack.distillate.md +11 -0
- package/rcode/templates/memory/project/decisions.md +32 -0
- package/rcode/templates/memory/project/design-system.md +128 -0
- package/rcode/templates/memory/project/stack.md +46 -0
- package/rcode/templates/milestone.md +149 -0
- package/rcode/templates/projects/api-backend/PROJECT.md +37 -0
- package/rcode/templates/projects/api-backend/template.yaml +17 -0
- package/rcode/templates/projects/mobile-app/PROJECT.md +37 -0
- package/rcode/templates/projects/mobile-app/template.yaml +17 -0
- package/rcode/templates/projects/saas-b2b/PROJECT.md +40 -0
- package/rcode/templates/projects/saas-b2b/template.yaml +18 -0
- package/rcode/templates/settings-hooks.json +75 -0
- package/rcode/templates/summary.md +77 -0
- package/rcode/templates/verification-report.md +83 -0
- package/rcode/workflows/add-phase.md +193 -0
- package/rcode/workflows/add-tests.md +362 -0
- package/rcode/workflows/add-todo.md +193 -0
- package/rcode/workflows/analyze-dependencies.md +149 -0
- package/rcode/workflows/audit-fix.md +211 -0
- package/rcode/workflows/audit-milestone.md +193 -0
- package/rcode/workflows/audit-plans.md +260 -0
- package/rcode/workflows/audit-uat.md +114 -0
- package/rcode/workflows/audit-worktrees.md +168 -0
- package/rcode/workflows/audit.md +207 -0
- package/rcode/workflows/autonomous-smart-discuss.md +253 -0
- package/rcode/workflows/autonomous.md +936 -0
- package/rcode/workflows/brainstorm.md +219 -0
- package/rcode/workflows/capture.md +65 -0
- package/rcode/workflows/chain.md +199 -0
- package/rcode/workflows/check-implementation-readiness.md +204 -0
- package/rcode/workflows/check-todos.md +191 -0
- package/rcode/workflows/checkpoint-preview.md +12 -0
- package/rcode/workflows/cleanup.md +157 -0
- package/rcode/workflows/code-review-fix.md +546 -0
- package/rcode/workflows/code-review.md +628 -0
- package/rcode/workflows/complete-milestone.md +849 -0
- package/rcode/workflows/correct-course.md +207 -0
- package/rcode/workflows/council.md +587 -0
- package/rcode/workflows/create-architecture.md +36 -0
- package/rcode/workflows/create-epics-and-stories.md +388 -0
- package/rcode/workflows/create-prd.md +30 -0
- package/rcode/workflows/create-story.md +303 -0
- package/rcode/workflows/dashboard.md +138 -0
- package/rcode/workflows/debug.md +278 -0
- package/rcode/workflows/decisions.md +112 -0
- package/rcode/workflows/dev-story.md +443 -0
- package/rcode/workflows/diagnose-issues.md +92 -0
- package/rcode/workflows/diff.md +85 -0
- package/rcode/workflows/discuss-phase-discuss-areas.md +275 -0
- package/rcode/workflows/discuss-phase-power.md +332 -0
- package/rcode/workflows/discuss-phase.md +972 -0
- package/rcode/workflows/discuss.md +232 -0
- package/rcode/workflows/do.md +438 -0
- package/rcode/workflows/docs-update.md +271 -0
- package/rcode/workflows/document-project.md +197 -0
- package/rcode/workflows/edit-prd.md +36 -0
- package/rcode/workflows/enable-hooks.md +112 -0
- package/rcode/workflows/execute-milestone.md +144 -0
- package/rcode/workflows/execute-regression-gates.md +136 -0
- package/rcode/workflows/execute-sprint.md +613 -0
- package/rcode/workflows/execute-verify-phase-goal.md +168 -0
- package/rcode/workflows/execute-waves.md +462 -0
- package/rcode/workflows/execute.md +1062 -0
- package/rcode/workflows/explore.md +179 -0
- package/rcode/workflows/export-to-github.md +179 -0
- package/rcode/workflows/feature-drift.md +248 -0
- package/rcode/workflows/forensics.md +215 -0
- package/rcode/workflows/from-template.md +178 -0
- package/rcode/workflows/health.md +265 -0
- package/rcode/workflows/help.md +354 -0
- package/rcode/workflows/import.md +326 -0
- package/rcode/workflows/inbox.md +425 -0
- package/rcode/workflows/init.md +356 -0
- package/rcode/workflows/insert-phase.md +122 -0
- package/rcode/workflows/install.md +82 -0
- package/rcode/workflows/karpathy-audit.md +412 -0
- package/rcode/workflows/lens-audit.md +705 -0
- package/rcode/workflows/list-plans.md +151 -0
- package/rcode/workflows/list-workspaces.md +120 -0
- package/rcode/workflows/map-codebase.md +466 -0
- package/rcode/workflows/memory-audit.md +150 -0
- package/rcode/workflows/memory-distill.md +118 -0
- package/rcode/workflows/memory-init.md +111 -0
- package/rcode/workflows/memory-update.md +92 -0
- package/rcode/workflows/milestone-summary.md +211 -0
- package/rcode/workflows/new-milestone.md +644 -0
- package/rcode/workflows/new-project-create-roadmap.md +210 -0
- package/rcode/workflows/new-project-define-requirements.md +167 -0
- package/rcode/workflows/new-project-research-decision.md +254 -0
- package/rcode/workflows/new-project-research.md +318 -0
- package/rcode/workflows/new-project-roadmap.md +451 -0
- package/rcode/workflows/new-project.md +994 -0
- package/rcode/workflows/new-workspace.md +172 -0
- package/rcode/workflows/next.md +167 -0
- package/rcode/workflows/note.md +161 -0
- package/rcode/workflows/notify-test.md +118 -0
- package/rcode/workflows/pause-work.md +253 -0
- package/rcode/workflows/phase.md +94 -0
- package/rcode/workflows/plan-milestone-gaps.md +278 -0
- package/rcode/workflows/plan-milestone.md +110 -0
- package/rcode/workflows/plan-prd-express.md +113 -0
- package/rcode/workflows/plan-research-validation.md +320 -0
- package/rcode/workflows/plan-spawn-planner.md +261 -0
- package/rcode/workflows/plan.md +995 -0
- package/rcode/workflows/plant-seed.md +180 -0
- package/rcode/workflows/pr-branch.md +134 -0
- package/rcode/workflows/prfaq.md +12 -0
- package/rcode/workflows/profile-user.md +173 -0
- package/rcode/workflows/progress.md +51 -0
- package/rcode/workflows/quick.md +213 -0
- package/rcode/workflows/remove-phase.md +165 -0
- package/rcode/workflows/remove-workspace.md +169 -0
- package/rcode/workflows/replay.md +165 -0
- package/rcode/workflows/rerun.md +82 -0
- package/rcode/workflows/research-phase.md +113 -0
- package/rcode/workflows/resume-work.md +336 -0
- package/rcode/workflows/retrospective.md +36 -0
- package/rcode/workflows/review-adversarial.md +205 -0
- package/rcode/workflows/review-edge-case-hunter.md +225 -0
- package/rcode/workflows/review.md +297 -0
- package/rcode/workflows/scaffold-milestone.md +65 -0
- package/rcode/workflows/scaffold-project.md +36 -0
- package/rcode/workflows/scaffold-skill.md +142 -0
- package/rcode/workflows/scan.md +388 -0
- package/rcode/workflows/secure-phase.md +216 -0
- package/rcode/workflows/session-report.md +257 -0
- package/rcode/workflows/settings.md +189 -0
- package/rcode/workflows/ship.md +284 -0
- package/rcode/workflows/show.md +74 -0
- package/rcode/workflows/sprint-planning.md +208 -0
- package/rcode/workflows/sprint-status.md +129 -0
- package/rcode/workflows/stats.md +147 -0
- package/rcode/workflows/status.md +164 -0
- package/rcode/workflows/ui-phase.md +159 -0
- package/rcode/workflows/ui-review.md +145 -0
- package/rcode/workflows/undo.md +432 -0
- package/rcode/workflows/update.md +249 -0
- package/rcode/workflows/validate-phase.md +191 -0
- package/rcode/workflows/validate-prd.md +36 -0
- package/rcode/workflows/verify-phase.md +420 -0
- package/rcode/workflows/verify-work.md +733 -0
- package/rcode/workflows/why.md +135 -0
- package/rcode/workflows/workstream.md +215 -0
- package/server/dashboard.js +22 -17
- package/server/lib/api.js +26 -7
- package/server/lib/html/client/components/App.js +56 -19
- package/server/lib/html/client/components/Sidebar.js +15 -2
- package/server/lib/html/client/components/Topbar.js +6 -3
- package/server/lib/html/client/components/shared.js +9 -9
- package/server/lib/html/client/orchestrator.js +17 -17
- package/server/lib/html/client/store.js +30 -0
- package/server/lib/html/client/util.js +26 -36
- package/server/lib/html/client/views/DecisionsView.js +4 -4
- package/server/lib/html/client/views/FilesView.js +22 -4
- package/server/lib/html/client/views/KanbanView.js +15 -4
- package/server/lib/html/client/views/MemoryView.js +7 -7
- package/server/lib/html/client/views/OrchestrationView.js +13 -3
- package/server/lib/html/client/views/OverviewView.js +49 -9
- package/server/lib/html/client/views/PhasesView.js +9 -9
- package/server/lib/html/client/views/RoadmapView.js +11 -11
- package/server/lib/html/client/views/SprintsView.js +7 -7
- package/server/lib/html/client/views/TasksView.js +7 -7
- package/server/lib/html/client.js +7 -0
- package/server/lib/html/css.js +18 -2
- package/server/lib/html/shell.js +27 -4
- package/server/lib/scanner.js +26 -21
- package/server/orchestrator.js +48 -23
- package/rihal/DOCS-AUDIT.md +0 -14
- package/rihal/agents/rihal-advisor-researcher.md +0 -93
- package/rihal/agents/rihal-ahmed.md +0 -10
- package/rihal/agents/rihal-assumptions-analyzer.md +0 -49
- package/rihal/agents/rihal-code-fixer.md +0 -57
- package/rihal/agents/rihal-code-reviewer.md +0 -57
- package/rihal/agents/rihal-codebase-mapper.md +0 -78
- package/rihal/agents/rihal-cross-platform-auditor.md +0 -15
- package/rihal/agents/rihal-debugger.md +0 -37
- package/rihal/agents/rihal-dep-auditor.md +0 -15
- package/rihal/agents/rihal-deviation-analyzer.md +0 -75
- package/rihal/agents/rihal-docs-auditor.md +0 -31
- package/rihal/agents/rihal-edge-case-hunter.md +0 -95
- package/rihal/agents/rihal-executor.md +0 -27
- package/rihal/agents/rihal-fatima.md +0 -19
- package/rihal/agents/rihal-haitham.md +0 -99
- package/rihal/agents/rihal-hanzla.md +0 -18
- package/rihal/agents/rihal-hussain-pm.md +0 -19
- package/rihal/agents/rihal-i18n-auditor.md +0 -16
- package/rihal/agents/rihal-integration-checker.md +0 -61
- package/rihal/agents/rihal-khalid.md +0 -99
- package/rihal/agents/rihal-layla.md +0 -10
- package/rihal/agents/rihal-mariam.md +0 -18
- package/rihal/agents/rihal-nasser.md +0 -10
- package/rihal/agents/rihal-noor.md +0 -11
- package/rihal/agents/rihal-nyquist-auditor.md +0 -24
- package/rihal/agents/rihal-observability-auditor.md +0 -16
- package/rihal/agents/rihal-omar.md +0 -96
- package/rihal/agents/rihal-phase-researcher.md +0 -96
- package/rihal/agents/rihal-planner.md +0 -32
- package/rihal/agents/rihal-profiler.md +0 -98
- package/rihal/agents/rihal-project-researcher.md +0 -94
- package/rihal/agents/rihal-remediation-planner.md +0 -56
- package/rihal/agents/rihal-research-synthesizer.md +0 -45
- package/rihal/agents/rihal-roadmapper.md +0 -48
- package/rihal/agents/rihal-sadiq.md +0 -18
- package/rihal/agents/rihal-security-adversary.md +0 -98
- package/rihal/agents/rihal-security-auditor.md +0 -100
- package/rihal/agents/rihal-sprint-checker.md +0 -31
- package/rihal/agents/rihal-ui-auditor.md +0 -100
- package/rihal/agents/rihal-ux-designer.md +0 -57
- package/rihal/agents/rihal-verifier.md +0 -40
- package/rihal/agents/rihal-waleed.md +0 -20
- package/rihal/agents/rihal-yousef.md +0 -97
- package/rihal/agents/rihal-zahra.md +0 -63
- package/rihal/agents/rihal-zayd.md +0 -79
- package/rihal/agents/rules/codebase-mapper/detailed-guide.md +0 -615
- package/rihal/agents/rules/debugger/checkpoint-recovery.md +0 -272
- package/rihal/agents/rules/debugger/debug-session-state.md +0 -261
- package/rihal/agents/rules/debugger/investigation-protocol.md +0 -298
- package/rihal/agents/rules/debugger/scientific-method.md +0 -317
- package/rihal/agents/rules/executor/authentication-gates.md +0 -202
- package/rihal/agents/rules/executor/deviation-rules.md +0 -191
- package/rihal/agents/rules/executor/execution-flow.md +0 -116
- package/rihal/agents/rules/executor/self-check.md +0 -241
- package/rihal/agents/rules/executor/stub-detection.md +0 -267
- package/rihal/agents/rules/executor/summary-creation.md +0 -76
- package/rihal/agents/rules/executor/task-commit-protocol.md +0 -309
- package/rihal/agents/rules/executor/tdd-flow.md +0 -294
- package/rihal/agents/rules/phase-researcher/detailed-guide.md +0 -628
- package/rihal/agents/rules/planner/goal-backward-thinking.md +0 -220
- package/rihal/agents/rules/planner/task-templates.md +0 -296
- package/rihal/agents/rules/project-researcher/detailed-guide.md +0 -589
- package/rihal/agents/rules/roadmapper/detailed-guide.md +0 -620
- package/rihal/agents/rules/sprint-checker/dimensions.md +0 -414
- package/rihal/agents/rules/sprint-checker/process.md +0 -377
- package/rihal/agents/rules/verifier/anti-patterns.md +0 -94
- package/rihal/agents/rules/verifier/artifact-verification.md +0 -69
- package/rihal/agents/rules/verifier/context-loading.md +0 -84
- package/rihal/agents/rules/verifier/gap-output.md +0 -51
- package/rihal/agents/rules/verifier/key-links.md +0 -56
- package/rihal/agents/rules/verifier/requirements-coverage.md +0 -28
- package/rihal/agents/rules/verifier/verification-report.md +0 -131
- package/rihal/bin/lib/config.cjs +0 -158
- package/rihal/bin/lib/council-panel.cjs +0 -663
- package/rihal/bin/lib/roadmap.cjs +0 -280
- package/rihal/bin/rihal-hooks.cjs +0 -709
- package/rihal/bin/rihal-tools.cjs +0 -7150
- package/rihal/brain/README.md +0 -38
- package/rihal/brain/best-practices/no-autonomous-bypass.md +0 -37
- package/rihal/brain/best-practices/no-theoretical-suggestions.md +0 -56
- package/rihal/brain/best-practices/research-citation-rule.md +0 -39
- package/rihal/brain/best-practices/state-sync-rule.md +0 -43
- package/rihal/brain/sources.yaml +0 -62
- package/rihal/commands/add-phase.md +0 -18
- package/rihal/commands/add-tests.md +0 -18
- package/rihal/commands/add-todo.md +0 -8
- package/rihal/commands/analyze-dependencies.md +0 -11
- package/rihal/commands/audit-fix.md +0 -14
- package/rihal/commands/audit-milestone.md +0 -12
- package/rihal/commands/audit-uat.md +0 -18
- package/rihal/commands/audit.md +0 -8
- package/rihal/commands/autonomous.md +0 -19
- package/rihal/commands/brainstorm.md +0 -11
- package/rihal/commands/capture.md +0 -12
- package/rihal/commands/chain.md +0 -8
- package/rihal/commands/check-implementation-readiness.md +0 -18
- package/rihal/commands/check-todos.md +0 -18
- package/rihal/commands/checkpoint-preview.md +0 -13
- package/rihal/commands/cleanup.md +0 -18
- package/rihal/commands/code-review-fix.md +0 -14
- package/rihal/commands/code-review.md +0 -14
- package/rihal/commands/complete-milestone.md +0 -12
- package/rihal/commands/config.md +0 -8
- package/rihal/commands/correct-course.md +0 -8
- package/rihal/commands/council.md +0 -25
- package/rihal/commands/create-architecture.md +0 -18
- package/rihal/commands/create-epics-and-stories.md +0 -8
- package/rihal/commands/create-prd.md +0 -18
- package/rihal/commands/create-story.md +0 -8
- package/rihal/commands/dashboard.md +0 -10
- package/rihal/commands/debug.md +0 -8
- package/rihal/commands/decisions.md +0 -10
- package/rihal/commands/dev-story.md +0 -8
- package/rihal/commands/diagnose-issues.md +0 -18
- package/rihal/commands/diff.md +0 -10
- package/rihal/commands/discuss-phase-power.md +0 -18
- package/rihal/commands/discuss-phase.md +0 -19
- package/rihal/commands/discuss.md +0 -23
- package/rihal/commands/do.md +0 -22
- package/rihal/commands/docs-update.md +0 -14
- package/rihal/commands/document-project.md +0 -8
- package/rihal/commands/edit-prd.md +0 -18
- package/rihal/commands/enable-hooks.md +0 -11
- package/rihal/commands/execute-milestone.md +0 -18
- package/rihal/commands/execute-sprint.md +0 -13
- package/rihal/commands/execute.md +0 -19
- package/rihal/commands/explore.md +0 -14
- package/rihal/commands/export-to-github.md +0 -11
- package/rihal/commands/feature-drift.md +0 -18
- package/rihal/commands/forensics.md +0 -11
- package/rihal/commands/from-template.md +0 -11
- package/rihal/commands/health.md +0 -10
- package/rihal/commands/help.md +0 -8
- package/rihal/commands/import.md +0 -12
- package/rihal/commands/inbox.md +0 -12
- package/rihal/commands/init.md +0 -14
- package/rihal/commands/insert-phase.md +0 -11
- package/rihal/commands/install.md +0 -10
- package/rihal/commands/karpathy-audit.md +0 -18
- package/rihal/commands/lens-audit.md +0 -70
- package/rihal/commands/list-plans.md +0 -11
- package/rihal/commands/list-workspaces.md +0 -10
- package/rihal/commands/map-codebase.md +0 -14
- package/rihal/commands/memory-audit.md +0 -10
- package/rihal/commands/memory-distill.md +0 -11
- package/rihal/commands/memory-init.md +0 -12
- package/rihal/commands/memory-update.md +0 -12
- package/rihal/commands/milestone-summary.md +0 -11
- package/rihal/commands/new-milestone.md +0 -12
- package/rihal/commands/new-project-research.md +0 -18
- package/rihal/commands/new-project-roadmap.md +0 -18
- package/rihal/commands/new-project.md +0 -13
- package/rihal/commands/new-workspace.md +0 -12
- package/rihal/commands/next.md +0 -19
- package/rihal/commands/note.md +0 -12
- package/rihal/commands/notify-test.md +0 -10
- package/rihal/commands/pause-work.md +0 -8
- package/rihal/commands/phase.md +0 -11
- package/rihal/commands/plan-milestone-gaps.md +0 -18
- package/rihal/commands/plan-milestone.md +0 -18
- package/rihal/commands/plan.md +0 -19
- package/rihal/commands/plant-seed.md +0 -18
- package/rihal/commands/pr-branch.md +0 -18
- package/rihal/commands/prfaq.md +0 -15
- package/rihal/commands/profile-user.md +0 -8
- package/rihal/commands/progress.md +0 -18
- package/rihal/commands/quick.md +0 -14
- package/rihal/commands/remove-phase.md +0 -18
- package/rihal/commands/remove-workspace.md +0 -11
- package/rihal/commands/replay.md +0 -11
- package/rihal/commands/rerun.md +0 -11
- package/rihal/commands/research-phase.md +0 -18
- package/rihal/commands/resume-work.md +0 -8
- package/rihal/commands/retrospective.md +0 -18
- package/rihal/commands/review-edge-case-hunter.md +0 -18
- package/rihal/commands/review.md +0 -18
- package/rihal/commands/scaffold-milestone.md +0 -18
- package/rihal/commands/scaffold-project.md +0 -18
- package/rihal/commands/scaffold-skill.md +0 -18
- package/rihal/commands/scan.md +0 -14
- package/rihal/commands/secure-phase.md +0 -14
- package/rihal/commands/session-report.md +0 -10
- package/rihal/commands/settings.md +0 -8
- package/rihal/commands/ship.md +0 -30
- package/rihal/commands/show.md +0 -10
- package/rihal/commands/sprint-planning.md +0 -20
- package/rihal/commands/sprint-status.md +0 -21
- package/rihal/commands/stats.md +0 -10
- package/rihal/commands/status.md +0 -21
- package/rihal/commands/ui-phase.md +0 -8
- package/rihal/commands/ui-review.md +0 -8
- package/rihal/commands/undo.md +0 -14
- package/rihal/commands/update.md +0 -11
- package/rihal/commands/validate-phase.md +0 -18
- package/rihal/commands/validate-prd.md +0 -18
- package/rihal/commands/verify-phase.md +0 -18
- package/rihal/commands/verify-work.md +0 -19
- package/rihal/commands/why.md +0 -10
- package/rihal/commands/workstream.md +0 -11
- package/rihal/config/model-profiles.json +0 -226
- package/rihal/config/model-profiles.schema.json +0 -36
- package/rihal/config.yaml +0 -39
- package/rihal/digests/README.md +0 -50
- package/rihal/digests/fatima.md +0 -24
- package/rihal/digests/hussain-pm.md +0 -24
- package/rihal/digests/mariam.md +0 -24
- package/rihal/digests/sadiq.md +0 -24
- package/rihal/digests/waleed.md +0 -24
- package/rihal/modules/core.yaml +0 -101
- package/rihal/modules/discovery.yaml +0 -50
- package/rihal/modules/execution.yaml +0 -66
- package/rihal/references/REFERENCES_INDEX.md +0 -109
- package/rihal/references/agent-contracts.md +0 -48
- package/rihal/references/agent-shared-rules.md +0 -81
- package/rihal/references/assumptions-analyzer-playbook.md +0 -82
- package/rihal/references/auditor-shared-checklists.md +0 -91
- package/rihal/references/auto-init-guard.md +0 -117
- package/rihal/references/checkpoints-index.md +0 -53
- package/rihal/references/code-fixer-playbook.md +0 -71
- package/rihal/references/code-reviewer-playbook.md +0 -71
- package/rihal/references/codebase-mapping-process.md +0 -176
- package/rihal/references/command-redirect-format.md +0 -62
- package/rihal/references/commit-conventions.md +0 -125
- package/rihal/references/common-bug-patterns-index.md +0 -44
- package/rihal/references/context-budget.md +0 -104
- package/rihal/references/continuation-format.md +0 -248
- package/rihal/references/council-protocol.md +0 -91
- package/rihal/references/debugger-playbook.md +0 -127
- package/rihal/references/design-tokens.md +0 -98
- package/rihal/references/dispatch-banner.md +0 -157
- package/rihal/references/docs-auditor-playbook.md +0 -148
- package/rihal/references/execution-protocol.md +0 -155
- package/rihal/references/executor-playbook.md +0 -119
- package/rihal/references/gate-prompts.md +0 -212
- package/rihal/references/gates.md +0 -127
- package/rihal/references/git-integration.md +0 -159
- package/rihal/references/git-planning-commit.md +0 -185
- package/rihal/references/git-preflight.md +0 -117
- package/rihal/references/integration-verification-playbook.md +0 -392
- package/rihal/references/iterative-retrieval.md +0 -85
- package/rihal/references/karpathy-guidelines-full.md +0 -79
- package/rihal/references/karpathy-guidelines.md +0 -11
- package/rihal/references/model-profile-resolution.md +0 -44
- package/rihal/references/model-profiles.md +0 -90
- package/rihal/references/no-unauthorized-git-ops.md +0 -73
- package/rihal/references/nyquist-auditor-playbook.md +0 -157
- package/rihal/references/output-format.md +0 -398
- package/rihal/references/output-realism.md +0 -52
- package/rihal/references/persona-engineer-shared.md +0 -61
- package/rihal/references/phase-argument-parsing.md +0 -35
- package/rihal/references/phase-id-conventions.md +0 -101
- package/rihal/references/planner-playbook.md +0 -217
- package/rihal/references/remediation-planner-playbook.md +0 -75
- package/rihal/references/research-synthesis-playbook.md +0 -205
- package/rihal/references/researcher-shared.md +0 -87
- package/rihal/references/response-style.md +0 -81
- package/rihal/references/revision-loop.md +0 -38
- package/rihal/references/roadmapper-playbook.md +0 -82
- package/rihal/references/sprint-checker-playbook.md +0 -128
- package/rihal/references/state-schema.md +0 -366
- package/rihal/references/ui-brand.md +0 -254
- package/rihal/references/universal-anti-patterns.md +0 -59
- package/rihal/references/ux-designer-playbook.md +0 -74
- package/rihal/references/verb-dictionary.md +0 -186
- package/rihal/references/verification-patterns-index.md +0 -76
- package/rihal/references/verification-patterns.md +0 -612
- package/rihal/references/verifier-playbook.md +0 -104
- package/rihal/references/workstream-flag.md +0 -166
- package/rihal/skills/SKILLS_INDEX.md +0 -143
- package/rihal/skills/_shared/no-autonomous-bypass.md +0 -37
- package/rihal/skills/_shared/research-citation-rule.md +0 -39
- package/rihal/skills/_shared/state-sync-rule.md +0 -43
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/SKILL.md +0 -46
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/workflow.md +0 -49
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/SKILL.md +0 -45
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/workflow.md +0 -49
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/SKILL.md +0 -48
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/workflow.md +0 -50
- package/rihal/skills/actions/1-analysis/rihal-document-project/SKILL.md +0 -45
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/index-template.md +0 -169
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/project-overview-template.md +0 -103
- package/rihal/skills/actions/1-analysis/rihal-document-project/templates/source-tree-template.md +0 -135
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflow.md +0 -27
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/deep-dive-workflow.md +0 -34
- package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/full-scan-workflow.md +0 -34
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +0 -145
- package/rihal/skills/actions/1-analysis/rihal-product-brief/SKILL.md +0 -123
- package/rihal/skills/actions/1-analysis/rihal-product-brief/rihal-manifest.json +0 -17
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +0 -58
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-02-design-epics.md +0 -212
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-03-create-stories.md +0 -255
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-04-final-validation.md +0 -143
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/workflow.md +0 -66
- package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +0 -63
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/README.md +0 -30
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-03-sequencing.md +0 -65
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-05-kill-criteria.md +0 -59
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-06-phase-stubs.md +0 -56
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-07-backlog.md +0 -44
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-08-write-roadmap.md +0 -58
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-09-state-sync.md +0 -62
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-10-complete.md +0 -56
- package/rihal/skills/actions/2-plan/rihal-create-milestone/workflow.md +0 -93
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +0 -80
- package/rihal/skills/actions/2-plan/rihal-create-prd/data/prd-purpose.md +0 -197
- package/rihal/skills/actions/2-plan/rihal-create-prd/data/project-types.csv +0 -11
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02-discovery.md +0 -208
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02b-vision.md +0 -142
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02c-executive-summary.md +0 -158
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-03-success.md +0 -214
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-04-journeys.md +0 -201
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-05-domain.md +0 -194
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-06-innovation.md +0 -211
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-07-project-type.md +0 -222
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-08-scoping.md +0 -216
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-09-functional.md +0 -219
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-10-nonfunctional.md +0 -230
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-11-polish.md +0 -221
- package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-12-complete.md +0 -115
- package/rihal/skills/actions/2-plan/rihal-create-prd/workflow.md +0 -64
- package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +0 -59
- package/rihal/skills/actions/2-plan/rihal-create-story/workflow.md +0 -380
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/SKILL.md +0 -47
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-02-discovery.md +0 -190
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-03-core-experience.md +0 -217
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-04-emotional-response.md +0 -220
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-05-inspiration.md +0 -235
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-06-design-system.md +0 -253
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-07-defining-experience.md +0 -255
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-08-visual-foundation.md +0 -225
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-09-design-directions.md +0 -225
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-10-user-journeys.md +0 -242
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-11-component-strategy.md +0 -249
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-12-ux-patterns.md +0 -238
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-13-responsive-accessibility.md +0 -265
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-14-complete.md +0 -171
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/workflow.md +0 -36
- package/rihal/skills/actions/2-plan/rihal-edit-prd/SKILL.md +0 -45
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-01-discovery.md +0 -242
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-01b-legacy-conversion.md +0 -204
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-02-review.md +0 -245
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-03-edit.md +0 -250
- package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-04-complete.md +0 -165
- package/rihal/skills/actions/2-plan/rihal-edit-prd/workflow.md +0 -63
- package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +0 -96
- package/rihal/skills/actions/2-plan/rihal-frontend-design/references.md +0 -79
- package/rihal/skills/actions/2-plan/rihal-validate-prd/SKILL.md +0 -45
- package/rihal/skills/actions/2-plan/rihal-validate-prd/data/prd-purpose.md +0 -197
- package/rihal/skills/actions/2-plan/rihal-validate-prd/data/project-types.csv +0 -11
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-01-discovery.md +0 -221
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-02-format-detection.md +0 -188
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-02b-parity-check.md +0 -206
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-03-density-validation.md +0 -171
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +0 -261
- package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-13-report-complete.md +0 -229
- package/rihal/skills/actions/2-plan/rihal-validate-prd/workflow.md +0 -62
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/SKILL.md +0 -46
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-06-final-assessment.md +0 -126
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/workflow.md +0 -49
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/SKILL.md +0 -50
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-02-context.md +0 -224
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-03-starter.md +0 -329
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-04-decisions.md +0 -318
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-05-patterns.md +0 -359
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-06-structure.md +0 -379
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-07-validation.md +0 -359
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-08-complete.md +0 -76
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/workflow.md +0 -38
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/SKILL.md +0 -47
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/steps/step-02-generate.md +0 -321
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/workflow.md +0 -43
- package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +0 -73
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +0 -75
- package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +0 -115
- package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +0 -59
- package/rihal/skills/actions/4-implementation/rihal-code-review/steps/step-02-review.md +0 -38
- package/rihal/skills/actions/4-implementation/rihal-code-review/workflow.md +0 -55
- package/rihal/skills/actions/4-implementation/rihal-correct-course/SKILL.md +0 -46
- package/rihal/skills/actions/4-implementation/rihal-correct-course/workflow.md +0 -267
- package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +0 -199
- package/rihal/skills/actions/4-implementation/rihal-dev-story/SKILL.md +0 -80
- package/rihal/skills/actions/4-implementation/rihal-dev-story/workflow.md +0 -537
- package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +0 -93
- package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +0 -98
- package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +0 -53
- package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +0 -93
- package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +0 -99
- package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +0 -67
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/SKILL.md +0 -47
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/checklist.md +0 -33
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/workflow.md +0 -136
- package/rihal/skills/actions/4-implementation/rihal-retrospective/SKILL.md +0 -45
- package/rihal/skills/actions/4-implementation/rihal-retrospective/workflow.md +0 -1491
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/SKILL.md +0 -91
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-03-clone.md +0 -50
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-04-post-setup.md +0 -44
- package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +0 -79
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +0 -63
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/checklist.md +0 -43
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/workflow.md +0 -296
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/SKILL.md +0 -44
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/workflow.md +0 -261
- package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +0 -76
- package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +0 -150
- package/rihal/skills/agents/dalil-scout/SKILL.md +0 -135
- package/rihal/skills/agents/dalil-scout/references.md +0 -67
- package/rihal/skills/agents/fatima-qa/SKILL.md +0 -158
- package/rihal/skills/agents/fatima-qa/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/haitham-frontend/SKILL.md +0 -151
- package/rihal/skills/agents/hanzla-engineer/SKILL.md +0 -159
- package/rihal/skills/agents/hanzla-engineer/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/hussain-pm/SKILL.md +0 -167
- package/rihal/skills/agents/hussain-pm/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/hussain-sm/SKILL.md +0 -141
- package/rihal/skills/agents/hussain-sm/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/layla-designer/SKILL.md +0 -125
- package/rihal/skills/agents/layla-designer/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/majlis-council/SKILL.md +0 -116
- package/rihal/skills/agents/majlis-council/references.md +0 -90
- package/rihal/skills/agents/mariam-marketing/SKILL.md +0 -182
- package/rihal/skills/agents/nasser-eng-manager/SKILL.md +0 -156
- package/rihal/skills/agents/noor-writer/SKILL.md +0 -134
- package/rihal/skills/agents/noor-writer/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +0 -122
- package/rihal/skills/agents/raees-orchestrator/references.md +0 -47
- package/rihal/skills/agents/rihal-cross-platform-auditor/SKILL.md +0 -163
- package/rihal/skills/agents/rihal-dep-auditor/SKILL.md +0 -152
- package/rihal/skills/agents/rihal-deviation-analyzer/SKILL.md +0 -79
- package/rihal/skills/agents/rihal-i18n-auditor/SKILL.md +0 -153
- package/rihal/skills/agents/rihal-observability-auditor/SKILL.md +0 -157
- package/rihal/skills/agents/sadiq-analyst/SKILL.md +0 -163
- package/rihal/skills/agents/sadiq-analyst/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/waleed-architect/SKILL.md +0 -154
- package/rihal/skills/agents/waleed-architect/skill-manifest.yaml +0 -11
- package/rihal/skills/agents/yousef-backend/SKILL.md +0 -164
- package/rihal/skills/agents/zahra-branding/SKILL.md +0 -172
- package/rihal/skills/agents/zayd-ml/SKILL.md +0 -155
- package/rihal/skills/core/module-help.csv +0 -11
- package/rihal/skills/core/module.yaml +0 -25
- package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +0 -69
- package/rihal/skills/core/rihal-auth-audit/SKILL.md +0 -95
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +0 -116
- package/rihal/skills/core/rihal-brainstorming/steps/step-03-technique-execution.md +0 -401
- package/rihal/skills/core/rihal-brainstorming/workflow.md +0 -53
- package/rihal/skills/core/rihal-client-gate/SKILL.md +0 -93
- package/rihal/skills/core/rihal-clone-website/SKILL.md +0 -87
- package/rihal/skills/core/rihal-deploy-unify/SKILL.md +0 -89
- package/rihal/skills/core/rihal-distillator/SKILL.md +0 -65
- package/rihal/skills/core/rihal-distillator/references.md +0 -118
- package/rihal/skills/core/rihal-distillator/resources/distillate-format-reference.md +0 -227
- package/rihal/skills/core/rihal-distillator/scripts/analyze_sources.py +0 -300
- package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +0 -127
- package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +0 -75
- package/rihal/skills/core/rihal-editorial-review-structure/references.md +0 -110
- package/rihal/skills/core/rihal-help/SKILL.md +0 -127
- package/rihal/skills/core/rihal-incident-record/SKILL.md +0 -163
- package/rihal/skills/core/rihal-index-docs/SKILL.md +0 -105
- package/rihal/skills/core/rihal-init/SKILL.md +0 -134
- package/rihal/skills/core/rihal-init/resources/core-module.yaml +0 -25
- package/rihal/skills/core/rihal-init/scripts/rihal_init.py +0 -593
- package/rihal/skills/core/rihal-init/scripts/tests/test_rihal_init.py +0 -329
- package/rihal/skills/core/rihal-memory-audit/SKILL.md +0 -107
- package/rihal/skills/core/rihal-memory-distill/SKILL.md +0 -89
- package/rihal/skills/core/rihal-memory-init/SKILL.md +0 -91
- package/rihal/skills/core/rihal-memory-update/SKILL.md +0 -87
- package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +0 -118
- package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +0 -108
- package/rihal/skills/core/rihal-party-mode/SKILL.md +0 -98
- package/rihal/skills/core/rihal-party-mode/steps/step-01-agent-loading.md +0 -138
- package/rihal/skills/core/rihal-party-mode/steps/step-02-discussion-orchestration.md +0 -187
- package/rihal/skills/core/rihal-party-mode/steps/step-03-graceful-exit.md +0 -167
- package/rihal/skills/core/rihal-party-mode/workflow.md +0 -190
- package/rihal/skills/core/rihal-rebrand/SKILL.md +0 -135
- package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +0 -74
- package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +0 -122
- package/rihal/skills/core/rihal-shard-doc/SKILL.md +0 -144
- package/rihal/skills/core/rihal-theme-system/SKILL.md +0 -115
- package/rihal/state.json +0 -21
- package/rihal/team.yaml +0 -610
- package/rihal/templates/RESEARCH.md +0 -84
- package/rihal/templates/UAT.md +0 -80
- package/rihal/templates/VALIDATION.md +0 -45
- package/rihal/templates/github/bug-template.md +0 -53
- package/rihal/templates/github/epic-template.md +0 -57
- package/rihal/templates/github/feature-template.md +0 -55
- package/rihal/templates/github/task-template.md +0 -52
- package/rihal/templates/memory/INDEX.md +0 -47
- package/rihal/templates/memory/distillates/project.distillate.md +0 -11
- package/rihal/templates/memory/distillates/stack.distillate.md +0 -11
- package/rihal/templates/memory/project/decisions.md +0 -32
- package/rihal/templates/memory/project/design-system.md +0 -128
- package/rihal/templates/memory/project/stack.md +0 -46
- package/rihal/templates/milestone.md +0 -149
- package/rihal/templates/projects/api-backend/PROJECT.md +0 -37
- package/rihal/templates/projects/api-backend/template.yaml +0 -17
- package/rihal/templates/projects/mobile-app/PROJECT.md +0 -37
- package/rihal/templates/projects/mobile-app/template.yaml +0 -17
- package/rihal/templates/projects/saas-b2b/PROJECT.md +0 -40
- package/rihal/templates/projects/saas-b2b/template.yaml +0 -18
- package/rihal/templates/settings-hooks.json +0 -75
- package/rihal/templates/summary.md +0 -77
- package/rihal/templates/verification-report.md +0 -83
- package/rihal/workflows/add-phase.md +0 -183
- package/rihal/workflows/add-tests.md +0 -352
- package/rihal/workflows/add-todo.md +0 -187
- package/rihal/workflows/analyze-dependencies.md +0 -144
- package/rihal/workflows/audit-fix.md +0 -204
- package/rihal/workflows/audit-milestone.md +0 -188
- package/rihal/workflows/audit-plans.md +0 -255
- package/rihal/workflows/audit-uat.md +0 -109
- package/rihal/workflows/audit-worktrees.md +0 -163
- package/rihal/workflows/audit.md +0 -202
- package/rihal/workflows/autonomous-smart-discuss.md +0 -248
- package/rihal/workflows/autonomous.md +0 -931
- package/rihal/workflows/brainstorm.md +0 -203
- package/rihal/workflows/capture.md +0 -60
- package/rihal/workflows/chain.md +0 -188
- package/rihal/workflows/check-implementation-readiness.md +0 -193
- package/rihal/workflows/check-todos.md +0 -181
- package/rihal/workflows/checkpoint-preview.md +0 -7
- package/rihal/workflows/cleanup.md +0 -152
- package/rihal/workflows/code-review-fix.md +0 -534
- package/rihal/workflows/code-review.md +0 -621
- package/rihal/workflows/complete-milestone.md +0 -845
- package/rihal/workflows/correct-course.md +0 -196
- package/rihal/workflows/council.md +0 -582
- package/rihal/workflows/create-architecture.md +0 -31
- package/rihal/workflows/create-epics-and-stories.md +0 -379
- package/rihal/workflows/create-prd.md +0 -25
- package/rihal/workflows/create-story.md +0 -297
- package/rihal/workflows/dashboard.md +0 -133
- package/rihal/workflows/debug.md +0 -272
- package/rihal/workflows/decisions.md +0 -107
- package/rihal/workflows/dev-story.md +0 -437
- package/rihal/workflows/diagnose-issues.md +0 -87
- package/rihal/workflows/diff.md +0 -80
- package/rihal/workflows/discuss-phase-discuss-areas.md +0 -271
- package/rihal/workflows/discuss-phase-power.md +0 -325
- package/rihal/workflows/discuss-phase.md +0 -962
- package/rihal/workflows/discuss.md +0 -227
- package/rihal/workflows/do.md +0 -434
- package/rihal/workflows/docs-update.md +0 -264
- package/rihal/workflows/document-project.md +0 -186
- package/rihal/workflows/edit-prd.md +0 -31
- package/rihal/workflows/enable-hooks.md +0 -107
- package/rihal/workflows/execute-milestone.md +0 -139
- package/rihal/workflows/execute-regression-gates.md +0 -131
- package/rihal/workflows/execute-sprint.md +0 -603
- package/rihal/workflows/execute-verify-phase-goal.md +0 -163
- package/rihal/workflows/execute-waves.md +0 -457
- package/rihal/workflows/execute.md +0 -1051
- package/rihal/workflows/explore.md +0 -171
- package/rihal/workflows/export-to-github.md +0 -174
- package/rihal/workflows/feature-drift.md +0 -243
- package/rihal/workflows/forensics.md +0 -209
- package/rihal/workflows/from-template.md +0 -173
- package/rihal/workflows/health.md +0 -258
- package/rihal/workflows/help.md +0 -343
- package/rihal/workflows/import.md +0 -320
- package/rihal/workflows/inbox.md +0 -418
- package/rihal/workflows/init.md +0 -350
- package/rihal/workflows/insert-phase.md +0 -116
- package/rihal/workflows/install.md +0 -77
- package/rihal/workflows/karpathy-audit.md +0 -402
- package/rihal/workflows/lens-audit.md +0 -705
- package/rihal/workflows/list-plans.md +0 -146
- package/rihal/workflows/list-workspaces.md +0 -115
- package/rihal/workflows/map-codebase.md +0 -455
- package/rihal/workflows/memory-audit.md +0 -145
- package/rihal/workflows/memory-distill.md +0 -113
- package/rihal/workflows/memory-init.md +0 -106
- package/rihal/workflows/memory-update.md +0 -87
- package/rihal/workflows/milestone-summary.md +0 -206
- package/rihal/workflows/new-milestone.md +0 -639
- package/rihal/workflows/new-project-create-roadmap.md +0 -176
- package/rihal/workflows/new-project-define-requirements.md +0 -160
- package/rihal/workflows/new-project-research-decision.md +0 -247
- package/rihal/workflows/new-project-research.md +0 -314
- package/rihal/workflows/new-project-roadmap.md +0 -446
- package/rihal/workflows/new-project.md +0 -992
- package/rihal/workflows/new-workspace.md +0 -167
- package/rihal/workflows/next.md +0 -162
- package/rihal/workflows/note.md +0 -156
- package/rihal/workflows/notify-test.md +0 -113
- package/rihal/workflows/pause-work.md +0 -249
- package/rihal/workflows/phase.md +0 -89
- package/rihal/workflows/plan-milestone-gaps.md +0 -273
- package/rihal/workflows/plan-milestone.md +0 -105
- package/rihal/workflows/plan-prd-express.md +0 -108
- package/rihal/workflows/plan-research-validation.md +0 -313
- package/rihal/workflows/plan-spawn-planner.md +0 -257
- package/rihal/workflows/plan.md +0 -983
- package/rihal/workflows/plant-seed.md +0 -175
- package/rihal/workflows/pr-branch.md +0 -129
- package/rihal/workflows/prfaq.md +0 -7
- package/rihal/workflows/profile-user.md +0 -162
- package/rihal/workflows/progress.md +0 -46
- package/rihal/workflows/quick.md +0 -208
- package/rihal/workflows/remove-phase.md +0 -160
- package/rihal/workflows/remove-workspace.md +0 -164
- package/rihal/workflows/replay.md +0 -160
- package/rihal/workflows/rerun.md +0 -77
- package/rihal/workflows/research-phase.md +0 -108
- package/rihal/workflows/resume-work.md +0 -331
- package/rihal/workflows/retrospective.md +0 -31
- package/rihal/workflows/review-adversarial.md +0 -194
- package/rihal/workflows/review-edge-case-hunter.md +0 -214
- package/rihal/workflows/review.md +0 -287
- package/rihal/workflows/scaffold-milestone.md +0 -60
- package/rihal/workflows/scaffold-project.md +0 -31
- package/rihal/workflows/scaffold-skill.md +0 -137
- package/rihal/workflows/scan.md +0 -382
- package/rihal/workflows/secure-phase.md +0 -209
- package/rihal/workflows/session-report.md +0 -252
- package/rihal/workflows/settings.md +0 -184
- package/rihal/workflows/ship.md +0 -274
- package/rihal/workflows/show.md +0 -69
- package/rihal/workflows/sprint-planning.md +0 -198
- package/rihal/workflows/sprint-status.md +0 -124
- package/rihal/workflows/stats.md +0 -141
- package/rihal/workflows/status.md +0 -148
- package/rihal/workflows/ui-phase.md +0 -148
- package/rihal/workflows/ui-review.md +0 -134
- package/rihal/workflows/undo.md +0 -425
- package/rihal/workflows/update.md +0 -243
- package/rihal/workflows/validate-phase.md +0 -181
- package/rihal/workflows/validate-prd.md +0 -31
- package/rihal/workflows/verify-phase.md +0 -409
- package/rihal/workflows/verify-work.md +0 -731
- package/rihal/workflows/why.md +0 -130
- package/rihal/workflows/workstream.md +0 -209
- /package/{rihal → rcode}/agents/rules/debugger/hypothesis-templates.md +0 -0
- /package/{rihal → rcode}/agents/rules/planner/common-patterns.md +0 -0
- /package/{rihal → rcode}/agents/rules/planner/dependency-analysis.md +0 -0
- /package/{rihal → rcode}/agents/rules/planner/sprint-verification.md +0 -0
- /package/{rihal → rcode}/agents/rules/verifier/behavioral-spot-checks.md +0 -0
- /package/{rihal → rcode}/agents/rules/verifier/data-flow-trace.md +0 -0
- /package/{rihal → rcode}/bin/lib/code-references.cjs +0 -0
- /package/{rihal → rcode}/bin/lib/verify.cjs +0 -0
- /package/{rihal → rcode}/references/brain-methods.csv +0 -0
- /package/{rihal → rcode}/references/checklist-architect.md +0 -0
- /package/{rihal → rcode}/references/checklist-change.md +0 -0
- /package/{rihal → rcode}/references/checklist-pm.md +0 -0
- /package/{rihal → rcode}/references/checklist-po-master.md +0 -0
- /package/{rihal → rcode}/references/checklist-story-dod.md +0 -0
- /package/{rihal → rcode}/references/checklist-story-draft.md +0 -0
- /package/{rihal → rcode}/references/checkpoints.md +0 -0
- /package/{rihal → rcode}/references/codebase-grounding.md +0 -0
- /package/{rihal → rcode}/references/common-bug-patterns.md +0 -0
- /package/{rihal → rcode}/references/domain-probes.md +0 -0
- /package/{rihal → rcode}/references/elicitation-methods.csv +0 -0
- /package/{rihal → rcode}/references/project-types.yaml +0 -0
- /package/{rihal → rcode}/references/questioning.md +0 -0
- /package/{rihal → rcode}/references/tdd.md +0 -0
- /package/{rihal → rcode}/references/thinking-models-debug.md +0 -0
- /package/{rihal → rcode}/references/thinking-models-planning.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/checklist.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/documentation-requirements.csv +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/instructions.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/templates/deep-dive-template.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/templates/project-scan-report-schema.json +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/workflows/deep-dive-instructions.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/workflows/full-scan-instructions.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/agents/artifact-analyzer.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/agents/web-researcher.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/assets/prfaq-template.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq/rihal-manifest.json → rcode/skills/actions/1-analysis/rcode-prfaq/rcode-manifest.json} +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/customer-faq.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/internal-faq.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/press-release.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/verdict.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/artifact-analyzer.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/opportunity-reviewer.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/skeptic-reviewer.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/web-researcher.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/contextual-discovery.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/draft-and-review.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/finalize.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/guided-elicitation.md +0 -0
- /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/resources/brief-template.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-01-init.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-02-domain-analysis.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-03-competitive-landscape.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-04-regulatory-focus.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-05-technical-trends.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-06-research-synthesis.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/research.template.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/research.template.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-01-init.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-02-customer-behavior.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-03-customer-pain-points.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-04-customer-decisions.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-05-competitive-analysis.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-06-research-completion.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/research.template.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-01-init.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-02-technical-overview.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-03-integration-patterns.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-04-architectural-patterns.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-05-implementation-research.md +0 -0
- /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-06-research-synthesis.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-epics-and-stories → rcode/skills/actions/2-plan/rcode-create-epics-and-stories}/steps/step-01-validate-prerequisites.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-epics-and-stories → rcode/skills/actions/2-plan/rcode-create-epics-and-stories}/templates/epics-template.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-milestone → rcode/skills/actions/2-plan/rcode-create-milestone}/steps/step-01-init.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-milestone → rcode/skills/actions/2-plan/rcode-create-milestone}/steps/step-02-outcomes.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-milestone → rcode/skills/actions/2-plan/rcode-create-milestone}/steps/step-04-windows.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/data/domain-complexity.csv +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/steps-c/step-01-init.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/steps-c/step-01b-continue.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/templates/prd-template.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-story → rcode/skills/actions/2-plan/rcode-create-story}/checklist.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-story → rcode/skills/actions/2-plan/rcode-create-story}/discover-inputs.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-story → rcode/skills/actions/2-plan/rcode-create-story}/template.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-ux-design → rcode/skills/actions/2-plan/rcode-create-ux-design}/steps/step-01-init.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-ux-design → rcode/skills/actions/2-plan/rcode-create-ux-design}/steps/step-01b-continue.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-create-ux-design → rcode/skills/actions/2-plan/rcode-create-ux-design}/ux-design-template.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/data/domain-complexity.csv +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-04-brief-coverage-validation.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-05-measurability-validation.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-06-traceability-validation.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-07-implementation-leakage-validation.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-08-domain-compliance-validation.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-09-project-type-validation.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-10-smart-validation.md +0 -0
- /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-12-completeness-validation.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-01-document-discovery.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-02-prd-analysis.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-03-epic-coverage-validation.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-04-ux-alignment.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-05-epic-quality-review.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/templates/readiness-report-template.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/architecture-decision-template.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/data/domain-complexity.csv +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/data/project-types.csv +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/steps/step-01-init.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/steps/step-01b-continue.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-generate-project-context → rcode/skills/actions/3-solutioning/rcode-generate-project-context}/project-context-template.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-generate-project-context → rcode/skills/actions/3-solutioning/rcode-generate-project-context}/steps/step-01-discover.md +0 -0
- /package/{rihal/skills/actions/3-solutioning/rihal-generate-project-context → rcode/skills/actions/3-solutioning/rcode-generate-project-context}/steps/step-03-complete.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/generate-trail.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-01-orientation.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-02-walkthrough.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-03-detail-pass.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-04-testing.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-05-wrapup.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-code-review → rcode/skills/actions/4-implementation/rcode-code-review}/steps/step-01-gather-context.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-code-review → rcode/skills/actions/4-implementation/rcode-code-review}/steps/step-03-triage.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-code-review → rcode/skills/actions/4-implementation/rcode-code-review}/steps/step-04-present.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-correct-course → rcode/skills/actions/4-implementation/rcode-correct-course}/checklist.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-dev-story → rcode/skills/actions/4-implementation/rcode-dev-story}/checklist.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-scaffold-project → rcode/skills/actions/4-implementation/rcode-scaffold-project}/steps/step-01-target.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-scaffold-project → rcode/skills/actions/4-implementation/rcode-scaffold-project}/steps/step-02-safety.md +0 -0
- /package/{rihal/skills/actions/4-implementation/rihal-sprint-planning → rcode/skills/actions/4-implementation/rcode-sprint-planning}/sprint-status-template.yaml +0 -0
- /package/{rihal → rcode}/skills/agents/noor-writer/explain-concept.md +0 -0
- /package/{rihal → rcode}/skills/agents/noor-writer/mermaid-gen.md +0 -0
- /package/{rihal → rcode}/skills/agents/noor-writer/validate-doc.md +0 -0
- /package/{rihal → rcode}/skills/agents/noor-writer/write-document.md +0 -0
- /package/{rihal/skills/core/rihal-advanced-elicitation → rcode/skills/core/rcode-advanced-elicitation}/methods.csv +0 -0
- /package/{rihal/skills/core/rihal-advanced-elicitation → rcode/skills/core/rcode-advanced-elicitation}/references.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/brain-methods.csv +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-01-session-setup.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-01b-continue.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02a-user-selected.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02b-ai-recommended.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02c-random-selection.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02d-progressive-flow.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-04-idea-organization.md +0 -0
- /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/template.md +0 -0
- /package/{rihal/skills/core/rihal-clone-website → rcode/skills/core/rcode-clone-website}/references.md +0 -0
- /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/agents/distillate-compressor.md +0 -0
- /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/agents/round-trip-reconstructor.md +0 -0
- /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/resources/compression-rules.md +0 -0
- /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/resources/splitting-strategy.md +0 -0
- /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/scripts/tests/test_analyze_sources.py +0 -0
- /package/{rihal → rcode}/templates/UI-SPEC.md +0 -0
- /package/{rihal → rcode}/templates/documentation-requirements.csv +0 -0
- /package/{rihal → rcode}/templates/memory/change-records/.gitkeep +0 -0
- /package/{rihal → rcode}/templates/memory/incidents/known-issues.md +0 -0
- /package/{rihal → rcode}/templates/memory/incidents/post-mortems/.gitkeep +0 -0
- /package/{rihal → rcode}/templates/memory/milestones/archive/.gitkeep +0 -0
- /package/{rihal → rcode}/templates/memory/milestones/current.md +0 -0
- /package/{rihal → rcode}/templates/memory/people/stakeholders.md +0 -0
- /package/{rihal → rcode}/templates/memory/people/team.md +0 -0
- /package/{rihal → rcode}/templates/memory/project/glossary.md +0 -0
- /package/{rihal → rcode}/templates/projects/api-backend/REQUIREMENTS.md +0 -0
- /package/{rihal → rcode}/templates/projects/api-backend/ROADMAP.md +0 -0
- /package/{rihal → rcode}/templates/projects/mobile-app/REQUIREMENTS.md +0 -0
- /package/{rihal → rcode}/templates/projects/mobile-app/ROADMAP.md +0 -0
- /package/{rihal → rcode}/templates/projects/saas-b2b/REQUIREMENTS.md +0 -0
- /package/{rihal → rcode}/templates/projects/saas-b2b/ROADMAP.md +0 -0
- /package/{rihal → rcode}/templates/sprint.md +0 -0
package/cli/install.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* cli/install.js —
|
|
2
|
+
* cli/install.js — rcode v2 file-shipping installer (prototype)
|
|
3
3
|
*
|
|
4
4
|
* Compared to the v1 `cli/init.js` (2918 lines of inline string templates),
|
|
5
|
-
* this installer copies real files from the package's `
|
|
5
|
+
* this installer copies real files from the package's `rcode/` directory
|
|
6
6
|
* into a target project. The same file-shipping pattern (no npm deps).
|
|
7
7
|
*
|
|
8
8
|
* Target layout in the user's project:
|
|
9
9
|
*
|
|
10
|
-
* .
|
|
10
|
+
* .rcode/
|
|
11
11
|
* _config/
|
|
12
12
|
* manifest.yaml (version + install date + installed modules)
|
|
13
|
-
* agent-manifest.csv (auto-generated from
|
|
13
|
+
* agent-manifest.csv (auto-generated from rcode/agents/*.md frontmatter)
|
|
14
14
|
* files-manifest.csv (SHA256 hashes for update/doctor)
|
|
15
15
|
* config.yaml (user_name, project_name, language, mode)
|
|
16
16
|
* workflows/
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
* council-protocol.md
|
|
20
20
|
* commit-conventions.md
|
|
21
21
|
* bin/
|
|
22
|
-
*
|
|
22
|
+
* rcode-tools.cjs
|
|
23
23
|
* lib/council-panel.cjs
|
|
24
24
|
* .claude/
|
|
25
25
|
* agents/
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* rcode-sadiq.md
|
|
27
|
+
* rcode-waleed.md
|
|
28
|
+
* rcode-fatima.md
|
|
29
29
|
* commands/
|
|
30
|
-
*
|
|
30
|
+
* rcode/
|
|
31
31
|
* council.md
|
|
32
32
|
* .planning/
|
|
33
33
|
* council-sessions/ (empty dir, populated on first council run)
|
|
@@ -77,7 +77,7 @@ const dim = (s) => pc.dim(s);
|
|
|
77
77
|
const bold = (s) => pc.bold(s);
|
|
78
78
|
|
|
79
79
|
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
80
|
-
const SOURCE_ROOT = path.join(PACKAGE_ROOT, '
|
|
80
|
+
const SOURCE_ROOT = path.join(PACKAGE_ROOT, 'rcode');
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Single source of truth for supported IDEs (#697 — W4.3).
|
|
@@ -91,7 +91,45 @@ const SOURCE_ROOT = path.join(PACKAGE_ROOT, 'rihal');
|
|
|
91
91
|
*/
|
|
92
92
|
const SUPPORTED_IDES = Object.freeze(['claude', 'cursor', 'gemini', 'vscode', 'antigravity', 'windsurf']);
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Resolve the stable on-disk location of this package so config.yaml
|
|
96
|
+
* rcode_source_path doesn't point to a temp npm install directory.
|
|
97
|
+
* Issue #831 — process.argv[1] may be /tmp/... when installed via npx.
|
|
98
|
+
* Resolution order: package.json location of @hanzlaa/rcode in global
|
|
99
|
+
* node_modules, then local node_modules, then argv fallback.
|
|
100
|
+
*/
|
|
101
|
+
function resolveStableSourcePath() {
|
|
102
|
+
const candidateDirs = [
|
|
103
|
+
// pnpm/npm global store
|
|
104
|
+
path.join(process.env.HOME || '', '.pnpm-global', 'node_modules', '@hanzlaa', 'rcode'),
|
|
105
|
+
path.join(process.env.HOME || '', '.npm-global', 'lib', 'node_modules', '@hanzlaa', 'rcode'),
|
|
106
|
+
// local node_modules (most common for pnpm add -D)
|
|
107
|
+
path.join(process.cwd(), 'node_modules', '@hanzlaa', 'rcode'),
|
|
108
|
+
// argv-based fallback (may be /tmp/... on npx)
|
|
109
|
+
path.dirname(path.dirname(process.argv[1] || '')),
|
|
110
|
+
];
|
|
111
|
+
for (const dir of candidateDirs) {
|
|
112
|
+
if (dir && fs.existsSync(path.join(dir, 'package.json'))) return dir;
|
|
113
|
+
}
|
|
114
|
+
return path.dirname(path.dirname(process.argv[1] || ''));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Walk up the directory tree from startDir looking for pnpm-workspace.yaml.
|
|
119
|
+
* Returns the first directory that contains the file, or null if not found.
|
|
120
|
+
* Issue #821/#832 — used to detect workspace roots and anchor TARGET_DIR.
|
|
121
|
+
*/
|
|
122
|
+
function findPnpmWorkspaceRoot(startDir) {
|
|
123
|
+
let dir = startDir;
|
|
124
|
+
while (true) {
|
|
125
|
+
if (fs.existsSync(path.join(dir, 'pnpm-workspace.yaml'))) return dir;
|
|
126
|
+
const parent = path.dirname(dir);
|
|
127
|
+
if (parent === dir) return null; // reached filesystem root
|
|
128
|
+
dir = parent;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Zod schema for .rcode/config.yaml validation (#250).
|
|
95
133
|
const ConfigSchema = z.object({
|
|
96
134
|
user_name: z.string().min(1),
|
|
97
135
|
project_name: z.string().min(1),
|
|
@@ -101,7 +139,7 @@ const ConfigSchema = z.object({
|
|
|
101
139
|
}).default('guided'),
|
|
102
140
|
model_profile: z.string().optional(),
|
|
103
141
|
commit_planning: z.boolean().optional(),
|
|
104
|
-
|
|
142
|
+
rcode_source_path: z.string().optional(),
|
|
105
143
|
workflow: z.object({
|
|
106
144
|
research_by_default: z.boolean().optional(),
|
|
107
145
|
plan_checker: z.boolean().optional(),
|
|
@@ -171,7 +209,13 @@ function parseArgs(argv) {
|
|
|
171
209
|
else if (arg === '--project') opts.projectName = argv[++i];
|
|
172
210
|
else if (arg === '--language') opts.language = argv[++i];
|
|
173
211
|
else if (arg === '--mode') opts.mode = argv[++i];
|
|
174
|
-
else if (arg === '--ide') {
|
|
212
|
+
else if (arg === '--ide') {
|
|
213
|
+
opts.ide = argv[++i];
|
|
214
|
+
// Issue #841: normalise 'claude-code' alias — the tool is marketed as
|
|
215
|
+
// "Claude Code" so users pass --ide claude-code expecting it to work.
|
|
216
|
+
if (opts.ide === 'claude-code') opts.ide = 'claude';
|
|
217
|
+
opts.ideProvided = true;
|
|
218
|
+
}
|
|
175
219
|
else if (arg === '--module') opts.modules.push(argv[++i]);
|
|
176
220
|
else if (arg === '--commit-planning') opts.commitPlanning = true;
|
|
177
221
|
else if (arg === '--no-commit-planning' || arg === '--ignore-planning') opts.commitPlanning = false;
|
|
@@ -195,11 +239,33 @@ function parseArgs(argv) {
|
|
|
195
239
|
}
|
|
196
240
|
// --global without an explicit target means "install to ~/.claude/" — i.e.
|
|
197
241
|
// home dir. Without this, running `rcode install --global` from inside a
|
|
198
|
-
// project directory wrote
|
|
242
|
+
// project directory wrote rcode artifacts to that project, not to the user's
|
|
199
243
|
// home where Claude Code reads global commands from.
|
|
200
244
|
if (opts.global && !opts.targetProvided) {
|
|
201
245
|
opts.target = os.homedir();
|
|
202
246
|
}
|
|
247
|
+
// Issue #821/#832: pnpm workspace anchor.
|
|
248
|
+
// When `pnpm add -D @hanzlaa/rcode` runs inside a workspace member,
|
|
249
|
+
// pnpm may change process.cwd() to the workspace root (the directory that
|
|
250
|
+
// contains pnpm-workspace.yaml). npm sets INIT_CWD to the original member
|
|
251
|
+
// directory where the user ran the command.
|
|
252
|
+
// Guard 1: CWD is the workspace root + INIT_CWD points inside it → use INIT_CWD.
|
|
253
|
+
// Guard 2: workspace root found above CWD → keep CWD (don't walk up).
|
|
254
|
+
if (!opts.targetProvided && !opts.global) {
|
|
255
|
+
const cwd = process.cwd();
|
|
256
|
+
const hasPnpmWorkspaceHere = fs.existsSync(path.join(cwd, 'pnpm-workspace.yaml'));
|
|
257
|
+
const initCwd = process.env.INIT_CWD;
|
|
258
|
+
if (hasPnpmWorkspaceHere && initCwd && path.resolve(initCwd) !== path.resolve(cwd)) {
|
|
259
|
+
// pnpm changed CWD to workspace root; INIT_CWD has the member directory.
|
|
260
|
+
opts.target = path.resolve(initCwd);
|
|
261
|
+
} else {
|
|
262
|
+
// Check if we're already inside a workspace member (workspace root in a parent).
|
|
263
|
+
const workspaceRoot = findPnpmWorkspaceRoot(path.dirname(cwd));
|
|
264
|
+
if (workspaceRoot) {
|
|
265
|
+
opts.target = cwd; // explicit anchor — do not drift to workspace root
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
203
269
|
if (!opts.projectName) opts.projectName = path.basename(opts.target);
|
|
204
270
|
return opts;
|
|
205
271
|
}
|
|
@@ -207,7 +273,7 @@ function parseArgs(argv) {
|
|
|
207
273
|
/**
|
|
208
274
|
* Create a tar.gz backup of every file the install plan would touch BEFORE
|
|
209
275
|
* --force-overwrite clobbers them. Closes #381 — without this, customized
|
|
210
|
-
* .claude/agents/
|
|
276
|
+
* .claude/agents/rcode-*.md and similar files were silently lost.
|
|
211
277
|
*
|
|
212
278
|
* Returns { ok, path, warning, fileCount } — ok=false means we couldn't
|
|
213
279
|
* create the backup (tar missing, no paths, etc.); the caller decides
|
|
@@ -232,10 +298,10 @@ function createInstallBackup(target, plan) {
|
|
|
232
298
|
// explicitly preserves them — defensive: if install regresses and starts
|
|
233
299
|
// touching them, the backup catches it.
|
|
234
300
|
for (const stateFile of [
|
|
235
|
-
'.
|
|
236
|
-
'.
|
|
237
|
-
'.
|
|
238
|
-
'.
|
|
301
|
+
'.rcode/config.yaml',
|
|
302
|
+
'.rcode/state.json',
|
|
303
|
+
'.rcode/_config/manifest.yaml',
|
|
304
|
+
'.rcode/_config/files-manifest.csv',
|
|
239
305
|
]) {
|
|
240
306
|
if (fs.existsSync(path.join(target, stateFile))) {
|
|
241
307
|
paths.push(stateFile);
|
|
@@ -246,11 +312,11 @@ function createInstallBackup(target, plan) {
|
|
|
246
312
|
return { ok: false, warning: 'no existing files to back up — fresh install', fileCount: 0 };
|
|
247
313
|
}
|
|
248
314
|
|
|
249
|
-
const backupsDir = path.join(target, '.
|
|
315
|
+
const backupsDir = path.join(target, '.rcode/backups');
|
|
250
316
|
try {
|
|
251
317
|
fs.mkdirSync(backupsDir, { recursive: true });
|
|
252
318
|
} catch (err) {
|
|
253
|
-
return { ok: false, warning: `could not create .
|
|
319
|
+
return { ok: false, warning: `could not create .rcode/backups/: ${err.message}`, fileCount: 0 };
|
|
254
320
|
}
|
|
255
321
|
|
|
256
322
|
const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
@@ -278,7 +344,7 @@ function createInstallBackup(target, plan) {
|
|
|
278
344
|
}
|
|
279
345
|
|
|
280
346
|
/**
|
|
281
|
-
* Print the
|
|
347
|
+
* Print the rcode Memory Bank installer header. Box-drawn banner shown once
|
|
282
348
|
* at the top of every interactive install run.
|
|
283
349
|
*/
|
|
284
350
|
function printInstallHeader(targetVersion) {
|
|
@@ -287,11 +353,12 @@ function printInstallHeader(targetVersion) {
|
|
|
287
353
|
'',
|
|
288
354
|
pc.cyan('╭───────────────────────────────────────────────────────────╮'),
|
|
289
355
|
pc.cyan('│') + ' ' + pc.cyan('│'),
|
|
290
|
-
pc.cyan('│') + ' ' + pc.bold(pc.yellow('🕌
|
|
356
|
+
pc.cyan('│') + ' ' + pc.bold(pc.yellow('🕌 rcode Memory Bank')) + ' ' + dim('— installer') + ' ' + pc.cyan('│'),
|
|
291
357
|
pc.cyan('│') + ' ' + dim('A persistent context-brain for your editor') + ' ' + pc.cyan('│'),
|
|
292
358
|
pc.cyan('│') + ' ' + pc.cyan('│'),
|
|
293
359
|
pc.cyan('│') + ' ' + dim('version ') + pc.green('v' + v) + ' ' + pc.cyan('│'),
|
|
294
360
|
pc.cyan('│') + ' ' + dim('docs ') + 'github.com/hanzlahabib/rihal-code ' + pc.cyan('│'),
|
|
361
|
+
pc.cyan('│') + ' ' + dim('by ') + 'Hanzla Habib' + ' ' + pc.cyan('│'),
|
|
295
362
|
pc.cyan('│') + ' ' + pc.cyan('│'),
|
|
296
363
|
pc.cyan('╰───────────────────────────────────────────────────────────╯'),
|
|
297
364
|
'',
|
|
@@ -400,14 +467,14 @@ async function resolveCommitPlanning(opts) {
|
|
|
400
467
|
if (opts.commitPlanning !== null) return opts.commitPlanning;
|
|
401
468
|
if (opts.noPrompt || opts.global) return false; // global install: no planning artifacts
|
|
402
469
|
|
|
403
|
-
// Issue #685: on re-install, read the existing .
|
|
470
|
+
// Issue #685: on re-install, read the existing .rcode/config.yaml and use
|
|
404
471
|
// its commit_planning value as the default. Otherwise the new prompt
|
|
405
472
|
// answer overwrites .gitignore but NOT config.yaml, leaving two sources of
|
|
406
473
|
// truth that silently diverge. Users on re-install almost always want to
|
|
407
474
|
// KEEP their existing setting unless they explicitly pass --commit-planning.
|
|
408
475
|
let existingValue = null;
|
|
409
476
|
try {
|
|
410
|
-
const cfgPath = path.join(opts.target, '.
|
|
477
|
+
const cfgPath = path.join(opts.target, '.rcode', 'config.yaml');
|
|
411
478
|
if (fs.existsSync(cfgPath)) {
|
|
412
479
|
const cfg = fs.readFileSync(cfgPath, 'utf8');
|
|
413
480
|
const m = cfg.match(/^commit_planning:\s*(true|false)\s*$/m);
|
|
@@ -441,7 +508,7 @@ async function resolveCommitPlanning(opts) {
|
|
|
441
508
|
|
|
442
509
|
function printHelp() {
|
|
443
510
|
console.log(`
|
|
444
|
-
|
|
511
|
+
rcode installer
|
|
445
512
|
|
|
446
513
|
Usage:
|
|
447
514
|
node cli/install.js [target-dir]
|
|
@@ -458,11 +525,11 @@ Options:
|
|
|
458
525
|
--help this text
|
|
459
526
|
|
|
460
527
|
Installs (IDE-specific):
|
|
461
|
-
claude: target/.
|
|
462
|
-
target/.claude/agents/ first-class
|
|
463
|
-
target/.claude/commands/
|
|
464
|
-
cursor: target/.cursor/rules/
|
|
465
|
-
gemini: target/.gemini/
|
|
528
|
+
claude: target/.rcode/ config, workflows, references, bin
|
|
529
|
+
target/.claude/agents/ first-class rcode subagents
|
|
530
|
+
target/.claude/commands/rcode/ slash commands
|
|
531
|
+
cursor: target/.cursor/rules/rcode/ Cursor-specific rules + agents
|
|
532
|
+
gemini: target/.gemini/rcode/ Gemini CLI commands + agents
|
|
466
533
|
target/.planning/ artifact output dir (all IDEs)
|
|
467
534
|
`);
|
|
468
535
|
}
|
|
@@ -477,62 +544,62 @@ function getPathsForIde(ide, target) {
|
|
|
477
544
|
return {
|
|
478
545
|
agentsDir: path.join(target, '.claude', 'agents'),
|
|
479
546
|
commandsDir: path.join(target, '.claude', 'commands'),
|
|
480
|
-
workflowsDir: path.join(target, '.
|
|
481
|
-
referencesDir: path.join(target, '.
|
|
482
|
-
binDir: path.join(target, '.
|
|
547
|
+
workflowsDir: path.join(target, '.rcode', 'workflows'),
|
|
548
|
+
referencesDir: path.join(target, '.rcode', 'references'),
|
|
549
|
+
binDir: path.join(target, '.rcode', 'bin'),
|
|
483
550
|
};
|
|
484
551
|
case 'cursor':
|
|
485
552
|
return {
|
|
486
|
-
agentsDir: path.join(target, '.cursor', 'rules', '
|
|
487
|
-
commandsDir: path.join(target, '.cursor', 'rules', '
|
|
488
|
-
workflowsDir: path.join(target, '.
|
|
489
|
-
referencesDir: path.join(target, '.
|
|
490
|
-
binDir: path.join(target, '.
|
|
553
|
+
agentsDir: path.join(target, '.cursor', 'rules', 'rcode', 'agents'),
|
|
554
|
+
commandsDir: path.join(target, '.cursor', 'rules', 'rcode', 'commands'),
|
|
555
|
+
workflowsDir: path.join(target, '.rcode', 'workflows'),
|
|
556
|
+
referencesDir: path.join(target, '.rcode', 'references'),
|
|
557
|
+
binDir: path.join(target, '.rcode', 'bin'),
|
|
491
558
|
};
|
|
492
559
|
case 'gemini':
|
|
493
560
|
return {
|
|
494
|
-
agentsDir: path.join(target, '.gemini', '
|
|
495
|
-
commandsDir: path.join(target, '.gemini', '
|
|
496
|
-
workflowsDir: path.join(target, '.
|
|
497
|
-
referencesDir: path.join(target, '.
|
|
498
|
-
binDir: path.join(target, '.
|
|
561
|
+
agentsDir: path.join(target, '.gemini', 'rcode', 'agents'),
|
|
562
|
+
commandsDir: path.join(target, '.gemini', 'rcode', 'commands'),
|
|
563
|
+
workflowsDir: path.join(target, '.rcode', 'workflows'),
|
|
564
|
+
referencesDir: path.join(target, '.rcode', 'references'),
|
|
565
|
+
binDir: path.join(target, '.rcode', 'bin'),
|
|
499
566
|
};
|
|
500
567
|
case 'vscode':
|
|
501
568
|
// VS Code's Claude Code / Continue / Copilot extensions all read from
|
|
502
569
|
// .claude/ (Claude Code's canonical paths). We install there directly
|
|
503
570
|
// using the SAME layout as the claude case (prefixed-root form) so
|
|
504
571
|
// multi-IDE installs don't double up — see #723 / #635-#643 / #646.
|
|
505
|
-
// The .vscode/
|
|
572
|
+
// The .vscode/rcode/ marker is preserved for workspace settings.
|
|
506
573
|
return {
|
|
507
574
|
agentsDir: path.join(target, '.claude', 'agents'),
|
|
508
575
|
commandsDir: path.join(target, '.claude', 'commands'),
|
|
509
|
-
workflowsDir: path.join(target, '.
|
|
510
|
-
referencesDir: path.join(target, '.
|
|
511
|
-
binDir: path.join(target, '.
|
|
512
|
-
markerDir: path.join(target, '.vscode', '
|
|
576
|
+
workflowsDir: path.join(target, '.rcode', 'workflows'),
|
|
577
|
+
referencesDir: path.join(target, '.rcode', 'references'),
|
|
578
|
+
binDir: path.join(target, '.rcode', 'bin'),
|
|
579
|
+
markerDir: path.join(target, '.vscode', 'rcode'),
|
|
513
580
|
};
|
|
514
581
|
case 'antigravity':
|
|
515
582
|
// Antigravity (Google's agentic IDE) — install to .antigravity/ mirroring
|
|
516
583
|
// the .gemini/ structure. Antigravity's plugin protocol is still firming
|
|
517
|
-
// up; the user can adjust paths via .
|
|
584
|
+
// up; the user can adjust paths via .rcode/config.yaml's `extra_install_paths`
|
|
518
585
|
// if Antigravity expects different routing.
|
|
519
586
|
return {
|
|
520
|
-
agentsDir: path.join(target, '.antigravity', '
|
|
521
|
-
commandsDir: path.join(target, '.antigravity', '
|
|
522
|
-
workflowsDir: path.join(target, '.
|
|
523
|
-
referencesDir: path.join(target, '.
|
|
524
|
-
binDir: path.join(target, '.
|
|
587
|
+
agentsDir: path.join(target, '.antigravity', 'rcode', 'agents'),
|
|
588
|
+
commandsDir: path.join(target, '.antigravity', 'rcode', 'commands'),
|
|
589
|
+
workflowsDir: path.join(target, '.rcode', 'workflows'),
|
|
590
|
+
referencesDir: path.join(target, '.rcode', 'references'),
|
|
591
|
+
binDir: path.join(target, '.rcode', 'bin'),
|
|
525
592
|
};
|
|
526
593
|
case 'windsurf':
|
|
527
594
|
// Windsurf (Codeium's agentic IDE) — uses .windsurf/rules/ for .mdc rule
|
|
528
595
|
// files, parallel to cursor's .cursor/rules/. cli/lib/manifest.cjs already
|
|
529
596
|
// handles the rules-install verify path (#723 closes the install-side gap).
|
|
530
597
|
return {
|
|
531
|
-
agentsDir: path.join(target, '.windsurf', 'rules', '
|
|
532
|
-
commandsDir: path.join(target, '.windsurf', 'rules', '
|
|
533
|
-
workflowsDir: path.join(target, '.
|
|
534
|
-
referencesDir: path.join(target, '.
|
|
535
|
-
binDir: path.join(target, '.
|
|
598
|
+
agentsDir: path.join(target, '.windsurf', 'rules', 'rcode', 'agents'),
|
|
599
|
+
commandsDir: path.join(target, '.windsurf', 'rules', 'rcode', 'commands'),
|
|
600
|
+
workflowsDir: path.join(target, '.rcode', 'workflows'),
|
|
601
|
+
referencesDir: path.join(target, '.rcode', 'references'),
|
|
602
|
+
binDir: path.join(target, '.rcode', 'bin'),
|
|
536
603
|
};
|
|
537
604
|
default:
|
|
538
605
|
throw new Error(`Unknown IDE: ${ide}. Supported: ${SUPPORTED_IDES.join(', ')}`);
|
|
@@ -542,7 +609,7 @@ function getPathsForIde(ide, target) {
|
|
|
542
609
|
/**
|
|
543
610
|
* Walk a directory and return absolute file paths. Uses fast-glob so
|
|
544
611
|
* symlink cycles are never followed and patterns can be excluded via
|
|
545
|
-
* .
|
|
612
|
+
* .rcodeignore files (#249).
|
|
546
613
|
*/
|
|
547
614
|
function walkFiles(dir, extraIgnore = []) {
|
|
548
615
|
if (!fs.existsSync(dir)) return [];
|
|
@@ -556,11 +623,11 @@ function walkFiles(dir, extraIgnore = []) {
|
|
|
556
623
|
}
|
|
557
624
|
|
|
558
625
|
/**
|
|
559
|
-
* Read .
|
|
626
|
+
* Read .rcodeignore patterns from a given root directory.
|
|
560
627
|
* Returns an array of glob-style ignore patterns (same syntax as .gitignore).
|
|
561
628
|
*/
|
|
562
|
-
function
|
|
563
|
-
const ignoreFile = path.join(root, '.
|
|
629
|
+
function readRcodeIgnore(root) {
|
|
630
|
+
const ignoreFile = path.join(root, '.rcodeignore');
|
|
564
631
|
if (!fs.existsSync(ignoreFile)) return [];
|
|
565
632
|
return fs.readFileSync(ignoreFile, 'utf8')
|
|
566
633
|
.split('\n')
|
|
@@ -592,7 +659,7 @@ function copyDirRecursive(source, dest) {
|
|
|
592
659
|
|
|
593
660
|
/**
|
|
594
661
|
* Seed .planning/ with starter ROADMAP.md + STATE.md + PROJECT.md so
|
|
595
|
-
* workflows work immediately after install. User can /
|
|
662
|
+
* workflows work immediately after install. User can /rcode-sprint-planning
|
|
596
663
|
* on a fresh install without manual setup.
|
|
597
664
|
*
|
|
598
665
|
* Only seeds if .planning/ROADMAP.md doesn't already exist (preserves user data).
|
|
@@ -611,11 +678,11 @@ function seedStarterPlanning(target, projectName) {
|
|
|
611
678
|
const name = projectName || path.basename(target);
|
|
612
679
|
|
|
613
680
|
// Stub planning files: clearly marked as install templates so users (and
|
|
614
|
-
// /
|
|
681
|
+
// /rcode-new-project Step 0.5 detection) can tell them apart from real
|
|
615
682
|
// planning artifacts. See issues #670 #671 #676.
|
|
616
683
|
const STUB_BANNER =
|
|
617
|
-
`<!-- INSTALL STUB — overwritten by /
|
|
618
|
-
` /
|
|
684
|
+
`<!-- INSTALL STUB — overwritten by /rcode-new-project. Delete this file or run\n` +
|
|
685
|
+
` /rcode-new-project before committing. See https://github.com/hanzlahabib/rihal-code/issues/670 -->\n\n`;
|
|
619
686
|
|
|
620
687
|
fs.writeFileSync(projectPath,
|
|
621
688
|
STUB_BANNER +
|
|
@@ -652,26 +719,26 @@ function seedStarterPlanning(target, projectName) {
|
|
|
652
719
|
`---\n\n` +
|
|
653
720
|
`## Decisions\n\n_None yet._\n\n` +
|
|
654
721
|
`## Blockers\n\n_None._\n\n` +
|
|
655
|
-
`## Next Action\n\nRun \`/
|
|
722
|
+
`## Next Action\n\nRun \`/rcode-new-project <description>\` to bootstrap, or \`/rcode-sprint-planning\` once a real phase exists.\n`
|
|
656
723
|
);
|
|
657
724
|
|
|
658
|
-
// Issue #670: do NOT pre-seed .
|
|
725
|
+
// Issue #670: do NOT pre-seed .rcode/state.json with a fake project +
|
|
659
726
|
// "Setup & Scaffolding" phase. That made every fresh install look like a
|
|
660
|
-
// real initialized project and broke /
|
|
727
|
+
// real initialized project and broke /rcode-new-project Step 0.5 detection.
|
|
661
728
|
//
|
|
662
729
|
// Write a minimal shell with _seeded_stub:true so:
|
|
663
|
-
// -
|
|
664
|
-
// - /
|
|
730
|
+
// - rcode-tools doesn't have to re-init on first call (avoids race)
|
|
731
|
+
// - /rcode-new-project Step 0.5 (issue #671) can detect "stub" reliably
|
|
665
732
|
// - sprint tools that previously relied on phase 01 will surface a clear
|
|
666
|
-
// "no phases yet — run /
|
|
733
|
+
// "no phases yet — run /rcode-new-project first" error instead of
|
|
667
734
|
// silently operating on a fake phase
|
|
668
735
|
//
|
|
669
736
|
// Issue #705: only mark _seeded_stub when the planning ROADMAP is also
|
|
670
737
|
// a stub. If the user manually deletes state.json but has real
|
|
671
738
|
// .planning/ROADMAP.md (no INSTALL STUB banner), seeding _seeded_stub
|
|
672
|
-
// would mis-classify a real project as fresh and let /
|
|
739
|
+
// would mis-classify a real project as fresh and let /rcode-new-project
|
|
673
740
|
// overwrite it. Guard with the banner check.
|
|
674
|
-
const
|
|
741
|
+
const rcodeStateJson = path.join(target, '.rcode', 'state.json');
|
|
675
742
|
function planningRoadmapIsStub() {
|
|
676
743
|
const rmPath = path.join(target, '.planning', 'ROADMAP.md');
|
|
677
744
|
if (!fs.existsSync(rmPath)) return true; // missing → fresh install case
|
|
@@ -680,16 +747,46 @@ function seedStarterPlanning(target, projectName) {
|
|
|
680
747
|
return text.includes('<!-- INSTALL STUB');
|
|
681
748
|
} catch { return true; }
|
|
682
749
|
}
|
|
683
|
-
if (!fs.existsSync(
|
|
750
|
+
if (!fs.existsSync(rcodeStateJson)) {
|
|
684
751
|
const now = new Date().toISOString();
|
|
685
752
|
const isStubProject = planningRoadmapIsStub();
|
|
753
|
+
|
|
754
|
+
// Resolve project name from config.yaml if available (#816)
|
|
755
|
+
let resolvedProject = null;
|
|
756
|
+
const configYamlPath = path.join(target, '.rcode', 'config.yaml');
|
|
757
|
+
if (fs.existsSync(configYamlPath)) {
|
|
758
|
+
try {
|
|
759
|
+
const cfg = fs.readFileSync(configYamlPath, 'utf8');
|
|
760
|
+
const m = cfg.match(/^project_name:\s*"?([^"\n]+)"?/m);
|
|
761
|
+
if (m) resolvedProject = m[1].trim();
|
|
762
|
+
} catch { /* leave null */ }
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// Sync current_phase from ROADMAP.md if it exists and isn't a stub (#810)
|
|
766
|
+
let resolvedPhase = null;
|
|
767
|
+
const roadmapPath = path.join(target, '.planning', 'ROADMAP.md');
|
|
768
|
+
if (!isStubProject && fs.existsSync(roadmapPath)) {
|
|
769
|
+
try {
|
|
770
|
+
const rm = fs.readFileSync(roadmapPath, 'utf8');
|
|
771
|
+
// Format A — pipe table: | 01 | Phase Name | ...
|
|
772
|
+
const tableMatch = rm.match(/^\|\s*(\d+(?:\.\d+)?)\s*\|/m);
|
|
773
|
+
if (tableMatch) {
|
|
774
|
+
resolvedPhase = String(parseInt(tableMatch[1], 10));
|
|
775
|
+
} else {
|
|
776
|
+
// Format B — heading: ## Phase 01 — Name
|
|
777
|
+
const headMatch = rm.match(/^#{2,4}\s*Phase\s+(\d+(?:\.\d+)?)/im);
|
|
778
|
+
if (headMatch) resolvedPhase = String(parseInt(headMatch[1], 10));
|
|
779
|
+
}
|
|
780
|
+
} catch { /* leave null */ }
|
|
781
|
+
}
|
|
782
|
+
|
|
686
783
|
const state = {
|
|
687
784
|
version: '1',
|
|
688
|
-
project:
|
|
785
|
+
project: resolvedProject,
|
|
689
786
|
...(isStubProject ? { _seeded_stub: true } : {}),
|
|
690
787
|
created: now,
|
|
691
788
|
updated: now,
|
|
692
|
-
current_phase:
|
|
789
|
+
current_phase: resolvedPhase,
|
|
693
790
|
current_plan: 0,
|
|
694
791
|
current_sprint: null,
|
|
695
792
|
milestone: null,
|
|
@@ -704,8 +801,8 @@ function seedStarterPlanning(target, projectName) {
|
|
|
704
801
|
last_session: null,
|
|
705
802
|
velocity_history: [],
|
|
706
803
|
};
|
|
707
|
-
fs.mkdirSync(path.dirname(
|
|
708
|
-
writeFileAtomic(
|
|
804
|
+
fs.mkdirSync(path.dirname(rcodeStateJson), { recursive: true });
|
|
805
|
+
writeFileAtomic(rcodeStateJson, JSON.stringify(state, null, 2) + '\n');
|
|
709
806
|
}
|
|
710
807
|
|
|
711
808
|
return true;
|
|
@@ -734,23 +831,23 @@ function ensureRcodeGitignore(target, options = {}) {
|
|
|
734
831
|
'',
|
|
735
832
|
BEGIN,
|
|
736
833
|
'# Added automatically on first rcode install. Idempotent — safe to re-run.',
|
|
737
|
-
'# Edit `commit_planning` in .
|
|
834
|
+
'# Edit `commit_planning` in .rcode/config.yaml to flip planning-artifact tracking.',
|
|
738
835
|
'',
|
|
739
836
|
'# Installed methodology files (regenerate with: npx @hanzlaa/rcode install)',
|
|
740
837
|
'.claude/',
|
|
741
|
-
'.
|
|
742
|
-
'.
|
|
743
|
-
'.
|
|
744
|
-
'.
|
|
745
|
-
'.
|
|
838
|
+
'.rcode/bin/',
|
|
839
|
+
'.rcode/workflows/',
|
|
840
|
+
'.rcode/references/',
|
|
841
|
+
'.rcode/commands/',
|
|
842
|
+
'.rcode/skills/',
|
|
746
843
|
'',
|
|
747
|
-
'# Pulled
|
|
748
|
-
'.
|
|
749
|
-
'.
|
|
750
|
-
'.
|
|
844
|
+
'# Pulled rcode brain content (refresh with: rcode brain pull)',
|
|
845
|
+
'.rcode/brain/rcode-github/',
|
|
846
|
+
'.rcode/brain/rcode-docs/',
|
|
847
|
+
'.rcode/brain/best-practices/',
|
|
751
848
|
'',
|
|
752
849
|
'# Runtime noise',
|
|
753
|
-
'.
|
|
850
|
+
'.rcode/state.json.lock',
|
|
754
851
|
'.planning/debug/',
|
|
755
852
|
'.planning/_backup/',
|
|
756
853
|
];
|
|
@@ -766,9 +863,9 @@ function ensureRcodeGitignore(target, options = {}) {
|
|
|
766
863
|
lines.push(
|
|
767
864
|
'',
|
|
768
865
|
'# What you DO commit:',
|
|
769
|
-
'# .
|
|
770
|
-
'# .
|
|
771
|
-
'# .
|
|
866
|
+
'# .rcode/config.yaml - project mode/language/profile/commit_planning',
|
|
867
|
+
'# .rcode/state.json - decisions, roadmap pointer, blockers',
|
|
868
|
+
'# .rcode/brain/sources.yaml - brain source manifest',
|
|
772
869
|
commitPlanning
|
|
773
870
|
? '# .planning/ - PRD, roadmap, sprints, SUMMARY.md files'
|
|
774
871
|
: '# (planning artifacts are NOT committed — see commit_planning in config)',
|
|
@@ -820,7 +917,7 @@ function ensureRcodeGitignore(target, options = {}) {
|
|
|
820
917
|
|
|
821
918
|
/**
|
|
822
919
|
* Ensure .git/hooks/pre-commit includes the rcode-managed block that auto-syncs
|
|
823
|
-
* state.json when .planning/ or .
|
|
920
|
+
* state.json when .planning/ or .rcode/brain/sources.yaml files change.
|
|
824
921
|
*
|
|
825
922
|
* Idempotent via sentinels — existing user hook content is preserved.
|
|
826
923
|
* Respects opts.gitHooks: false → skip entirely (--no-git-hooks flag).
|
|
@@ -841,12 +938,12 @@ function ensureRcodePreCommitHook(target, options = {}) {
|
|
|
841
938
|
const BLOCK = [
|
|
842
939
|
'',
|
|
843
940
|
BEGIN,
|
|
844
|
-
'# Auto-syncs .
|
|
941
|
+
'# Auto-syncs .rcode/state.json when planning files change.',
|
|
845
942
|
'# Added by rcode install — safe to re-run (idempotent).',
|
|
846
|
-
'if git diff --cached --name-only | grep -qE "^\\.planning/|^\\.
|
|
847
|
-
' if [ -x .
|
|
848
|
-
' node .
|
|
849
|
-
' git add .
|
|
943
|
+
'if git diff --cached --name-only | grep -qE "^\\.planning/|^\\.rcode/brain/sources\\.yaml$"; then',
|
|
944
|
+
' if [ -x .rcode/bin/rcode-tools.cjs ]; then',
|
|
945
|
+
' node .rcode/bin/rcode-tools.cjs state sync --from-disk > /dev/null 2>&1 || true',
|
|
946
|
+
' git add .rcode/state.json 2>/dev/null || true',
|
|
850
947
|
' fi',
|
|
851
948
|
'fi',
|
|
852
949
|
END,
|
|
@@ -900,14 +997,14 @@ function ensureRcodePreCommitHook(target, options = {}) {
|
|
|
900
997
|
}
|
|
901
998
|
|
|
902
999
|
/**
|
|
903
|
-
* Install brain scaffold (sources.yaml + README.md) into .
|
|
1000
|
+
* Install brain scaffold (sources.yaml + README.md) into .rcode/brain/ on target.
|
|
904
1001
|
* Actual brain content lands after `brain pull` runs.
|
|
905
|
-
* Closes #188 — previously the package's
|
|
1002
|
+
* Closes #188 — previously the package's rcode/brain/sources.yaml was never
|
|
906
1003
|
* copied to the target at all, leaving brain pull permanently broken.
|
|
907
1004
|
*/
|
|
908
1005
|
function installBrainScaffold(packageRoot, target) {
|
|
909
|
-
const srcDir = path.join(packageRoot, '
|
|
910
|
-
const destDir = path.join(target, '.
|
|
1006
|
+
const srcDir = path.join(packageRoot, 'rcode', 'brain');
|
|
1007
|
+
const destDir = path.join(target, '.rcode', 'brain');
|
|
911
1008
|
fs.mkdirSync(destDir, { recursive: true });
|
|
912
1009
|
let copied = 0;
|
|
913
1010
|
for (const name of ['sources.yaml', 'README.md']) {
|
|
@@ -919,9 +1016,9 @@ function installBrainScaffold(packageRoot, target) {
|
|
|
919
1016
|
}
|
|
920
1017
|
}
|
|
921
1018
|
// Also pre-seed the best-practices subfolder from the package's
|
|
922
|
-
//
|
|
1019
|
+
// rcode/skills/_shared/ so a fresh install has working brain content
|
|
923
1020
|
// immediately, even before brain pull runs against real upstream URLs.
|
|
924
|
-
const sharedSrc = path.join(packageRoot, '
|
|
1021
|
+
const sharedSrc = path.join(packageRoot, 'rcode', 'skills', '_shared');
|
|
925
1022
|
if (fs.existsSync(sharedSrc)) {
|
|
926
1023
|
const bpDest = path.join(destDir, 'best-practices');
|
|
927
1024
|
fs.mkdirSync(bpDest, { recursive: true });
|
|
@@ -941,38 +1038,42 @@ function installBrainScaffold(packageRoot, target) {
|
|
|
941
1038
|
/**
|
|
942
1039
|
* Install v1-style skills into the target project.
|
|
943
1040
|
*
|
|
944
|
-
* User-facing skills → .claude/skills/
|
|
945
|
-
* Internal skills → .
|
|
1041
|
+
* User-facing skills → .claude/skills/rcode-{name} (phrase-activated, visible as slash commands)
|
|
1042
|
+
* Internal skills → .rcode/skills/rcode-{name} (utility libs called by other skills, NOT in
|
|
946
1043
|
* .claude/skills/ so they don't pollute the menu)
|
|
947
1044
|
*
|
|
948
1045
|
* A skill is marked internal by adding `internal: true` to its SKILL.md frontmatter.
|
|
949
1046
|
*/
|
|
950
1047
|
function installSkills(packageRoot, target, options = {}) {
|
|
951
|
-
const skillsSource = path.join(packageRoot, '
|
|
1048
|
+
const skillsSource = path.join(packageRoot, 'rcode/skills');
|
|
952
1049
|
const skillsDest = path.join(target, '.claude/skills');
|
|
953
|
-
const internalDest = path.join(target, '.
|
|
1050
|
+
const internalDest = path.join(target, '.rcode/skills');
|
|
954
1051
|
|
|
955
1052
|
if (!fs.existsSync(skillsSource)) return { count: 0, skippedGlobal: 0 };
|
|
956
1053
|
fs.mkdirSync(skillsDest, { recursive: true });
|
|
957
1054
|
fs.mkdirSync(internalDest, { recursive: true });
|
|
958
1055
|
|
|
959
|
-
// Issue #679: when ~/.claude/skills/<name>/ already exists with the
|
|
1056
|
+
// Issue #679: when ~/.claude/skills/<name>/ already exists with the rcode-
|
|
960
1057
|
// prefix, Claude Code reads from BOTH global and project, showing every
|
|
961
|
-
// /
|
|
1058
|
+
// /rcode-* twice in the slash picker. Skip the project copy for any rcode-*
|
|
962
1059
|
// skill that already lives in the global skills dir.
|
|
963
1060
|
const globalSkillsDir = path.join(os.homedir(), '.claude', 'skills');
|
|
964
|
-
const
|
|
965
|
-
? new Set(fs.readdirSync(globalSkillsDir).filter(n => n.startsWith('
|
|
1061
|
+
const globalRcodeSkills = (options.skipGlobalDuplicates && fs.existsSync(globalSkillsDir))
|
|
1062
|
+
? new Set(fs.readdirSync(globalSkillsDir).filter(n => n.startsWith('rcode-')))
|
|
966
1063
|
: new Set();
|
|
967
1064
|
|
|
968
1065
|
let count = 0;
|
|
969
1066
|
let skippedGlobal = 0;
|
|
970
1067
|
|
|
1068
|
+
const _internalSkillCache = new Map();
|
|
971
1069
|
function isInternalSkill(skillDir) {
|
|
1070
|
+
if (_internalSkillCache.has(skillDir)) return _internalSkillCache.get(skillDir);
|
|
972
1071
|
const skillMd = path.join(skillDir, 'SKILL.md');
|
|
973
|
-
if (!fs.existsSync(skillMd)) return false;
|
|
1072
|
+
if (!fs.existsSync(skillMd)) { _internalSkillCache.set(skillDir, false); return false; }
|
|
974
1073
|
const text = fs.readFileSync(skillMd, 'utf8');
|
|
975
|
-
|
|
1074
|
+
const result = /^internal:\s*true\s*$/m.test(text);
|
|
1075
|
+
_internalSkillCache.set(skillDir, result);
|
|
1076
|
+
return result;
|
|
976
1077
|
}
|
|
977
1078
|
|
|
978
1079
|
function hasLocalOverride(destDir) {
|
|
@@ -989,18 +1090,18 @@ function installSkills(packageRoot, target, options = {}) {
|
|
|
989
1090
|
const src = path.join(dir, entry.name);
|
|
990
1091
|
const hasSkillMd = fs.existsSync(path.join(src, 'SKILL.md'));
|
|
991
1092
|
if (hasSkillMd) {
|
|
992
|
-
const destName = entry.name.startsWith('
|
|
1093
|
+
const destName = entry.name.startsWith('rcode-')
|
|
993
1094
|
? entry.name
|
|
994
|
-
: `
|
|
1095
|
+
: `rcode-${entry.name}`;
|
|
995
1096
|
const internal = isInternalSkill(src);
|
|
996
1097
|
const dest = internal
|
|
997
|
-
? path.join(internalDest, destName) // internal → .
|
|
1098
|
+
? path.join(internalDest, destName) // internal → .rcode/skills/
|
|
998
1099
|
: path.join(skillsDest, destName); // user-facing → .claude/skills/
|
|
999
1100
|
|
|
1000
|
-
// Skip user-facing (non-internal)
|
|
1101
|
+
// Skip user-facing (non-internal) rcode-* skills when the same name
|
|
1001
1102
|
// exists globally — UNLESS the user has a *.local.md override on the
|
|
1002
1103
|
// project copy, in which case we always preserve their customization.
|
|
1003
|
-
if (!internal &&
|
|
1104
|
+
if (!internal && globalRcodeSkills.has(destName) && !hasLocalOverride(dest)) {
|
|
1004
1105
|
// Also remove the existing project copy (left over from previous
|
|
1005
1106
|
// installs that didn't dedup) so it stops showing in the picker.
|
|
1006
1107
|
if (fs.existsSync(dest)) {
|
|
@@ -1061,18 +1162,18 @@ function parseFrontmatter(text) {
|
|
|
1061
1162
|
* For cursor IDE, converts command files from .md to .mdc format.
|
|
1062
1163
|
*/
|
|
1063
1164
|
/**
|
|
1064
|
-
* Migrate legacy vscode-layout commands (.claude/commands/
|
|
1065
|
-
* to the unified prefixed-root form (.claude/commands/
|
|
1165
|
+
* Migrate legacy vscode-layout commands (.claude/commands/rcode/{name}.md)
|
|
1166
|
+
* to the unified prefixed-root form (.claude/commands/rcode-{name}.md).
|
|
1066
1167
|
*
|
|
1067
1168
|
* Idempotent. Safe to run on every install/update — no-op when no legacy
|
|
1068
|
-
* dir exists. After move, removes the now-empty
|
|
1169
|
+
* dir exists. After move, removes the now-empty rcode/ subdir.
|
|
1069
1170
|
*
|
|
1070
1171
|
* Returns { moved, removed_dir } so callers can log the migration count.
|
|
1071
1172
|
* Designed by Waleed for #723; closes the dual-layout cause of #635, #637,
|
|
1072
1173
|
* #638, #639, #640, #641, #642, #643, #646.
|
|
1073
1174
|
*/
|
|
1074
1175
|
function migrateVscodeCommandsLayout(target) {
|
|
1075
|
-
const legacyDir = path.join(target, '.claude', 'commands', '
|
|
1176
|
+
const legacyDir = path.join(target, '.claude', 'commands', 'rcode');
|
|
1076
1177
|
const newRoot = path.join(target, '.claude', 'commands');
|
|
1077
1178
|
if (!fs.existsSync(legacyDir) || !fs.statSync(legacyDir).isDirectory()) {
|
|
1078
1179
|
return { moved: 0, removed_dir: false };
|
|
@@ -1082,8 +1183,8 @@ function migrateVscodeCommandsLayout(target) {
|
|
|
1082
1183
|
const src = path.join(legacyDir, entry);
|
|
1083
1184
|
if (!fs.statSync(src).isFile() || !entry.endsWith('.md')) continue;
|
|
1084
1185
|
const baseName = path.basename(entry, '.md');
|
|
1085
|
-
// Don't double-prefix if someone already had
|
|
1086
|
-
const targetName = baseName.startsWith('
|
|
1186
|
+
// Don't double-prefix if someone already had rcode-foo.md inside rcode/.
|
|
1187
|
+
const targetName = baseName.startsWith('rcode-') ? entry : `rcode-${entry}`;
|
|
1087
1188
|
const dst = path.join(newRoot, targetName);
|
|
1088
1189
|
if (fs.existsSync(dst)) {
|
|
1089
1190
|
// Already migrated by an earlier pass — remove the duplicate at source.
|
|
@@ -1121,7 +1222,7 @@ function buildInstallPlan(ide = 'claude', target = process.cwd()) {
|
|
|
1121
1222
|
}
|
|
1122
1223
|
// Note: pre-#723 we had a dual-layout workaround here that filtered
|
|
1123
1224
|
// vscode subdir entries when claude+vscode were both selected. After
|
|
1124
|
-
// Waleed's unification (vscode now writes the same
|
|
1225
|
+
// Waleed's unification (vscode now writes the same rcode-{name}.md root
|
|
1125
1226
|
// form as claude), the seen-by-rel dedup above already covers it — both
|
|
1126
1227
|
// IDEs emit identical `rel` values and only one wins. Layout drift will
|
|
1127
1228
|
// resurface this filter; it's intentionally deleted, not commented out.
|
|
@@ -1138,27 +1239,27 @@ function buildInstallPlan(ide = 'claude', target = process.cwd()) {
|
|
|
1138
1239
|
const relAgents = path.relative(target, paths.agentsDir);
|
|
1139
1240
|
const relCommands = path.relative(target, paths.commandsDir);
|
|
1140
1241
|
|
|
1141
|
-
// .
|
|
1242
|
+
// .rcode/workflows/
|
|
1142
1243
|
for (const f of walkFiles(path.join(SOURCE_ROOT, 'workflows'))) {
|
|
1143
1244
|
const rel = path.relative(path.join(SOURCE_ROOT, 'workflows'), f);
|
|
1144
1245
|
plan.push({ src: f, rel: path.join(relWorkflows, rel) });
|
|
1145
1246
|
}
|
|
1146
1247
|
|
|
1147
|
-
// .
|
|
1248
|
+
// .rcode/references/
|
|
1148
1249
|
for (const f of walkFiles(path.join(SOURCE_ROOT, 'references'))) {
|
|
1149
1250
|
const rel = path.relative(path.join(SOURCE_ROOT, 'references'), f);
|
|
1150
1251
|
plan.push({ src: f, rel: path.join(relReferences, rel) });
|
|
1151
1252
|
}
|
|
1152
1253
|
|
|
1153
|
-
// .
|
|
1254
|
+
// .rcode/bin/
|
|
1154
1255
|
for (const f of walkFiles(path.join(SOURCE_ROOT, 'bin'))) {
|
|
1155
1256
|
const rel = path.relative(path.join(SOURCE_ROOT, 'bin'), f);
|
|
1156
1257
|
plan.push({ src: f, rel: path.join(relBin, rel), executable: f.endsWith('.cjs') });
|
|
1157
1258
|
}
|
|
1158
1259
|
|
|
1159
|
-
// .
|
|
1260
|
+
// .rcode/templates/projects/ — starter templates consumed by /rcode-from-template
|
|
1160
1261
|
const projectTemplatesSrc = path.join(SOURCE_ROOT, 'templates', 'projects');
|
|
1161
|
-
const relProjectTemplates = path.relative(target, path.join(target, '.
|
|
1262
|
+
const relProjectTemplates = path.relative(target, path.join(target, '.rcode', 'templates', 'projects'));
|
|
1162
1263
|
for (const f of walkFiles(projectTemplatesSrc)) {
|
|
1163
1264
|
const rel = path.relative(projectTemplatesSrc, f);
|
|
1164
1265
|
plan.push({ src: f, rel: path.join(relProjectTemplates, rel) });
|
|
@@ -1173,31 +1274,31 @@ function buildInstallPlan(ide = 'claude', target = process.cwd()) {
|
|
|
1173
1274
|
}
|
|
1174
1275
|
|
|
1175
1276
|
// Commands — IDE-specific
|
|
1176
|
-
// Claude AND VSCode: output as .claude/commands/
|
|
1277
|
+
// Claude AND VSCode: output as .claude/commands/rcode-{name}.md (prefixed root).
|
|
1177
1278
|
// Both target the same commands dir (#723 / Waleed unification) so multi-IDE
|
|
1178
|
-
// installs never duplicate. Cursor/Gemini keep the bare-name-in-
|
|
1279
|
+
// installs never duplicate. Cursor/Gemini keep the bare-name-in-rcode/-subdir form.
|
|
1179
1280
|
for (const f of walkFiles(path.join(SOURCE_ROOT, 'commands'))) {
|
|
1180
1281
|
const rel = path.relative(path.join(SOURCE_ROOT, 'commands'), f);
|
|
1181
1282
|
const ext = ide === 'cursor' ? '.mdc' : '.md';
|
|
1182
1283
|
const baseName = path.basename(f, '.md');
|
|
1183
1284
|
const outName = (ide === 'claude' || ide === 'vscode')
|
|
1184
|
-
? `
|
|
1285
|
+
? `rcode-${baseName}${ext}`
|
|
1185
1286
|
: baseName + ext;
|
|
1186
1287
|
plan.push({ src: f, rel: path.join(relCommands, path.dirname(rel), outName), ide, cursor: ide === 'cursor' });
|
|
1187
1288
|
}
|
|
1188
1289
|
|
|
1189
|
-
// Agent rules (on-demand reference files) — copied to .
|
|
1190
|
-
const agentRulesDir = path.join(target, '.
|
|
1290
|
+
// Agent rules (on-demand reference files) — copied to .rcode/agents-rules/
|
|
1291
|
+
const agentRulesDir = path.join(target, '.rcode', 'agents-rules');
|
|
1191
1292
|
for (const f of walkFiles(path.join(SOURCE_ROOT, 'agents', 'rules'))) {
|
|
1192
1293
|
const rel = path.relative(path.join(SOURCE_ROOT, 'agents', 'rules'), f);
|
|
1193
|
-
plan.push({ src: f, rel: path.join('.
|
|
1294
|
+
plan.push({ src: f, rel: path.join('.rcode', 'agents-rules', rel) });
|
|
1194
1295
|
}
|
|
1195
1296
|
|
|
1196
1297
|
return plan;
|
|
1197
1298
|
}
|
|
1198
1299
|
|
|
1199
1300
|
/**
|
|
1200
|
-
* Parse a module YAML manifest (
|
|
1301
|
+
* Parse a module YAML manifest (rcode/modules/{name}.yaml).
|
|
1201
1302
|
* Returns { name, requires[], agents[], workflows[], commands[], references[] }.
|
|
1202
1303
|
*/
|
|
1203
1304
|
function readModuleManifest(moduleName) {
|
|
@@ -1236,7 +1337,7 @@ function readModuleManifest(moduleName) {
|
|
|
1236
1337
|
}
|
|
1237
1338
|
|
|
1238
1339
|
/**
|
|
1239
|
-
* List available module names by scanning
|
|
1340
|
+
* List available module names by scanning rcode/modules/*.yaml
|
|
1240
1341
|
*/
|
|
1241
1342
|
function listAvailableModules() {
|
|
1242
1343
|
const modulesDir = path.join(SOURCE_ROOT, 'modules');
|
|
@@ -1257,13 +1358,13 @@ function filterPlanByModules(plan, moduleNames) {
|
|
|
1257
1358
|
const mod = readModuleManifest(modName);
|
|
1258
1359
|
if (!mod) { console.warn(` ⚠ Unknown module: ${modName}`); continue; }
|
|
1259
1360
|
for (const a of mod.agents) allowed.add(path.join('.claude', 'agents', a));
|
|
1260
|
-
for (const w of mod.workflows) allowed.add(path.join('.
|
|
1261
|
-
for (const c of mod.commands) allowed.add(path.join('.claude', 'commands', `
|
|
1262
|
-
for (const r of mod.references) allowed.add(path.join('.
|
|
1361
|
+
for (const w of mod.workflows) allowed.add(path.join('.rcode', 'workflows', w));
|
|
1362
|
+
for (const c of mod.commands) allowed.add(path.join('.claude', 'commands', `rcode-${c}`));
|
|
1363
|
+
for (const r of mod.references) allowed.add(path.join('.rcode', 'references', r));
|
|
1263
1364
|
}
|
|
1264
1365
|
// Always include bin/ (shared infrastructure, not module-specific)
|
|
1265
1366
|
return plan.filter((entry) => {
|
|
1266
|
-
if (entry.rel.startsWith(path.join('.
|
|
1367
|
+
if (entry.rel.startsWith(path.join('.rcode', 'bin'))) return true;
|
|
1267
1368
|
return allowed.has(entry.rel);
|
|
1268
1369
|
});
|
|
1269
1370
|
}
|
|
@@ -1272,21 +1373,27 @@ function filterPlanByModules(plan, moduleNames) {
|
|
|
1272
1373
|
* Auto-generate agent-manifest.csv from the installed agent files'
|
|
1273
1374
|
* frontmatter. Columns: id, file, name, description, color.
|
|
1274
1375
|
*
|
|
1275
|
-
* The `id` column strips the `
|
|
1376
|
+
* The `id` column strips the `rcode-` prefix so workflow code can match
|
|
1276
1377
|
* against the council-panel scorer's AGENT_IDS (which use bare names).
|
|
1277
1378
|
*/
|
|
1278
1379
|
function generateAgentManifest(plan, target) {
|
|
1279
1380
|
const rows = [['id', 'file', 'name', 'description', 'color']];
|
|
1280
1381
|
const seen = new Set(); // Track IDs already added to avoid duplicates
|
|
1382
|
+
// Memoize per-file text reads — same agent .md may be visited across loops 1-3.
|
|
1383
|
+
const _textCache = new Map();
|
|
1384
|
+
const readAgentText = (p) => {
|
|
1385
|
+
if (!_textCache.has(p)) _textCache.set(p, fs.readFileSync(p, 'utf8'));
|
|
1386
|
+
return _textCache.get(p);
|
|
1387
|
+
};
|
|
1281
1388
|
|
|
1282
1389
|
for (const entry of plan) {
|
|
1283
1390
|
if (!entry.rel.startsWith(path.join('.claude', 'agents'))) continue;
|
|
1284
1391
|
if (!entry.rel.match(/^\.claude[\/\\]agents[\/\\][^\/\\]+\.md$/)) continue;
|
|
1285
1392
|
const filePath = path.join(target, entry.rel);
|
|
1286
|
-
const text =
|
|
1393
|
+
const text = readAgentText(filePath);
|
|
1287
1394
|
const { frontmatter } = parseFrontmatter(text);
|
|
1288
1395
|
const name = frontmatter.name || path.basename(entry.rel, '.md');
|
|
1289
|
-
const bareId = name.replace(/^
|
|
1396
|
+
const bareId = name.replace(/^rcode-/, '');
|
|
1290
1397
|
if (seen.has(bareId)) continue; // Skip duplicate
|
|
1291
1398
|
seen.add(bareId);
|
|
1292
1399
|
const desc = (frontmatter.description || '').replace(/"/g, '""');
|
|
@@ -1301,21 +1408,56 @@ function generateAgentManifest(plan, target) {
|
|
|
1301
1408
|
// Also include agents already on disk but not in current plan
|
|
1302
1409
|
const agentDir = path.join(target, '.claude', 'agents');
|
|
1303
1410
|
if (fs.existsSync(agentDir)) {
|
|
1304
|
-
const existingFiles = fs.readdirSync(agentDir).filter(f => f.startsWith('
|
|
1411
|
+
const existingFiles = fs.readdirSync(agentDir).filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
|
|
1305
1412
|
const alreadyIncluded = new Set(plan.filter(e => e.rel.startsWith(path.join('.claude', 'agents'))).map(e => path.basename(e.rel)));
|
|
1306
1413
|
for (const file of existingFiles) {
|
|
1307
1414
|
if (alreadyIncluded.has(file)) continue;
|
|
1308
1415
|
const filePath = path.join(agentDir, file);
|
|
1309
|
-
const text =
|
|
1416
|
+
const text = readAgentText(filePath);
|
|
1310
1417
|
const { frontmatter } = parseFrontmatter(text);
|
|
1311
1418
|
const name = frontmatter.name || path.basename(file, '.md');
|
|
1312
|
-
const bareId = name.replace(/^
|
|
1419
|
+
const bareId = name.replace(/^rcode-/, '');
|
|
1313
1420
|
if (seen.has(bareId)) continue; // Skip if already added
|
|
1314
1421
|
seen.add(bareId);
|
|
1315
1422
|
const desc = (frontmatter.description || '').replace(/"/g, '""');
|
|
1316
1423
|
rows.push([bareId, path.join('.claude', 'agents', file), name, `"${desc}"`, frontmatter.color || '']);
|
|
1317
1424
|
}
|
|
1318
1425
|
}
|
|
1426
|
+
// Issues #805/#808/#825: always scan known global locations (not gated on
|
|
1427
|
+
// rows.length === 1) so the manifest reflects every installed agent. On a
|
|
1428
|
+
// fresh project install agents may live in ~/.claude/agents/ (global slash
|
|
1429
|
+
// commands) or in the source tree if local copy was skipped via dedup.
|
|
1430
|
+
// Also scan rcode/agents/ in SOURCE_ROOT as a last-resort fallback so the
|
|
1431
|
+
// manifest is never empty when the package itself ships agent definitions.
|
|
1432
|
+
const extraScans = [
|
|
1433
|
+
path.join(os.homedir(), '.claude', 'agents'),
|
|
1434
|
+
path.join(os.homedir(), '.rcode', 'agents'),
|
|
1435
|
+
];
|
|
1436
|
+
// Final fallback: scan the package source itself.
|
|
1437
|
+
try {
|
|
1438
|
+
const sourceAgentsDir = path.join(SOURCE_ROOT, 'agents');
|
|
1439
|
+
if (fs.existsSync(sourceAgentsDir)) extraScans.push(sourceAgentsDir);
|
|
1440
|
+
} catch { /* SOURCE_ROOT may not be in scope on some paths */ }
|
|
1441
|
+
|
|
1442
|
+
for (const scanDir of extraScans) {
|
|
1443
|
+
if (!fs.existsSync(scanDir)) continue;
|
|
1444
|
+
let files;
|
|
1445
|
+
try {
|
|
1446
|
+
files = fs.readdirSync(scanDir).filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
|
|
1447
|
+
} catch { continue; }
|
|
1448
|
+
for (const file of files) {
|
|
1449
|
+
const filePath = path.join(scanDir, file);
|
|
1450
|
+
let text;
|
|
1451
|
+
try { text = readAgentText(filePath); } catch { continue; }
|
|
1452
|
+
const { frontmatter } = parseFrontmatter(text);
|
|
1453
|
+
const name = frontmatter.name || path.basename(file, '.md');
|
|
1454
|
+
const bareId = name.replace(/^rcode-/, '');
|
|
1455
|
+
if (seen.has(bareId)) continue;
|
|
1456
|
+
seen.add(bareId);
|
|
1457
|
+
const desc = (frontmatter.description || '').replace(/"/g, '""');
|
|
1458
|
+
rows.push([bareId, path.join('.claude', 'agents', file), name, `"${desc}"`, frontmatter.color || '']);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1319
1461
|
return rows.map((r) => r.join(',')).join('\n') + '\n';
|
|
1320
1462
|
}
|
|
1321
1463
|
|
|
@@ -1326,11 +1468,17 @@ function generateAgentManifest(plan, target) {
|
|
|
1326
1468
|
function generateFilesManifest(plan, target, { mergeExistingManifest = false, extraScanDirs = [] } = {}) {
|
|
1327
1469
|
const rows = [['rel', 'sha256', 'size']];
|
|
1328
1470
|
const newRels = new Set();
|
|
1471
|
+
// Memoize Buffer reads — plan loop and merge loop can visit the same file path.
|
|
1472
|
+
const _bufCache = new Map();
|
|
1473
|
+
const readFileBuf = (p) => {
|
|
1474
|
+
if (!_bufCache.has(p)) _bufCache.set(p, fs.readFileSync(p));
|
|
1475
|
+
return _bufCache.get(p);
|
|
1476
|
+
};
|
|
1329
1477
|
|
|
1330
1478
|
for (const entry of plan) {
|
|
1331
1479
|
const filePath = path.join(target, entry.rel);
|
|
1332
1480
|
if (!fs.existsSync(filePath)) continue;
|
|
1333
|
-
const buf =
|
|
1481
|
+
const buf = readFileBuf(filePath);
|
|
1334
1482
|
const rel = entry.rel.split(path.sep).join('/');
|
|
1335
1483
|
rows.push([rel, sha256(buf), String(buf.length)]);
|
|
1336
1484
|
newRels.add(rel);
|
|
@@ -1338,7 +1486,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
|
|
|
1338
1486
|
|
|
1339
1487
|
// Issue #702: skills installed via installSkills() and sidebar stubs
|
|
1340
1488
|
// generated by cli/generate-command-skills.cjs are NOT in the install plan
|
|
1341
|
-
// (they're walked from
|
|
1489
|
+
// (they're walked from rcode/skills/ separately and copied directly).
|
|
1342
1490
|
// Without this scan, files-manifest.csv was missing the largest category
|
|
1343
1491
|
// of installed files — orphan sweep + doctor drift detection were blind
|
|
1344
1492
|
// to renamed/removed skills.
|
|
@@ -1355,7 +1503,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
|
|
|
1355
1503
|
// is a code-controlled set, but cheap to verify).
|
|
1356
1504
|
if (rel.startsWith('..') || path.isAbsolute(rel)) continue;
|
|
1357
1505
|
try {
|
|
1358
|
-
const buf =
|
|
1506
|
+
const buf = readFileBuf(full);
|
|
1359
1507
|
rows.push([rel, sha256(buf), String(buf.length)]);
|
|
1360
1508
|
newRels.add(rel);
|
|
1361
1509
|
} catch { /* unreadable file — skip */ }
|
|
@@ -1369,7 +1517,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
|
|
|
1369
1517
|
// --force sweep was not run. Without this, a re-install without --force
|
|
1370
1518
|
// silently drops stale files from the manifest, making them invisible.
|
|
1371
1519
|
if (mergeExistingManifest) {
|
|
1372
|
-
const manifestPath = path.join(target, '.
|
|
1520
|
+
const manifestPath = path.join(target, '.rcode', '_config', 'files-manifest.csv');
|
|
1373
1521
|
if (fs.existsSync(manifestPath)) {
|
|
1374
1522
|
try {
|
|
1375
1523
|
const oldRows = fs.readFileSync(manifestPath, 'utf8').split('\n').slice(1).filter(Boolean);
|
|
@@ -1378,7 +1526,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
|
|
|
1378
1526
|
if (!rel || newRels.has(rel)) continue;
|
|
1379
1527
|
const full = path.join(target, rel);
|
|
1380
1528
|
if (!fs.existsSync(full)) continue; // already gone — don't re-add
|
|
1381
|
-
const buf =
|
|
1529
|
+
const buf = readFileBuf(full);
|
|
1382
1530
|
rows.push([rel, sha256(buf), String(buf.length)]);
|
|
1383
1531
|
newRels.add(rel);
|
|
1384
1532
|
}
|
|
@@ -1391,7 +1539,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
|
|
|
1391
1539
|
|
|
1392
1540
|
/**
|
|
1393
1541
|
* Orphan sweep — remove files that were part of a previous install but aren't
|
|
1394
|
-
* in the current plan. Reads `.
|
|
1542
|
+
* in the current plan. Reads `.rcode/_config/files-manifest.csv` from the
|
|
1395
1543
|
* previous install and computes the diff against the new plan.
|
|
1396
1544
|
*
|
|
1397
1545
|
* Closes #196 — without this, upgrading rcode leaves stale skill/command
|
|
@@ -1400,12 +1548,12 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
|
|
|
1400
1548
|
* Deliberately conservative:
|
|
1401
1549
|
* - Only removes files that appeared in the PREVIOUS manifest.
|
|
1402
1550
|
* - Never removes files the user created themselves.
|
|
1403
|
-
* - Never touches .
|
|
1551
|
+
* - Never touches .rcode/config.yaml, .rcode/state.json, or .planning/.
|
|
1404
1552
|
*
|
|
1405
1553
|
* Returns the number of orphan files removed.
|
|
1406
1554
|
*/
|
|
1407
1555
|
function sweepStaleInstalledFiles(target, newPlan) {
|
|
1408
|
-
const manifestPath = path.join(target, '.
|
|
1556
|
+
const manifestPath = path.join(target, '.rcode', '_config', 'files-manifest.csv');
|
|
1409
1557
|
if (!fs.existsSync(manifestPath)) return 0;
|
|
1410
1558
|
|
|
1411
1559
|
let oldRels;
|
|
@@ -1418,7 +1566,7 @@ function sweepStaleInstalledFiles(target, newPlan) {
|
|
|
1418
1566
|
|
|
1419
1567
|
const newRelsSet = new Set(newPlan.map(e => e.rel.split(path.sep).join('/')));
|
|
1420
1568
|
// Safety — never sweep these, even if they somehow landed in the manifest.
|
|
1421
|
-
const neverSweep = /^(\.
|
|
1569
|
+
const neverSweep = /^(\.rcode\/config\.yaml|\.rcode\/state\.json|\.rcode\/state\.json\.lock|\.planning\/|\.rcode\/brain\/sources\.yaml)/;
|
|
1422
1570
|
// #382 — local overrides: files matching <name>.local.md are user-managed.
|
|
1423
1571
|
// The installer never touches them: not in copy, not in sweep, not even on
|
|
1424
1572
|
// --force-overwrite. This gives users a stable path to customize agent
|
|
@@ -1456,12 +1604,55 @@ function sweepStaleInstalledFiles(target, newPlan) {
|
|
|
1456
1604
|
if (fs.existsSync(dir) && fs.readdirSync(dir).length === 0) {
|
|
1457
1605
|
fs.rmdirSync(dir);
|
|
1458
1606
|
}
|
|
1459
|
-
} catch {
|
|
1607
|
+
} catch (err) {
|
|
1608
|
+
console.error('[install] sweepStaleInstalledFiles: failed to remove empty dir', dir + ':', err?.message || err);
|
|
1609
|
+
}
|
|
1460
1610
|
}
|
|
1461
1611
|
|
|
1462
1612
|
return removed;
|
|
1463
1613
|
}
|
|
1464
1614
|
|
|
1615
|
+
/**
|
|
1616
|
+
* Issue #838 — pnpm lockfile silent failure detection.
|
|
1617
|
+
*
|
|
1618
|
+
* pnpm add -D can exit 0 and print "Done" even when the lockfile is
|
|
1619
|
+
* corrupted, without actually writing package.json. This helper is called
|
|
1620
|
+
* after any pnpm add run (including auto-install flows) to confirm the
|
|
1621
|
+
* package genuinely landed in devDependencies.
|
|
1622
|
+
*
|
|
1623
|
+
* Returns { ok: true } when:
|
|
1624
|
+
* - no package.json exists in target (nothing to verify)
|
|
1625
|
+
* - package found in dependencies or devDependencies
|
|
1626
|
+
*
|
|
1627
|
+
* Returns { ok: false, message } when:
|
|
1628
|
+
* - package.json exists in a pnpm project (pnpm-lock.yaml present) but
|
|
1629
|
+
* @hanzlaa/rcode is absent from both dep sections — strongly suggests
|
|
1630
|
+
* a silent pnpm add failure due to a broken lockfile.
|
|
1631
|
+
*/
|
|
1632
|
+
function verifyPnpmAddDevDep(target) {
|
|
1633
|
+
const pkgPath = path.join(target, 'package.json');
|
|
1634
|
+
const lockPath = path.join(target, 'pnpm-lock.yaml');
|
|
1635
|
+
// Only diagnose when both a package.json and pnpm-lock.yaml exist (pnpm project).
|
|
1636
|
+
if (!fs.existsSync(pkgPath) || !fs.existsSync(lockPath)) return { ok: true };
|
|
1637
|
+
try {
|
|
1638
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
1639
|
+
const inDeps = Object.prototype.hasOwnProperty.call(pkg.dependencies || {}, '@hanzlaa/rcode');
|
|
1640
|
+
const inDevDeps = Object.prototype.hasOwnProperty.call(pkg.devDependencies || {}, '@hanzlaa/rcode');
|
|
1641
|
+
if (!inDeps && !inDevDeps) {
|
|
1642
|
+
return {
|
|
1643
|
+
ok: false,
|
|
1644
|
+
message:
|
|
1645
|
+
'@hanzlaa/rcode not found in package.json — if you ran `pnpm add -D @hanzlaa/rcode` ' +
|
|
1646
|
+
'and it reported success, your lockfile may be corrupted.\n' +
|
|
1647
|
+
' Fix: pnpm install --fix-lockfile && pnpm add -D @hanzlaa/rcode',
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
return { ok: true };
|
|
1651
|
+
} catch {
|
|
1652
|
+
return { ok: true }; // unreadable package.json — not our problem
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1465
1656
|
function readPackageVersion() {
|
|
1466
1657
|
try {
|
|
1467
1658
|
const pkg = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT, 'package.json'), 'utf8'));
|
|
@@ -1477,7 +1668,7 @@ function generateInstallManifest(opts) {
|
|
|
1477
1668
|
// Merge with existing manifest if present; capture previous_version for rollback (#253).
|
|
1478
1669
|
let existingModules = [];
|
|
1479
1670
|
let previousVersion = null;
|
|
1480
|
-
const existingPath = path.join(opts.target, '.
|
|
1671
|
+
const existingPath = path.join(opts.target, '.rcode', '_config', 'manifest.yaml');
|
|
1481
1672
|
if (fs.existsSync(existingPath)) {
|
|
1482
1673
|
const text = fs.readFileSync(existingPath, 'utf8');
|
|
1483
1674
|
let inModules = false;
|
|
@@ -1494,7 +1685,7 @@ function generateInstallManifest(opts) {
|
|
|
1494
1685
|
const allModules = [...new Set([...existingModules, ...newModules])];
|
|
1495
1686
|
const moduleLines = allModules.map((m) => ` - ${m}`).join('\n');
|
|
1496
1687
|
const lines = [
|
|
1497
|
-
'#
|
|
1688
|
+
'# rcode v2 install manifest',
|
|
1498
1689
|
`version: ${version}`,
|
|
1499
1690
|
`installDate: ${new Date().toISOString()}`,
|
|
1500
1691
|
];
|
|
@@ -1509,7 +1700,7 @@ function sanitizeYamlValue(val) {
|
|
|
1509
1700
|
|
|
1510
1701
|
function generateConfigYaml(opts) {
|
|
1511
1702
|
return [
|
|
1512
|
-
'#
|
|
1703
|
+
'# rcode v2 project config',
|
|
1513
1704
|
'# Generated by install. Safe to edit.',
|
|
1514
1705
|
`user_name: "${sanitizeYamlValue(opts.userName)}"`,
|
|
1515
1706
|
`project_name: "${sanitizeYamlValue(opts.projectName)}"`,
|
|
@@ -1517,7 +1708,7 @@ function generateConfigYaml(opts) {
|
|
|
1517
1708
|
`mode: "${sanitizeYamlValue(opts.mode)}"`,
|
|
1518
1709
|
`model_profile: "balanced"`,
|
|
1519
1710
|
`commit_planning: ${opts.commitPlanning !== false}`,
|
|
1520
|
-
`
|
|
1711
|
+
`rcode_source_path: "${sanitizeYamlValue(resolveStableSourcePath())}/"`,
|
|
1521
1712
|
'workflow:',
|
|
1522
1713
|
' research_by_default: false',
|
|
1523
1714
|
' plan_checker: true',
|
|
@@ -1610,7 +1801,7 @@ async function install(opts) {
|
|
|
1610
1801
|
}
|
|
1611
1802
|
|
|
1612
1803
|
// Issue #691: file lock prevents concurrent installs from racing on the
|
|
1613
|
-
// same .
|
|
1804
|
+
// same .rcode/_config/manifest.yaml + files-manifest.csv. Without it, two
|
|
1614
1805
|
// parallel runs (two terminals, postinstall + manual install, etc.) can
|
|
1615
1806
|
// each write a manifest the OTHER doesn't see → orphan sweep on the next
|
|
1616
1807
|
// install deletes files the other run considered legit.
|
|
@@ -1640,7 +1831,7 @@ async function install(opts) {
|
|
|
1640
1831
|
}
|
|
1641
1832
|
|
|
1642
1833
|
/**
|
|
1643
|
-
* Acquire an exclusive install lock at .
|
|
1834
|
+
* Acquire an exclusive install lock at .rcode/.install.lock (issue #691).
|
|
1644
1835
|
*
|
|
1645
1836
|
* Returns:
|
|
1646
1837
|
* { ok: true, release: () => void } lock acquired
|
|
@@ -1650,7 +1841,7 @@ async function install(opts) {
|
|
|
1650
1841
|
* reclaimed automatically.
|
|
1651
1842
|
*/
|
|
1652
1843
|
function acquireInstallLock(target) {
|
|
1653
|
-
const lockDir = path.join(target, '.
|
|
1844
|
+
const lockDir = path.join(target, '.rcode');
|
|
1654
1845
|
const lockPath = path.join(lockDir, '.install.lock');
|
|
1655
1846
|
try {
|
|
1656
1847
|
fs.mkdirSync(lockDir, { recursive: true });
|
|
@@ -1668,14 +1859,14 @@ function acquireInstallLock(target) {
|
|
|
1668
1859
|
return {
|
|
1669
1860
|
ok: true,
|
|
1670
1861
|
release: () => {
|
|
1671
|
-
try { fs.unlinkSync(lockPath); } catch {}
|
|
1862
|
+
try { fs.unlinkSync(lockPath); } catch (err) { console.error('[install] acquireInstallLock: failed to release lock', lockPath + ':', err?.message || err); }
|
|
1672
1863
|
},
|
|
1673
1864
|
};
|
|
1674
1865
|
} catch (err) {
|
|
1675
1866
|
if (err.code !== 'EEXIST') throw err;
|
|
1676
1867
|
// Lock exists — check if holder is alive.
|
|
1677
1868
|
let pid = 0;
|
|
1678
|
-
try { pid = parseInt(fs.readFileSync(lockPath, 'utf8'), 10); } catch {}
|
|
1869
|
+
try { pid = parseInt(fs.readFileSync(lockPath, 'utf8'), 10); } catch (err) { console.error('[install] acquireInstallLock: failed to read lock pid from', lockPath + ':', err?.message || err); }
|
|
1679
1870
|
if (pid && !isAlive(pid)) {
|
|
1680
1871
|
// Stale lock — remove and retry once.
|
|
1681
1872
|
try { fs.unlinkSync(lockPath); } catch {}
|
|
@@ -1701,10 +1892,10 @@ async function installInner(opts) {
|
|
|
1701
1892
|
// Resolve commit-planning preference (interactive prompt or flag) — #189.
|
|
1702
1893
|
opts.commitPlanning = await resolveCommitPlanning(opts);
|
|
1703
1894
|
|
|
1704
|
-
console.log(`\n🕌 ${bold('
|
|
1895
|
+
console.log(`\n🕌 ${bold('rcode')} ${pc.cyan('v' + pkgVersion)} ${dim('→')} ${opts.target}`);
|
|
1705
1896
|
|
|
1706
1897
|
// Detect an existing install and surface it (#195).
|
|
1707
|
-
const existingManifestPath = path.join(opts.target, '.
|
|
1898
|
+
const existingManifestPath = path.join(opts.target, '.rcode', '_config', 'manifest.yaml');
|
|
1708
1899
|
if (fs.existsSync(existingManifestPath)) {
|
|
1709
1900
|
const m = fs.readFileSync(existingManifestPath, 'utf8').match(/^version:\s*(.+)$/m);
|
|
1710
1901
|
const existingVersion = m ? m[1].trim() : 'unknown';
|
|
@@ -1727,6 +1918,9 @@ async function installInner(opts) {
|
|
|
1727
1918
|
|
|
1728
1919
|
// Validate IDE(s) — structured error for unsupported editors (#197).
|
|
1729
1920
|
// SUPPORTED_IDES is the module-level constant (#697 / W4.3).
|
|
1921
|
+
// Issue #841: also accept 'claude-code' as an alias — normalise any that
|
|
1922
|
+
// slipped through resolveIde before reaching this point.
|
|
1923
|
+
opts.ides = opts.ides.map(ide => (ide === 'claude-code' ? 'claude' : ide));
|
|
1730
1924
|
const unsupported = opts.ides.filter(ide => !SUPPORTED_IDES.includes(ide));
|
|
1731
1925
|
if (unsupported.length > 0) {
|
|
1732
1926
|
console.error(`✖ --ide ${unsupported.join(', ')} is not supported in v${readPackageVersion()}.`);
|
|
@@ -1736,6 +1930,7 @@ async function installInner(opts) {
|
|
|
1736
1930
|
console.error(' cursor — Cursor IDE');
|
|
1737
1931
|
console.error(' gemini — Gemini CLI');
|
|
1738
1932
|
console.error(' vscode — VS Code (with Claude Code / Continue / Copilot extension)');
|
|
1933
|
+
console.error(' windsurf — Windsurf (Codeium)');
|
|
1739
1934
|
console.error(' antigravity — Antigravity (experimental)');
|
|
1740
1935
|
console.error('');
|
|
1741
1936
|
console.error(' Tracked for future:');
|
|
@@ -1763,8 +1958,8 @@ async function installInner(opts) {
|
|
|
1763
1958
|
|
|
1764
1959
|
// Antigravity install is experimental — best-effort path, user may need to adjust
|
|
1765
1960
|
if (opts.ides.includes('antigravity')) {
|
|
1766
|
-
console.log(' ' + warn('Antigravity install is experimental. Files land at .antigravity/
|
|
1767
|
-
console.log(' ' + dim('If Antigravity expects a different path, adjust .
|
|
1961
|
+
console.log(' ' + warn('Antigravity install is experimental. Files land at .antigravity/rcode/{agents,commands}/.'));
|
|
1962
|
+
console.log(' ' + dim('If Antigravity expects a different path, adjust .rcode/config.yaml and re-run.'));
|
|
1768
1963
|
}
|
|
1769
1964
|
|
|
1770
1965
|
// Validate requested modules exist
|
|
@@ -1783,7 +1978,7 @@ async function installInner(opts) {
|
|
|
1783
1978
|
if (Array.isArray(opts.ides) && opts.ides.includes('vscode') || (opts.ide === 'vscode')) {
|
|
1784
1979
|
const migrated = migrateVscodeCommandsLayout(opts.target);
|
|
1785
1980
|
if (migrated.moved > 0) {
|
|
1786
|
-
console.log(` ↻ Migrated ${migrated.moved} legacy vscode-layout command(s) to .claude/commands/
|
|
1981
|
+
console.log(` ↻ Migrated ${migrated.moved} legacy vscode-layout command(s) to .claude/commands/rcode-{name}.md`);
|
|
1787
1982
|
}
|
|
1788
1983
|
}
|
|
1789
1984
|
|
|
@@ -1799,7 +1994,7 @@ async function installInner(opts) {
|
|
|
1799
1994
|
}
|
|
1800
1995
|
|
|
1801
1996
|
// Force-overwrite backup — closes #381. Without this, customized
|
|
1802
|
-
// .claude/agents/
|
|
1997
|
+
// .claude/agents/rcode-*.md and similar package-managed files were silently
|
|
1803
1998
|
// clobbered with no recovery path. Now every --force-overwrite run creates
|
|
1804
1999
|
// a tar.gz of every existing target before any write happens.
|
|
1805
2000
|
// Skip when --no-backup is passed (CI escape hatch) or on fresh installs.
|
|
@@ -1834,7 +2029,7 @@ async function installInner(opts) {
|
|
|
1834
2029
|
// to overwrite. If hashes differ, user customized it → preserve.
|
|
1835
2030
|
const priorManifest = new Map();
|
|
1836
2031
|
if (opts.nonDestructive) {
|
|
1837
|
-
const manifestPath = path.join(opts.target, '.
|
|
2032
|
+
const manifestPath = path.join(opts.target, '.rcode', '_config', 'files-manifest.csv');
|
|
1838
2033
|
if (fs.existsSync(manifestPath)) {
|
|
1839
2034
|
try {
|
|
1840
2035
|
const lines = fs.readFileSync(manifestPath, 'utf8').split('\n').slice(1).filter(Boolean);
|
|
@@ -1866,16 +2061,24 @@ async function installInner(opts) {
|
|
|
1866
2061
|
const relForward = entry.rel.split(path.sep).join('/');
|
|
1867
2062
|
ensureDir(path.dirname(destPath));
|
|
1868
2063
|
|
|
2064
|
+
// Per-iteration lazy readers — avoids re-reading destPath / entry.src across
|
|
2065
|
+
// multiple conditional branches within the same loop body (up to 4 reads of
|
|
2066
|
+
// destPath and 5 reads of entry.src in the worst case without this cache).
|
|
2067
|
+
let _destBuf = null;
|
|
2068
|
+
let _srcBuf = null;
|
|
2069
|
+
const readDestBuf = () => { if (!_destBuf) _destBuf = fs.readFileSync(destPath); return _destBuf; };
|
|
2070
|
+
const readSrcBuf = () => { if (!_srcBuf) _srcBuf = fs.readFileSync(entry.src); return _srcBuf; };
|
|
2071
|
+
|
|
1869
2072
|
// Non-destructive guard (#232): preserve user-modified files.
|
|
1870
2073
|
// --accept-all (#251) overrides: treat all files as pristine.
|
|
1871
2074
|
if (opts.nonDestructive && !opts.forceOverwrite && !opts.acceptAll && fs.existsSync(destPath)) {
|
|
1872
2075
|
const priorHash = priorManifest.get(relForward);
|
|
1873
2076
|
if (priorHash) {
|
|
1874
|
-
const installedContent =
|
|
1875
|
-
const currentHash = sha256(
|
|
2077
|
+
const installedContent = readDestBuf().toString('utf8');
|
|
2078
|
+
const currentHash = sha256(readDestBuf());
|
|
1876
2079
|
if (currentHash !== priorHash) {
|
|
1877
2080
|
// Compute diff stat for display (#251)
|
|
1878
|
-
const srcContent =
|
|
2081
|
+
const srcContent = readSrcBuf().toString('utf8');
|
|
1879
2082
|
const patch = createTwoFilesPatch(relForward, relForward, installedContent, srcContent, 'installed', 'source');
|
|
1880
2083
|
let ins = 0, del = 0;
|
|
1881
2084
|
for (const line of patch.split('\n')) {
|
|
@@ -1894,8 +2097,8 @@ async function installInner(opts) {
|
|
|
1894
2097
|
}
|
|
1895
2098
|
|
|
1896
2099
|
if (fs.existsSync(destPath) && !opts.force && !opts.forceOverwrite) {
|
|
1897
|
-
const existingHash = sha256(
|
|
1898
|
-
const sourceHash = sha256(
|
|
2100
|
+
const existingHash = sha256(readDestBuf());
|
|
2101
|
+
const sourceHash = sha256(readSrcBuf());
|
|
1899
2102
|
if (existingHash === sourceHash) { skipped++; continue; }
|
|
1900
2103
|
if (!opts.yes && !opts.nonDestructive) {
|
|
1901
2104
|
// Buffer the conflict instead of spamming a warning per file (#451).
|
|
@@ -1904,8 +2107,8 @@ async function installInner(opts) {
|
|
|
1904
2107
|
rel: relForward,
|
|
1905
2108
|
src: entry.src,
|
|
1906
2109
|
destPath,
|
|
1907
|
-
existingContent:
|
|
1908
|
-
sourceContent:
|
|
2110
|
+
existingContent: readDestBuf().toString('utf8'),
|
|
2111
|
+
sourceContent: readSrcBuf().toString('utf8'),
|
|
1909
2112
|
});
|
|
1910
2113
|
skipped++;
|
|
1911
2114
|
continue;
|
|
@@ -1913,14 +2116,14 @@ async function installInner(opts) {
|
|
|
1913
2116
|
}
|
|
1914
2117
|
|
|
1915
2118
|
if (fs.existsSync(destPath) && opts.forceOverwrite) {
|
|
1916
|
-
const existing =
|
|
1917
|
-
const incoming =
|
|
2119
|
+
const existing = readDestBuf();
|
|
2120
|
+
const incoming = readSrcBuf();
|
|
1918
2121
|
if (!existing.equals(incoming)) {
|
|
1919
2122
|
spinner.update({ text: dim(`overwriting ${entry.rel}`) });
|
|
1920
2123
|
}
|
|
1921
2124
|
}
|
|
1922
2125
|
|
|
1923
|
-
let content =
|
|
2126
|
+
let content = readSrcBuf().toString('utf8');
|
|
1924
2127
|
if (entry.cursor) content = convertToCursorMdc(content);
|
|
1925
2128
|
fs.writeFileSync(destPath, content, 'utf8');
|
|
1926
2129
|
if (entry.executable) fs.chmodSync(destPath, 0o755);
|
|
@@ -2041,7 +2244,7 @@ async function installInner(opts) {
|
|
|
2041
2244
|
// Global install only ships the read-only tooling: commands, skills, workflows, bin.
|
|
2042
2245
|
if (opts.global) {
|
|
2043
2246
|
// Still write the manifest so the global install is traceable/upgradeable
|
|
2044
|
-
const configDir = path.join(opts.target, '.
|
|
2247
|
+
const configDir = path.join(opts.target, '.rcode', '_config');
|
|
2045
2248
|
ensureDir(configDir);
|
|
2046
2249
|
fs.writeFileSync(path.join(configDir, 'manifest.yaml'), generateInstallManifest(opts));
|
|
2047
2250
|
// Install skills + sidebar stubs globally — never dedup against globals,
|
|
@@ -2061,7 +2264,7 @@ async function installInner(opts) {
|
|
|
2061
2264
|
return 0;
|
|
2062
2265
|
}
|
|
2063
2266
|
|
|
2064
|
-
// Duplicate-prevention: if
|
|
2267
|
+
// Duplicate-prevention: if rcode commands already exist globally in ~/.claude/commands/,
|
|
2065
2268
|
// skip writing agents/commands to the project's .claude/ directory. Without this,
|
|
2066
2269
|
// running `npx rcode install` in the home dir AND then in a project creates two sets
|
|
2067
2270
|
// of identical files — Claude Code shows both as duplicate slash commands.
|
|
@@ -2071,18 +2274,18 @@ async function installInner(opts) {
|
|
|
2071
2274
|
// Run dedup even when force:true — only forceOverwrite skips it.
|
|
2072
2275
|
if (isProjectInstall && !opts.forceOverwrite) {
|
|
2073
2276
|
try {
|
|
2074
|
-
// Check both root-level
|
|
2075
|
-
const
|
|
2076
|
-
fs.readdirSync(globalClaudeCommands).some(f => f.startsWith('
|
|
2077
|
-
fs.existsSync(path.join(globalClaudeCommands, '
|
|
2277
|
+
// Check both root-level rcode-*.md AND the rcode/ subdirectory (vscode-style).
|
|
2278
|
+
const globalHasrcode = fs.existsSync(globalClaudeCommands) && (
|
|
2279
|
+
fs.readdirSync(globalClaudeCommands).some(f => f.startsWith('rcode-') && f.endsWith('.md')) ||
|
|
2280
|
+
fs.existsSync(path.join(globalClaudeCommands, 'rcode'))
|
|
2078
2281
|
);
|
|
2079
|
-
const
|
|
2080
|
-
fs.readdirSync(projectClaudeCommands).some(f => f.startsWith('
|
|
2081
|
-
fs.existsSync(path.join(projectClaudeCommands, '
|
|
2282
|
+
const projectHasrcode = fs.existsSync(projectClaudeCommands) && (
|
|
2283
|
+
fs.readdirSync(projectClaudeCommands).some(f => f.startsWith('rcode-') && f.endsWith('.md')) ||
|
|
2284
|
+
fs.existsSync(path.join(projectClaudeCommands, 'rcode'))
|
|
2082
2285
|
);
|
|
2083
|
-
if (
|
|
2286
|
+
if (globalHasrcode && !projectHasrcode) {
|
|
2084
2287
|
// Global commands exist, project has none yet — filter them out of the plan
|
|
2085
|
-
// so we don't create duplicates. Project gets .
|
|
2288
|
+
// so we don't create duplicates. Project gets .rcode/ state only.
|
|
2086
2289
|
const before = plan.length;
|
|
2087
2290
|
const filtered = plan.filter(e => {
|
|
2088
2291
|
const rel = e.rel.split(path.sep).join('/');
|
|
@@ -2091,33 +2294,33 @@ async function installInner(opts) {
|
|
|
2091
2294
|
if (filtered.length < before) {
|
|
2092
2295
|
plan.length = 0;
|
|
2093
2296
|
filtered.forEach(e => plan.push(e));
|
|
2094
|
-
console.log(' ' + dim('Global
|
|
2297
|
+
console.log(' ' + dim('Global rcode commands detected in ~/.claude/ — skipping project-level agent/command install to avoid duplicates.'));
|
|
2095
2298
|
console.log(' ' + dim('Use --force-overwrite to install locally anyway.'));
|
|
2096
2299
|
}
|
|
2097
|
-
} else if (
|
|
2300
|
+
} else if (globalHasrcode && projectHasrcode) {
|
|
2098
2301
|
// Both exist — project commands are duplicates. Remove project-level ones.
|
|
2099
2302
|
try {
|
|
2100
|
-
// Remove root-level
|
|
2303
|
+
// Remove root-level rcode-*.md files
|
|
2101
2304
|
const projectCommandFiles = fs.readdirSync(projectClaudeCommands)
|
|
2102
|
-
.filter(f => f.startsWith('
|
|
2305
|
+
.filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
|
|
2103
2306
|
for (const f of projectCommandFiles) {
|
|
2104
2307
|
fs.unlinkSync(path.join(projectClaudeCommands, f));
|
|
2105
2308
|
}
|
|
2106
|
-
// Remove
|
|
2309
|
+
// Remove rcode/ subdirectory (vscode-style commands).
|
|
2107
2310
|
// #688 — safeRmSync refuses to traverse out-of-target symlinks.
|
|
2108
|
-
const
|
|
2109
|
-
if (fs.existsSync(
|
|
2110
|
-
safeRmSync(
|
|
2311
|
+
const rcodeSubdir = path.join(projectClaudeCommands, 'rcode');
|
|
2312
|
+
if (fs.existsSync(rcodeSubdir)) {
|
|
2313
|
+
safeRmSync(rcodeSubdir, opts.target);
|
|
2111
2314
|
}
|
|
2112
2315
|
const projectAgentsDir = path.join(opts.target, '.claude', 'agents');
|
|
2113
2316
|
if (fs.existsSync(projectAgentsDir)) {
|
|
2114
2317
|
const agentFiles = fs.readdirSync(projectAgentsDir)
|
|
2115
|
-
.filter(f => f.startsWith('
|
|
2318
|
+
.filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
|
|
2116
2319
|
for (const f of agentFiles) {
|
|
2117
2320
|
fs.unlinkSync(path.join(projectAgentsDir, f));
|
|
2118
2321
|
}
|
|
2119
2322
|
}
|
|
2120
|
-
console.log(' ' + dim('Removed duplicate project-level
|
|
2323
|
+
console.log(' ' + dim('Removed duplicate project-level rcode commands (global ones in ~/.claude/ take precedence).'));
|
|
2121
2324
|
} catch { /* non-fatal */ }
|
|
2122
2325
|
const filtered = plan.filter(e => {
|
|
2123
2326
|
const rel = e.rel.split(path.sep).join('/');
|
|
@@ -2130,15 +2333,18 @@ async function installInner(opts) {
|
|
|
2130
2333
|
} catch { /* non-fatal — skip detection on permission errors */ }
|
|
2131
2334
|
}
|
|
2132
2335
|
|
|
2133
|
-
// Write .
|
|
2134
|
-
const configDir = path.join(opts.target, '.
|
|
2336
|
+
// Write .rcode/_config/manifest.yaml + agent-manifest.csv + files-manifest.csv
|
|
2337
|
+
const configDir = path.join(opts.target, '.rcode', '_config');
|
|
2135
2338
|
ensureDir(configDir);
|
|
2339
|
+
// Issue #806: ensure .planning/ exists so /rcode-new-project Write calls succeed
|
|
2340
|
+
// even when seedStarterPlanning returns early (e.g. ROADMAP.md already present).
|
|
2341
|
+
ensureDir(path.join(opts.target, '.planning'));
|
|
2136
2342
|
fs.writeFileSync(path.join(configDir, 'manifest.yaml'), generateInstallManifest(opts));
|
|
2137
2343
|
fs.writeFileSync(path.join(configDir, 'agent-manifest.csv'), generateAgentManifest(plan, opts.target));
|
|
2138
2344
|
|
|
2139
2345
|
// Handle --reset flag: delete config.yaml and state.json if --reset is passed
|
|
2140
|
-
const configPath = path.join(opts.target, '.
|
|
2141
|
-
const stateDest = path.join(opts.target, '.
|
|
2346
|
+
const configPath = path.join(opts.target, '.rcode', 'config.yaml');
|
|
2347
|
+
const stateDest = path.join(opts.target, '.rcode', 'state.json');
|
|
2142
2348
|
let existedBefore = false;
|
|
2143
2349
|
|
|
2144
2350
|
if (opts.reset && opts.force) {
|
|
@@ -2153,7 +2359,7 @@ async function installInner(opts) {
|
|
|
2153
2359
|
}
|
|
2154
2360
|
// Note: --reset without --force is rejected at the top of install() (#680).
|
|
2155
2361
|
|
|
2156
|
-
// Write .
|
|
2362
|
+
// Write .rcode/config.yaml (user_name, project_name, language, mode)
|
|
2157
2363
|
// Note: config.yaml is user data and should NOT be overwritten on --force (unless --reset)
|
|
2158
2364
|
if (!fs.existsSync(configPath)) {
|
|
2159
2365
|
writeFileAtomic(configPath, generateConfigYaml(opts));
|
|
@@ -2189,17 +2395,21 @@ async function installInner(opts) {
|
|
|
2189
2395
|
console.log('');
|
|
2190
2396
|
console.log(' ' + warn('config.yaml has validation errors:'));
|
|
2191
2397
|
for (const e of validation.errors) console.log(pc.yellow(e));
|
|
2192
|
-
console.log(dim(' → Edit .
|
|
2398
|
+
console.log(dim(' → Edit .rcode/config.yaml to fix, then run /rcode-status'));
|
|
2193
2399
|
}
|
|
2194
2400
|
} catch { /* best-effort */ }
|
|
2195
2401
|
|
|
2196
|
-
// Seed .
|
|
2402
|
+
// Seed .rcode/state.json (skip if already exists — don't overwrite on re-install unless --reset)
|
|
2197
2403
|
if (!fs.existsSync(stateDest)) {
|
|
2198
2404
|
const stateSrc = path.join(SOURCE_ROOT, 'state.json');
|
|
2199
2405
|
if (fs.existsSync(stateSrc)) {
|
|
2200
2406
|
const now = new Date().toISOString();
|
|
2407
|
+
// #809/#830: escape projectName for JSON embedding — quotes/backslashes
|
|
2408
|
+
// would corrupt the resulting state.json. JSON.stringify wraps in quotes;
|
|
2409
|
+
// slice them off because the template already has surrounding quotes.
|
|
2410
|
+
const safeProject = JSON.stringify(String(opts.projectName || path.basename(opts.target))).slice(1, -1);
|
|
2201
2411
|
let stateContent = fs.readFileSync(stateSrc, 'utf8')
|
|
2202
|
-
.replace(/__PROJECT_NAME__/g,
|
|
2412
|
+
.replace(/__PROJECT_NAME__/g, safeProject)
|
|
2203
2413
|
.replace(/__INSTALL_DATE__/g, now);
|
|
2204
2414
|
|
|
2205
2415
|
// Issue #705: the template ships with _seeded_stub:true. If the user
|
|
@@ -2228,21 +2438,21 @@ async function installInner(opts) {
|
|
|
2228
2438
|
// .planning/council-sessions/ empty dir
|
|
2229
2439
|
ensureDir(path.join(opts.target, '.planning', 'council-sessions'));
|
|
2230
2440
|
|
|
2231
|
-
// .
|
|
2232
|
-
// The /
|
|
2233
|
-
const contextDir = path.join(opts.target, '.
|
|
2441
|
+
// .rcode/context/ — seed stub files so doctor doesn't report "never initialized"
|
|
2442
|
+
// The /rcode-init slash command populates these with real project content.
|
|
2443
|
+
const contextDir = path.join(opts.target, '.rcode', 'context');
|
|
2234
2444
|
ensureDir(contextDir);
|
|
2235
2445
|
const activeCtx = path.join(contextDir, 'active.md');
|
|
2236
2446
|
const briefCtx = path.join(contextDir, 'project-brief.md');
|
|
2237
2447
|
if (!fs.existsSync(activeCtx)) {
|
|
2238
|
-
fs.writeFileSync(activeCtx, '# Active Context\n\n_Run `/
|
|
2448
|
+
fs.writeFileSync(activeCtx, '# Active Context\n\n_Run `/rcode-init` inside your AI editor to populate this file._\n');
|
|
2239
2449
|
}
|
|
2240
2450
|
if (!fs.existsSync(briefCtx)) {
|
|
2241
|
-
fs.writeFileSync(briefCtx, '# Project Brief\n\n_Run `/
|
|
2451
|
+
fs.writeFileSync(briefCtx, '# Project Brief\n\n_Run `/rcode-init` inside your AI editor to populate this file._\n');
|
|
2242
2452
|
}
|
|
2243
2453
|
|
|
2244
|
-
// ~/.
|
|
2245
|
-
const globalAgentsDir = path.join(os.homedir(), '.
|
|
2454
|
+
// ~/.rcode/agents/ global agents directory
|
|
2455
|
+
const globalAgentsDir = path.join(os.homedir(), '.rcode', 'agents');
|
|
2246
2456
|
ensureDir(globalAgentsDir);
|
|
2247
2457
|
|
|
2248
2458
|
// Issue #702: files-manifest.csv used to be written here, BEFORE
|
|
@@ -2250,11 +2460,11 @@ async function installInner(opts) {
|
|
|
2250
2460
|
// functions install were therefore invisible to sweepStaleInstalledFiles
|
|
2251
2461
|
// and doctor's drift detection. Manifest generation moved below to AFTER
|
|
2252
2462
|
// all skill installations complete, with extraScanDirs covering both
|
|
2253
|
-
// .claude/skills/ and .
|
|
2463
|
+
// .claude/skills/ and .rcode/skills/ on disk.
|
|
2254
2464
|
|
|
2255
2465
|
// Install v1-style phrase-activated skills (scaffold-project, create-prd,
|
|
2256
2466
|
// retrospective, etc.) into .claude/skills/ alongside the v2 agents/commands.
|
|
2257
|
-
// Issue #679: skip
|
|
2467
|
+
// Issue #679: skip rcode-* skills that already exist in ~/.claude/skills/
|
|
2258
2468
|
// (global precedence) so the slash picker doesn't show every command twice.
|
|
2259
2469
|
// Reuse the isProjectInstall flag declared earlier in this scope.
|
|
2260
2470
|
const skillsResult = installSkills(PACKAGE_ROOT, opts.target, {
|
|
@@ -2262,7 +2472,7 @@ async function installInner(opts) {
|
|
|
2262
2472
|
});
|
|
2263
2473
|
let skillsInstalled = skillsResult.count;
|
|
2264
2474
|
if (skillsResult.skippedGlobal > 0) {
|
|
2265
|
-
console.log(' ' + dim(`Skipped ${skillsResult.skippedGlobal} project-level
|
|
2475
|
+
console.log(' ' + dim(`Skipped ${skillsResult.skippedGlobal} project-level rcode skills (global ones in ~/.claude/skills/ take precedence) — closes #679.`));
|
|
2266
2476
|
}
|
|
2267
2477
|
|
|
2268
2478
|
// Generate install-time skill stubs that mirror sidebar-worthy slash commands.
|
|
@@ -2296,7 +2506,7 @@ async function installInner(opts) {
|
|
|
2296
2506
|
mergeExistingManifest: !opts.force,
|
|
2297
2507
|
extraScanDirs: [
|
|
2298
2508
|
path.join(opts.target, '.claude', 'skills'),
|
|
2299
|
-
path.join(opts.target, '.
|
|
2509
|
+
path.join(opts.target, '.rcode', 'skills'),
|
|
2300
2510
|
],
|
|
2301
2511
|
}),
|
|
2302
2512
|
);
|
|
@@ -2304,7 +2514,7 @@ async function installInner(opts) {
|
|
|
2304
2514
|
// Seed .planning/ with starter ROADMAP + STATE so workflows work immediately
|
|
2305
2515
|
const starterSeeded = seedStarterPlanning(opts.target, opts.projectName);
|
|
2306
2516
|
|
|
2307
|
-
// Install brain scaffolding at .
|
|
2517
|
+
// Install brain scaffolding at .rcode/brain/ (sources.yaml + README).
|
|
2308
2518
|
// Actual brain content lands after first brain pull runs.
|
|
2309
2519
|
installBrainScaffold(PACKAGE_ROOT, opts.target);
|
|
2310
2520
|
|
|
@@ -2316,13 +2526,13 @@ async function installInner(opts) {
|
|
|
2316
2526
|
// Respects --no-git-hooks flag; skips silently when .git/ is absent.
|
|
2317
2527
|
const hookReport = ensureRcodePreCommitHook(opts.target, { gitHooks: opts.gitHooks });
|
|
2318
2528
|
|
|
2319
|
-
// Pull
|
|
2320
|
-
// Runs
|
|
2529
|
+
// Pull rcode brain content (v2.0 — issue #158).
|
|
2530
|
+
// Runs rcode-tools brain pull as a child process. Placeholder URLs
|
|
2321
2531
|
// are skipped gracefully so this does not fail a fresh install.
|
|
2322
2532
|
let brainReport = null;
|
|
2323
2533
|
try {
|
|
2324
2534
|
const { execFileSync } = require('child_process');
|
|
2325
|
-
const toolsPath = path.join(opts.target, '.
|
|
2535
|
+
const toolsPath = path.join(opts.target, '.rcode', 'bin', 'rcode-tools.cjs');
|
|
2326
2536
|
if (fs.existsSync(toolsPath)) {
|
|
2327
2537
|
// Issue #706: 60s timeout — without it, a slow upstream URL hangs the
|
|
2328
2538
|
// entire install indefinitely. Brain pull is best-effort, so a timeout
|
|
@@ -2411,12 +2621,12 @@ async function installInner(opts) {
|
|
|
2411
2621
|
let agentsFromGlobal = false, commandsFromGlobal = false;
|
|
2412
2622
|
try {
|
|
2413
2623
|
if (fs.existsSync(agentsDir)) {
|
|
2414
|
-
agentCount = fs.readdirSync(agentsDir).filter(f => (f.startsWith('
|
|
2624
|
+
agentCount = fs.readdirSync(agentsDir).filter(f => (f.startsWith('rcode-') || f.startsWith('rcode-')) && (f.endsWith('.md') || f.endsWith('.mdc'))).length;
|
|
2415
2625
|
}
|
|
2416
2626
|
if (fs.existsSync(commandsDir)) {
|
|
2417
|
-
// claude IDE names commands
|
|
2627
|
+
// claude IDE names commands rcode-*.md; other IDEs use plain {name}.md inside a rcode/ subdir
|
|
2418
2628
|
const commandFilter = primaryIde === 'claude'
|
|
2419
|
-
? f => f.startsWith('
|
|
2629
|
+
? f => f.startsWith('rcode-') && (f.endsWith('.md') || f.endsWith('.mdc'))
|
|
2420
2630
|
: f => f.endsWith('.md') || f.endsWith('.mdc');
|
|
2421
2631
|
commandCount = fs.readdirSync(commandsDir).filter(commandFilter).length;
|
|
2422
2632
|
}
|
|
@@ -2431,36 +2641,38 @@ async function installInner(opts) {
|
|
|
2431
2641
|
const homeCommands = path.join(os.homedir(), '.claude/commands');
|
|
2432
2642
|
const homeSkills = path.join(os.homedir(), '.claude/skills');
|
|
2433
2643
|
if (agentCount === 0 && fs.existsSync(homeAgents)) {
|
|
2434
|
-
// #669 — count both
|
|
2644
|
+
// #669 — count both rcode-* and rcode-* prefixes; missing rcode-
|
|
2435
2645
|
// branch produced "Agents: 0" alongside "Skills: 120".
|
|
2436
2646
|
const n = fs.readdirSync(homeAgents)
|
|
2437
|
-
.filter(f => (f.startsWith('
|
|
2647
|
+
.filter(f => (f.startsWith('rcode-') || f.startsWith('rcode-')) && f.endsWith('.md'))
|
|
2438
2648
|
.length;
|
|
2439
2649
|
if (n > 0) { agentCount = n; agentsFromGlobal = true; }
|
|
2440
2650
|
}
|
|
2441
2651
|
if (commandCount === 0 && fs.existsSync(homeCommands)) {
|
|
2442
2652
|
const n = fs.readdirSync(homeCommands)
|
|
2443
|
-
.filter(f => (f.startsWith('
|
|
2653
|
+
.filter(f => (f.startsWith('rcode-') || f.startsWith('rcode-')) && f.endsWith('.md'))
|
|
2444
2654
|
.length;
|
|
2445
2655
|
if (n > 0) { commandCount = n; commandsFromGlobal = true; }
|
|
2446
2656
|
}
|
|
2447
2657
|
if (skillsInstalled < 20 && fs.existsSync(homeSkills)) {
|
|
2448
2658
|
try {
|
|
2449
2659
|
const globalSkillCount = fs.readdirSync(homeSkills, { withFileTypes: true })
|
|
2450
|
-
.filter(d => d.isDirectory() && d.name.startsWith('
|
|
2660
|
+
.filter(d => d.isDirectory() && d.name.startsWith('rcode-')).length;
|
|
2451
2661
|
if (globalSkillCount > skillsInstalled) skillsInstalled = globalSkillCount;
|
|
2452
2662
|
} catch { /* non-fatal */ }
|
|
2453
2663
|
}
|
|
2454
2664
|
}
|
|
2455
|
-
} catch {
|
|
2665
|
+
} catch (err) {
|
|
2666
|
+
console.error('[install] installInner: failed to count installed agents/commands:', err?.message || err);
|
|
2667
|
+
}
|
|
2456
2668
|
|
|
2457
2669
|
const version = readPackageVersion();
|
|
2458
2670
|
console.log('');
|
|
2459
2671
|
console.log(` ${bold('Version:')} ${pc.cyan('@hanzlaa/rcode@' + version)}`);
|
|
2460
2672
|
console.log(` ${bold('IDE:')} ${opts.ides.join(', ')}`);
|
|
2461
|
-
console.log(` ${bold('Language:')} ${opts.language} ${dim('(change in .
|
|
2673
|
+
console.log(` ${bold('Language:')} ${opts.language} ${dim('(change in .rcode/config.yaml)')}`);
|
|
2462
2674
|
console.log(` ${bold('Mode:')} ${opts.mode} ${dim('(guided=confirm at gates, yolo=autonomous)')}`);
|
|
2463
|
-
console.log(` ${bold('Planning:')} ${opts.commitPlanning !== false ? 'committed' : 'gitignored'} ${dim('(flip:
|
|
2675
|
+
console.log(` ${bold('Planning:')} ${opts.commitPlanning !== false ? 'committed' : 'gitignored'} ${dim('(flip: rcode-tools gitignore refresh)')}`);
|
|
2464
2676
|
console.log('');
|
|
2465
2677
|
// Show the actual install paths so cursor/gemini/antigravity output is accurate
|
|
2466
2678
|
const relAgents = path.relative(opts.target, idePaths.agentsDir) || idePaths.agentsDir;
|
|
@@ -2476,9 +2688,9 @@ async function installInner(opts) {
|
|
|
2476
2688
|
console.log(` ${bold('Next:')}`);
|
|
2477
2689
|
console.log(` cd ${opts.target}`);
|
|
2478
2690
|
console.log(' claude # start Claude Code (reload window if already open)');
|
|
2479
|
-
console.log(' /
|
|
2480
|
-
console.log(' /
|
|
2481
|
-
console.log(' /
|
|
2691
|
+
console.log(' /rcode-progress # where you are, what\'s next');
|
|
2692
|
+
console.log(' /rcode-do # interactive command picker');
|
|
2693
|
+
console.log(' /rcode-council <q> # multi-agent strategic answer');
|
|
2482
2694
|
console.log('');
|
|
2483
2695
|
// #665 — when the install came in via npm -g (--global --no-prompt), the
|
|
2484
2696
|
// interactive IDE/planning prompts were skipped. Tell the user how to
|
|
@@ -2490,15 +2702,16 @@ async function installInner(opts) {
|
|
|
2490
2702
|
console.log('');
|
|
2491
2703
|
}
|
|
2492
2704
|
console.log(dim(' Refresh anytime:'));
|
|
2493
|
-
console.log(dim('
|
|
2494
|
-
console.log(dim(
|
|
2705
|
+
console.log(dim(' pnpm dlx @hanzlaa/rcode@latest install # recommended (avoids npm 11.x npx issues)'));
|
|
2706
|
+
console.log(dim(' npx @hanzlaa/rcode@latest install # npm / yarn'));
|
|
2707
|
+
console.log(dim(` /rcode-update v${version} # pin rcode to a specific version`));
|
|
2495
2708
|
console.log('');
|
|
2496
2709
|
console.log(dim(' Want the rcode CLI on your PATH? (optional — needed for rcode version / rcode update):'));
|
|
2497
|
-
console.log(dim(' npm install -g @hanzlaa/rcode # installs rcode,
|
|
2710
|
+
console.log(dim(' npm install -g @hanzlaa/rcode # installs rcode, rcode, rcode commands'));
|
|
2498
2711
|
console.log(dim(' rcode version # verify'));
|
|
2499
2712
|
console.log('');
|
|
2500
2713
|
console.log(dim(' Customize without losing changes on update:'));
|
|
2501
|
-
console.log(dim(' Create <name>.local.md siblings (e.g. .claude/agents/
|
|
2714
|
+
console.log(dim(' Create <name>.local.md siblings (e.g. .claude/agents/rcode-waleed.local.md)'));
|
|
2502
2715
|
console.log(dim(' *.local.md files are NEVER touched by install / --force-overwrite / uninstall.'));
|
|
2503
2716
|
console.log('');
|
|
2504
2717
|
console.log(' ' + warn('If your IDE is already open, reload the window to refresh skills/commands.'));
|
|
@@ -2507,7 +2720,7 @@ async function installInner(opts) {
|
|
|
2507
2720
|
|
|
2508
2721
|
// Lightweight update check (#252) — async background, never blocks install.
|
|
2509
2722
|
// Suppressed in non-TTY / CI or when --no-update-check is passed.
|
|
2510
|
-
if (!opts.noUpdateCheck && process.stdout.isTTY && !process.env.CI && !process.env.
|
|
2723
|
+
if (!opts.noUpdateCheck && process.stdout.isTTY && !process.env.CI && !process.env.RCODE_NO_UPDATE_NOTIFIER) {
|
|
2511
2724
|
const { execFile } = require('child_process');
|
|
2512
2725
|
execFile('npm', ['view', '@hanzlaa/rcode', 'version', '--json'], { timeout: 4000 }, (err, stdout) => {
|
|
2513
2726
|
if (err) return;
|
|
@@ -2525,6 +2738,16 @@ async function installInner(opts) {
|
|
|
2525
2738
|
});
|
|
2526
2739
|
}
|
|
2527
2740
|
|
|
2741
|
+
// Issue #838: verify pnpm add didn't silently fail (broken lockfile).
|
|
2742
|
+
// Only fires in pnpm projects (pnpm-lock.yaml present). Non-blocking.
|
|
2743
|
+
if (!opts.global) {
|
|
2744
|
+
const pnpmCheck = verifyPnpmAddDevDep(opts.target);
|
|
2745
|
+
if (!pnpmCheck.ok) {
|
|
2746
|
+
console.log(' ' + warn(pnpmCheck.message));
|
|
2747
|
+
console.log('');
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2528
2751
|
// Health check — smoke test that the install actually works (#193).
|
|
2529
2752
|
const healthPass = runInstallHealthCheck(opts.target, { agentCount, commandCount, skillsInstalled });
|
|
2530
2753
|
return healthPass ? 0 : 1;
|
|
@@ -2560,9 +2783,9 @@ function runInstallHealthCheck(target, counts) {
|
|
|
2560
2783
|
const tolerate = (n) => Math.max(1, Math.floor(n * 0.9));
|
|
2561
2784
|
expected.agents = tolerate(pkgManifest.agents.size);
|
|
2562
2785
|
expected.skills = tolerate(pkgManifest.actions.size);
|
|
2563
|
-
// Commands count comes from
|
|
2786
|
+
// Commands count comes from rcode/commands/. No bundled enumerator
|
|
2564
2787
|
// exists; reuse the agents threshold as a proxy floor.
|
|
2565
|
-
const commandsDir = path.join(PACKAGE_ROOT, '
|
|
2788
|
+
const commandsDir = path.join(PACKAGE_ROOT, 'rcode', 'commands');
|
|
2566
2789
|
if (fs.existsSync(commandsDir)) {
|
|
2567
2790
|
const cmdCount = fs.readdirSync(commandsDir).filter(f => f.endsWith('.md') && !f.startsWith('_')).length;
|
|
2568
2791
|
expected.commands = tolerate(cmdCount);
|
|
@@ -2580,23 +2803,23 @@ function runInstallHealthCheck(target, counts) {
|
|
|
2580
2803
|
}
|
|
2581
2804
|
}
|
|
2582
2805
|
|
|
2583
|
-
check('
|
|
2584
|
-
const toolsPath = path.join(target, '.
|
|
2585
|
-
if (!fs.existsSync(toolsPath)) throw new Error('bin/
|
|
2806
|
+
check('rcode-tools.cjs runs', () => {
|
|
2807
|
+
const toolsPath = path.join(target, '.rcode', 'bin', 'rcode-tools.cjs');
|
|
2808
|
+
if (!fs.existsSync(toolsPath)) throw new Error('bin/rcode-tools.cjs not installed');
|
|
2586
2809
|
execFileSync('node', ['-c', toolsPath], { stdio: 'pipe' });
|
|
2587
2810
|
return 'syntax ok';
|
|
2588
2811
|
});
|
|
2589
2812
|
|
|
2590
|
-
check('.
|
|
2591
|
-
const p = path.join(target, '.
|
|
2813
|
+
check('.rcode/config.yaml present', () => {
|
|
2814
|
+
const p = path.join(target, '.rcode', 'config.yaml');
|
|
2592
2815
|
if (!fs.existsSync(p)) throw new Error('missing');
|
|
2593
2816
|
const text = fs.readFileSync(p, 'utf8');
|
|
2594
2817
|
if (!/user_name:|project_name:/.test(text)) throw new Error('config.yaml incomplete');
|
|
2595
2818
|
return `${fs.statSync(p).size} bytes`;
|
|
2596
2819
|
});
|
|
2597
2820
|
|
|
2598
|
-
check('.
|
|
2599
|
-
const p = path.join(target, '.
|
|
2821
|
+
check('.rcode/state.json parses', () => {
|
|
2822
|
+
const p = path.join(target, '.rcode', 'state.json');
|
|
2600
2823
|
if (!fs.existsSync(p)) throw new Error('missing');
|
|
2601
2824
|
JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
2602
2825
|
return 'valid JSON';
|
|
@@ -2620,7 +2843,7 @@ function runInstallHealthCheck(target, counts) {
|
|
|
2620
2843
|
if (fails > 0) {
|
|
2621
2844
|
console.log('');
|
|
2622
2845
|
console.log(' ' + fail(`${fails} health check${fails === 1 ? '' : 's'} failed — install may be broken.`));
|
|
2623
|
-
console.log(dim(' Debug: node .
|
|
2846
|
+
console.log(dim(' Debug: node .rcode/bin/rcode-tools.cjs state read && ls -la .rcode/'));
|
|
2624
2847
|
console.log(dim(' Reinstall: rcode install . --force'));
|
|
2625
2848
|
console.log('');
|
|
2626
2849
|
return false;
|
|
@@ -2669,7 +2892,7 @@ async function runInstallWizard(opts) {
|
|
|
2669
2892
|
const pkgVersion = readPackageVersion();
|
|
2670
2893
|
|
|
2671
2894
|
console.log('');
|
|
2672
|
-
intro(pc.bold('🕌
|
|
2895
|
+
intro(pc.bold('🕌 rcode') + pc.dim(` v${pkgVersion}`));
|
|
2673
2896
|
|
|
2674
2897
|
// ── 1. Install directory ──────────────────────────────────────────────
|
|
2675
2898
|
if (!opts.targetProvided) {
|
|
@@ -2774,7 +2997,7 @@ async function runInstallWizard(opts) {
|
|
|
2774
2997
|
if (require.main === module) main();
|
|
2775
2998
|
|
|
2776
2999
|
/**
|
|
2777
|
-
* Handler for cli/index.js — called as `npx
|
|
3000
|
+
* Handler for cli/index.js — called as `npx rcode install [args]`.
|
|
2778
3001
|
* Converts the index.js-style (args, ctx) signature into a cli/install.js
|
|
2779
3002
|
* parseArgs-compatible argv and runs install().
|
|
2780
3003
|
*/
|