cc-devflow 4.2.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/cc-act/CHANGELOG.md +64 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +212 -0
- package/.claude/skills/cc-act/SKILL.md +322 -0
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +64 -0
- package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +25 -0
- package/.claude/skills/cc-act/references/closure-contract.md +49 -0
- package/.claude/skills/cc-act/references/git-commit-guidelines.md +83 -0
- package/.claude/skills/cc-act/scripts/archive-requirement.sh +49 -0
- package/.claude/skills/cc-act/scripts/cc-act-common.sh +240 -0
- package/.claude/skills/cc-act/scripts/detect-ship-target.sh +82 -0
- package/.claude/skills/cc-act/scripts/generate-status-report.sh +83 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +195 -0
- package/.claude/skills/cc-act/scripts/sync-act-docs.sh +315 -0
- package/.claude/skills/cc-act/scripts/verify-act-gate.sh +63 -0
- package/.claude/skills/cc-check/CHANGELOG.md +73 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +153 -0
- package/.claude/skills/cc-check/SKILL.md +345 -0
- package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +50 -0
- package/.claude/skills/cc-check/references/gate-contract.md +29 -0
- package/.claude/skills/cc-check/references/review-contract.md +45 -0
- package/.claude/skills/cc-check/scripts/render-report-card.js +229 -0
- package/.claude/skills/cc-check/scripts/run-quality-gates.sh +86 -0
- package/.claude/skills/cc-check/scripts/verify-gate.sh +57 -0
- package/.claude/skills/cc-do/CHANGELOG.md +49 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +119 -0
- package/.claude/skills/cc-do/SKILL.md +216 -0
- package/.claude/skills/cc-do/references/execution-recovery.md +86 -0
- package/.claude/skills/cc-do/references/parallel-dispatch.md +80 -0
- package/.claude/skills/cc-do/scripts/build-task-context.sh +184 -0
- package/.claude/skills/cc-do/scripts/cc-do-common.sh +79 -0
- package/.claude/skills/cc-do/scripts/check-task-status.sh +92 -0
- package/.claude/skills/cc-do/scripts/detect-file-conflicts.sh +87 -0
- package/.claude/skills/cc-do/scripts/mark-task-complete.sh +119 -0
- package/.claude/skills/cc-do/scripts/record-review-decision.sh +89 -0
- package/.claude/skills/cc-do/scripts/recover-workflow.sh +84 -0
- package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +70 -0
- package/.claude/skills/cc-do/scripts/select-ready-tasks.sh +135 -0
- package/.claude/skills/cc-do/scripts/verify-task-gates.sh +94 -0
- package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +102 -0
- package/.claude/skills/cc-investigate/CHANGELOG.md +26 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +49 -0
- package/.claude/skills/cc-investigate/SKILL.md +221 -0
- package/.claude/skills/cc-investigate/assets/ANALYSIS_TEMPLATE.md +55 -0
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +52 -0
- package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +103 -0
- package/.claude/skills/cc-investigate/references/investigation-contract.md +28 -0
- package/.claude/skills/cc-investigate/scripts/bootstrap-analysis.sh +38 -0
- package/.claude/skills/cc-plan/CHANGELOG.md +99 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +106 -0
- package/.claude/skills/cc-plan/SKILL.md +325 -0
- package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +155 -0
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +98 -0
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +108 -0
- package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +79 -0
- package/.claude/skills/cc-plan/references/planning-contract.md +82 -0
- package/.claude/skills/cc-plan/scripts/bump-skill-version.sh +103 -0
- package/.claude/skills/cc-plan/scripts/parse-task-dependencies.js +75 -0
- package/.claude/skills/cc-plan/scripts/validate-scope.sh +78 -0
- package/.claude/skills/cc-roadmap/CHANGELOG.md +114 -0
- package/.claude/skills/cc-roadmap/PLAYBOOK.md +136 -0
- package/.claude/skills/cc-roadmap/SKILL.md +259 -0
- package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +45 -0
- package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +153 -0
- package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +48 -0
- package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +37 -0
- package/.claude/skills/cc-roadmap/scripts/bump-skill-version.sh +103 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/markdown.js +604 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/query.js +63 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/schema.js +245 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/store.js +139 -0
- package/.claude/skills/cc-roadmap/scripts/locate-roadmap-item.sh +109 -0
- package/.claude/skills/cc-roadmap/scripts/roadmap-tracking.js +153 -0
- package/.claude/skills/cc-roadmap/scripts/sync-roadmap-progress.sh +100 -0
- package/.claude/skills/cc-simplify/CHANGELOG.md +10 -0
- package/.claude/skills/cc-simplify/SKILL.md +55 -0
- package/.claude/skills/cc-spec-init/CHANGELOG.md +7 -0
- package/.claude/skills/cc-spec-init/PLAYBOOK.md +55 -0
- package/.claude/skills/cc-spec-init/SKILL.md +127 -0
- package/.claude/skills/cc-spec-init/assets/CAPABILITY_TEMPLATE.md +63 -0
- package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +25 -0
- package/.claude/skills/cc-spec-init/assets/INDEX_TEMPLATE.md +34 -0
- package/.claude/skills/cc-spec-init/references/spec-contract.md +22 -0
- package/.claude/skills/cc-spec-init/scripts/bootstrap-specs.sh +31 -0
- package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +45 -0
- package/CHANGELOG.md +101 -4
- package/README.md +120 -755
- package/README.zh-CN.md +119 -755
- package/bin/adapt.js +2 -6
- package/bin/cc-devflow-cli.js +72 -177
- package/config/distributable-skills.json +24 -0
- package/docs/CLAUDE.md +10 -6
- package/docs/commands/README.md +19 -46
- package/docs/commands/README.zh-CN.md +25 -48
- package/docs/examples/BY-ARTIFACT.md +7 -0
- package/docs/examples/README.md +38 -0
- package/docs/examples/START-HERE.md +149 -0
- package/docs/examples/example-bindings.json +38 -0
- package/docs/examples/full-design-blocked/BACKLOG.md +45 -0
- package/docs/examples/full-design-blocked/README.md +55 -0
- package/docs/examples/full-design-blocked/ROADMAP.md +53 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +154 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +146 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +78 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +52 -0
- package/docs/examples/full-design-blocked/roadmap-tracking.json +50 -0
- package/docs/examples/local-handoff/BACKLOG.md +45 -0
- package/docs/examples/local-handoff/README.md +56 -0
- package/docs/examples/local-handoff/ROADMAP.md +45 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +39 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +29 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +71 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +98 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +59 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +44 -0
- package/docs/examples/local-handoff/roadmap-tracking.json +48 -0
- package/docs/examples/pdca-loop/BACKLOG.md +46 -0
- package/docs/examples/pdca-loop/README.md +58 -0
- package/docs/examples/pdca-loop/ROADMAP.md +133 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +72 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +29 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +72 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +201 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +73 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +44 -0
- package/docs/examples/pdca-loop/roadmap-tracking.json +114 -0
- package/docs/examples/scripts/check-example-bindings.sh +116 -0
- package/docs/guides/getting-started.md +94 -129
- package/docs/guides/getting-started.zh-CN.md +103 -84
- package/docs/skill-runtime-migration.md +46 -0
- package/docs/v4.3.0-migration-guide.md +111 -0
- package/lib/compiler/CLAUDE.md +55 -84
- package/lib/compiler/__tests__/drift.test.js +1 -1
- package/lib/compiler/__tests__/errors.test.js +0 -1
- package/lib/compiler/__tests__/integration.test.js +49 -3
- package/lib/compiler/__tests__/manifest.test.js +0 -156
- package/lib/compiler/__tests__/parser.test.js +33 -104
- package/lib/compiler/__tests__/schemas.test.js +30 -34
- package/lib/compiler/__tests__/skills-registry.test.js +114 -0
- package/lib/compiler/__tests__/transformer.test.js +5 -9
- package/lib/compiler/emitters/antigravity-emitter.js +5 -213
- package/lib/compiler/emitters/base-emitter.js +3 -298
- package/lib/compiler/emitters/codex-emitter.js +4 -202
- package/lib/compiler/emitters/cursor-emitter.js +3 -287
- package/lib/compiler/emitters/qwen-emitter.js +4 -176
- package/lib/compiler/index.js +65 -345
- package/lib/compiler/manifest.js +6 -68
- package/lib/compiler/parser.js +31 -63
- package/lib/compiler/platforms.js +32 -277
- package/lib/compiler/resource-copier.js +176 -6
- package/lib/compiler/rules-emitters/__tests__/antigravity-rules-emitter.test.js +3 -3
- package/lib/compiler/rules-emitters/__tests__/cursor-rules-emitter.test.js +14 -4
- package/lib/compiler/rules-emitters/__tests__/qwen-rules-emitter.test.js +16 -7
- package/lib/compiler/rules-emitters/antigravity-rules-emitter.js +10 -15
- package/lib/compiler/rules-emitters/base-rules-emitter.js +5 -5
- package/lib/compiler/rules-emitters/cursor-rules-emitter.js +7 -12
- package/lib/compiler/rules-emitters/index.js +6 -3
- package/lib/compiler/rules-emitters/qwen-rules-emitter.js +7 -7
- package/lib/compiler/schemas.js +8 -4
- package/lib/compiler/skills-registry.js +213 -15
- package/lib/compiler/transformer.js +1 -1
- package/lib/skill-runtime/CLAUDE.md +19 -0
- package/lib/skill-runtime/__tests__/autopilot.test.js +210 -0
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +181 -0
- package/lib/skill-runtime/__tests__/delegation.test.js +97 -0
- package/lib/skill-runtime/__tests__/dispatch.test.js +267 -0
- package/lib/skill-runtime/__tests__/intent.test.js +219 -0
- package/lib/skill-runtime/__tests__/lifecycle.test.js +169 -0
- package/lib/skill-runtime/__tests__/paths.test.js +42 -0
- package/lib/skill-runtime/__tests__/planner.tdd.test.js +250 -0
- package/lib/skill-runtime/__tests__/prepare-pr.test.js +139 -0
- package/lib/skill-runtime/__tests__/query.test.js +284 -0
- package/lib/skill-runtime/__tests__/runtime.integration.test.js +279 -0
- package/lib/skill-runtime/__tests__/schemas.test.js +207 -0
- package/lib/skill-runtime/__tests__/team-state.test.js +51 -0
- package/lib/skill-runtime/__tests__/worker-run.test.js +253 -0
- package/lib/skill-runtime/__tests__/worker.test.js +56 -0
- package/lib/skill-runtime/artifacts.js +93 -0
- package/lib/skill-runtime/delegation.js +533 -0
- package/lib/skill-runtime/index.js +34 -0
- package/lib/skill-runtime/intent.js +333 -0
- package/lib/skill-runtime/lifecycle.js +294 -0
- package/lib/skill-runtime/operations/CLAUDE.md +19 -0
- package/lib/skill-runtime/operations/approve.js +66 -0
- package/lib/skill-runtime/operations/autopilot-core.js +337 -0
- package/lib/skill-runtime/operations/autopilot-execution.js +307 -0
- package/lib/skill-runtime/operations/autopilot-shared.js +48 -0
- package/lib/skill-runtime/operations/autopilot.js +163 -0
- package/lib/skill-runtime/operations/dispatch.js +454 -0
- package/lib/skill-runtime/operations/init.js +64 -0
- package/lib/{harness → skill-runtime}/operations/janitor.js +9 -6
- package/lib/skill-runtime/operations/plan.js +59 -0
- package/lib/skill-runtime/operations/prepare-pr.js +25 -0
- package/lib/{harness → skill-runtime}/operations/release.js +18 -5
- package/lib/skill-runtime/operations/resume.js +143 -0
- package/lib/skill-runtime/operations/snapshot.js +45 -0
- package/lib/skill-runtime/operations/verify.js +170 -0
- package/lib/skill-runtime/operations/worker-run.js +529 -0
- package/lib/skill-runtime/operations/worker.js +33 -0
- package/lib/skill-runtime/paths.js +213 -0
- package/lib/skill-runtime/planner.js +519 -0
- package/lib/skill-runtime/query.js +157 -0
- package/lib/skill-runtime/review.js +557 -0
- package/lib/skill-runtime/schemas.js +400 -0
- package/lib/{harness → skill-runtime}/store.js +45 -30
- package/lib/skill-runtime/team-state.js +122 -0
- package/package.json +13 -11
- package/.claude/CLAUDE.md +0 -125
- package/.claude/agents/architecture-designer.md +0 -443
- package/.claude/agents/bug-analyzer.md +0 -381
- package/.claude/agents/checklist-agent.md +0 -175
- package/.claude/agents/clarify-analyst.md +0 -50
- package/.claude/agents/code-quality-reviewer.md +0 -205
- package/.claude/agents/code-reviewer.md +0 -71
- package/.claude/agents/codex-analyzer.md +0 -39
- package/.claude/agents/compatibility-checker.md +0 -579
- package/.claude/agents/consistency-checker.md +0 -532
- package/.claude/agents/dev-implementer.md +0 -195
- package/.claude/agents/flow-researcher.md +0 -132
- package/.claude/agents/impact-analyzer.md +0 -440
- package/.claude/agents/planner.md +0 -230
- package/.claude/agents/prd-writer.md +0 -320
- package/.claude/agents/project-guidelines-generator.md +0 -1329
- package/.claude/agents/qa-tester.md +0 -313
- package/.claude/agents/release-manager.md +0 -295
- package/.claude/agents/security-reviewer.md +0 -314
- package/.claude/agents/spec-reviewer.md +0 -221
- package/.claude/agents/style-guide-generator.md +0 -458
- package/.claude/agents/tech-architect.md +0 -516
- package/.claude/agents/ui-designer.md +0 -485
- package/.claude/commands/core/architecture.md +0 -459
- package/.claude/commands/core/guidelines.md +0 -511
- package/.claude/commands/core/roadmap.md +0 -468
- package/.claude/commands/core/style.md +0 -83
- package/.claude/commands/flow/CLAUDE.md +0 -28
- package/.claude/commands/flow/archive.md +0 -280
- package/.claude/commands/flow/checklist.md +0 -18
- package/.claude/commands/flow/clarify.md +0 -18
- package/.claude/commands/flow/constitution.md +0 -82
- package/.claude/commands/flow/context.md +0 -150
- package/.claude/commands/flow/delta.md +0 -245
- package/.claude/commands/flow/dev.md +0 -40
- package/.claude/commands/flow/fix.md +0 -217
- package/.claude/commands/flow/ideate.md +0 -214
- package/.claude/commands/flow/init.md +0 -38
- package/.claude/commands/flow/new.md +0 -23
- package/.claude/commands/flow/quality.md +0 -21
- package/.claude/commands/flow/release.md +0 -36
- package/.claude/commands/flow/restart.md +0 -97
- package/.claude/commands/flow/spec.md +0 -36
- package/.claude/commands/flow/status.md +0 -64
- package/.claude/commands/flow/update.md +0 -111
- package/.claude/commands/flow/upgrade.md +0 -115
- package/.claude/commands/flow/verify.md +0 -37
- package/.claude/commands/flow/workspace.md +0 -155
- package/.claude/commands/util/cancel-ralph.md +0 -60
- package/.claude/commands/util/code-review.md +0 -58
- package/.claude/commands/util/git-commit.md +0 -422
- package/.claude/commands/util/problem-analyzer.md +0 -60
- package/.claude/config/quality-gates.yml +0 -305
- package/.claude/config/quality-rules.yml +0 -161
- package/.claude/docs/SPEC_KIT_CONSTITUTION_ANALYSIS.md +0 -426
- package/.claude/docs/design/consistency-conflict-detection-algorithms.md +0 -658
- package/.claude/docs/design/intent-driven-input-design.md +0 -380
- package/.claude/docs/design/prd-version-management-design.md +0 -437
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +0 -117
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +0 -99
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +0 -188
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +0 -338
- package/.claude/docs/guides/TEAM_MODE_GUIDE.md +0 -312
- package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +0 -633
- package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +0 -156
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +0 -261
- package/.claude/docs/templates/BRAINSTORM_TEMPLATE.md +0 -148
- package/.claude/docs/templates/CHECKLIST_TEMPLATE.md +0 -52
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +0 -206
- package/.claude/docs/templates/CODE_REVIEW_TEMPLATE.md +0 -71
- package/.claude/docs/templates/DELTA_SPEC_TEMPLATE.md +0 -91
- package/.claude/docs/templates/DESIGN_DECISIONS_TEMPLATE.md +0 -151
- package/.claude/docs/templates/EPIC_TEMPLATE.md +0 -805
- package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +0 -80
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +0 -198
- package/.claude/docs/templates/INTENT_CLARIFICATION_TEMPLATE.md +0 -57
- package/.claude/docs/templates/JOURNAL_TEMPLATE.md +0 -75
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +0 -76
- package/.claude/docs/templates/PRD_TEMPLATE.md +0 -562
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +0 -276
- package/.claude/docs/templates/REVIEW-HIGH.md +0 -57
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +0 -198
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +0 -310
- package/.claude/docs/templates/STYLE_TEMPLATE.md +0 -1266
- package/.claude/docs/templates/TASKS_TEMPLATE.md +0 -523
- package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +0 -1019
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +0 -1435
- package/.claude/docs/templates/_shared/CLAUDE.md +0 -36
- package/.claude/docs/templates/_shared/CONSTITUTION_CHECK.md +0 -125
- package/.claude/docs/templates/_shared/VALIDATION_CHECKLIST.md +0 -187
- package/.claude/docs/templates/_shared/YAML_FRONTMATTER.md +0 -164
- package/.claude/docs/templates/context/dev.jsonl.template +0 -6
- package/.claude/docs/templates/context/epic.jsonl.template +0 -5
- package/.claude/docs/templates/context/prd.jsonl.template +0 -4
- package/.claude/docs/templates/context/research.jsonl.template +0 -4
- package/.claude/docs/templates/context/review.jsonl.template +0 -5
- package/.claude/docs/templates/context/tech.jsonl.template +0 -5
- package/.claude/guides/agent-guides/agent-coordination-guide.md +0 -459
- package/.claude/guides/project-guidelines-system.md +0 -463
- package/.claude/guides/technical-guides/datetime-handling-guide.md +0 -563
- package/.claude/guides/technical-guides/git-github-guide.md +0 -642
- package/.claude/guides/technical-guides/test-execution-guide.md +0 -618
- package/.claude/guides/workflow-guides/bug-fix-orchestrator.md +0 -217
- package/.claude/guides/workflow-guides/flow-orchestrator.md +0 -48
- package/.claude/hooks/CLAUDE.md +0 -342
- package/.claude/hooks/checklist-gate.js +0 -397
- package/.claude/hooks/error-handling-reminder.sh +0 -12
- package/.claude/hooks/error-handling-reminder.ts +0 -459
- package/.claude/hooks/hooks.json +0 -15
- package/.claude/hooks/inject-agent-context.ts +0 -480
- package/.claude/hooks/inject-skill-context.ts +0 -359
- package/.claude/hooks/post-tool-use-tracker.sh +0 -280
- package/.claude/hooks/pre-tool-use-guardrail.sh +0 -36
- package/.claude/hooks/pre-tool-use-guardrail.ts +0 -342
- package/.claude/hooks/ralph-loop.ts +0 -931
- package/.claude/hooks/ralph-stop-hook.sh +0 -190
- package/.claude/hooks/skill-activation-prompt.sh +0 -36
- package/.claude/hooks/skill-activation-prompt.ts +0 -214
- package/.claude/hooks/state/skills-used-test-guard.json +0 -3
- package/.claude/hooks/task-completed-hook.ts +0 -593
- package/.claude/hooks/teammate-idle-hook.ts +0 -690
- package/.claude/hooks/types/team-types.d.ts +0 -238
- package/.claude/rules/devflow-conventions.md +0 -286
- package/.claude/rules/project-constitution.md +0 -1002
- package/.claude/rules/rationalization-library.md +0 -282
- package/.claude/schemas/constitution.schema.json +0 -43
- package/.claude/scripts/CLAUDE.md +0 -76
- package/.claude/scripts/analyze-upgrade-impact.sh +0 -200
- package/.claude/scripts/archive-requirement.sh +0 -394
- package/.claude/scripts/calculate-checklist-completion.sh +0 -243
- package/.claude/scripts/calculate-quarter.sh +0 -206
- package/.claude/scripts/check-dependencies.sh +0 -409
- package/.claude/scripts/check-prerequisites.sh +0 -232
- package/.claude/scripts/check-task-status.sh +0 -288
- package/.claude/scripts/checklist-errors.sh +0 -131
- package/.claude/scripts/common.sh +0 -1102
- package/.claude/scripts/consolidate-research.sh +0 -182
- package/.claude/scripts/create-requirement.sh +0 -451
- package/.claude/scripts/delta-parser.ts +0 -527
- package/.claude/scripts/detect-file-conflicts.sh +0 -151
- package/.claude/scripts/export-contracts.sh +0 -117
- package/.claude/scripts/extract-data-model.sh +0 -78
- package/.claude/scripts/flow-context-add.sh +0 -134
- package/.claude/scripts/flow-context-init.sh +0 -133
- package/.claude/scripts/flow-context-validate.sh +0 -144
- package/.claude/scripts/flow-delta-apply.sh +0 -297
- package/.claude/scripts/flow-delta-archive.sh +0 -71
- package/.claude/scripts/flow-delta-create.sh +0 -202
- package/.claude/scripts/flow-delta-list.sh +0 -142
- package/.claude/scripts/flow-delta-status.sh +0 -235
- package/.claude/scripts/flow-quality-full.sh +0 -215
- package/.claude/scripts/flow-quality-quick.sh +0 -119
- package/.claude/scripts/flow-workspace-init.sh +0 -117
- package/.claude/scripts/flow-workspace-record.sh +0 -164
- package/.claude/scripts/generate-clarification-questions.sh +0 -377
- package/.claude/scripts/generate-clarification-report.sh +0 -463
- package/.claude/scripts/generate-quickstart.sh +0 -146
- package/.claude/scripts/generate-research-tasks.sh +0 -157
- package/.claude/scripts/generate-status-report.sh +0 -523
- package/.claude/scripts/generate-tech-analysis.sh +0 -46
- package/.claude/scripts/get-workflow-status.sh +0 -415
- package/.claude/scripts/locate-requirement-in-roadmap.sh +0 -233
- package/.claude/scripts/manage-constitution.sh +0 -602
- package/.claude/scripts/mark-task-complete.sh +0 -198
- package/.claude/scripts/parse-task-dependencies.js +0 -334
- package/.claude/scripts/populate-research-tasks.sh +0 -284
- package/.claude/scripts/record-quality-error.sh +0 -165
- package/.claude/scripts/recover-workflow.sh +0 -463
- package/.claude/scripts/run-clarify-scan.sh +0 -601
- package/.claude/scripts/run-high-review.sh +0 -62
- package/.claude/scripts/run-problem-analysis.sh +0 -68
- package/.claude/scripts/run-quality-gates.sh +0 -242
- package/.claude/scripts/setup-epic.sh +0 -173
- package/.claude/scripts/setup-ralph-loop.sh +0 -155
- package/.claude/scripts/sync-roadmap-progress.sh +0 -300
- package/.claude/scripts/sync-task-marks.sh +0 -199
- package/.claude/scripts/team-dev-init.sh +0 -319
- package/.claude/scripts/team-state-recovery.sh +0 -229
- package/.claude/scripts/test-clarify-scan.sh +0 -515
- package/.claude/scripts/update-agent-context.sh +0 -806
- package/.claude/scripts/validate-constitution.sh +0 -567
- package/.claude/scripts/validate-hooks.sh +0 -487
- package/.claude/scripts/validate-research.sh +0 -332
- package/.claude/scripts/validate-scope-boundary.sh +0 -493
- package/.claude/scripts/verify-gate.sh +0 -269
- package/.claude/scripts/verify-setup.sh +0 -37
- package/.claude/scripts/workflow-status.ts +0 -433
- package/.claude/settings.json +0 -95
- package/.claude/skills/_reference-implementations/README.md +0 -96
- package/.claude/skills/_reference-implementations/backend-express-prisma/SKILL.md +0 -302
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/architecture-overview.md +0 -451
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/async-and-errors.md +0 -307
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/complete-examples.md +0 -638
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/configuration.md +0 -275
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/database-patterns.md +0 -224
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/middleware-guide.md +0 -213
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/routing-and-controllers.md +0 -756
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/sentry-and-monitoring.md +0 -336
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/services-and-repositories.md +0 -789
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/testing-guide.md +0 -235
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/validation-patterns.md +0 -754
- package/.claude/skills/_reference-implementations/frontend-react-mui/SKILL.md +0 -399
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/common-patterns.md +0 -331
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/complete-examples.md +0 -872
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/component-patterns.md +0 -502
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/data-fetching.md +0 -767
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/file-organization.md +0 -502
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/loading-and-error-states.md +0 -501
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/performance.md +0 -406
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/routing-guide.md +0 -364
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/styling-guide.md +0 -428
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/typescript-standards.md +0 -418
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +0 -169
- package/.claude/skills/domain/attention-refresh/SKILL.md +0 -170
- package/.claude/skills/domain/brainstorming/SKILL.md +0 -161
- package/.claude/skills/domain/debugging/SKILL.md +0 -221
- package/.claude/skills/domain/finishing-branch/SKILL.md +0 -189
- package/.claude/skills/domain/receiving-review/SKILL.md +0 -153
- package/.claude/skills/domain/tdd/SKILL.md +0 -218
- package/.claude/skills/domain/verification/SKILL.md +0 -158
- package/.claude/skills/guardrail/constitution-guardian/SKILL.md +0 -306
- package/.claude/skills/guardrail/tdd-enforcer/SKILL.md +0 -192
- package/.claude/skills/skill-rules.json +0 -359
- package/.claude/skills/utility/constitution-quick-ref/SKILL.md +0 -374
- package/.claude/skills/utility/file-standards/SKILL.md +0 -353
- package/.claude/skills/utility/fractal-docs/SKILL.md +0 -45
- package/.claude/skills/utility/journey-checker/SKILL.md +0 -199
- package/.claude/skills/utility/journey-checker/pressure-scenarios.md +0 -164
- package/.claude/skills/utility/npm-release/SKILL.md +0 -314
- package/.claude/skills/utility/skill-creator/LICENSE.txt +0 -202
- package/.claude/skills/utility/skill-creator/SKILL.md +0 -356
- package/.claude/skills/utility/skill-creator/references/output-patterns.md +0 -82
- package/.claude/skills/utility/skill-creator/references/workflows.md +0 -28
- package/.claude/skills/utility/skill-creator/scripts/init_skill.py +0 -303
- package/.claude/skills/utility/skill-creator/scripts/package_skill.py +0 -110
- package/.claude/skills/utility/skill-creator/scripts/quick_validate.py +0 -95
- package/.claude/skills/workflow/CLAUDE.md +0 -24
- package/.claude/skills/workflow/flow-dev/CLAUDE.md +0 -16
- package/.claude/skills/workflow/flow-dev/SKILL.md +0 -94
- package/.claude/skills/workflow/flow-dev/assets/IMPLEMENTATION_PLAN_TEMPLATE.md +0 -71
- package/.claude/skills/workflow/flow-dev/context.jsonl +0 -4
- package/.claude/skills/workflow/flow-dev/dev-implementer.jsonl +0 -8
- package/.claude/skills/workflow/flow-dev/scripts/entry-gate.sh +0 -116
- package/.claude/skills/workflow/flow-dev/scripts/exit-gate.sh +0 -101
- package/.claude/skills/workflow/flow-dev/scripts/task-orchestrator.sh +0 -106
- package/.claude/skills/workflow/flow-fix/SKILL.md +0 -105
- package/.claude/skills/workflow/flow-fix/context.jsonl +0 -6
- package/.claude/skills/workflow/flow-fix/references/bug-analyzer.md +0 -381
- package/.claude/skills/workflow/flow-init/SKILL.md +0 -84
- package/.claude/skills/workflow/flow-init/assets/BRAINSTORM_TEMPLATE.md +0 -148
- package/.claude/skills/workflow/flow-init/assets/INIT_FLOW_TEMPLATE.md +0 -198
- package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +0 -276
- package/.claude/skills/workflow/flow-init/context.jsonl +0 -5
- package/.claude/skills/workflow/flow-init/references/flow-researcher.md +0 -132
- package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +0 -240
- package/.claude/skills/workflow/flow-init/scripts/consolidate-research.sh +0 -182
- package/.claude/skills/workflow/flow-init/scripts/create-requirement.sh +0 -404
- package/.claude/skills/workflow/flow-init/scripts/generate-research-tasks.sh +0 -157
- package/.claude/skills/workflow/flow-init/scripts/populate-research-tasks.sh +0 -284
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +0 -340
- package/.claude/skills/workflow/flow-quality/SKILL.md +0 -98
- package/.claude/skills/workflow/flow-quality/context.jsonl +0 -6
- package/.claude/skills/workflow/flow-quality/references/code-quality-reviewer.md +0 -205
- package/.claude/skills/workflow/flow-quality/references/qa-tester.md +0 -313
- package/.claude/skills/workflow/flow-quality/references/security-reviewer.md +0 -314
- package/.claude/skills/workflow/flow-quality/references/spec-reviewer.md +0 -221
- package/.claude/skills/workflow/flow-release/SKILL.md +0 -49
- package/.claude/skills/workflow/flow-release/context.jsonl +0 -5
- package/.claude/skills/workflow/flow-release/references/release-manager.md +0 -295
- package/.claude/skills/workflow/flow-spec/CLAUDE.md +0 -17
- package/.claude/skills/workflow/flow-spec/SKILL.md +0 -74
- package/.claude/skills/workflow/flow-spec/context.jsonl +0 -5
- package/.claude/skills/workflow/flow-spec/scripts/entry-gate.sh +0 -194
- package/.claude/skills/workflow/flow-spec/scripts/exit-gate.sh +0 -244
- package/.claude/skills/workflow/flow-spec/scripts/parallel-orchestrator.sh +0 -205
- package/.claude/skills/workflow/flow-spec/scripts/team-communication.sh +0 -353
- package/.claude/skills/workflow/flow-spec/scripts/team-init.sh +0 -195
- package/.claude/skills/workflow/flow-spec/scripts/test-team-mode.sh +0 -496
- package/.claude/skills/workflow/flow-spec/team-config.json +0 -165
- package/.claude/skills/workflow/flow-verify/CLAUDE.md +0 -10
- package/.claude/skills/workflow/flow-verify/SKILL.md +0 -53
- package/.claude/skills/workflow/flow-verify/context.jsonl +0 -5
- package/.claude/skills/workflow.yaml +0 -219
- package/.claude/tests/README.md +0 -300
- package/.claude/tests/TODO.md +0 -69
- package/.claude/tests/__pycache__/test_analyze_upgrade_impact.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_consolidate_research.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_export_contracts.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_extract_data_model.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_quickstart.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_research_tasks.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/constitution/run_all_constitution_tests.sh +0 -111
- package/.claude/tests/constitution/test_agent_assignment.sh +0 -207
- package/.claude/tests/constitution/test_article_coverage.sh +0 -201
- package/.claude/tests/constitution/test_template_completeness.sh +0 -150
- package/.claude/tests/constitution/test_version_consistency.sh +0 -120
- package/.claude/tests/fixtures/spec_delta_full.md +0 -16
- package/.claude/tests/fixtures/tasks_progress_sample.md +0 -5
- package/.claude/tests/run-all-tests.sh +0 -229
- package/.claude/tests/scripts/run.sh +0 -30
- package/.claude/tests/scripts/test-framework.sh +0 -128
- package/.claude/tests/scripts/test_check_prerequisites.sh +0 -511
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak +0 -504
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak2 +0 -505
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak3 +0 -506
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak4 +0 -507
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak5 +0 -508
- package/.claude/tests/scripts/test_check_task_status.sh +0 -499
- package/.claude/tests/scripts/test_common.sh +0 -244
- package/.claude/tests/scripts/test_generate_status_report.sh +0 -71
- package/.claude/tests/scripts/test_mark_task_complete.sh +0 -441
- package/.claude/tests/scripts/test_mark_task_complete.sh.backup +0 -410
- package/.claude/tests/scripts/test_recover_workflow.sh +0 -304
- package/.claude/tests/scripts/test_setup_epic.sh +0 -437
- package/.claude/tests/scripts/test_sync_task_marks.sh +0 -196
- package/.claude/tests/scripts/test_validate_constitution.sh +0 -74
- package/.claude/tests/scripts/test_validate_research.sh +0 -462
- package/.claude/tests/slugify.bats +0 -82
- package/.claude/tests/test-framework.sh +0 -732
- package/.claude/tests/test_analyze_upgrade_impact.py +0 -34
- package/.claude/tests/test_consolidate_research.py +0 -48
- package/.claude/tests/test_export_contracts.py +0 -43
- package/.claude/tests/test_extract_data_model.py +0 -33
- package/.claude/tests/test_generate_quickstart.py +0 -50
- package/.claude/tests/test_generate_research_tasks.py +0 -52
- package/bin/harness.js +0 -22
- package/docs/commands/core-roadmap.md +0 -106
- package/docs/commands/core-roadmap.zh-CN.md +0 -102
- package/docs/commands/core-style.md +0 -53
- package/docs/commands/core-style.zh-CN.md +0 -53
- package/docs/commands/flow-init.md +0 -140
- package/docs/commands/flow-init.zh-CN.md +0 -169
- package/docs/commands/flow-new.md +0 -39
- package/docs/commands/flow-new.zh-CN.md +0 -39
- package/lib/compiler/__tests__/compile-regression.test.js +0 -103
- package/lib/compiler/__tests__/multi-module-emitters.test.js +0 -534
- package/lib/compiler/__tests__/resource-copier.test.js +0 -26
- package/lib/compiler/__tests__/skill-discovery.test.js +0 -72
- package/lib/compiler/context-expander.js +0 -179
- package/lib/compiler/rules-emitters/__tests__/codex-rules-emitter.test.js +0 -109
- package/lib/compiler/rules-emitters/codex-rules-emitter.js +0 -116
- package/lib/compiler/skill-discovery.js +0 -68
- package/lib/harness/CLAUDE.md +0 -21
- package/lib/harness/cli.js +0 -208
- package/lib/harness/index.js +0 -16
- package/lib/harness/operations/dispatch.js +0 -285
- package/lib/harness/operations/init.js +0 -48
- package/lib/harness/operations/pack.js +0 -100
- package/lib/harness/operations/plan.js +0 -29
- package/lib/harness/operations/resume.js +0 -44
- package/lib/harness/operations/verify.js +0 -163
- package/lib/harness/planner.js +0 -141
- package/lib/harness/schemas.js +0 -108
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: flow-workspace
|
|
3
|
-
description: Manage developer workspace and session persistence (RM-018)
|
|
4
|
-
version: 3.0.0
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /flow-workspace
|
|
8
|
-
|
|
9
|
-
> **[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Manage developer workspaces for session persistence.
|
|
14
|
-
Enables context recovery across sessions and tracks development progress.
|
|
15
|
-
|
|
16
|
-
## Usage
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
# Initialize workspace for a developer
|
|
20
|
-
/flow-workspace init [developer]
|
|
21
|
-
|
|
22
|
-
# Start session (recover context)
|
|
23
|
-
/flow-workspace start [REQ-XXX|BUG-XXX]
|
|
24
|
-
/flow-workspace start REQ-XXX --switch
|
|
25
|
-
/flow-workspace start BUG-XXX --switch --cd # 需 source/eval 场景
|
|
26
|
-
|
|
27
|
-
# Record progress to journal
|
|
28
|
-
/flow-workspace record "message"
|
|
29
|
-
|
|
30
|
-
# Switch to different requirement
|
|
31
|
-
/flow-workspace switch REQ-XXX
|
|
32
|
-
/flow-workspace switch BUG-XXX --cd # 需 source/eval 场景
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Subcommands
|
|
36
|
-
|
|
37
|
-
### init
|
|
38
|
-
|
|
39
|
-
Initialize a workspace for a developer.
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
/flow-workspace init dimon
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Creates:
|
|
46
|
-
```
|
|
47
|
-
devflow/workspace/dimon/
|
|
48
|
-
├── .current-req # Current requirement ID
|
|
49
|
-
├── journal-1.md # Session journal
|
|
50
|
-
└── ...
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### start
|
|
54
|
-
|
|
55
|
-
Start a new session, recovering context from previous session.
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
/flow-workspace start
|
|
59
|
-
/flow-workspace start REQ-008 --switch
|
|
60
|
-
/flow-workspace start BUG-008 --switch
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Process:
|
|
64
|
-
1. Read `.current-req` to get current requirement
|
|
65
|
-
2. Read latest journal entries
|
|
66
|
-
3. Display context summary
|
|
67
|
-
4. Ready to continue work
|
|
68
|
-
|
|
69
|
-
可选行为:
|
|
70
|
-
- 传入 `REQ-XXX/BUG-XXX` 会先更新 `.current-req` 再恢复上下文
|
|
71
|
-
- `--switch` 输出切换建议;`--cd` 在脚本被 `source` 时可直接切换目录
|
|
72
|
-
|
|
73
|
-
### record
|
|
74
|
-
|
|
75
|
-
Record progress to the journal.
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
/flow-workspace record "Completed T015, starting T016"
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Appends to current journal file. Creates new journal file when approaching 2000 lines.
|
|
82
|
-
|
|
83
|
-
### switch
|
|
84
|
-
|
|
85
|
-
Switch to a different requirement.
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
/flow-workspace switch REQ-008
|
|
89
|
-
/flow-workspace switch REQ-008 --cd
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Updates `.current-req` and creates a new journal entry.
|
|
93
|
-
|
|
94
|
-
## Workspace Structure
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
devflow/workspace/
|
|
98
|
-
├── index.md # Active developers list
|
|
99
|
-
└── {developer}/
|
|
100
|
-
├── .current-req # Current REQ-ID (e.g., "REQ-007")
|
|
101
|
-
├── journal-1.md # Session journal (max 2000 lines)
|
|
102
|
-
├── journal-2.md # Overflow journal
|
|
103
|
-
└── ...
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Journal Format
|
|
107
|
-
|
|
108
|
-
```markdown
|
|
109
|
-
## [2026-02-06 10:30] Session Start
|
|
110
|
-
|
|
111
|
-
**REQ**: REQ-007
|
|
112
|
-
**Phase**: flow-dev
|
|
113
|
-
**Task**: T015
|
|
114
|
-
|
|
115
|
-
### Progress
|
|
116
|
-
- Completed: T014 (auth middleware)
|
|
117
|
-
- Current: T015 (rate limiting)
|
|
118
|
-
- Blocked: None
|
|
119
|
-
|
|
120
|
-
### Notes
|
|
121
|
-
- Discovered edge case in token refresh
|
|
122
|
-
- Need to revisit error handling in T016
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Integration
|
|
126
|
-
|
|
127
|
-
### With flow-init
|
|
128
|
-
|
|
129
|
-
When `/flow:init` creates a new requirement (and workspace already initialized):
|
|
130
|
-
```bash
|
|
131
|
-
# Auto-update workspace
|
|
132
|
-
echo "REQ-XXX" > devflow/workspace/{developer}/.current-req
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### With flow-dev
|
|
136
|
-
|
|
137
|
-
During development, progress is automatically recorded:
|
|
138
|
-
```bash
|
|
139
|
-
/flow-workspace record "Completed T015"
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### With Attention Refresh
|
|
143
|
-
|
|
144
|
-
Journal is read at Protocol 3 (Ralph iteration start) to maintain context.
|
|
145
|
-
|
|
146
|
-
## Scripts
|
|
147
|
-
|
|
148
|
-
- `.claude/scripts/flow-workspace-init.sh` - Initialize workspace
|
|
149
|
-
- `.claude/scripts/flow-workspace-record.sh` - Record progress
|
|
150
|
-
|
|
151
|
-
## Related
|
|
152
|
-
|
|
153
|
-
- **Template**: `.claude/docs/templates/JOURNAL_TEMPLATE.md`
|
|
154
|
-
- **Index**: `devflow/workspace/index.md`
|
|
155
|
-
- **Attention Refresh**: `.claude/skills/flow-attention-refresh/SKILL.md`
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "cancel-ralph"
|
|
3
|
-
description: "Cancel active Ralph Wiggum loop"
|
|
4
|
-
allowed-tools: ["Bash(test -f .claude/ralph-loop.local.md:*)", "Bash(rm .claude/ralph-loop.local.md)", "Read(.claude/ralph-loop.local.md)"]
|
|
5
|
-
hide-from-slash-command-tool: "true"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Cancel Ralph - 取消 Ralph 循环
|
|
9
|
-
|
|
10
|
-
## 用途
|
|
11
|
-
|
|
12
|
-
手动取消当前会话中正在运行的 Ralph 循环。
|
|
13
|
-
|
|
14
|
-
## 使用方法
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
/cancel-ralph
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## 执行步骤
|
|
21
|
-
|
|
22
|
-
1. 检查 `.claude/ralph-loop.local.md` 是否存在
|
|
23
|
-
```bash
|
|
24
|
-
test -f .claude/ralph-loop.local.md && echo "EXISTS" || echo "NOT_FOUND"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
2. **如果 NOT_FOUND**:
|
|
28
|
-
- 输出: "No active Ralph loop found."
|
|
29
|
-
|
|
30
|
-
3. **如果 EXISTS**:
|
|
31
|
-
- 读取 `.claude/ralph-loop.local.md` 获取当前 iteration
|
|
32
|
-
- 删除状态文件:
|
|
33
|
-
```bash
|
|
34
|
-
rm .claude/ralph-loop.local.md
|
|
35
|
-
```
|
|
36
|
-
- 输出: "Cancelled Ralph loop (was at iteration N)" 其中 N 是 iteration 值
|
|
37
|
-
|
|
38
|
-
## 何时使用
|
|
39
|
-
|
|
40
|
-
- Ralph 循环陷入死循环
|
|
41
|
-
- 需要手动干预修复问题
|
|
42
|
-
- 想要停止无限循环
|
|
43
|
-
|
|
44
|
-
## 示例
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
User: /cancel-ralph
|
|
48
|
-
Assistant: [检查状态文件]
|
|
49
|
-
Assistant: Cancelled Ralph loop (was at iteration 15)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## 注意事项
|
|
53
|
-
|
|
54
|
-
- 取消后需要手动清理未完成的工作
|
|
55
|
-
- 建议在取消前检查 ERROR_LOG.md 了解问题
|
|
56
|
-
- 可以重新运行 `/flow-ralph` 从当前状态继续
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review-high
|
|
3
|
-
description: 'Produce a high-rigor code review report with severity triage. Usage: /code-review-high "<diff or summary>"'
|
|
4
|
-
scripts:
|
|
5
|
-
review: .claude/scripts/run-high-review.sh
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Code-Review-High - 高强度代码审查命令
|
|
9
|
-
|
|
10
|
-
## User Input
|
|
11
|
-
```text
|
|
12
|
-
$ARGUMENTS = "<patch|summary|PR URL>"
|
|
13
|
-
```
|
|
14
|
-
可传递 git diff、文件路径列表或变更摘要。命令会把输入交给后端脚本执行标准化审查流程。
|
|
15
|
-
|
|
16
|
-
## 执行流程
|
|
17
|
-
|
|
18
|
-
### 阶段 1: 输入收集
|
|
19
|
-
- 接受变更摘要(本地 diff、PR 链接、文件列表)。
|
|
20
|
-
- 解析模块范围、涉及文件数量、风险等级。
|
|
21
|
-
|
|
22
|
-
### 阶段 2: 调用审查脚本
|
|
23
|
-
```
|
|
24
|
-
Run: {SCRIPT:review} --input "<payload>" --severity high
|
|
25
|
-
```
|
|
26
|
-
- 脚本加载审查模板 (.claude/docs/templates/REVIEW-HIGH.md)。
|
|
27
|
-
- 聚合上下文:最近提交、相关测试结果、配置/基础设施变更。
|
|
28
|
-
|
|
29
|
-
### 阶段 3: 生成报告
|
|
30
|
-
- 输出结构遵循高强度审查骨架:
|
|
31
|
-
- Summary、Top risks、Approval 建议
|
|
32
|
-
- 受影响文件列表
|
|
33
|
-
- Root cause & assumptions
|
|
34
|
-
- Findings(按严重度分类,附位置与修复建议)
|
|
35
|
-
- Performance、Integration、Testing、Docs、Open questions、Final recommendation
|
|
36
|
-
- 报告保存为 `reviews/high-review-${timestamp}.md`,并打印路径。
|
|
37
|
-
|
|
38
|
-
## 审查准则
|
|
39
|
-
- 关注 correctness、security、performance、integration、test 覆盖、长期可维护性。
|
|
40
|
-
- 使用提供的 severity rubric(BLOCKER/HIGH/MEDIUM/LOW/NIT)。
|
|
41
|
-
- 每个高风险问题需给出最小修复方案与验证方式。
|
|
42
|
-
- 若缺少必要上下文(测试计划、迁移脚本等),在 Findings 中标注并请求补充。
|
|
43
|
-
|
|
44
|
-
## 错误处理
|
|
45
|
-
- 输入为空 → 提示提供 diff 或摘要。
|
|
46
|
-
- 脚本运行失败 → 输出错误日志路径。
|
|
47
|
-
- 报告写入失败 → 保留临时文件并提示手动保存。
|
|
48
|
-
|
|
49
|
-
## 输出
|
|
50
|
-
```
|
|
51
|
-
✅ reviews/high-review-*.md
|
|
52
|
-
✅ 控制台显示摘要和建议
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## 下一步
|
|
56
|
-
- 将报告附在 PR 审查意见中。
|
|
57
|
-
- 若存在 BLOCKER/HIGH 问题,要求作者修复后再次运行本命令。
|
|
58
|
-
- Reviewed PR 通过后,可存档报告于 devflow/requirements/${REQ}/reviews/。
|
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-commit
|
|
3
|
-
description: Git Commit 工作流最佳实践 - Conventional Commits 规范、分支策略、PR 管理
|
|
4
|
-
version: 3.0.0
|
|
5
|
-
author: CC-DevFlow
|
|
6
|
-
updated_at: 2026-01-04
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
> **哲学核心**:Commit 是代码历史的节点,每个节点都应该清晰、独立、可追溯。
|
|
10
|
-
> **Rebase 信仰**:优先使用 `git rebase` 保持线性历史,让提交历史像链表一样优雅。
|
|
11
|
-
> **协作原则**:本地项目直接合并,远程项目走 PR 流程,代码审查是质量保障的自然环节。
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 📋 Commit Message 规范
|
|
16
|
-
|
|
17
|
-
### 格式标准(Conventional Commits)
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
<type>(<scope>): <subject>
|
|
21
|
-
|
|
22
|
-
<body>
|
|
23
|
-
|
|
24
|
-
<footer>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Type 类型
|
|
28
|
-
|
|
29
|
-
| Type | 说明 | 示例 |
|
|
30
|
-
|------|------|------|
|
|
31
|
-
| `feat` | 新功能 | `feat(user): 添加登录功能` |
|
|
32
|
-
| `fix` | 修复 Bug | `fix(auth): 修复 token 过期问题` |
|
|
33
|
-
| `docs` | 文档更新 | `docs(readme): 更新安装说明` |
|
|
34
|
-
| `style` | 代码格式 | `style(utils): 统一代码缩进` |
|
|
35
|
-
| `refactor` | 重构 | `refactor(api): 简化请求处理逻辑` |
|
|
36
|
-
| `perf` | 性能优化 | `perf(render): 优化列表渲染性能` |
|
|
37
|
-
| `test` | 测试 | `test(utils): 添加工具函数单元测试` |
|
|
38
|
-
| `chore` | 构建/工具 | `chore(deps): 更新依赖版本` |
|
|
39
|
-
|
|
40
|
-
### 编写规则
|
|
41
|
-
|
|
42
|
-
- **Subject**:50 字以内,祈使句,首字母小写,结尾不加句号
|
|
43
|
-
- **Body**:72 字换行,说明为什么和如何,而非做了什么
|
|
44
|
-
- **Footer**:`BREAKING CHANGE: <描述>` 或 `Closes #123`
|
|
45
|
-
|
|
46
|
-
### ✅ 好示例
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
feat(user): 添加微信登录功能
|
|
50
|
-
|
|
51
|
-
支持通过微信授权码快速登录,提升用户体验。
|
|
52
|
-
登录成功后自动同步用户信息到本地存储。
|
|
53
|
-
|
|
54
|
-
Closes #123
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 🔄 工作流程
|
|
60
|
-
|
|
61
|
-
### 远程项目 PR 流程(团队协作)
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# 1. 创建功能分支
|
|
65
|
-
git checkout main
|
|
66
|
-
git pull --rebase
|
|
67
|
-
git checkout -b feature/my-feature
|
|
68
|
-
|
|
69
|
-
# 2. 开发并提交(多次小提交)
|
|
70
|
-
git add <file1>
|
|
71
|
-
git commit -m "feat(module): 实现核心功能"
|
|
72
|
-
git add <file2>
|
|
73
|
-
git commit -m "test(module): 添加单元测试"
|
|
74
|
-
|
|
75
|
-
# 3. 推送前 rebase 主分支(保持线性历史)
|
|
76
|
-
git checkout main
|
|
77
|
-
git pull --rebase
|
|
78
|
-
git checkout feature/my-feature
|
|
79
|
-
git rebase main
|
|
80
|
-
|
|
81
|
-
# 4. 推送到远程
|
|
82
|
-
git push -u origin feature/my-feature
|
|
83
|
-
# rebase 后需要 force push
|
|
84
|
-
git push --force-with-lease
|
|
85
|
-
|
|
86
|
-
# 5. 创建 Pull Request
|
|
87
|
-
gh pr create --title "feat: 添加新功能" --body "$(cat <<'EOF'
|
|
88
|
-
## Summary
|
|
89
|
-
- 实现核心功能模块
|
|
90
|
-
- 添加完整测试覆盖
|
|
91
|
-
|
|
92
|
-
## Test plan
|
|
93
|
-
- [x] 单元测试通过
|
|
94
|
-
- [x] 集成测试通过
|
|
95
|
-
|
|
96
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
97
|
-
EOF
|
|
98
|
-
)"
|
|
99
|
-
|
|
100
|
-
# 6. 合并 PR 后清理
|
|
101
|
-
git checkout main
|
|
102
|
-
git pull --rebase
|
|
103
|
-
git branch -d feature/my-feature
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
### 本地项目直接合并(个人项目)
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
# 1. 创建功能分支
|
|
112
|
-
git checkout main
|
|
113
|
-
git checkout -b feature/my-feature
|
|
114
|
-
|
|
115
|
-
# 2. 开发并提交
|
|
116
|
-
git add .
|
|
117
|
-
git commit -m "feat(module): 实现核心功能"
|
|
118
|
-
|
|
119
|
-
# 3. Rebase 主分支并快进合并
|
|
120
|
-
git checkout main
|
|
121
|
-
git pull --rebase # 如果有远程仓库
|
|
122
|
-
git checkout feature/my-feature
|
|
123
|
-
git rebase main
|
|
124
|
-
git checkout main
|
|
125
|
-
git merge --ff-only feature/my-feature
|
|
126
|
-
|
|
127
|
-
# 4. 清理分支
|
|
128
|
-
git branch -d feature/my-feature
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
### 🚨 紧急修复流程(Hotfix)
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
# 1. 从 main 创建热修复分支
|
|
137
|
-
git checkout main
|
|
138
|
-
git pull --rebase
|
|
139
|
-
git checkout -b hotfix/critical-issue
|
|
140
|
-
|
|
141
|
-
# 2. 修复并提交
|
|
142
|
-
git add .
|
|
143
|
-
git commit -m "fix(critical): 修复紧急问题"
|
|
144
|
-
|
|
145
|
-
# 3. 合并到 main 和 develop
|
|
146
|
-
git checkout main
|
|
147
|
-
git merge hotfix/critical-issue
|
|
148
|
-
git push
|
|
149
|
-
|
|
150
|
-
git checkout develop
|
|
151
|
-
git merge hotfix/critical-issue
|
|
152
|
-
git push
|
|
153
|
-
|
|
154
|
-
# 4. 清理分支
|
|
155
|
-
git branch -d hotfix/critical-issue
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## 📦 多文件拆分提交工作流(NEW)
|
|
161
|
-
|
|
162
|
-
> **原则**:涉及多文件时,必须按同类变更拆分提交,每个 commit 只包含一类变更。
|
|
163
|
-
|
|
164
|
-
### 场景 1:功能 + 测试 + 文档
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
# ❌ 错误:一次性提交所有文件
|
|
168
|
-
git add .
|
|
169
|
-
git commit -m "feat: 添加用户管理功能"
|
|
170
|
-
|
|
171
|
-
# ✅ 正确:按类型拆分提交
|
|
172
|
-
# 第一次提交:核心功能实现
|
|
173
|
-
git add src/services/user.ts src/routes/user.ts
|
|
174
|
-
git commit -m "feat(user): 实现用户管理核心功能"
|
|
175
|
-
|
|
176
|
-
# 第二次提交:测试文件
|
|
177
|
-
git add tests/user.test.ts
|
|
178
|
-
git commit -m "test(user): 添加用户管理单元测试"
|
|
179
|
-
|
|
180
|
-
# 第三次提交:文档更新
|
|
181
|
-
git add docs/api/user.md README.md
|
|
182
|
-
git commit -m "docs(user): 添加用户管理 API 文档"
|
|
183
|
-
|
|
184
|
-
# 第四次提交:配置变更
|
|
185
|
-
git add .env.example config/user.yml
|
|
186
|
-
git commit -m "chore(user): 添加用户管理配置文件"
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### 场景 2:重构多个模块
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
# ✅ 按模块拆分提交
|
|
193
|
-
# 第一次提交:auth 模块重构
|
|
194
|
-
git add src/services/auth.ts src/middlewares/auth.ts
|
|
195
|
-
git commit -m "refactor(auth): 简化认证逻辑"
|
|
196
|
-
|
|
197
|
-
# 第二次提交:user 模块重构
|
|
198
|
-
git add src/services/user.ts src/models/user.ts
|
|
199
|
-
git commit -m "refactor(user): 优化用户服务层"
|
|
200
|
-
|
|
201
|
-
# 第三次提交:api 模块重构
|
|
202
|
-
git add src/routes/api.ts src/controllers/api.ts
|
|
203
|
-
git commit -m "refactor(api): 统一 API 错误处理"
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### 场景 3:跨层修改(数据库 + 服务 + API)
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
# ✅ 按层次拆分提交
|
|
210
|
-
# 第一次提交:数据模型层
|
|
211
|
-
git add prisma/schema.prisma prisma/migrations/*
|
|
212
|
-
git commit -m "feat(db): 添加 order 表及关联字段"
|
|
213
|
-
|
|
214
|
-
# 第二次提交:服务层
|
|
215
|
-
git add src/services/order.ts src/lib/prisma/order.ts
|
|
216
|
-
git commit -m "feat(order): 实现订单服务逻辑"
|
|
217
|
-
|
|
218
|
-
# 第三次提交:API 路由层
|
|
219
|
-
git add src/routes/order.ts src/controllers/order.ts
|
|
220
|
-
git commit -m "feat(order): 添加订单 API 接口"
|
|
221
|
-
|
|
222
|
-
# 第四次提交:前端集成
|
|
223
|
-
git add miniprogram/pages/order/* miniprogram/utils/order-api.js
|
|
224
|
-
git commit -m "feat(order): 小程序订单页面集成"
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### 场景 4:Bug 修复 + 防御性代码
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
# ✅ 先修复 bug,再添加防御
|
|
231
|
-
# 第一次提交:核心 bug 修复
|
|
232
|
-
git add src/services/payment.ts
|
|
233
|
-
git commit -m "fix(payment): 修复支付回调处理逻辑"
|
|
234
|
-
|
|
235
|
-
# 第二次提交:添加测试
|
|
236
|
-
git add tests/payment.test.ts
|
|
237
|
-
git commit -m "test(payment): 添加支付回调场景测试"
|
|
238
|
-
|
|
239
|
-
# 第三次提交:防御性代码
|
|
240
|
-
git add src/middlewares/validator.ts
|
|
241
|
-
git commit -m "feat(payment): 添加支付参数校验中间件"
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### 拆分提交的技巧
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
# 技巧 1:交互式添加(部分文件添加)
|
|
248
|
-
git add -p <file> # 逐块选择要提交的代码
|
|
249
|
-
|
|
250
|
-
# 技巧 2:查看未提交变更
|
|
251
|
-
git status -s
|
|
252
|
-
git diff --stat
|
|
253
|
-
|
|
254
|
-
# 技巧 3:临时保存其他变更
|
|
255
|
-
git stash push -m "临时保存其他模块变更" -- <files>
|
|
256
|
-
|
|
257
|
-
# 技巧 4:整理已提交历史
|
|
258
|
-
git rebase -i HEAD~5 # 交互式整理最近 5 个 commit
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### 拆分原则
|
|
262
|
-
|
|
263
|
-
| 维度 | 拆分规则 | 示例 |
|
|
264
|
-
|------|----------|------|
|
|
265
|
-
| **功能维度** | 实现 → 测试 → 文档 | `feat → test → docs` |
|
|
266
|
-
| **模块维度** | 按模块边界拆分 | `auth → user → order` |
|
|
267
|
-
| **层次维度** | 按架构分层拆分 | `model → service → route → UI` |
|
|
268
|
-
| **类型维度** | 按文件类型拆分 | `.ts → .test.ts → .md → .yml` |
|
|
269
|
-
| **影响范围** | 核心 → 边缘 | `核心逻辑 → 配置 → 文档` |
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
## 🔄 Rebase 最佳实践
|
|
274
|
-
|
|
275
|
-
### 日常 Rebase
|
|
276
|
-
|
|
277
|
-
```bash
|
|
278
|
-
# 功能分支定期 rebase 主分支
|
|
279
|
-
git checkout feature/my-feature
|
|
280
|
-
git fetch origin
|
|
281
|
-
git rebase origin/main
|
|
282
|
-
|
|
283
|
-
# 解决冲突后继续
|
|
284
|
-
git add .
|
|
285
|
-
git rebase --continue
|
|
286
|
-
|
|
287
|
-
# 中止 rebase
|
|
288
|
-
git rebase --abort
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### 交互式 Rebase 整理历史
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
# 整理最近 3 个 commit
|
|
295
|
-
git rebase -i HEAD~3
|
|
296
|
-
|
|
297
|
-
# 操作选项:
|
|
298
|
-
# pick: 保留 commit
|
|
299
|
-
# reword: 修改 message
|
|
300
|
-
# squash: 合并到上一个 commit(保留 message)
|
|
301
|
-
# fixup: 合并到上一个 commit(丢弃 message)
|
|
302
|
-
# drop: 删除 commit
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
### Rebase 黄金法则
|
|
306
|
-
|
|
307
|
-
```yaml
|
|
308
|
-
核心原则: "永远不要 rebase 公共分支的历史"
|
|
309
|
-
|
|
310
|
-
✅ 安全场景:
|
|
311
|
-
- 个人功能分支 rebase 主分支
|
|
312
|
-
- 本地未推送的提交整理
|
|
313
|
-
|
|
314
|
-
❌ 危险场景:
|
|
315
|
-
- 主分支(main/master/develop)
|
|
316
|
-
- 多人协作的长期分支
|
|
317
|
-
- 已推送到公共仓库的提交
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### Force Push 安全使用
|
|
321
|
-
|
|
322
|
-
```bash
|
|
323
|
-
# ❌ 危险:无脑覆盖
|
|
324
|
-
git push --force
|
|
325
|
-
|
|
326
|
-
# ✅ 安全:仅当远程无新提交时才覆盖
|
|
327
|
-
git push --force-with-lease
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
## 📤 Pull Request 管理
|
|
333
|
-
|
|
334
|
-
### 创建 PR
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
# 使用 gh 命令创建 PR
|
|
338
|
-
gh pr create \
|
|
339
|
-
--title "feat(module): 添加新功能" \
|
|
340
|
-
--body "$(cat <<'EOF'
|
|
341
|
-
## Summary
|
|
342
|
-
- 实现了 XXX 核心功能
|
|
343
|
-
- 添加了完整的测试覆盖
|
|
344
|
-
|
|
345
|
-
## Test Plan
|
|
346
|
-
- [x] 单元测试通过
|
|
347
|
-
- [x] 集成测试通过
|
|
348
|
-
|
|
349
|
-
## Related Issues
|
|
350
|
-
Closes #123
|
|
351
|
-
|
|
352
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
353
|
-
EOF
|
|
354
|
-
)"
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
### PR 合并策略
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
# 1. Squash merge(推荐,合并为单个 commit)
|
|
361
|
-
gh pr merge 123 --squash --delete-branch
|
|
362
|
-
|
|
363
|
-
# 2. Rebase merge(线性历史)
|
|
364
|
-
gh pr merge 123 --rebase --delete-branch
|
|
365
|
-
|
|
366
|
-
# 3. Merge commit(保留完整历史)
|
|
367
|
-
gh pr merge 123 --merge
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### PR 最佳实践
|
|
371
|
-
|
|
372
|
-
- ✅ 每个 PR ≤ 400 行代码变更
|
|
373
|
-
- ✅ 专注单一功能或修复
|
|
374
|
-
- ✅ 推送前 `git rebase main`
|
|
375
|
-
- ✅ 所有讨论解决后再合并
|
|
376
|
-
|
|
377
|
-
---
|
|
378
|
-
|
|
379
|
-
## 🛠️ 常用命令速查
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
# 查看状态
|
|
383
|
-
git status -s
|
|
384
|
-
git diff --staged
|
|
385
|
-
|
|
386
|
-
# 提交
|
|
387
|
-
git add -p # 交互式添加
|
|
388
|
-
git commit -m "message" # 快速提交
|
|
389
|
-
git commit --amend # 修改最后一次提交
|
|
390
|
-
|
|
391
|
-
# 撤销
|
|
392
|
-
git restore <file> # 撤销工作区变更
|
|
393
|
-
git restore --staged <file> # 撤销暂存区变更
|
|
394
|
-
git reset --soft HEAD~1 # 撤销提交(保留变更)
|
|
395
|
-
|
|
396
|
-
# 分支
|
|
397
|
-
git switch -c <branch> # 创建并切换分支
|
|
398
|
-
git branch -d <branch> # 删除分支
|
|
399
|
-
|
|
400
|
-
# 暂存
|
|
401
|
-
git stash push -m "desc" -- <files>
|
|
402
|
-
git stash pop
|
|
403
|
-
|
|
404
|
-
# 历史
|
|
405
|
-
git log --oneline --graph
|
|
406
|
-
git show <commit-hash>
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
---
|
|
410
|
-
|
|
411
|
-
## 🎯 核心原则
|
|
412
|
-
|
|
413
|
-
1. **原子性提交**:每个 commit 只做一件事,功能完整、可独立测试
|
|
414
|
-
2. **清晰的 Message**:遵循 Conventional Commits,让历史可读可追溯
|
|
415
|
-
3. **频繁提交**:小步快跑,不积累大量变更
|
|
416
|
-
4. **保持线性历史**:优先 rebase,让历史像链表一样优雅
|
|
417
|
-
5. **同类变更分组**:多文件按类型/模块/层次拆分提交
|
|
418
|
-
6. **安全的 Force Push**:仅在个人分支使用 `--force-with-lease`
|
|
419
|
-
|
|
420
|
-
---
|
|
421
|
-
|
|
422
|
-
**记住**:好的 commit 历史是项目最好的文档。代码是写给人看的,只是顺便让机器运行。
|