@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,139 @@
|
|
|
1
|
+
# 功能点梳理:{{功能名称}}
|
|
2
|
+
|
|
3
|
+
## 一、来源信息
|
|
4
|
+
|
|
5
|
+
- **需求基线**:`.planning/requirements/baseline.md`
|
|
6
|
+
- **功能名称**:{{功能名称}}
|
|
7
|
+
- **功能名**:{{功能名}}
|
|
8
|
+
- **输出目录**:`.planning/features/{{功能名}}/`
|
|
9
|
+
- **生成时间**:{{日期}}
|
|
10
|
+
- **当前执行切片**:{{SL-001}} — {{切片名称}}
|
|
11
|
+
|
|
12
|
+
## 二、范围摘要
|
|
13
|
+
|
|
14
|
+
### 2.0 当前功能切片
|
|
15
|
+
|
|
16
|
+
> 默认只展开当前功能切片。`depends_on` 仅作为历史上下文、复用、兼容或约束来源,除非当前切片明确修改/影响它,否则不生成独立节点。
|
|
17
|
+
|
|
18
|
+
- **当前功能名**:{{功能名}}
|
|
19
|
+
- **本轮范围说明**:{{本轮新增/修改/影响范围摘要}}
|
|
20
|
+
- **当前执行切片**:{{SL-001}} — {{切片名称}}
|
|
21
|
+
|
|
22
|
+
| 类型 | ID | 名称/说明 | 本轮关系 | 展开处理 |
|
|
23
|
+
|------|----|-----------|----------|----------|
|
|
24
|
+
| FP | FP-001 | {{功能点名称}} | {{新增/修改/影响}} | {{展开为章节路径}} |
|
|
25
|
+
| BR | BR-001 | {{规则说明}} | {{新增/修改/影响}} | {{承接到逻辑/规则节点}} |
|
|
26
|
+
| BC | BC-001 | {{场景说明}} | {{新增/修改/影响}} | {{承接到边界/异常节点}} |
|
|
27
|
+
|
|
28
|
+
### 2.0a 跨功能依赖承接
|
|
29
|
+
|
|
30
|
+
| 依赖对象 | 关系 | 在本轮中的作用 | 输出处理 |
|
|
31
|
+
|----------|------|----------------|----------|
|
|
32
|
+
| FP-003 | {{前置依赖/修改/复用/兼容/替换/影响}} | {{为什么需要读取该历史项}} | {{仅作上下文/承接为兼容约束/当前切片明确修改所以展开}} |
|
|
33
|
+
|
|
34
|
+
### 2.1 已纳入功能点
|
|
35
|
+
|
|
36
|
+
| 功能点ID | 功能点 | 类型 | 状态 | 优先级 | 输出位置 |
|
|
37
|
+
|----------|--------|------|------|--------|----------|
|
|
38
|
+
| FP-001 | {{功能点名称}} | {{新增/修改/影响}} | {{明确/待确认/推断,待确认}} | {{P0/P1/P2}} | {{章节路径}} |
|
|
39
|
+
|
|
40
|
+
### 2.2 已纳入规则与边界
|
|
41
|
+
|
|
42
|
+
| ID | 类型 | 关联功能点 | 说明 | 输出位置 |
|
|
43
|
+
|----|------|------------|------|----------|
|
|
44
|
+
| BR-001 | 业务规则 | FP-001 | {{规则说明}} | {{章节路径}} |
|
|
45
|
+
| BC-001 | 边界场景 | FP-001 | {{场景说明}} | {{章节路径}} |
|
|
46
|
+
|
|
47
|
+
### 2.3 不纳入/暂不处理
|
|
48
|
+
|
|
49
|
+
| 内容 | 原因 | 来源 |
|
|
50
|
+
|------|------|------|
|
|
51
|
+
| {{范围外内容}} | {{原因}} | {{来源}} |
|
|
52
|
+
| {{后置切片内容}} | 后置切片,非当前执行范围 | {{SL-002 / baseline 3.0b}} |
|
|
53
|
+
|
|
54
|
+
### 2.4 反向审视与用户拍板承接
|
|
55
|
+
|
|
56
|
+
| CR ID | 维度 | 用户决策/状态 | 输出处理 |
|
|
57
|
+
|-------|------|---------------|----------|
|
|
58
|
+
| CR-001 | {{冲突/复用/历史/过度工程/替代方案}} | {{已确认/待确认/不适用}} | {{对应章节/不展开/待确认}} |
|
|
59
|
+
|
|
60
|
+
## 三、功能点三维梳理
|
|
61
|
+
|
|
62
|
+
### 3.0 关键链路骨架
|
|
63
|
+
|
|
64
|
+
> 先确认每个 FP 的触发、写入、读取、状态、异常和验收锚点,再展开样式/功能/逻辑节点。高风险链路必须有矩阵,避免长文档掩盖断裂点。
|
|
65
|
+
|
|
66
|
+
| Slice | FP | 结果 | 触发/入口 | 写入/状态变化 | 读取/下游消费 | 异常/幂等 | 涉及代码库 | 验收锚点 |
|
|
67
|
+
|-------|----|------|-----------|----------------|----------------|-----------|------------|----------|
|
|
68
|
+
| SL-001 | FP-001 | {{业务结果}} | {{页面/接口/命令/回调/消息}} | {{表/状态/消息}} | {{页面/API/任务/端}} | {{重复/失败/延迟/权限}} | {{codebase}} | {{可验证路径}} |
|
|
69
|
+
|
|
70
|
+
### 3.0a 高风险链路矩阵
|
|
71
|
+
|
|
72
|
+
| 链路类型 | 关联 FP | 必查项 | 输出处理 | 缺口/结论 |
|
|
73
|
+
|----------|---------|--------|----------|-----------|
|
|
74
|
+
| {{通知/异步/迁移/字段替换/记录模型/权限菜单/外部幂等/列表展示}} | FP-001 | {{写入点、读取点、seed、调用方矩阵等}} | {{对应章节/待确认/不适用}} | {{通过/阻塞/非阻塞}} |
|
|
75
|
+
|
|
76
|
+
### 3.1 后台
|
|
77
|
+
|
|
78
|
+
- {{页面或模块}}
|
|
79
|
+
- {{页面区域}}
|
|
80
|
+
- {{组件/字段/按钮/表格列/弹窗}} ({{FP/BR/BC ID}}{{,CR ID 如适用}})
|
|
81
|
+
- 样式
|
|
82
|
+
- {{文案、位置、组件类型、展示格式、空状态或 UI待确认}}
|
|
83
|
+
- 功能
|
|
84
|
+
- {{操作、系统响应、校验、权限、加载、异常、边界}}
|
|
85
|
+
- 逻辑
|
|
86
|
+
- {{仅写有来源的规则、计算、数据来源、状态流转;无则省略}}
|
|
87
|
+
|
|
88
|
+
### 3.2 C端
|
|
89
|
+
|
|
90
|
+
- {{页面或流程}}
|
|
91
|
+
- {{页面区域/流程节点}}
|
|
92
|
+
- {{组件/操作/状态}} ({{FP/BR/BC ID}}{{,CR ID 如适用}})
|
|
93
|
+
- 样式
|
|
94
|
+
- {{文案、位置、组件类型、展示格式、空状态或 UI待确认}}
|
|
95
|
+
- 功能
|
|
96
|
+
- {{操作路径、授权、提交、取消、超时、失败、重试}}
|
|
97
|
+
- 逻辑
|
|
98
|
+
- {{仅写有来源的规则、计算、数据来源、状态流转;无则省略}}
|
|
99
|
+
|
|
100
|
+
### 3.3 API/服务
|
|
101
|
+
|
|
102
|
+
- {{服务能力或任务}}
|
|
103
|
+
- {{触发方式/接口/任务节点}} ({{FP/BR/BC ID}}{{,CR ID 如适用}})
|
|
104
|
+
- 样式
|
|
105
|
+
- 不适用:非 UI 能力
|
|
106
|
+
- 功能
|
|
107
|
+
- {{触发、输入校验、输出、幂等、异常、重试}}
|
|
108
|
+
- 逻辑
|
|
109
|
+
- {{业务规则、状态变更、数据来源、兼容性}}
|
|
110
|
+
|
|
111
|
+
## 四、待确认事项
|
|
112
|
+
|
|
113
|
+
| 问题ID | 分类 | 关联对象 | 问题 | 影响 | 当前处理 |
|
|
114
|
+
|--------|------|----------|------|------|----------|
|
|
115
|
+
| Q-001 | {{阻塞待确认/非阻塞待确认/UI待确认/枚举待确认/接口/数据待确认}} | {{FP/BR/BC/组件}} | {{问题}} | {{影响}} | {{已标注待确认/需回到 workflow-requirement-baseline}} |
|
|
116
|
+
|
|
117
|
+
## 五、追溯关系
|
|
118
|
+
|
|
119
|
+
| 输出章节 | 关联 FP | 关联 BR | 关联 BC | 关联 CR | 来源说明 |
|
|
120
|
+
|----------|---------|---------|---------|---------|----------|
|
|
121
|
+
| {{章节路径}} | FP-001 | BR-001 | BC-001 | CR-001 | {{baseline 来源段落/章节}} |
|
|
122
|
+
|
|
123
|
+
## 六、自查结果
|
|
124
|
+
|
|
125
|
+
| 检查项 | 结果 | 说明 |
|
|
126
|
+
|--------|------|------|
|
|
127
|
+
| 输出目录一致 | {{通过/有问题}} | {{说明}} |
|
|
128
|
+
| FP 覆盖完整 | {{通过/有问题}} | {{说明}} |
|
|
129
|
+
| 反向审视承接 | {{通过/有问题}} | {{说明}} |
|
|
130
|
+
| 样式/功能完整 | {{通过/有问题}} | {{说明}} |
|
|
131
|
+
| 逻辑均有来源 | {{通过/有问题}} | {{说明}} |
|
|
132
|
+
| 权限规则正确 | {{通过/有问题}} | {{说明}} |
|
|
133
|
+
| 只读/编辑未误推断 | {{通过/有问题}} | {{说明}} |
|
|
134
|
+
| 枚举/状态值明确 | {{通过/有问题}} | {{说明}} |
|
|
135
|
+
| 异常/边界覆盖 | {{通过/有问题}} | {{说明}} |
|
|
136
|
+
| 链路骨架完整 | {{通过/有问题}} | {{说明}} |
|
|
137
|
+
| 高风险链路门禁 | {{通过/有问题}} | {{说明}} |
|
|
138
|
+
| 切片范围一致 | {{通过/有问题}} | {{说明}} |
|
|
139
|
+
| 未包含技术方案内容 | {{通过/有问题}} | {{说明}} |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 核心规避规则(来自真实 Bug)
|
|
2
|
+
|
|
3
|
+
1. **权限控制统一为"不显示"** — 无权限时按钮不显示,而非置灰
|
|
4
|
+
2. **只读字段不可推断为可编辑** — baseline 未说明可编辑的字段默认为只读
|
|
5
|
+
3. **计算规则必须有原文依据** — 金额正负、余额计算等必须来自 baseline 或 baseline 记录的来源材料
|
|
6
|
+
4. **同名字段在不同页面定义可能不同** — 不能跨页面复用
|
|
7
|
+
5. **baseline 记录的评审结论必须严格遵循** — 优先级最高
|
|
8
|
+
6. **下拉选项必须列出具体枚举值** — 不能写"系统枚举"
|
|
9
|
+
7. **功能模块按前后台分类组织** — C端归C端,后台归后台
|
|
10
|
+
8. **待确认不能写成事实** — baseline 待确认项只能进入待确认区或节点内标记,不能当作已确认规则
|
|
11
|
+
9. **范围外内容不生成节点** — baseline 范围控制中明确不包含或暂不处理的内容,不得展开为功能点
|
|
12
|
+
10. **回答影响基线时停止** — 用户补充若改变 FP/BR/BC/范围/输出目录,应回到 workflow-requirement-baseline 更新 baseline
|
package/plugins/devflow-design/skills/workflow-feature-breakdown/references/exception-checklist.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 异常场景检查清单
|
|
2
|
+
|
|
3
|
+
## 用户主动操作
|
|
4
|
+
- [ ] 用户取消操作如何处理
|
|
5
|
+
- [ ] 用户退出页面如何处理
|
|
6
|
+
- [ ] 用户重复操作如何处理
|
|
7
|
+
|
|
8
|
+
## 系统超时
|
|
9
|
+
- [ ] 支付超时如何处理
|
|
10
|
+
- [ ] 接口超时如何处理
|
|
11
|
+
- [ ] 回调超时如何处理
|
|
12
|
+
|
|
13
|
+
## 数据异常
|
|
14
|
+
- [ ] 余额不足如何处理
|
|
15
|
+
- [ ] 参数错误如何处理
|
|
16
|
+
- [ ] 数据不一致如何处理
|
|
17
|
+
|
|
18
|
+
## 第三方异常
|
|
19
|
+
- [ ] 回调失败如何重试
|
|
20
|
+
- [ ] 状态不一致如何同步
|
|
21
|
+
- [ ] 主动查询机制
|
|
22
|
+
|
|
23
|
+
## 绕过场景
|
|
24
|
+
- [ ] 站外支付如何识别
|
|
25
|
+
- [ ] 跳过中间环节如何处理
|
|
26
|
+
|
|
27
|
+
## 输出标注规则
|
|
28
|
+
- [ ] baseline 已明确的异常场景写入对应节点的功能维度
|
|
29
|
+
- [ ] baseline 未明确但测试必须关注的异常,写入待确认事项
|
|
30
|
+
- [ ] 缺少重试、补偿、幂等、告警规则时,标记为接口/数据待确认或非阻塞待确认
|
|
31
|
+
- [ ] 不要自行补充重试次数、超时时长、补偿策略等业务规则
|
package/plugins/devflow-design/skills/workflow-feature-breakdown/references/trace-integrity-guide.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# 链路完整性防失真指南
|
|
2
|
+
|
|
3
|
+
Use this reference when a feature spans multiple pages, services, codebases, async jobs, old-system migration, or field/source replacement. The goal is to keep the feature breakdown test-readable without letting long UI trees hide broken execution chains.
|
|
4
|
+
|
|
5
|
+
This is a project-level guardrail, not a business-feature rulebook. Lessons from past features can trigger these checks, but this file must describe reusable failure modes and review gates rather than naming one historical feature as the default pattern.
|
|
6
|
+
|
|
7
|
+
## 1. Critical Trace Card
|
|
8
|
+
|
|
9
|
+
Write one short card for every FP before leaf-node expansion:
|
|
10
|
+
|
|
11
|
+
| 字段 | 要求 |
|
|
12
|
+
|------|------|
|
|
13
|
+
| 结果 | 用户或业务最终得到什么 |
|
|
14
|
+
| 触发 | 谁/什么事件启动链路 |
|
|
15
|
+
| 入口 | 页面、接口、命令、回调、菜单、消息或调用方 |
|
|
16
|
+
| 写入 | 被创建/更新的表、状态、缓存或消息 |
|
|
17
|
+
| 读取 | 哪个页面、接口、任务或端消费该数据 |
|
|
18
|
+
| 状态 | 关键状态流转、可见性、权限或归属变化 |
|
|
19
|
+
| 异常 | 重复、失败、延迟、缺失、并发时如何处理 |
|
|
20
|
+
| 范围 | 涉及代码库和明确不做项 |
|
|
21
|
+
| 验收 | 一个可验证的用户路径或系统断言 |
|
|
22
|
+
|
|
23
|
+
If a card has no clear write/read pair or no test anchor, mark the FP as high risk and create a pending item.
|
|
24
|
+
|
|
25
|
+
## 2. High-Risk Chain Matrices
|
|
26
|
+
|
|
27
|
+
### A. Notification / Message / Homepage Entry
|
|
28
|
+
|
|
29
|
+
Use when the feature says notification, message center, workbench/homepage entry, unread count, or jump link.
|
|
30
|
+
|
|
31
|
+
Required checks:
|
|
32
|
+
|
|
33
|
+
- Producer event and dedupe key.
|
|
34
|
+
- Real write target: table/model/API used by the visible consumer, not the semantic name guessed from wording.
|
|
35
|
+
- Consumer path: frontend list/count API and its filters.
|
|
36
|
+
- Jump path and permission/menu availability.
|
|
37
|
+
- Empty/no-op case: when no message should be produced.
|
|
38
|
+
|
|
39
|
+
Review fails if the document says "send notification" but does not identify the visible consumer's read model.
|
|
40
|
+
|
|
41
|
+
### B. Async / Scheduled / Callback / Polling
|
|
42
|
+
|
|
43
|
+
Use when plans, jobs, callbacks, polling, external platform status, delayed sync, model analysis, or retries exist.
|
|
44
|
+
|
|
45
|
+
Required checks:
|
|
46
|
+
|
|
47
|
+
- Creation entry.
|
|
48
|
+
- Command/job class.
|
|
49
|
+
- Command registration.
|
|
50
|
+
- Database or scheduler seed.
|
|
51
|
+
- Runtime trigger frequency and enabled status.
|
|
52
|
+
- Idempotency key.
|
|
53
|
+
- Monitoring/status field.
|
|
54
|
+
- Recovery behavior for partial failure.
|
|
55
|
+
|
|
56
|
+
Review fails if code command creation is covered but scheduler seed or enabled runtime is not mentioned.
|
|
57
|
+
|
|
58
|
+
### C. Migration From Old System
|
|
59
|
+
|
|
60
|
+
Use when moving old pages, services, OpenAPI bridges, configs, or runtime behavior into the current system.
|
|
61
|
+
|
|
62
|
+
Required checks:
|
|
63
|
+
|
|
64
|
+
- Old entry route and caller context parameters.
|
|
65
|
+
- Old page's primary data table/model.
|
|
66
|
+
- Old filter fields and operation buttons.
|
|
67
|
+
- New route, new data model, and compatibility redirects.
|
|
68
|
+
- Runtime dependency policy: old runtime allowed/disallowed; true external platform seam allowed/disallowed.
|
|
69
|
+
- Data migration boundary: which configuration/history/runtime records move and which do not.
|
|
70
|
+
|
|
71
|
+
Review fails if the output recreates a page by menu name but omits old entry parameters or old operation semantics.
|
|
72
|
+
|
|
73
|
+
### D. Field / Contract Replacement
|
|
74
|
+
|
|
75
|
+
Use when a new field or config source replaces an old one.
|
|
76
|
+
|
|
77
|
+
Required checks:
|
|
78
|
+
|
|
79
|
+
- Caller matrix: every page, dialog, batch action, backend API, cron job, and mobile/API caller that can trigger the business action.
|
|
80
|
+
- Frontend control and validation.
|
|
81
|
+
- API request DTO and server validation.
|
|
82
|
+
- Persistence and snapshot fields.
|
|
83
|
+
- Execution-time source of truth.
|
|
84
|
+
- Old field downgrade/removal: validation, hints, required flags, request params, and fallback behavior.
|
|
85
|
+
|
|
86
|
+
Review fails if only the new page is covered while existing callers can still use the old contract.
|
|
87
|
+
|
|
88
|
+
### E. Record / Plan / Task Object Taxonomy
|
|
89
|
+
|
|
90
|
+
Use when the feature mentions plan, target, job, record, call record, task, callback, or history.
|
|
91
|
+
|
|
92
|
+
Required checks:
|
|
93
|
+
|
|
94
|
+
- Define each object in business terms.
|
|
95
|
+
- Define which table stores each object.
|
|
96
|
+
- Define when an object may be created.
|
|
97
|
+
- Define which pages query which object.
|
|
98
|
+
- Define binding fields between objects.
|
|
99
|
+
- Confirm placeholders do not pollute business records.
|
|
100
|
+
|
|
101
|
+
Review fails if platform job records and CRM business records are collapsed into one table without an explicit rule.
|
|
102
|
+
|
|
103
|
+
### F. Permission / Menu / Route Reachability
|
|
104
|
+
|
|
105
|
+
Use for new pages, homepage/message direct links, dynamic menus, auth-center integration, or hidden routes.
|
|
106
|
+
|
|
107
|
+
Required checks:
|
|
108
|
+
|
|
109
|
+
- Page component path.
|
|
110
|
+
- Dynamic menu/auth-center record.
|
|
111
|
+
- Permission code or visibility rule.
|
|
112
|
+
- Direct entry behavior when menu sync is delayed.
|
|
113
|
+
- Route component normalization or fallback if the project uses dynamic components.
|
|
114
|
+
|
|
115
|
+
Review fails if an entry is visible but route reachability depends on unverified menu data.
|
|
116
|
+
|
|
117
|
+
### G. External Call / Model Analysis Idempotency
|
|
118
|
+
|
|
119
|
+
Use for third-party APIs, platform polling, recording download, transcript fetch, model calls, or callbacks.
|
|
120
|
+
|
|
121
|
+
Required checks:
|
|
122
|
+
|
|
123
|
+
- Local short-circuit fields before external calls.
|
|
124
|
+
- Idempotency key and status.
|
|
125
|
+
- Retry and cooldown policy.
|
|
126
|
+
- Preserve existing local data on partial external response.
|
|
127
|
+
- Separate platform sync from model analysis when both are side effects.
|
|
128
|
+
|
|
129
|
+
Review fails if repeated callback/poll/analyze can overwrite existing data or repeat costly external calls without a local missing-field trigger.
|
|
130
|
+
|
|
131
|
+
### H. List Display Contract
|
|
132
|
+
|
|
133
|
+
Use when a table column or card displays derived, summarized, permission-filtered, or AI-generated information.
|
|
134
|
+
|
|
135
|
+
Required checks:
|
|
136
|
+
|
|
137
|
+
- Stable display field exposed by backend.
|
|
138
|
+
- Source raw fields and transformation owner.
|
|
139
|
+
- Empty/failed/unauthorized display.
|
|
140
|
+
- Sorting/filtering field if different from display field.
|
|
141
|
+
|
|
142
|
+
Review fails if frontend is expected to choose among raw fields for a named business display such as "分析结果", "业务摘要", or other derived presentation fields.
|
|
143
|
+
|
|
144
|
+
## 3. Scope Pressure Rule
|
|
145
|
+
|
|
146
|
+
When the current slice has more than 8 FPs or a migration FP with many secondary pages:
|
|
147
|
+
|
|
148
|
+
- Keep the trace skeleton concise and mandatory.
|
|
149
|
+
- Expand P0 user-facing and execution-chain nodes first.
|
|
150
|
+
- Mark broad secondary CRUD/config pages as `范围占位` unless baseline explicitly requires full CRUD detail now.
|
|
151
|
+
- Put optional styling detail into `UI待确认` or `非阻塞待确认`; do not let it crowd out chain gates.
|
|
152
|
+
|
|
153
|
+
The review should prefer a shorter document with complete chains over a long document with many field nodes but missing seams.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# 三维描述规范
|
|
2
|
+
|
|
3
|
+
## 样式维度
|
|
4
|
+
描述元素视觉呈现和位置:
|
|
5
|
+
- 文案内容、位置信息、组件类型、展示规则
|
|
6
|
+
- 按钮:"按钮文案显示为'新增',位于页面头部右侧"
|
|
7
|
+
- 输入框:"字段标签显示为'订单编号',占位符显示'请输入'"
|
|
8
|
+
- 表格列:"展示订单编号文本,支持复制"
|
|
9
|
+
|
|
10
|
+
## 功能维度
|
|
11
|
+
描述用户操作和系统响应,覆盖边界:
|
|
12
|
+
- 交互行为、必填校验、格式校验、异常处理
|
|
13
|
+
- 权限控制(无权限时按钮不显示)
|
|
14
|
+
- 防重复提交(请求中按钮置灰)
|
|
15
|
+
- 空数据状态
|
|
16
|
+
|
|
17
|
+
## 逻辑维度
|
|
18
|
+
描述计算规则和业务约束,仅当有明确业务规则时才写:
|
|
19
|
+
- 计算公式、统计口径、状态联动、业务约束
|
|
20
|
+
- 数据来源、条件判断
|
|
21
|
+
|
|
22
|
+
## 细颗粒度拆分示例
|
|
23
|
+
|
|
24
|
+
### 筛选区
|
|
25
|
+
|
|
26
|
+
错误:把多个筛选条件聚合成一句。
|
|
27
|
+
|
|
28
|
+
正确:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
- 筛选区
|
|
32
|
+
- 订单编号输入框
|
|
33
|
+
- 来源:FP-001
|
|
34
|
+
- 样式
|
|
35
|
+
- 字段标签显示为"订单编号"
|
|
36
|
+
- 输入框占位符显示"请输入订单编号"
|
|
37
|
+
- 功能
|
|
38
|
+
- 支持手动输入和粘贴
|
|
39
|
+
- 点击查询后按订单编号精准筛选
|
|
40
|
+
- 逻辑
|
|
41
|
+
- 查询字段来自 baseline 数据要求;无来源则标记待确认
|
|
42
|
+
- 订单状态下拉选择
|
|
43
|
+
- 来源:FP-001/BR-001
|
|
44
|
+
- 样式
|
|
45
|
+
- 下拉框默认显示"全部"
|
|
46
|
+
- 功能
|
|
47
|
+
- 可选项必须列出具体枚举;缺失时标记枚举待确认
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 表格列
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
- 列表区
|
|
54
|
+
- 表格整体
|
|
55
|
+
- 来源:FP-002
|
|
56
|
+
- 样式
|
|
57
|
+
- 空数据时显示空状态文案;文案缺失时标记 UI待确认
|
|
58
|
+
- 功能
|
|
59
|
+
- 进入页面后加载列表
|
|
60
|
+
- 加载失败时提示并支持重试
|
|
61
|
+
- 列:订单编号
|
|
62
|
+
- 来源:FP-002
|
|
63
|
+
- 样式
|
|
64
|
+
- 展示订单编号文本
|
|
65
|
+
- 功能
|
|
66
|
+
- 只读展示,不可编辑
|
|
67
|
+
- 逻辑
|
|
68
|
+
- 数据来自订单号字段
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 弹窗表单
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
- 新增/编辑弹窗
|
|
75
|
+
- 表单字段:活动名称
|
|
76
|
+
- 来源:FP-003/BR-002
|
|
77
|
+
- 样式
|
|
78
|
+
- 字段标签显示为"活动名称"
|
|
79
|
+
- 标注必填标记
|
|
80
|
+
- 功能
|
|
81
|
+
- 为空时提交阻断并提示
|
|
82
|
+
- 重复时提示名称已存在
|
|
83
|
+
- 逻辑
|
|
84
|
+
- 活动名称唯一性规则必须来自 baseline
|
|
85
|
+
- 按钮:确定
|
|
86
|
+
- 来源:FP-003
|
|
87
|
+
- 样式
|
|
88
|
+
- 按钮文案显示为"确定"
|
|
89
|
+
- 功能
|
|
90
|
+
- 请求中按钮置灰,防止重复提交
|
|
91
|
+
- 接口失败时弹窗不关闭并提示错误
|
|
92
|
+
```
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-frontend-tech-spec
|
|
3
|
+
description: "Use when a requirement baseline and UI specification need a frontend technical design covering routes, components, state, APIs, reuse, and risks."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Legacy Command Metadata
|
|
7
|
+
|
|
8
|
+
Original slash-command metadata retained only as workflow invocation guidance.
|
|
9
|
+
|
|
10
|
+
```yaml
|
|
11
|
+
argument-hint: <功能名>
|
|
12
|
+
user-invocable: true
|
|
13
|
+
pattern: generator+tool-wrapper
|
|
14
|
+
inputs:
|
|
15
|
+
- .planning/features/{功能名}/功能点梳理.md
|
|
16
|
+
- .planning/features/{功能名}/UI-SPEC.md
|
|
17
|
+
- .planning/requirements/baseline.md
|
|
18
|
+
- .planning/PROJECT.md
|
|
19
|
+
- .planning/navigation/INDEX.md
|
|
20
|
+
- .planning/rules/INDEX.md
|
|
21
|
+
- .planning/execution-contract.md
|
|
22
|
+
- .planning/toolchain.md
|
|
23
|
+
- .planning/lessons/README.md
|
|
24
|
+
- .context/spec/index.md
|
|
25
|
+
- .context/spec/stacks/
|
|
26
|
+
- .context/spec/frontend/index.md
|
|
27
|
+
- .context/spec/frontend/
|
|
28
|
+
- .context/spec/design/
|
|
29
|
+
- .context/workflow/
|
|
30
|
+
- .context/lessons/README.md(如存在)
|
|
31
|
+
- references/frontend-stack-slots/common-web.md
|
|
32
|
+
- references/frontend-stack-slots/react.md
|
|
33
|
+
- references/frontend-stack-slots/next.md
|
|
34
|
+
- references/frontend-stack-slots/vue.md
|
|
35
|
+
- .planning/milestones/
|
|
36
|
+
- references/affected-module-exploration.md
|
|
37
|
+
output: .planning/features/{功能名}/前端技术方案.md
|
|
38
|
+
allowed-tools:
|
|
39
|
+
- Read
|
|
40
|
+
- Write
|
|
41
|
+
- Edit
|
|
42
|
+
- Bash
|
|
43
|
+
- Grep
|
|
44
|
+
- Glob
|
|
45
|
+
- ask
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
# 前端技术方案生成器
|
|
49
|
+
|
|
50
|
+
根据需求基线和前端现有代码,生成前端技术方案文档。
|
|
51
|
+
|
|
52
|
+
## 核心原则
|
|
53
|
+
|
|
54
|
+
**遇到不确定的地方,必须询问用户,不要自己做决定。**
|
|
55
|
+
|
|
56
|
+
## 工作流程
|
|
57
|
+
|
|
58
|
+
### 第一阶段:理解需求
|
|
59
|
+
|
|
60
|
+
1. 读取 `.planning/requirements/baseline.md` 理解需求
|
|
61
|
+
2. 读取 `.planning/PROJECT.md` 了解项目上下文
|
|
62
|
+
3. 如果 baseline.md 不存在,询问用户提供需求
|
|
63
|
+
4. 读取 `references/project-rule-contract.md`,按 Spec Read Contract 发现并加载目标项目的前端规则包:`.planning/rules/INDEX.md` → `.context/spec/index.md` → 命中的 stack spec → 命中的 frontend codebase spec → navigation → code-index(如存在且需要关系事实)→ 源码
|
|
64
|
+
5. 若 `.context/spec/design/index.md` 不存在,先调用 `devflow_design_rule(args=[])` 安装共享设计规则包;若仍不存在,记录“未发现设计规则包”并继续。
|
|
65
|
+
6. 若存在 `.context/spec/design/index.md`,读取设计规则入口。只把用户拍板、设计稿事实、现有项目规范、项目级已确认 token 作为实现依据;`.context/spec/design/recommendations/` 与 `ui-ux-pro-max` 查询结果只能补充实现注意点、风险、测试门禁或待确认事项。
|
|
66
|
+
7. 按 `references/project-rule-contract.md` 的 Stack Slot Loading 规则加载前端技术栈插槽:始终读取 `common-web.md`,再按技术栈读取 React / Next.js / Vue 插槽
|
|
67
|
+
8. 读取 baseline 的 `反向审视与用户拍板`、`待确认事项`、`下游输入契约`:
|
|
68
|
+
- 已确认的页面/交互/复用/替代方案决策必须进入前端方案
|
|
69
|
+
- 影响 scope、交互语义、组件归属、兼容性或实现成本的未确认项,不得被当成已确认需求
|
|
70
|
+
- 若未确认项阻塞前端方案,询问用户;`--auto` 或无法询问时写入待确认事项和风险
|
|
71
|
+
9. 若 baseline 或 `功能点梳理.md` 包含 `SL-*` 切片计划,读取 `skill://workflow-pipeline/references/slice-safety-guide.md`,只为当前执行切片生成前端方案。后置切片只可作为依赖上下文或后续范围,不得生成路由、组件或 API 调用实现设计。
|
|
72
|
+
|
|
73
|
+
### 第二阶段:探索现有前端代码
|
|
74
|
+
|
|
75
|
+
1. **读取 PROJECT.md 的 Project Layout 章节**,确定前端代码所在目录
|
|
76
|
+
2. 按 `references/project-rule-contract.md` 的顺序读取项目规则包,优先使用 `.planning/rules/INDEX.md` 和 `.context/spec/index.md` 匹配 stack/codebase spec,兼容 `.context/spec/frontend/`、`.context/spec/design/`、`.context/workflow/`、`.context/lessons/` 和根目录 `AGENTS.md` / `CLAUDE.md`
|
|
77
|
+
3. 若 `.planning/code-index/` 存在,用 Symbol Index 和 Relation Graph 查询相关页面、路由、组件、store/hook、API client、imports/calls,并回读 `evidence_path:evidence_line`
|
|
78
|
+
4. 识别前端项目结构(页面/组件/路由/Store)
|
|
79
|
+
5. 查找 API 调用层的封装模式;优先使用 code-index 的 calls/imports/routes_to 关系,缺失时再按导航和源码兜底
|
|
80
|
+
6. **分析接口调用压力**:梳理每个页面/操作的 API 调用次数、并发数、请求瀑布、是否存在冗余或可合并的请求;识别已有防抖/节流/缓存/竞态处理策略
|
|
81
|
+
7. **分析接口安全**:检查 Token 存储位置与刷新机制、敏感字段是否暴露到前端、是否已有 CSRF/XSS 防护、请求签名/防重放机制
|
|
82
|
+
8. 查找 UI 组件库、设计系统、样式方案、状态管理和权限控制模式
|
|
83
|
+
9. 识别技术栈插槽:React、Next.js、Vue 或仅 Common Web,并记录未覆盖的框架为待确认/待扩展
|
|
84
|
+
10. 检查三层复用机会:已有页面/组件/交互模式、已有依赖/库、项目设计系统或代码模式;与 baseline 的复用决策保持一致
|
|
85
|
+
11. **执行被影响方探索**:读取 `references/affected-module-exploration.md`,对 baseline 第8.2节"关联历史功能/模块"表格列出的每个受影响的前端页面/组件,按清单逐项读取源码并产出:现有 props/emits/methods/API 调用清单、现有数据流和交互方式、保留/分支/抽离/新增决策。探索产出直接填入输出文档的"影响范围"章节和组件树。**探索产出检查不通过,不得进入 Phase 3。**
|
|
86
|
+
12. 如 `.context/spec/design/tools/ui-ux-pro-max/scripts/search.py` 存在,可按当前技术栈和 UI 场景补充查询:
|
|
87
|
+
```bash
|
|
88
|
+
python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "layout form table accessibility performance" --stack react
|
|
89
|
+
python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "accessibility loading error duplicate submit" --domain ux
|
|
90
|
+
python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "aria focus keyboard semantic form" --domain web
|
|
91
|
+
```
|
|
92
|
+
查询结果不得覆盖项目规则和已确认 UI-SPEC;与项目现状冲突时写入风险或待确认事项。
|
|
93
|
+
|
|
94
|
+
如果与 baseline 中的用户拍板结果冲突,停止并要求重新确认,不要自行改判。
|
|
95
|
+
|
|
96
|
+
### 第二阶段.5 — 组件 Seam 评估
|
|
97
|
+
|
|
98
|
+
在生成文档前,对每个 UI 功能点评估组件的 seam 位置和接口深度。
|
|
99
|
+
|
|
100
|
+
### 第二阶段.6 — Slice Scope Guard
|
|
101
|
+
|
|
102
|
+
如果输入包含当前执行切片:
|
|
103
|
+
|
|
104
|
+
- 在文档开头写明 active `Slice ID`、切片名称、纳入 FP/BR/BC、后置 FP/BR/BC。
|
|
105
|
+
- 路由、组件、状态、API 调用、权限入口只允许覆盖当前切片。
|
|
106
|
+
- 共享组件或 API 封装若服务于后置切片,必须说明它在当前切片中的可验证用途;否则移到后续范围。
|
|
107
|
+
- 若前端方案必须同时设计多个 slice 才能自洽,停止并要求回到 `workflow-requirement-baseline` 重新切片。
|
|
108
|
+
|
|
109
|
+
**1. 组件 Seam 决策**
|
|
110
|
+
|
|
111
|
+
对功能点梳理中的每个页面/组件节点,判断其来源:
|
|
112
|
+
|
|
113
|
+
| 组件 | 来源 | 依据 | Seam 决策 |
|
|
114
|
+
|------|------|------|----------|
|
|
115
|
+
| 订单列表 | 已有 Table 组件 | 布局、列配置匹配 | 复用(封装列配置 Props) |
|
|
116
|
+
| 订单详情 | 需新建 | 无现有组件匹配 | 新建独立组件 |
|
|
117
|
+
|
|
118
|
+
判断标准:
|
|
119
|
+
- **复用**:已有组件通过 Props 配置可覆盖需求,不改组件内部
|
|
120
|
+
- **扩展**:已有组件需加新 Props/Slots,改接口不改实现深度
|
|
121
|
+
- **新建**:无现有组件匹配,或现有组件改接口代价大于新建
|
|
122
|
+
|
|
123
|
+
**2. 组件接口深度评估**
|
|
124
|
+
|
|
125
|
+
对每个涉及新建或扩展的组件,评估其接口深度:
|
|
126
|
+
|
|
127
|
+
| 组件 | 公开 Props | 公开 Events | 公开 Slots | 评估 |
|
|
128
|
+
|------|-----------|------------|-----------|:----:|
|
|
129
|
+
| OrderDetail | props: 3 (orderId, showHistory, editable) | events: 2 (close, save) | slots: 0 | ✅ 深(小接口) |
|
|
130
|
+
| AdvancedFilter | props: 8 (fields, operators, logic, ...) | events: 5 | slots: 2 | ⚠️ 浅(接口膨胀,考虑拆分) |
|
|
131
|
+
|
|
132
|
+
判断标准:
|
|
133
|
+
- **深**:Props+Events+Slots ≤ 6,组件封装了复杂行为和状态
|
|
134
|
+
- **浅**:Props+Events+Slots ≥ 8,组件几乎透传了所有细节
|
|
135
|
+
- 浅组件的处理:是否可以把多个 Props 聚合成一个配置对象?
|
|
136
|
+
|
|
137
|
+
**3. 记录 seam 决策**
|
|
138
|
+
|
|
139
|
+
将评估结果写入方案文档的组件拆分章节:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
## 组件 Seam 决策
|
|
143
|
+
|
|
144
|
+
| 组件 | 来源 | 公开接口数 | 评估 | 说明 |
|
|
145
|
+
|------|------|:---------:|:----:|------|
|
|
146
|
+
| OrderList | 复用 | props: 3 / events: 2 | ✅ 深 | 只需加 orderStatus 列配置 |
|
|
147
|
+
| OrderDetail | 新建 | props: 3 / events: 2 | ✅ 深 | 保持小接口 |
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**门禁**:每个界面/组件必须有 seam 决策记录(复用/扩展/新建),否则不得进入 Phase 3。
|
|
151
|
+
|
|
152
|
+
1. 创建 `.planning/features/{功能名}/` 目录
|
|
153
|
+
2. 读取 `assets/frontend-spec-template.md` 模板
|
|
154
|
+
3. 按模板结构填充内容,并写入 `需求基线衔接`、`前端规范影响` 和 `技术栈插槽` 内容
|
|
155
|
+
4. 在 `前端规范影响` 中明确区分“已确认实现依据”和“推荐参考/待确认”,禁止把 UI-SPEC 中的“推荐 - 待拍板”作为组件 props、样式变量或实现常量直接落地。
|
|
156
|
+
|
|
157
|
+
If an older baseline still points to root `features/{功能名}/`, treat that as a legacy read path. New frontend tech-spec output stays under `.planning/features/{功能名}/`.
|
|
158
|
+
|
|
159
|
+
### 第四阶段:用户确认
|
|
160
|
+
|
|
161
|
+
1. 展示生成的文档
|
|
162
|
+
2. 询问是否需要修改
|
|
163
|
+
3. 迭代直到用户满意
|
|
164
|
+
|
|
165
|
+
### 第五阶段:结构化元数据
|
|
166
|
+
|
|
167
|
+
完成后写入 `.planning/features/{功能名}/前端技术方案.meta.json`,字段定义见 `feature-development.yaml` 中 `steps[frontend-tech-spec].meta_output.fields`:`route_count`, `component_count`, `api_count`, `api_gaps_count`。
|
|
168
|
+
|
|
169
|
+
`api_gaps_count` 表示前端方案发现但 `api-contract.md` 未覆盖的接口缺口数量。若大于 0,必须由 `workflow-api-supplement` 处理并回写 API 契约后,才能进入 `integration-verify`。
|
|
170
|
+
|
|
171
|
+
## 注意事项
|
|
172
|
+
|
|
173
|
+
1. 组件树要有层级,父组件→子组件关系清晰
|
|
174
|
+
2. 交互流程描述用户操作→页面响应→接口调用的完整链路
|
|
175
|
+
3. 状态管理描述新增 Store/state 的结构
|
|
176
|
+
4. 接口依赖标注请求/响应格式
|
|
177
|
+
5. 影响范围标注受影响的现有页面和组件
|
|
178
|
+
6. 若目标项目存在 `.planning/rules/` 或 `.context/spec/`,前端方案必须列出适用设计/组件/交互规范、相关经验教训、工具链要求、测试策略和审查门禁
|
|
179
|
+
7. 必须覆盖 loading、empty、error、permission、disabled、duplicate submit、responsive、accessibility 等用户可见状态;缺少来源时标记待确认
|
|
180
|
+
8. 必须分析接口调用压力:每个用户操作触发几次 API 调用、并发请求数量、是否存在重复/冗余/可合并请求、是否需要防抖/节流/缓存、是否存在竞态条件
|
|
181
|
+
9. 必须分析接口安全:Token 存储与刷新策略是否合规、敏感数据是否有暴露风险及脱敏方案、防重放/CSRF/XSS 措施是否到位、请求签名是否必要
|
|
182
|
+
10. 项目本地规则优先级高于技术栈插槽;技术栈插槽只补充项目未定义的默认规则
|
|
183
|
+
11. 与历史相关的判断优先来自 `.planning/milestones/`、`.planning/requirements/`、`.planning/lessons/` 和阶段 `CONTEXT.md`;`features/` 或 `.context/lessons/` 只作为目标项目存在时的兼容来源
|
|
184
|
+
12. 设计规则优先级为:用户拍板/设计稿事实/需求基线 > 现有代码与项目 token > `.context/spec/design/tokens/project-tokens.md` > `.context/spec/design/recommendations/` 与 `ui-ux-pro-max` 推荐。推荐项未经用户确认不得进入实现任务。
|
|
185
|
+
|
|
186
|
+
## 强制审查门禁(MANDATORY — 不可跳过)
|
|
187
|
+
|
|
188
|
+
### 反问审查
|
|
189
|
+
|
|
190
|
+
- [ ] 每个不确定的组件选择、路由设计、状态处理是否已向用户确认?(禁止猜测)
|
|
191
|
+
- [ ] `references/affected-module-exploration.md` 的探索产出检查是否全部通过?(现有 props/emits/methods/API 调用清单、保留/分支/抽离/新增决策)**若不通过,必须先补充代码探索,不得继续写文档。**
|
|
192
|
+
- [ ] 若 `.planning/code-index/` 存在,受影响页面/组件/API/store 的关系定位是否已查询 code-index 并回读源码 evidence?若未使用,是否说明缺失或过期原因?
|
|
193
|
+
- [ ] 方案影响的现有页面/组件是否已描述其**现状**?(先描述现状,再分析影响)
|
|
194
|
+
- [ ] loading/empty/error/permission/disabled/duplicate/responsive 等状态是否均已覆盖或标记待确认?
|
|
195
|
+
- [ ] 若存在 `SL-*`,方案是否只覆盖当前执行切片,且后置切片未进入实现范围?
|
|
196
|
+
|
|
197
|
+
### 调用压力审查
|
|
198
|
+
|
|
199
|
+
- [ ] 每个页面/操作的 API 调用次数、并发数、请求瀑布是否已梳理?
|
|
200
|
+
- [ ] 冗余/可合并请求是否已识别?防抖/节流/缓存/竞态处理策略是否已说明?
|
|
201
|
+
|
|
202
|
+
### 安全审查
|
|
203
|
+
|
|
204
|
+
- [ ] Token 管理(存储/刷新/过期)是否合规?
|
|
205
|
+
- [ ] 敏感数据是否有前端暴露风险?脱敏策略是否明确?
|
|
206
|
+
- [ ] 防重放、CSRF/XSS、请求签名等防护措施是否到位?
|
|
207
|
+
|
|
208
|
+
### 反向对照审查(源自 spec-writer 模式)
|
|
209
|
+
|
|
210
|
+
| 嗅探 | 检查 |
|
|
211
|
+
|------|------|
|
|
212
|
+
| 复用嗅探 | 组件/工具/hooks 是否已有现成可复用? |
|
|
213
|
+
| 冲突嗅探 | 路由/命名/组件层级是否与现有约定冲突? |
|
|
214
|
+
| 重叠嗅探 | 是否会与已有页面形成"两套并存"? |
|
|
215
|
+
|
|
216
|
+
### 产物完整性
|
|
217
|
+
|
|
218
|
+
- [ ] 方案包含:功能要点、影响范围、路由设计、组件拆分、数据流、状态处理、风险点
|
|
219
|
+
- [ ] 不含后端 DDL、后端代码任务
|
|
220
|
+
- [ ] 若存在 `.planning/rules/` 或 `.context/spec/`,适用规范已列出
|
|
221
|
+
- [ ] 审查结论已写入方案末尾
|
|
222
|
+
|
|
223
|
+
**审查结论不通过时不得报告 "Step 3b 完成"。**
|