@guanlin4924/devflow-pi 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -0
- package/docs/OMP-NATIVE-ARCHITECTURE.md +104 -0
- package/package.json +40 -0
- package/plugins/devflow-core/extensions/devflow-core.ts +1642 -0
- package/plugins/devflow-core/package.json +14 -0
- package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +174 -0
- package/plugins/devflow-core/runtime/hooks/hook_common.py +696 -0
- package/plugins/devflow-core/runtime/hooks/index_gate.py +63 -0
- package/plugins/devflow-core/runtime/hooks/injection_code_specification.py +7 -0
- package/plugins/devflow-core/runtime/hooks/post_tool.py +44 -0
- package/plugins/devflow-core/runtime/hooks/start.py +288 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +265 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/agents/openai.yaml +4 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +520 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/control_io.rb +42 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +138 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +121 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +553 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/manage_lessons.rb +219 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +168 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/update_triage_route.rb +110 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +565 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +783 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/uat-remediation.yaml +143 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/workflows-README.md +10 -0
- package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +117 -0
- package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +167 -0
- package/plugins/devflow-core/skills/workflow-pipeline/references/slice-safety-guide.md +125 -0
- package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +819 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/agents-md-template.md +25 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-backend-spec-template.md +68 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-frontend-spec-template.md +64 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-navigation-template.md +168 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-domain-index-template.md +43 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-spec-index-template.md +45 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/execution-contract-template.md +57 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/navigation-index-template.md +40 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/project-initialization-template.md +109 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/rules-index-template.md +80 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/run-manifest-template.json +40 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/directory-structure.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/engine.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/errors.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/locator.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/model.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/repository.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/router.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/scheduler.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/schema.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/service.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/testing.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/api-client.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/case-editor.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/components.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/directory-structure.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/forms.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/routing.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/state.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/testing.md +46 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/stack-spec-template.md +106 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/state-template.md +77 -0
- package/plugins/devflow-core/skills/workflow-project-context/assets/toolchain-template.md +37 -0
- package/plugins/devflow-core/skills/workflow-project-context/references/navigation-guide.md +262 -0
- package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py +545 -0
- package/plugins/devflow-design/agents/contract-auditor.md +18 -0
- package/plugins/devflow-design/extensions/devflow-design.ts +47 -0
- package/plugins/devflow-design/package.json +14 -0
- package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +142 -0
- package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +150 -0
- package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +121 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +257 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/adr-template.md +57 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/backend-spec-template.md +205 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/affected-module-exploration.md +59 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/backend-conventions.md +30 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/code-explore-guide.md +40 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/project-rule-contract.md +66 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +91 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/index.md +71 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/accessibility.md +31 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/component-library.md +31 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/design-systems.md +47 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/responsive-grid.md +29 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/stack-guidelines.md +31 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/ux-patterns.md +40 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tokens/project-tokens.md +19 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/SKILL.md +377 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/charts.csv +26 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/colors.csv +97 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/icons.csv +101 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/landing.csv +31 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/products.csv +97 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/styles.csv +68 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/typography.csv +58 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/scripts/core.py +253 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/scripts/search.py +114 -0
- package/plugins/devflow-design/skills/workflow-design-rule-pack/scripts/install.py +67 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +370 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/admin-system-template.md +57 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/api-service-template.md +42 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/c-end-system-template.md +25 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/output-template.md +139 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/references/bug-rules.md +12 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/references/exception-checklist.md +31 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/references/trace-integrity-guide.md +153 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/references/writing-guide.md +92 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +223 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/assets/frontend-spec-template.md +204 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/affected-module-exploration.md +58 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/component-patterns.md +42 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-conventions.md +28 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/common-web.md +53 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/next.md +40 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/react.md +41 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/vue.md +41 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/project-rule-contract.md +95 -0
- package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +172 -0
- package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +302 -0
- package/plugins/devflow-design/skills/workflow-ui-spec/assets/ui-spec-template.md +244 -0
- package/plugins/devflow-design/skills/workflow-ui-spec/references/affected-module-exploration.md +55 -0
- package/plugins/devflow-implementation/agents/implementation-worker.md +20 -0
- package/plugins/devflow-implementation/package.json +6 -0
- package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +124 -0
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/INDEX.md +13 -0
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/adversarial-review.md +35 -0
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/first-principles.md +26 -0
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/lesson-format.md +28 -0
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/root-cause-ladder.md +51 -0
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/seam-analysis.md +30 -0
- package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +160 -0
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md +33 -0
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/ddl-guidelines.md +60 -0
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +217 -0
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/project-rule-contract.md +55 -0
- package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +271 -0
- package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md +1251 -0
- package/plugins/devflow-implementation/skills/workflow-execute-phase/references/ui-brand.md +160 -0
- package/plugins/devflow-intel/agents/project-scout.md +27 -0
- package/plugins/devflow-intel/extensions/devflow-intel.ts +104 -0
- package/plugins/devflow-intel/package.json +14 -0
- package/plugins/devflow-intel/skills/code-index-query/SKILL.md +37 -0
- package/plugins/devflow-intel/skills/code-index-query/references/query-patterns.md +27 -0
- package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +68 -0
- package/plugins/devflow-intel/skills/workflow-code-index/references/adapter-contract.md +38 -0
- package/plugins/devflow-intel/skills/workflow-code-index/references/audit-checklist.md +10 -0
- package/plugins/devflow-intel/skills/workflow-code-index/references/confidence-rules.md +43 -0
- package/plugins/devflow-intel/skills/workflow-code-index/references/data-model.md +74 -0
- package/plugins/devflow-intel/skills/workflow-code-index/references/discovery.md +24 -0
- package/plugins/devflow-intel/skills/workflow-code-index/references/query-guide.md +20 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/__init__.py +1 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/base.py +30 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/generic_text.py +287 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/registry.py +17 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/code_index.py +437 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/__init__.py +1 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/discovery.py +139 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/hashing.py +11 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/scanner.py +115 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/schema.py +123 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/__init__.py +1 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/project_binding_check.py +66 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/relation_check.py +36 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/schema_validate.py +11 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/stale_check.py +42 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/__init__.py +1 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/jsonl_writer.py +25 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/markdown_writer.py +106 -0
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/sqlite_writer.py +143 -0
- package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +381 -0
- package/plugins/devflow-intel/skills/workflow-context-sync/agents/openai.yaml +4 -0
- package/plugins/devflow-intel/skills/workflow-context-sync/scripts/context_sync_cursor.py +241 -0
- package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +186 -0
- package/plugins/devflow-intel/skills/workflow-update-navigation/references/incremental-update-guide.md +47 -0
- package/plugins/devflow-quality/agents/code-reviewer.md +18 -0
- package/plugins/devflow-quality/agents/verification-runner.md +21 -0
- package/plugins/devflow-quality/extensions/devflow-quality.ts +59 -0
- package/plugins/devflow-quality/package.json +14 -0
- package/plugins/devflow-quality/skills/code-review/SKILL.md +288 -0
- package/plugins/devflow-quality/skills/code-review/references/cross-layer-checklist.md +70 -0
- package/plugins/devflow-quality/skills/code-review/references/dao-checklist.md +70 -0
- package/plugins/devflow-quality/skills/code-review/references/handler-checklist.md +48 -0
- package/plugins/devflow-quality/skills/code-review/references/repository-checklist.md +44 -0
- package/plugins/devflow-quality/skills/code-review/references/service-checklist.md +57 -0
- package/plugins/devflow-quality/skills/code-review/references/spec-checklist.md +34 -0
- package/plugins/devflow-quality/skills/code-review/references/vo-checklist.md +26 -0
- package/plugins/devflow-quality/skills/workflow-audit-milestone/SKILL.md +31 -0
- package/plugins/devflow-quality/skills/workflow-audit-milestone/references/audit-milestone.md +328 -0
- package/plugins/devflow-quality/skills/workflow-complete-milestone/SKILL.md +132 -0
- package/plugins/devflow-quality/skills/workflow-complete-milestone/assets/milestone-archive.md +123 -0
- package/plugins/devflow-quality/skills/workflow-complete-milestone/references/complete-milestone.md +775 -0
- package/plugins/devflow-quality/skills/workflow-complete-milestone/references/milestone-archive.md +123 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +126 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/api-mainflow-rules.md +27 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/codebase-discovery.md +54 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/intermediate-format.md +244 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/mainflow-selection.md +36 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +190 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/ui-mainflow-rules.md +110 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +583 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/discover_codebases.py +199 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/normalize_case_payloads.py +177 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/validate_case_payloads.py +370 -0
- package/plugins/devflow-quality/skills/workflow-verify-work/SKILL.md +106 -0
- package/plugins/devflow-quality/skills/workflow-verify-work/assets/UAT.md +265 -0
- package/plugins/devflow-quality/skills/workflow-verify-work/references/verify-work.md +759 -0
- package/plugins/devflow-requirements/agents/requirements-auditor.md +20 -0
- package/plugins/devflow-requirements/package.json +6 -0
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +219 -0
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/agents/openai.yaml +4 -0
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/references/review-method.md +257 -0
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/references/review-template.md +80 -0
- package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +325 -0
- package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +163 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +748 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/assets/baseline-template.md +281 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md +69 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/challenge-review-guide.md +158 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/decomposition-guide.md +115 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/project-context-guide.md +119 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md +76 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/requirement-review-checklist.md +115 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +204 -0
- package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +183 -0
- package/src/cli.ts +76 -0
- package/src/constants.ts +15 -0
- package/src/doctor.ts +66 -0
- package/src/paths.ts +37 -0
- package/src/platform-extension.ts +46 -0
- package/src/project-context.ts +165 -0
- package/src/runtime.ts +167 -0
- package/src/usage-stats.ts +101 -0
- package/templates/commands/start.md +58 -0
- package/templates/omp/AGENTS.md +36 -0
- package/templates/omp/config.yml +112 -0
- package/templates/omp/hook-config.json +18 -0
- package/templates/omp/index-policy.json +57 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-change-plan
|
|
3
|
+
description: "Use after workflow-integration-verify has passed or produced an approved no-op report. Generates an AI-executable change list with DDL, code tasks, and rollout steps from the reconciled backend/frontend/API design. This is NOT an API call guide — see workflow-api-call-guide for that."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 变更清单生成器
|
|
7
|
+
|
|
8
|
+
基于后端/前端技术方案,生成 AI 可直接执行的原子化变更清单,供 execute 阶段使用。
|
|
9
|
+
|
|
10
|
+
## 与其他 skill 的关系
|
|
11
|
+
|
|
12
|
+
| Skill | 产出 | 何时用 |
|
|
13
|
+
|-------|------|--------|
|
|
14
|
+
| `workflow-api-call-guide` | `api-call-guide.md` | Track A,API 调用指南给前端开发者 |
|
|
15
|
+
| `workflow-api-supplement` | `api-supplement-requests.md` | Track B 异常路径,前端发现 API 缺口 |
|
|
16
|
+
| `workflow-integration-verify` | `integration-report.md` | 双轨合流门禁,确认后端/API/前端设计一致 |
|
|
17
|
+
| **`workflow-change-plan`** | **`变更清单.md`** | **集成核对通过后**,execute 阶段的原子化任务清单 |
|
|
18
|
+
|
|
19
|
+
三者互补,不可互相替代。
|
|
20
|
+
- 有 API 变更 → 先跑 `api-contract`、`api-call-guide`、前端方案和必要的 `api-supplement`,再跑 `integration-verify`,最后跑 `change-plan`
|
|
21
|
+
- 无 API 变更 → 仍生成 no-op `api-contract`、no-op `api-call-guide` 和 no-op `integration-report`,由 `integration-verify` 标记 `merge_gate_status: skipped` 后再跑 `change-plan`
|
|
22
|
+
- `api-supplement` 只在 Track B 发现 API 缺口时触发;存在补充项时必须回写 API 契约并通过 `integration-verify`
|
|
23
|
+
- `change-plan` 不作为 Track A 或 Track B 的局部产物,不能绕过双轨合流门禁
|
|
24
|
+
|
|
25
|
+
## 核心原则
|
|
26
|
+
|
|
27
|
+
1. **任务原子化** — 每个任务足够小,AI 可在单次对话中完成
|
|
28
|
+
2. **依赖明确** — 标注任务间的依赖关系和执行顺序
|
|
29
|
+
3. **上下文完整** — 每个任务包含足够上下文,无需回看其他文档
|
|
30
|
+
4. **可验证** — 每个任务有明确的完成标准
|
|
31
|
+
5. **复用优先** — 先扫描项目已有实现,复用现有模式和工具库
|
|
32
|
+
6. **可验证完成标准** — 所有完成标准使用 `- [ ]` checkbox 格式,描述可通过静态代码分析验证的具体条件。执行阶段的 `code_review` 门禁将自动逐条验证。模糊描述(如"功能正确")会被标记为 `⚠️ UNVERIFIABLE` 并阻塞自动化验证流程
|
|
33
|
+
|
|
34
|
+
## 输入
|
|
35
|
+
|
|
36
|
+
按优先级查找(第一个存在即使用):
|
|
37
|
+
|
|
38
|
+
| 优先级 | 输入 | 轨道 |
|
|
39
|
+
|--------|------|------|
|
|
40
|
+
| 1 | `.planning/features/{feature}/integration-report.md` | 合流门禁结果,必须存在 |
|
|
41
|
+
| 2 | `.planning/features/{feature}/api-contract.md` | API 契约,包含 no-op 场景 |
|
|
42
|
+
| 3 | `.planning/features/{feature}/api-call-guide.md` | 前端消费指南,包含 no-op 场景 |
|
|
43
|
+
| 4 | `.planning/features/{feature}/后端技术方案.md` | Track A |
|
|
44
|
+
| 5 | `.planning/features/{feature}/前端技术方案.md` | Track B |
|
|
45
|
+
| 6 | `.planning/features/{feature}/功能点梳理.md` | Track B |
|
|
46
|
+
| 7 | `.planning/requirements/baseline.md` | fallback |
|
|
47
|
+
|
|
48
|
+
**无 API 变更时**:不得直接跳过合流。必须存在 no-op `api-contract.md`、no-op `api-call-guide.md` 和 no-op `integration-report.md`;变更清单聚焦于代码文件改动,DDL/API 章节标注"无"。
|
|
49
|
+
|
|
50
|
+
## 工作流程
|
|
51
|
+
|
|
52
|
+
### 第一阶段:收集输入
|
|
53
|
+
|
|
54
|
+
1. 读取 `integration-report.md` 和对应 meta → 确认 `merge_gate_status` 为 `passed` 或 `skipped`,且阻塞项为 0
|
|
55
|
+
2. 读取 `api-contract.md`、`api-call-guide.md` → 提取 API 任务、mock/联调要求和 no-op 判断
|
|
56
|
+
3. 读取后端技术方案 → 提取改动文件、库表变更、DDL、配置变更
|
|
57
|
+
4. 读取前端技术方案(如存在)→ 提取前端改动文件、路由、组件
|
|
58
|
+
5. 读取功能点梳理(如存在)→ 确认 FP 覆盖完整性
|
|
59
|
+
6. 读取 baseline.md 的审查结论和风险标记
|
|
60
|
+
7. 若输入包含 `SL-*` 切片计划,读取 `skill://workflow-pipeline/references/slice-safety-guide.md`,只生成当前执行切片的任务。后置切片只能写入风险/后续范围,不得生成实现任务。
|
|
61
|
+
|
|
62
|
+
### 第二阶段:扫描项目上下文
|
|
63
|
+
|
|
64
|
+
1. 验证技术方案中列出的文件路径存在
|
|
65
|
+
2. 读取关键源文件的当前内容(确认改动基线)
|
|
66
|
+
3. 识别可复用的现有模式和工具库
|
|
67
|
+
4. 检查 `.planning/execution-contract.md` 的分层规则
|
|
68
|
+
|
|
69
|
+
### 第三阶段:生成变更清单
|
|
70
|
+
|
|
71
|
+
输出到 `.planning/features/{feature}/变更清单.md`。
|
|
72
|
+
|
|
73
|
+
## 输出结构
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
# 变更清单:{功能名}
|
|
77
|
+
|
|
78
|
+
## 一、变更概览
|
|
79
|
+
|
|
80
|
+
| 维度 | 数量 |
|
|
81
|
+
|------|------|
|
|
82
|
+
| 总变更任务 | N |
|
|
83
|
+
| DDL 变更 | N |
|
|
84
|
+
| 后端文件 | N |
|
|
85
|
+
| 前端文件 | N |
|
|
86
|
+
| 配置文件 | N |
|
|
87
|
+
| 不可逆操作 | 有/无 |
|
|
88
|
+
| 当前执行切片 | SL-001 |
|
|
89
|
+
|
|
90
|
+
## 二、数据库变更
|
|
91
|
+
|
|
92
|
+
### DDL
|
|
93
|
+
|
|
94
|
+
```sql
|
|
95
|
+
-- 按执行顺序排列
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 数据迁移(如有)
|
|
99
|
+
|
|
100
|
+
## 三、代码变更任务
|
|
101
|
+
|
|
102
|
+
按依赖顺序排列。每个任务格式:
|
|
103
|
+
|
|
104
|
+
### T-001 {任务名称}
|
|
105
|
+
|
|
106
|
+
- **文件**:`path/to/file.py`
|
|
107
|
+
- **操作**:新增 / 修改 / 删除
|
|
108
|
+
- **依赖**:T-000(无则写"无")
|
|
109
|
+
- **参考实现**:`path/to/similar/file.py:line`(有则填写)
|
|
110
|
+
- **Code Index 证据**:相关 symbol/relation/evidence(有 `.planning/code-index/` 时填写;无则写"未使用:原因")
|
|
111
|
+
- **需求来源**:FP-001 / BR-001 / 技术方案第X章
|
|
112
|
+
- **Slice**:SL-001
|
|
113
|
+
- **适用规范**:`.context/spec/backend/service.md` 等(有则填写)
|
|
114
|
+
- **相关经验教训**:lesson ID 或"无"
|
|
115
|
+
- **执行前门禁**:编码前必须确认的事项(无则写"无")
|
|
116
|
+
- **测试策略**:单元/集成/人工测试策略简述
|
|
117
|
+
- **审查要求**:变更清单一致性、规范审查、兼容性检查
|
|
118
|
+
- **变更内容**:(具体描述改什么,精确到类名/方法名/字段名,禁止 TBD/TODO)
|
|
119
|
+
- **完成标准**:(每条必须使用 `- [ ]` checkbox 格式,可被 code_review 门禁自动验证)
|
|
120
|
+
- [ ] 具体可验证的检查项(可映射到代码中具体元素)
|
|
121
|
+
- [ ] 另一条检查项(可映射到验证命令)
|
|
122
|
+
- **验证命令**:`pytest tests/test_xxx.py -k test_yyy`
|
|
123
|
+
|
|
124
|
+
## 四、配置变更
|
|
125
|
+
|
|
126
|
+
## 五、上线步骤
|
|
127
|
+
|
|
128
|
+
1. 按顺序排列
|
|
129
|
+
2. 标注可并行 vs 必须串行
|
|
130
|
+
3. 标注需要人工确认的步骤
|
|
131
|
+
|
|
132
|
+
## 六、回滚方案(如有不可逆操作)
|
|
133
|
+
|
|
134
|
+
## 七、任务依赖图
|
|
135
|
+
|
|
136
|
+
```mermaid
|
|
137
|
+
graph TD
|
|
138
|
+
T-001 --> T-002
|
|
139
|
+
T-001 --> T-003
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## 八、风险提示
|
|
143
|
+
|
|
144
|
+
来自 baseline.md 和技术方案的风险标记。
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 完成门禁
|
|
148
|
+
|
|
149
|
+
- [ ] 每个技术方案中列出的改动文件都有对应任务
|
|
150
|
+
- [ ] 若存在 `SL-*`,每个任务都标注 Slice ID,且没有后置切片实现任务
|
|
151
|
+
- [ ] 跨 slice 共享任务有当前切片可验证门禁,否则已移出本轮
|
|
152
|
+
- [ ] DDL 与后端技术方案的库表设计一致
|
|
153
|
+
- [ ] 任务依赖关系正确(无循环依赖)
|
|
154
|
+
- [ ] 无 API 变更时 DDL/API 章节标注"无",不强行编造
|
|
155
|
+
- [ ] 每个任务有完成标准
|
|
156
|
+
- [ ] 所有完成标准使用 `- [ ]` checkbox 格式(非纯列表 `-`)
|
|
157
|
+
- [ ] 每条完成标准描述的是可通过静态代码分析验证的条件(禁止"功能正确"类模糊描述)
|
|
158
|
+
- [ ] 若 `.planning/code-index/` 存在,涉及已有代码的任务已标注相关 symbol/relation/evidence 或说明未使用原因
|
|
159
|
+
- [ ] 每个任务包含审查要求、适用规范、需求来源字段(至少标注"无")
|
|
160
|
+
- [ ] 文件路径与技术方案一致
|
package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 通用代码约束
|
|
2
|
+
|
|
3
|
+
Use this reference only as a fallback when the target project has no stronger rule package. Project-specific rules from `.planning/rules/`, `.context/spec/`, `AGENTS.md`, `CLAUDE.md`, framework conventions, or language stack slots override this file.
|
|
4
|
+
|
|
5
|
+
## Task Design
|
|
6
|
+
|
|
7
|
+
- Keep each task small enough to finish and verify independently.
|
|
8
|
+
- Every task must point to its requirement source: `FP-*`, `BR-*`, `BC-*`, related `CR-*`, or a technical-plan section.
|
|
9
|
+
- Do not create tasks for pending baseline decisions. Put them in the blocking section until the user confirms.
|
|
10
|
+
- Prefer extending existing project capabilities over introducing parallel implementations.
|
|
11
|
+
|
|
12
|
+
## API And Function Shape
|
|
13
|
+
|
|
14
|
+
- Keep public interfaces narrow and explicit.
|
|
15
|
+
- When a function or method accumulates many parameters, prefer a named input object/struct/type that reflects the business operation.
|
|
16
|
+
- Keep return shapes stable for existing consumers; additive changes are safer than renames or removals.
|
|
17
|
+
- Do not introduce new dependencies when an existing project dependency or helper already covers the need.
|
|
18
|
+
|
|
19
|
+
## Compatibility
|
|
20
|
+
|
|
21
|
+
- Preserve existing API response fields, request parameters, database columns, config keys, permission keys, and event payloads unless the baseline and technical plan explicitly approve a breaking change.
|
|
22
|
+
- For breaking changes, include migration, rollout, fallback, and rollback tasks.
|
|
23
|
+
- Generated artifacts, mocks, schema clients, DI wiring, or lockfiles must be updated when the project toolchain requires them.
|
|
24
|
+
|
|
25
|
+
## Reuse First
|
|
26
|
+
|
|
27
|
+
Before writing a new task, search for:
|
|
28
|
+
|
|
29
|
+
- Similar business capability.
|
|
30
|
+
- Existing helper/library/dependency.
|
|
31
|
+
- Existing naming, layering, error, validation, logging, permission, state, or UI pattern.
|
|
32
|
+
|
|
33
|
+
If reuse vs new changes scope, ownership, compatibility, or maintenance cost, link the task to the confirmed `CR-*` decision.
|
package/plugins/devflow-implementation/skills/workflow-change-plan/references/ddl-guidelines.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# DDL 规范
|
|
2
|
+
|
|
3
|
+
生成数据库变更时遵循以下规范。
|
|
4
|
+
|
|
5
|
+
Project-specific database rules override this file. Use this file only when the target project uses a MySQL-like relational database and no stronger local DDL guide exists. If the database type is unknown or non-relational, mark the migration strategy as `待确认` instead of forcing this template.
|
|
6
|
+
|
|
7
|
+
## 字段类型选择
|
|
8
|
+
|
|
9
|
+
| 数据类型 | 推荐类型 | 说明 |
|
|
10
|
+
|----------|----------|------|
|
|
11
|
+
| 主键 | `bigint NOT NULL AUTO_INCREMENT` | 统一使用 bigint |
|
|
12
|
+
| 外键/关联ID | `bigint NOT NULL DEFAULT 0` | 与主键类型一致 |
|
|
13
|
+
| 状态/类型 | `tinyint NOT NULL DEFAULT 0` | 枚举值用 tinyint |
|
|
14
|
+
| 短文本(<256) | `varchar(N)` | N 为实际最大长度 |
|
|
15
|
+
| 长文本 | `text` | 不定长大文本 |
|
|
16
|
+
| 金额 | `bigint` | 单位:分,避免浮点精度 |
|
|
17
|
+
| 时间戳 | `datetime` 或 `bigint`(毫秒) | 根据项目规范选择 |
|
|
18
|
+
| 布尔值 | `tinyint NOT NULL DEFAULT 0` | 0-否,1-是 |
|
|
19
|
+
| JSON 数据 | `json` 或 `text` | 根据 MySQL 版本选择 |
|
|
20
|
+
|
|
21
|
+
## 索引设计原则
|
|
22
|
+
|
|
23
|
+
1. 每表必须有主键,使用 `bigint AUTO_INCREMENT`
|
|
24
|
+
2. 所有 `_id` 结尾的外键字段必须建索引
|
|
25
|
+
3. WHERE 条件中高频使用的字段建索引
|
|
26
|
+
4. 联合索引遵循最左前缀原则,区分度高的字段放前面,命名 `idx_字段1_字段2`
|
|
27
|
+
5. 业务唯一字段使用 `UNIQUE KEY`
|
|
28
|
+
6. 避免冗余索引:已有 `idx_a_b` 则不需要单独的 `idx_a`
|
|
29
|
+
|
|
30
|
+
## CREATE TABLE 模板
|
|
31
|
+
|
|
32
|
+
```sql
|
|
33
|
+
CREATE TABLE `表名` (
|
|
34
|
+
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
35
|
+
`user_id` bigint NOT NULL DEFAULT 0 COMMENT '用户ID',
|
|
36
|
+
`type` tinyint NOT NULL DEFAULT 0 COMMENT '类型:0-默认,1-xxx',
|
|
37
|
+
`status` tinyint NOT NULL DEFAULT 0 COMMENT '状态:0-初始,1-处理中,2-完成',
|
|
38
|
+
`name` varchar(64) NOT NULL DEFAULT '' COMMENT '名称',
|
|
39
|
+
`amount` bigint NOT NULL DEFAULT 0 COMMENT '金额,单位:分',
|
|
40
|
+
`extra` text COMMENT '扩展信息JSON',
|
|
41
|
+
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
42
|
+
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
43
|
+
PRIMARY KEY (`id`),
|
|
44
|
+
KEY `idx_user_id` (`user_id`),
|
|
45
|
+
KEY `idx_created_at` (`created_at`)
|
|
46
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='表说明';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## ALTER TABLE 规范
|
|
50
|
+
|
|
51
|
+
```sql
|
|
52
|
+
-- 新增字段(指定位置)
|
|
53
|
+
ALTER TABLE `表名` ADD COLUMN `新字段` bigint NOT NULL DEFAULT 0 COMMENT '说明' AFTER `某字段`;
|
|
54
|
+
|
|
55
|
+
-- 新增索引
|
|
56
|
+
ALTER TABLE `表名` ADD INDEX `idx_字段名` (`字段名`);
|
|
57
|
+
|
|
58
|
+
-- 大表新增字段(MySQL 8.0+,仅支持表末尾)
|
|
59
|
+
ALTER TABLE `表名` ADD COLUMN `新字段` bigint NOT NULL DEFAULT 0 COMMENT '说明', ALGORITHM=INSTANT;
|
|
60
|
+
```
|
package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# 输出模板
|
|
2
|
+
|
|
3
|
+
生成变更清单时使用此模板。根据实际项目的分层结构调整章节,不必拘泥于示例中的层级名称。
|
|
4
|
+
|
|
5
|
+
> **MANDATORY:所有完成标准(`完成标准`)必须使用 `- [ ]` checkbox 格式。**
|
|
6
|
+
>
|
|
7
|
+
> 正确格式:
|
|
8
|
+
> ```
|
|
9
|
+
> - [ ] 所有新增字段设默认值,旧字段不变
|
|
10
|
+
> - [ ] DDL 执行后表结构符合预期
|
|
11
|
+
> ```
|
|
12
|
+
>
|
|
13
|
+
> 错误格式(纯列表无法被 code_review 门禁自动验证):
|
|
14
|
+
> ```
|
|
15
|
+
> - 所有新增字段设默认值
|
|
16
|
+
> - 功能正常工作
|
|
17
|
+
> ```
|
|
18
|
+
>
|
|
19
|
+
> 完成标准在执行阶段由 `code_review` 门禁自动逐条验证。每条标准必须描述**可通过静态代码分析验证的具体条件**(精确到类名/方法名/字段名/返回值/文件行),不得使用"确保功能正确"、"用户体验良好"等模糊描述。标准模糊的条目将被标记为 `⚠️ UNVERIFIABLE`,无法通过自动化验证。
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
# <功能名称> - 变更清单
|
|
25
|
+
|
|
26
|
+
> 基于技术文档:`.planning/features/{功能名}/前端技术方案.md` 和 `.planning/features/{功能名}/后端技术方案.md`
|
|
27
|
+
|
|
28
|
+
> 当前执行切片:`{{SL-001}}` — {{切片名称}}。本清单只生成该切片任务;后置切片仅作为上下文和风险记录。
|
|
29
|
+
|
|
30
|
+
## 项目规范摘要
|
|
31
|
+
|
|
32
|
+
> 从项目规则包、CLAUDE.md、AGENTS.md 或扫描结果中提取,确保后续执行任务时遵循。
|
|
33
|
+
|
|
34
|
+
- **技术栈**:语言 / 框架 / 主要依赖
|
|
35
|
+
- **分层结构**:项目的分层方式(如 Domain → DAO → Service → Handler)
|
|
36
|
+
- **规则来源**:`.planning/rules/` / `.context/spec/` / `.context/workflow/` / `.planning/lessons/` / `AGENTS.md` / `CLAUDE.md`
|
|
37
|
+
- **关键规范**:核心编码规则(命名、参数限制、错误处理、日志、事务、分页、权限等)
|
|
38
|
+
- **执行契约**:层级顺序、测试策略、codegen/mock/DI/migration 要求
|
|
39
|
+
- **经验教训**:与本次任务相关的历史教训
|
|
40
|
+
- **工具库**:项目已封装的公共组件(HTTP client、logger、缓存等)
|
|
41
|
+
|
|
42
|
+
## 需求基线与拍板追踪
|
|
43
|
+
|
|
44
|
+
| 来源对象 | 名称/摘要 | 承接方式 | 状态 |
|
|
45
|
+
|----------|-----------|----------|------|
|
|
46
|
+
| SL-001 / FP-001 | {{功能点}} | {{对应任务编号或不涉及}} | {{已承接/待确认/不涉及}} |
|
|
47
|
+
| SL-001 / BR-001 | {{业务规则}} | {{对应任务编号或不涉及}} | {{已承接/待确认/不涉及}} |
|
|
48
|
+
| SL-001 / BC-001 | {{边界场景}} | {{对应任务编号或不涉及}} | {{已承接/待确认/不涉及}} |
|
|
49
|
+
| SL-001 / CR-001 | {{反向审视决策}} | {{对应任务编号或阻塞项}} | {{已承接/待确认/阻塞}} |
|
|
50
|
+
|
|
51
|
+
## 阻塞性待确认项
|
|
52
|
+
|
|
53
|
+
| 问题ID/CR ID | 影响 | 当前处理 |
|
|
54
|
+
|--------------|------|----------|
|
|
55
|
+
| Q-001 / CR-001 | {{影响 scope/语义/归属/兼容性/成本}} | {{停止生成相关任务/暂不进入执行/待用户拍板}} |
|
|
56
|
+
|
|
57
|
+
## 一、数据库变更
|
|
58
|
+
|
|
59
|
+
### DDL 执行清单
|
|
60
|
+
|
|
61
|
+
| 序号 | 操作类型 | 表名 | 说明 | 是否可热更 |
|
|
62
|
+
|------|----------|------|------|------------|
|
|
63
|
+
| 1 | CREATE TABLE | xxx | 新建xxx表 | 是 |
|
|
64
|
+
| 2 | ALTER TABLE | yyy | 新增zzz字段 | 是/否 |
|
|
65
|
+
|
|
66
|
+
#### DDL-1: 新建 xxx 表
|
|
67
|
+
|
|
68
|
+
(完整 DDL,遵循 ddl-guidelines.md)
|
|
69
|
+
|
|
70
|
+
#### DDL-2: 修改 yyy 表
|
|
71
|
+
|
|
72
|
+
(ALTER 语句)
|
|
73
|
+
|
|
74
|
+
### 数据迁移脚本
|
|
75
|
+
|
|
76
|
+
如需数据迁移,列出迁移 SQL:
|
|
77
|
+
- 迁移说明
|
|
78
|
+
- 预计影响行数
|
|
79
|
+
- 建议执行方式(分批 / 一次性)
|
|
80
|
+
|
|
81
|
+
## 二、代码变更清单
|
|
82
|
+
|
|
83
|
+
按项目分层结构和依赖顺序组织。每个任务包含:
|
|
84
|
+
|
|
85
|
+
#### [编号] 任务标题
|
|
86
|
+
|
|
87
|
+
- **文件**:`完整文件路径`
|
|
88
|
+
- **类型**:新建 / 修改
|
|
89
|
+
- **依赖**:前置任务编号(无则填"无")
|
|
90
|
+
- **参考实现**:`xxx.go` 的 YYY 方法(有则填写,无则省略)
|
|
91
|
+
- **Slice**:`SL-001`
|
|
92
|
+
- **需求来源**:`FP-*` / `BR-*` / `BC-*` / `CR-*` / 技术方案章节
|
|
93
|
+
- **适用规范**:必须阅读的规则文件或章节
|
|
94
|
+
- **相关经验教训**:相关 lesson ID 或历史记录(无则填"无")
|
|
95
|
+
- **执行前门禁**:编码前必须确认的规则、依赖、数据或生成物
|
|
96
|
+
- **测试策略**:
|
|
97
|
+
- 单元测试:需要/不需要;原因;建议覆盖场景;建议测试位置
|
|
98
|
+
- 集成/API/组件测试:需要/不需要;原因;建议覆盖场景;建议测试位置
|
|
99
|
+
- 迁移/兼容验证:需要/不需要;原因
|
|
100
|
+
- 人工/浏览器验证:需要/不需要;场景与证据
|
|
101
|
+
- 规划级命令:目录级或范围级命令(如 `pytest app/tests/services/`、`pnpm test -- --run src/pages/...`、`pnpm build`)
|
|
102
|
+
- 执行级命令:执行阶段补充,精确到测试文件/用例;规划阶段填“执行阶段补充”
|
|
103
|
+
- 跳过自动化测试:类型(可接受/需评审/拒绝/无);原因;替代验证;技术债跟踪
|
|
104
|
+
- **审查要求**:变更清单一致性、规范审查、兼容性检查等
|
|
105
|
+
- **变更内容**:
|
|
106
|
+
- 具体要做什么(含核心代码片段,精确到类名/方法名/URL/字段名;禁止 TBD/TODO/模糊描述)
|
|
107
|
+
- **完成标准**:
|
|
108
|
+
- [ ] 具体可验证的检查项(每项可映射到一条验证命令,禁止"确保功能正确"类描述)
|
|
109
|
+
- **验证命令**(执行级,精确到文件/用例):`{{精确命令,如 pytest tests/services/test_xxx.py -k test_yyy}}`
|
|
110
|
+
|
|
111
|
+
> 按项目实际分层组织章节(如 Domain → DAO → Repository → Service → Web → 错误码 → 依赖注入),不同项目结构不同,灵活调整。
|
|
112
|
+
|
|
113
|
+
### 完成标准编写指南
|
|
114
|
+
|
|
115
|
+
每条完成标准将在执行阶段被 `code_review` 门禁自动验证,因此必须满足以下要求:
|
|
116
|
+
|
|
117
|
+
| 要求 | 好例子 | 坏例子 |
|
|
118
|
+
|------|--------|--------|
|
|
119
|
+
| 可静态验证 | `page=None 时 _evaluate_network_assertions 全部返回 skipped` | `功能正常工作` |
|
|
120
|
+
| 精确到代码元素 | `device_id 字段为 nullable=True, default=None` | `数据库字段正确` |
|
|
121
|
+
| 可映射到文件位置 | `execute_step 在 _run_action() 前注册 page.on("response")` | `监听器注册正确` |
|
|
122
|
+
| 单一断言 | `uiAssertionOptions 数组包含 10 个选项` | `UI 和 API 都正确实现` |
|
|
123
|
+
| 可映射验证命令 | `uv run pytest app/tests/test_web_executor.py -k network` | `测试通过` |
|
|
124
|
+
|
|
125
|
+
## 三、上线清单
|
|
126
|
+
|
|
127
|
+
### 3.1 数据库执行清单
|
|
128
|
+
|
|
129
|
+
| 序号 | SQL | 是否可热更 | 备注 |
|
|
130
|
+
|------|-----|------------|------|
|
|
131
|
+
| 1 | DDL-1 | 是 | 新建表 |
|
|
132
|
+
|
|
133
|
+
### 3.2 配置变更
|
|
134
|
+
|
|
135
|
+
| 文件 | 变更内容 | 说明 |
|
|
136
|
+
|------|----------|------|
|
|
137
|
+
|
|
138
|
+
### 3.3 中间件变更
|
|
139
|
+
|
|
140
|
+
Redis / MQ 等变更(如有)。
|
|
141
|
+
|
|
142
|
+
### 3.4 上线顺序
|
|
143
|
+
|
|
144
|
+
1. 执行数据库 DDL
|
|
145
|
+
2. 执行数据迁移脚本(如有)
|
|
146
|
+
3. 更新配置文件
|
|
147
|
+
4. 部署服务
|
|
148
|
+
5. 验证核心接口
|
|
149
|
+
|
|
150
|
+
## 四、回滚方案(可选)
|
|
151
|
+
|
|
152
|
+
> 询问用户是否需要
|
|
153
|
+
|
|
154
|
+
- 数据库回滚 SQL
|
|
155
|
+
- 配置回滚
|
|
156
|
+
- 服务回滚到上一版本
|
|
157
|
+
|
|
158
|
+
## 五、测试策略汇总(必填)
|
|
159
|
+
|
|
160
|
+
### 5.1 阶段边界
|
|
161
|
+
|
|
162
|
+
| 阶段 | 负责 | 不负责 |
|
|
163
|
+
|------|------|--------|
|
|
164
|
+
| workflow-change-plan | 规划任务级测试策略、范围、规划级命令、跳过自动化测试分级 | 不执行测试 |
|
|
165
|
+
| workflow-execute-phase | 新增/更新任务级单元、集成、组件、API、迁移验证;补充执行级命令并运行 | 不替代 UAT、全局回归、跨模块验收 |
|
|
166
|
+
| workflow-verify-work | UAT、全局工具链、E2E/浏览器验证、兼容性、回归、需求覆盖 | 不重新设计每个任务的单元/集成策略 |
|
|
167
|
+
|
|
168
|
+
### 5.2 任务测试策略矩阵
|
|
169
|
+
|
|
170
|
+
| 任务ID | 变更类型 | 单元测试 | 集成/API/组件测试 | 迁移/兼容验证 | 人工/浏览器验证 | 规划级命令 | 执行级命令 | 跳过自动化测试 |
|
|
171
|
+
|--------|----------|----------|-------------------|---------------|-----------------|------------|------------|----------------|
|
|
172
|
+
| T-01 | {{service/API/UI/config/job/integration}} | {{需要/不需要 + 原因}} | {{需要/不需要 + 原因}} | {{需要/不需要 + 原因}} | {{场景}} | `{{目录级命令}}` | 执行阶段补充 | {{无/可接受/需评审/拒绝 + 原因}} |
|
|
173
|
+
|
|
174
|
+
### 5.3 跳过自动化测试分级
|
|
175
|
+
|
|
176
|
+
| 类型 | 允许进入执行 | 示例 | 要求 |
|
|
177
|
+
|------|--------------|------|------|
|
|
178
|
+
| 可接受 | 是 | 纯文案、纯配置、纯样式且无逻辑分支 | 记录原因和替代验证 |
|
|
179
|
+
| 需评审 | 有条件 | 项目暂无测试框架、依赖环境不可用 | 记录风险、技术债和确认人 |
|
|
180
|
+
| 拒绝 | 否 | 太忙、后续补、QA 会测、人工点过了 | 必须补测试或标记阻塞 |
|
|
181
|
+
|
|
182
|
+
## 六、实现一致性与审查门禁
|
|
183
|
+
|
|
184
|
+
| 门禁 | 检查内容 | 通过标准 |
|
|
185
|
+
|------|----------|----------|
|
|
186
|
+
| 变更清单一致性 | 代码是否完整实现本清单、是否多实现、是否偏离任务描述 | 无漏实现/多实现/不一致,或已记录并获确认 |
|
|
187
|
+
| 需求基线一致性 | 实现范围是否符合 FP/BR/BC/CR 决策和待确认项 | 无越界实现,待确认项未被当成已确认范围 |
|
|
188
|
+
| 项目规范审查 | 是否满足项目规则包和任务适用规范 | 问题清单为空 |
|
|
189
|
+
| 测试与构建 | 是否满足任务测试策略和全局执行契约 | 规划级命令已定义,执行级命令在 execute 阶段补充并通过 |
|
|
190
|
+
| 兼容性 | 接口、数据库、配置、数据迁移是否兼容 | 兼容性风险已处理或已获确认 |
|
|
191
|
+
|
|
192
|
+
## 七、任务依赖图
|
|
193
|
+
|
|
194
|
+
使用 Mermaid 展示任务依赖关系:
|
|
195
|
+
|
|
196
|
+
(根据实际任务生成 mermaid graph TD 图)
|
|
197
|
+
|
|
198
|
+
## 八、执行建议
|
|
199
|
+
|
|
200
|
+
按批次列出执行顺序,每批内的任务可并行执行:
|
|
201
|
+
|
|
202
|
+
1. **第一批(无依赖)**:列出任务编号
|
|
203
|
+
2. **第二批**:列出任务编号
|
|
204
|
+
3. ...
|
|
205
|
+
|
|
206
|
+
每个任务执行时:
|
|
207
|
+
1. 读取任务描述
|
|
208
|
+
2. 输出 Rule Activation:适用规范、相关经验教训、测试策略、规划级命令、执行级命令
|
|
209
|
+
3. 扫描项目中同类功能的现有实现
|
|
210
|
+
4. 确认使用项目已有的工具库和模式
|
|
211
|
+
5. 在编码前或编码中新增/更新对应测试;不得堆到所有代码完成后的独立测试轮次
|
|
212
|
+
6. 编写代码
|
|
213
|
+
7. 补充执行级命令并运行任务要求的测试/构建/codegen
|
|
214
|
+
8. 运行验证铁律:IDENTIFY → RUN → READ → VERIFY → ONLY THEN claim done
|
|
215
|
+
9. 检查 Spec Compliance Gate:相关 depth spec 的 MUST 规则均已满足或已说明不适用
|
|
216
|
+
10. 检查完成标准和审查门禁
|
|
217
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Project Rule Package Contract
|
|
2
|
+
|
|
3
|
+
Use this contract when generating implementation change lists. A project rule package turns technical plans into executable tasks with explicit correctness gates.
|
|
4
|
+
|
|
5
|
+
## Discovery Order
|
|
6
|
+
|
|
7
|
+
Look for rule sources in the target project, in this order:
|
|
8
|
+
|
|
9
|
+
1. `.planning/rules/INDEX.md`
|
|
10
|
+
2. `.planning/execution-contract.md`
|
|
11
|
+
3. `.planning/toolchain.md`
|
|
12
|
+
4. `.planning/lessons/README.md`
|
|
13
|
+
5. `.planning/milestones/`
|
|
14
|
+
6. `.planning/requirements/`
|
|
15
|
+
7. `.context/spec/index.md`
|
|
16
|
+
8. matching `.context/spec/stacks/{stack_key}.md`
|
|
17
|
+
9. matching `.context/spec/frontend|backend/{codebase}.md`
|
|
18
|
+
10. `.context/spec/`
|
|
19
|
+
11. `.context/workflow/tdd.md`
|
|
20
|
+
12. `.context/workflow/verification.md`
|
|
21
|
+
13. `.context/workflow/checklist.md`
|
|
22
|
+
14. `.context/lessons/README.md`
|
|
23
|
+
15. root `AGENTS.md`, `CLAUDE.md`, or equivalent project instruction files
|
|
24
|
+
|
|
25
|
+
If none exist, explicitly write `未发现项目规则包` and continue using the technical documents and discovered code patterns.
|
|
26
|
+
|
|
27
|
+
History rule:
|
|
28
|
+
|
|
29
|
+
- Use `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and phase `CONTEXT.md` files as the primary history model.
|
|
30
|
+
- Treat `.context/lessons/` and `features/` as compatible legacy/project-rule evidence only when present in the target project.
|
|
31
|
+
- Do not require outbound-call style history files.
|
|
32
|
+
|
|
33
|
+
## Task-Level Requirements
|
|
34
|
+
|
|
35
|
+
Each implementation task must include:
|
|
36
|
+
|
|
37
|
+
- Requirement source: `FP-*`, `BR-*`, `BC-*`, related `CR-*`, or technical-plan section.
|
|
38
|
+
- Applicable rules: specific rule files or sections the implementer must read.
|
|
39
|
+
- Related lessons: prior lessons that could affect this task.
|
|
40
|
+
- Execution gate: what must be checked before coding.
|
|
41
|
+
- Test requirement: unit, integration, acceptance, build, codegen, migration, or manual verification.
|
|
42
|
+
- Review requirement: checklist items that must be satisfied before the task is complete.
|
|
43
|
+
|
|
44
|
+
## Execution Contract
|
|
45
|
+
|
|
46
|
+
When the project declares a layer order, TDD strategy, code generation step, mock strategy, or dependency injection step, encode it in the change list rather than leaving it as narrative context.
|
|
47
|
+
|
|
48
|
+
Examples:
|
|
49
|
+
|
|
50
|
+
- Layer order: Domain -> DAO -> Repository -> Service -> Handler -> Dependency Injection -> Integration Test.
|
|
51
|
+
- TDD strategy: service layer red-green loop; other layers direct implementation; integration tests after all layers.
|
|
52
|
+
- Code generation: regenerate mocks, wire files, API clients, ORM artifacts, or schema files when relevant.
|
|
53
|
+
- Verification: run target tests, full tests, build, lint, and rule review loop as applicable.
|
|
54
|
+
|
|
55
|
+
Pending baseline decisions must not become implementation tasks. Put them in the blocking section until the user confirms the scope or rationale.
|