@guanlin4924/devflow-pi 0.1.92 → 0.1.94
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 +6 -6
- package/package.json +1 -1
- package/plugins/devflow-core/extensions/devflow-core.ts +87 -33
- package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +3 -3
- package/plugins/devflow-core/runtime/hooks/hook_common.py +65 -11
- package/plugins/devflow-core/runtime/hooks/start.py +13 -13
- package/plugins/devflow-core/skills/wireframe-proposal/SKILL.md +2 -2
- package/plugins/devflow-core/skills/wireframe-validate/SKILL.md +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +19 -19
- package/plugins/devflow-core/skills/workflow-orchestrator/agents/openai.yaml +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_runner.py +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +9 -9
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/api_test_matrix.py +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_assessment.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_brief.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_feasibility.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_invalidation.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_commit.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_validate.py +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_source_resolver.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checker_adapter.rb +7 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/control_io.rb +51 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/cross_track_consistency_check.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +6 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_runtime.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +13 -13
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/machine_evidence.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/manage_lessons.rb +7 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_recover.rb +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_run.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/phase_ownership.rb +6 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/repair_control_plane.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_coverage.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_graph.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_preflight.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_run.py +18 -18
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/runtime_context_collector.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/session_rollover.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/static_runtime_context_collector.rb +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/tdd_evidence.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_command_policy.py +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_task_binding_check.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/update_triage_route.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +6 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_commit.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_validate.py +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/acceptance-remediation.yaml +12 -12
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +205 -205
- package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +3 -3
- package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +10 -10
- package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +14 -14
- package/plugins/devflow-core/skills/workflow-project-context/assets/agents-md-template.md +7 -7
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-backend-spec-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-frontend-spec-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-navigation-template.md +1 -1
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-domain-index-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-spec-index-template.md +10 -10
- package/plugins/devflow-core/skills/workflow-project-context/assets/execution-contract-template.md +2 -2
- package/plugins/devflow-core/skills/workflow-project-context/assets/navigation-index-template.md +18 -18
- package/plugins/devflow-core/skills/workflow-project-context/assets/project-initialization-template.md +32 -32
- package/plugins/devflow-core/skills/workflow-project-context/assets/rules-index-template.md +30 -30
- package/plugins/devflow-core/skills/workflow-project-context/assets/state-template.md +7 -7
- package/plugins/devflow-core/skills/workflow-project-context/references/navigation-guide.md +37 -37
- package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py +22 -17
- package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +4 -4
- package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +8 -8
- package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +5 -5
- package/plugins/devflow-design/skills/workflow-architecture-feasibility/SKILL.md +1 -1
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +39 -39
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/backend-spec-template.md +10 -10
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/affected-module-exploration.md +2 -2
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/code-explore-guide.md +1 -1
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/project-rule-contract.md +20 -20
- package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +8 -8
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/index.md +3 -3
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/accessibility.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/component-library.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/design-systems.md +1 -1
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/responsive-grid.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/stack-guidelines.md +6 -6
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/ux-patterns.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tokens/project-tokens.md +1 -1
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/SKILL.md +12 -12
- package/plugins/devflow-design/skills/workflow-design-rule-pack/scripts/install.py +2 -2
- package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +30 -30
- package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/output-template.md +2 -2
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +41 -41
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/assets/frontend-spec-template.md +15 -15
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/affected-module-exploration.md +2 -2
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/project-rule-contract.md +25 -25
- package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +13 -13
- package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +23 -23
- package/plugins/devflow-design/skills/workflow-ui-spec/assets/ui-spec-template.md +3 -3
- package/plugins/devflow-implementation/agents/implementation-worker.md +2 -2
- package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +9 -9
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/lesson-format.md +2 -2
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/root-cause-ladder.md +1 -1
- package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +17 -17
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md +1 -1
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +3 -3
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/project-rule-contract.md +16 -16
- package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +38 -38
- package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md +1 -1
- package/plugins/devflow-intel/agents/project-scout.md +3 -1
- package/plugins/devflow-intel/extensions/devflow-intel.ts +20 -19
- package/plugins/devflow-intel/skills/code-index-query/SKILL.md +8 -6
- package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +12 -12
- package/plugins/devflow-intel/skills/workflow-code-index/references/discovery.md +2 -2
- package/plugins/devflow-intel/skills/workflow-code-index/references/query-guide.md +1 -1
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/code_index.py +8 -8
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/discovery.py +2 -2
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/scanner.py +4 -1
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/project_binding_check.py +4 -4
- package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +14 -14
- package/plugins/devflow-intel/skills/workflow-context-sync/scripts/context_sync_cursor.py +2 -2
- package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +26 -26
- package/plugins/devflow-intel/skills/workflow-update-navigation/references/incremental-update-guide.md +2 -2
- package/plugins/devflow-quality/skills/code-review/SKILL.md +13 -13
- package/plugins/devflow-quality/skills/code-review/references/spec-checklist.md +1 -1
- package/plugins/devflow-quality/skills/workflow-acceptance-test-design/SKILL.md +8 -8
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/SKILL.md +6 -6
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/SKILL.md +14 -14
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +23 -23
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/codebase-discovery.md +9 -9
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +1 -1
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +2 -2
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/discover_codebases.py +2 -2
- package/plugins/devflow-quality/skills/workflow-release-closeout/SKILL.md +15 -15
- package/plugins/devflow-quality/skills/workflow-run-acceptance-tests/SKILL.md +5 -5
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +1 -1
- package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +10 -10
- package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +25 -25
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +49 -49
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/assets/baseline-template.md +22 -22
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md +3 -3
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/challenge-review-guide.md +3 -3
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/project-context-guide.md +11 -11
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md +1 -1
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/requirement-review-checklist.md +4 -4
- package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +16 -16
- package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +6 -6
- package/src/cli.ts +15 -0
- package/src/constants.ts +1 -1
- package/src/initialization-store.ts +3 -2
- package/src/project-context.ts +36 -14
- package/src/project-documents.ts +61 -61
- package/src/project-initializer.ts +23 -9
- package/src/project-layout.ts +217 -0
- package/src/runtime.ts +3 -3
- package/templates/commands/start.md +4 -4
- package/templates/omp/AGENTS.md +1 -1
- package/templates/omp/hook-config.json +7 -7
- package/templates/omp/index-policy.json +8 -8
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
| Rule File | Purpose | Status |
|
|
8
8
|
|-----------|---------|--------|
|
|
9
|
-
| `.planning/execution-contract.md` | Layer order, TDD strategy, codegen and verification gates | {{execution_contract_status}} |
|
|
10
|
-
| `.planning/toolchain.md` | Build, test, lint, mock, migration commands | {{toolchain_status}} |
|
|
11
|
-
| `.planning/lessons/README.md` | Cross-milestone lessons learned | {{lessons_status}} |
|
|
12
|
-
| `.planning/code-index/` | Machine code facts: symbols, relations, entrypoints, and data flow | {{code_index_status}} |
|
|
13
|
-
| `.context/spec/design/` | Frontend UI/UX recommendations and project-level design tokens | {{design_rule_pack_status}} |
|
|
14
|
-
| `.context/spec/index.md` | Generated technical spec registry and read order | {{context_spec_index_status}} |
|
|
15
|
-
| `.context/spec/stacks/` | Generated stack-level technical specs | {{stack_specs_status}} |
|
|
16
|
-
| `.context/workflow/` | Existing workflow gates (TDD, verification, checklist) | {{context_workflow_status}} |
|
|
17
|
-
| `.context/lessons/README.md` | Legacy project lessons | {{context_lessons_status}} |
|
|
9
|
+
| `.devflow/planning/execution-contract.md` | Layer order, TDD strategy, codegen and verification gates | {{execution_contract_status}} |
|
|
10
|
+
| `.devflow/planning/toolchain.md` | Build, test, lint, mock, migration commands | {{toolchain_status}} |
|
|
11
|
+
| `.devflow/planning/lessons/README.md` | Cross-milestone lessons learned | {{lessons_status}} |
|
|
12
|
+
| `.devflow/planning/code-index/` | Machine code facts: symbols, relations, entrypoints, and data flow | {{code_index_status}} |
|
|
13
|
+
| `.devflow/context/spec/design/` | Frontend UI/UX recommendations and project-level design tokens | {{design_rule_pack_status}} |
|
|
14
|
+
| `.devflow/context/spec/index.md` | Generated technical spec registry and read order | {{context_spec_index_status}} |
|
|
15
|
+
| `.devflow/context/spec/stacks/` | Generated stack-level technical specs | {{stack_specs_status}} |
|
|
16
|
+
| `.devflow/context/workflow/` | Existing workflow gates (TDD, verification, checklist) | {{context_workflow_status}} |
|
|
17
|
+
| `.devflow/context/lessons/README.md` | Legacy project lessons | {{context_lessons_status}} |
|
|
18
18
|
| `AGENTS.md` / `CLAUDE.md` | Root agent instructions | {{root_instructions_status}} |
|
|
19
19
|
| `.cursorrules` | IDE-level AI rules | {{cursorrules_status}} |
|
|
20
20
|
|
|
@@ -22,58 +22,58 @@
|
|
|
22
22
|
|
|
23
23
|
| Rule File | Path | Status |
|
|
24
24
|
|-----------|------|--------|
|
|
25
|
-
| Frontend Spec Index | `.context/spec/frontend/index.md` | {{frontend_spec_index_status}} |
|
|
26
|
-
| Frontend Specs | `.context/spec/frontend/` | {{frontend_specs_status}} |
|
|
27
|
-
| Design Specs | `.context/spec/design/` | {{design_specs_status}} |
|
|
25
|
+
| Frontend Spec Index | `.devflow/context/spec/frontend/index.md` | {{frontend_spec_index_status}} |
|
|
26
|
+
| Frontend Specs | `.devflow/context/spec/frontend/` | {{frontend_specs_status}} |
|
|
27
|
+
| Design Specs | `.devflow/context/spec/design/` | {{design_specs_status}} |
|
|
28
28
|
|
|
29
29
|
## Backend Rules
|
|
30
30
|
|
|
31
31
|
| Rule File | Path | Status |
|
|
32
32
|
|-----------|------|--------|
|
|
33
|
-
| Backend Spec Index | `.context/spec/backend/index.md` | {{backend_spec_index_status}} |
|
|
34
|
-
| Backend Specs | `.context/spec/backend/` | {{backend_specs_status}} |
|
|
33
|
+
| Backend Spec Index | `.devflow/context/spec/backend/index.md` | {{backend_spec_index_status}} |
|
|
34
|
+
| Backend Specs | `.devflow/context/spec/backend/` | {{backend_specs_status}} |
|
|
35
35
|
|
|
36
36
|
## Stack Specs
|
|
37
37
|
|
|
38
38
|
| Stack Key | Path | Codebases | Status |
|
|
39
39
|
|-----------|------|-----------|--------|
|
|
40
|
-
| {{stack_key}} | `.context/spec/stacks/{{stack_key}}.md` | {{codebases}} | {{stack_spec_status}} |
|
|
40
|
+
| {{stack_key}} | `.devflow/context/spec/stacks/{{stack_key}}.md` | {{codebases}} | {{stack_spec_status}} |
|
|
41
41
|
|
|
42
42
|
## Codebase Specs
|
|
43
43
|
|
|
44
44
|
| Codebase | Type | Stack Key | Path | Status |
|
|
45
45
|
|----------|------|-----------|------|--------|
|
|
46
|
-
| {{codebase_name}} | {{codebase_type}} | {{stack_key}} | `.context/spec/{{domain}}/{{codebase_name}}.md` | {{codebase_spec_status}} |
|
|
46
|
+
| {{codebase_name}} | {{codebase_type}} | {{stack_key}} | `.devflow/context/spec/{{domain}}/{{codebase_name}}.md` | {{codebase_spec_status}} |
|
|
47
47
|
|
|
48
48
|
## Spec Read Contract
|
|
49
49
|
|
|
50
50
|
Downstream skills must read technical rules in this order:
|
|
51
51
|
|
|
52
|
-
1. `.planning/rules/INDEX.md`
|
|
53
|
-
2. `.context/spec/index.md`
|
|
54
|
-
3. Matching `.context/spec/stacks/{stack_key}.md`
|
|
55
|
-
4. Matching `.context/spec/frontend|backend/{codebase}.md`
|
|
56
|
-
5. Matching `.context/spec/{domain}/index.md` and applicable depth specs
|
|
57
|
-
6. Matching `.planning/navigation/{codebase}.md`
|
|
58
|
-
7. `.planning/code-index/` machine symbols/relations for source-level relation facts; if fast mode skipped generation, refresh through `workflow-code-index` or record fallback
|
|
52
|
+
1. `.devflow/planning/rules/INDEX.md`
|
|
53
|
+
2. `.devflow/context/spec/index.md`
|
|
54
|
+
3. Matching `.devflow/context/spec/stacks/{stack_key}.md`
|
|
55
|
+
4. Matching `.devflow/context/spec/frontend|backend/{codebase}.md`
|
|
56
|
+
5. Matching `.devflow/context/spec/{domain}/index.md` and applicable depth specs
|
|
57
|
+
6. Matching `.devflow/planning/navigation/{codebase}.md`
|
|
58
|
+
7. `.devflow/planning/code-index/` machine symbols/relations for source-level relation facts; if fast mode skipped generation, refresh through `workflow-code-index` or record fallback
|
|
59
59
|
8. Actual source files
|
|
60
60
|
|
|
61
61
|
## Workflow Rules
|
|
62
62
|
|
|
63
63
|
| Rule File | Path | Status |
|
|
64
64
|
|-----------|------|--------|
|
|
65
|
-
| TDD Gate | `.context/workflow/tdd.md` | {{tdd_status}} |
|
|
66
|
-
| Verification Gate | `.context/workflow/verification.md` | {{verification_status}} |
|
|
67
|
-
| Checklist | `.context/workflow/checklist.md` | {{checklist_status}} |
|
|
65
|
+
| TDD Gate | `.devflow/context/workflow/tdd.md` | {{tdd_status}} |
|
|
66
|
+
| Verification Gate | `.devflow/context/workflow/verification.md` | {{verification_status}} |
|
|
67
|
+
| Checklist | `.devflow/context/workflow/checklist.md` | {{checklist_status}} |
|
|
68
68
|
|
|
69
69
|
## History Model
|
|
70
70
|
|
|
71
71
|
| Source | Role | Status |
|
|
72
72
|
|--------|------|--------|
|
|
73
|
-
| `.planning/milestones/` | Archived milestone summaries | {{milestones_status}} |
|
|
74
|
-
| `.planning/requirements/` | Requirement baselines | {{requirements_status}} |
|
|
75
|
-
| `.planning/lessons/` | Cross-milestone lessons | {{planning_lessons_status}} |
|
|
76
|
-
| `.planning/*/CONTEXT.md` | Phase/session decisions | {{context_md_status}} |
|
|
73
|
+
| `.devflow/planning/milestones/` | Archived milestone summaries | {{milestones_status}} |
|
|
74
|
+
| `.devflow/planning/requirements/` | Requirement baselines | {{requirements_status}} |
|
|
75
|
+
| `.devflow/planning/lessons/` | Cross-milestone lessons | {{planning_lessons_status}} |
|
|
76
|
+
| `.devflow/planning/*/CONTEXT.md` | Phase/session decisions | {{context_md_status}} |
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
- **Run Started At**: {{run_started_at}}
|
|
10
10
|
- **Last Scan At**: {{last_scan_at}}
|
|
11
11
|
- **Initialized By**: `workflow-project-context`
|
|
12
|
-
- **Project File**: `.planning/PROJECT.md`
|
|
13
|
-
- **Navigation Root**: `.planning/navigation/`
|
|
14
|
-
- **Code Index Root**: `.planning/code-index/`(generated by default unless fast mode skipped it)
|
|
12
|
+
- **Project File**: `.devflow/planning/PROJECT.md`
|
|
13
|
+
- **Navigation Root**: `.devflow/planning/navigation/`
|
|
14
|
+
- **Code Index Root**: `.devflow/planning/code-index/`(generated by default unless fast mode skipped it)
|
|
15
15
|
|
|
16
16
|
## Workflow State
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
| Name | Type | Path | Scan Status | Navigation File |
|
|
26
26
|
|------|------|------|-------------|-----------------|
|
|
27
27
|
{{#codebases}}
|
|
28
|
-
| {{name}} | {{type}} | {{path}} | {{scan_status}} | `.planning/navigation/{{name}}.md` |
|
|
28
|
+
| {{name}} | {{type}} | {{path}} | {{scan_status}} | `.devflow/planning/navigation/{{name}}.md` |
|
|
29
29
|
{{/codebases}}
|
|
30
30
|
|
|
31
31
|
## Completion
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
{{#codebases}}
|
|
40
40
|
| {{name}} navigation | {{nav_status}} | {{nav_notes}} |
|
|
41
41
|
{{/codebases}}
|
|
42
|
-
| Rules index (`.planning/rules/INDEX.md`) | {{rules_index_status}} | {{rules_index_notes}} |
|
|
43
|
-
| Execution contract (`.planning/execution-contract.md`) | {{execution_contract_status}} | {{execution_contract_notes}} |
|
|
44
|
-
| Toolchain contract (`.planning/toolchain.md`) | {{toolchain_status}} | {{toolchain_notes}} |
|
|
42
|
+
| Rules index (`.devflow/planning/rules/INDEX.md`) | {{rules_index_status}} | {{rules_index_notes}} |
|
|
43
|
+
| Execution contract (`.devflow/planning/execution-contract.md`) | {{execution_contract_status}} | {{execution_contract_notes}} |
|
|
44
|
+
| Toolchain contract (`.devflow/planning/toolchain.md`) | {{toolchain_status}} | {{toolchain_notes}} |
|
|
45
45
|
| Project rule package (other sources) | {{project_rule_package_status}} | {{project_rule_package_notes}} |
|
|
46
46
|
| Requirements baseline | Not created | Created later by workflow-requirement-baseline |
|
|
47
47
|
| Feature breakdown | Not created | Created later by workflow-feature-breakdown |
|
|
@@ -16,20 +16,20 @@ Run the following for EACH codebase identified in Step 1:
|
|
|
16
16
|
4. Read README files only for commands and architecture notes.
|
|
17
17
|
5. Inspect top-level source folders and common entry files.
|
|
18
18
|
6. Identify project rule package sources (once for the whole project, not per codebase):
|
|
19
|
-
- `.planning/rules/INDEX.md`
|
|
20
|
-
- `.planning/execution-contract.md`
|
|
21
|
-
- `.planning/toolchain.md`
|
|
22
|
-
- `.planning/lessons/README.md`
|
|
23
|
-
- `.planning/milestones/`
|
|
24
|
-
- `.planning/requirements/`
|
|
25
|
-
- `.context/spec/`
|
|
26
|
-
- `.context/workflow/`
|
|
27
|
-
- `.context/lessons/README.md`
|
|
19
|
+
- `.devflow/planning/rules/INDEX.md`
|
|
20
|
+
- `.devflow/planning/execution-contract.md`
|
|
21
|
+
- `.devflow/planning/toolchain.md`
|
|
22
|
+
- `.devflow/planning/lessons/README.md`
|
|
23
|
+
- `.devflow/planning/milestones/`
|
|
24
|
+
- `.devflow/planning/requirements/`
|
|
25
|
+
- `.devflow/context/spec/`
|
|
26
|
+
- `.devflow/context/workflow/`
|
|
27
|
+
- `.devflow/context/lessons/README.md`
|
|
28
28
|
- root `AGENTS.md` / `CLAUDE.md`
|
|
29
29
|
- `.cursorrules` files within each codebase root
|
|
30
30
|
7. Identify history model locations (once for the whole project):
|
|
31
|
-
- primary: `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, `.planning/*/CONTEXT.md`
|
|
32
|
-
- optional legacy: `features/`, `.context/lessons/`
|
|
31
|
+
- primary: `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, `.devflow/planning/*/CONTEXT.md`
|
|
32
|
+
- optional legacy: `features/`, `.devflow/context/lessons/`
|
|
33
33
|
8. Stop once entry points, conventions, commands, rule package locations, and history model locations are identified for each codebase.
|
|
34
34
|
|
|
35
35
|
## Scan Depth
|
|
@@ -113,7 +113,7 @@ Frontend navigation fields:
|
|
|
113
113
|
- Styles / theme
|
|
114
114
|
- Env config
|
|
115
115
|
- Dev/build/test commands
|
|
116
|
-
- Frontend rule sources such as `.context/spec/frontend/`, `.context/spec/design/`, `.planning/rules/`, `.planning/toolchain.md`, and lessons
|
|
116
|
+
- Frontend rule sources such as `.devflow/context/spec/frontend/`, `.devflow/context/spec/design/`, `.devflow/planning/rules/`, `.devflow/planning/toolchain.md`, and lessons
|
|
117
117
|
|
|
118
118
|
## Frontend Stack Slot Detection
|
|
119
119
|
|
|
@@ -202,45 +202,45 @@ Common sources:
|
|
|
202
202
|
|
|
203
203
|
| Source | Purpose |
|
|
204
204
|
|--------|---------|
|
|
205
|
-
| `.planning/rules/INDEX.md` | Project rule index used by workflow skills |
|
|
206
|
-
| `.planning/execution-contract.md` | Layer order, TDD strategy, codegen and verification gates |
|
|
207
|
-
| `.planning/toolchain.md` | Build, test, lint, mock, migration, and codegen commands |
|
|
208
|
-
| `.planning/lessons/README.md` | Project lessons maintained by workflow |
|
|
209
|
-
| `.planning/milestones/` | Primary milestone/history records for this workflow |
|
|
210
|
-
| `.planning/requirements/` | Current or historical requirement baselines |
|
|
211
|
-
| `.context/spec/index.md` | Generated or existing technical spec registry |
|
|
212
|
-
| `.context/spec/stacks/` | Stack-level technical specs generated from stack profiles |
|
|
213
|
-
| `.context/spec/frontend/` / `.context/spec/backend/` | Codebase-specific technical specs |
|
|
214
|
-
| `.context/workflow/` | Existing workflow gates such as TDD and verification |
|
|
215
|
-
| `.context/lessons/README.md` | Existing lessons from project work |
|
|
205
|
+
| `.devflow/planning/rules/INDEX.md` | Project rule index used by workflow skills |
|
|
206
|
+
| `.devflow/planning/execution-contract.md` | Layer order, TDD strategy, codegen and verification gates |
|
|
207
|
+
| `.devflow/planning/toolchain.md` | Build, test, lint, mock, migration, and codegen commands |
|
|
208
|
+
| `.devflow/planning/lessons/README.md` | Project lessons maintained by workflow |
|
|
209
|
+
| `.devflow/planning/milestones/` | Primary milestone/history records for this workflow |
|
|
210
|
+
| `.devflow/planning/requirements/` | Current or historical requirement baselines |
|
|
211
|
+
| `.devflow/context/spec/index.md` | Generated or existing technical spec registry |
|
|
212
|
+
| `.devflow/context/spec/stacks/` | Stack-level technical specs generated from stack profiles |
|
|
213
|
+
| `.devflow/context/spec/frontend/` / `.devflow/context/spec/backend/` | Codebase-specific technical specs |
|
|
214
|
+
| `.devflow/context/workflow/` | Existing workflow gates such as TDD and verification |
|
|
215
|
+
| `.devflow/context/lessons/README.md` | Existing lessons from project work |
|
|
216
216
|
| `AGENTS.md` / `CLAUDE.md` | Root agent instructions |
|
|
217
217
|
|
|
218
|
-
If both `.planning/rules/` and `.context/spec/` exist, record both. Do not merge them during initialization.
|
|
218
|
+
If both `.devflow/planning/rules/` and `.devflow/context/spec/` exist, record both. Do not merge them during initialization.
|
|
219
219
|
|
|
220
220
|
## Generated Context Spec Checks
|
|
221
221
|
|
|
222
|
-
When project initialization generates `.context/spec/`, verify:
|
|
222
|
+
When project initialization generates `.devflow/context/spec/`, verify:
|
|
223
223
|
|
|
224
224
|
- Every local/scannable codebase has a stack profile with `stack_key`, manifest path, and dependency fingerprint.
|
|
225
|
-
- Every unique `stack_key` has exactly one `.context/spec/stacks/{stack_key}.md`.
|
|
226
|
-
- Every frontend-type codebase has `.context/spec/frontend/{name}.md`.
|
|
227
|
-
- Every backend/service-type codebase has `.context/spec/backend/{name}.md`.
|
|
228
|
-
- `.context/spec/index.md` maps each codebase to its stack spec, codebase spec, and navigation file.
|
|
225
|
+
- Every unique `stack_key` has exactly one `.devflow/context/spec/stacks/{stack_key}.md`.
|
|
226
|
+
- Every frontend-type codebase has `.devflow/context/spec/frontend/{name}.md`.
|
|
227
|
+
- Every backend/service-type codebase has `.devflow/context/spec/backend/{name}.md`.
|
|
228
|
+
- `.devflow/context/spec/index.md` maps each codebase to its stack spec, codebase spec, and navigation file.
|
|
229
229
|
- Generated specs include version metadata and regeneration triggers.
|
|
230
230
|
- Stack specs contain stack-level guidance only; codebase-local paths and route/module names belong in codebase specs.
|
|
231
231
|
|
|
232
232
|
## History Model Detection
|
|
233
233
|
|
|
234
|
-
This workflow uses `.planning` artifacts as the primary long-term memory. Do not assume outbound-call style `features/*.spec.md` history exists.
|
|
234
|
+
This workflow uses `.devflow/planning` artifacts as the primary long-term memory. Do not assume outbound-call style `features/*.spec.md` history exists.
|
|
235
235
|
|
|
236
236
|
| Source | Role |
|
|
237
237
|
|--------|------|
|
|
238
|
-
| `.planning/milestones/` | Archived milestones and delivery summaries |
|
|
239
|
-
| `.planning/requirements/` | Requirement baselines and requirement decisions |
|
|
240
|
-
| `.planning/lessons/` | Cross-milestone lessons |
|
|
241
|
-
| `.planning/*/CONTEXT.md` | Phase/session decisions and handoff context |
|
|
238
|
+
| `.devflow/planning/milestones/` | Archived milestones and delivery summaries |
|
|
239
|
+
| `.devflow/planning/requirements/` | Requirement baselines and requirement decisions |
|
|
240
|
+
| `.devflow/planning/lessons/` | Cross-milestone lessons |
|
|
241
|
+
| `.devflow/planning/*/CONTEXT.md` | Phase/session decisions and handoff context |
|
|
242
242
|
| `features/` | Optional legacy feature docs if the target project already has them |
|
|
243
|
-
| `.context/lessons/` | Optional legacy/project-rule lessons |
|
|
243
|
+
| `.devflow/context/lessons/` | Optional legacy/project-rule lessons |
|
|
244
244
|
|
|
245
245
|
Record whether each primary source exists. Label legacy sources as legacy/project-rule evidence rather than the default history model.
|
|
246
246
|
|
|
@@ -248,14 +248,14 @@ Record whether each primary source exists. Label legacy sources as legacy/projec
|
|
|
248
248
|
|
|
249
249
|
- All codebase locations are recorded in the Codebase Registry.
|
|
250
250
|
- Nonexistent or remote-only locations are marked pending.
|
|
251
|
-
- Each codebase has a navigation file at `.planning/navigation/{name}.md`.
|
|
251
|
+
- Each codebase has a navigation file at `.devflow/planning/navigation/{name}.md`.
|
|
252
252
|
- Frameworks are recorded or `待确认` for each codebase.
|
|
253
253
|
- Entry points and key directories are recorded or `待确认` for each codebase.
|
|
254
254
|
- Frontend-type codebases have component conventions.
|
|
255
255
|
- Backend-type codebases have layer conventions.
|
|
256
256
|
- Dev/build/test commands are recorded or `待确认` for each codebase.
|
|
257
257
|
- Project rule package sources are recorded when present.
|
|
258
|
-
- History model sources are recorded, with `.planning` sources primary and legacy sources labeled.
|
|
258
|
+
- History model sources are recorded, with `.devflow/planning` sources primary and legacy sources labeled.
|
|
259
259
|
- `STATE.md` includes current step, completed steps, pending steps, blockers, and next action.
|
|
260
260
|
- `INDEX.md` includes Codebase Registry and downstream read contract.
|
|
261
261
|
- Initialization quality is marked as `complete`, `partial`, `pending`, or `not_applicable`.
|
package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py
CHANGED
|
@@ -17,25 +17,25 @@ SKILL_ROOT = Path(__file__).resolve().parents[1]
|
|
|
17
17
|
SPEC_TEMPLATE_ROOT = SKILL_ROOT / "assets" / "spec-templates"
|
|
18
18
|
|
|
19
19
|
CODE_INDEX_FILES = (
|
|
20
|
-
".planning/code-index/index.sqlite",
|
|
21
|
-
".planning/code-index/files.jsonl",
|
|
22
|
-
".planning/code-index/symbols.jsonl",
|
|
23
|
-
".planning/code-index/relations.jsonl",
|
|
24
|
-
".planning/code-index/AUDIT.md",
|
|
20
|
+
".devflow/planning/code-index/index.sqlite",
|
|
21
|
+
".devflow/planning/code-index/files.jsonl",
|
|
22
|
+
".devflow/planning/code-index/symbols.jsonl",
|
|
23
|
+
".devflow/planning/code-index/relations.jsonl",
|
|
24
|
+
".devflow/planning/code-index/AUDIT.md",
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
DESIGN_RULE_PACK_FILES = (
|
|
28
|
-
".context/spec/design/tokens/project-tokens.md",
|
|
29
|
-
".context/spec/design/recommendations/accessibility.md",
|
|
30
|
-
".context/spec/design/recommendations/component-library.md",
|
|
31
|
-
".context/spec/design/tools/ui-ux-pro-max/SKILL.md",
|
|
28
|
+
".devflow/context/spec/design/tokens/project-tokens.md",
|
|
29
|
+
".devflow/context/spec/design/recommendations/accessibility.md",
|
|
30
|
+
".devflow/context/spec/design/recommendations/component-library.md",
|
|
31
|
+
".devflow/context/spec/design/tools/ui-ux-pro-max/SKILL.md",
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
STATUS_FILES = (
|
|
35
|
-
".planning/STATE.md",
|
|
36
|
-
".planning/PROJECT.md",
|
|
37
|
-
".planning/navigation/INDEX.md",
|
|
38
|
-
".planning/rules/INDEX.md",
|
|
35
|
+
".devflow/planning/STATE.md",
|
|
36
|
+
".devflow/planning/PROJECT.md",
|
|
37
|
+
".devflow/planning/navigation/INDEX.md",
|
|
38
|
+
".devflow/planning/rules/INDEX.md",
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
|
|
@@ -44,7 +44,7 @@ def parse_args() -> argparse.Namespace:
|
|
|
44
44
|
parser.add_argument("--root", default=".")
|
|
45
45
|
parser.add_argument(
|
|
46
46
|
"--manifest",
|
|
47
|
-
default=".planning/project-context-run.json",
|
|
47
|
+
default=".devflow/planning/project-context-run.json",
|
|
48
48
|
)
|
|
49
49
|
return parser.parse_args()
|
|
50
50
|
|
|
@@ -136,7 +136,7 @@ def validate_status_markers(
|
|
|
136
136
|
content = path.read_text(encoding="utf-8")
|
|
137
137
|
if marker not in content:
|
|
138
138
|
errors.append(f"current-run status marker missing: {relative_path}")
|
|
139
|
-
if relative_path == ".planning/STATE.md" and "PENDING_TEMPLATE" in content:
|
|
139
|
+
if relative_path == ".devflow/planning/STATE.md" and "PENDING_TEMPLATE" in content:
|
|
140
140
|
errors.append("STATE.md contains an unresolved PENDING_TEMPLATE blocker")
|
|
141
141
|
|
|
142
142
|
|
|
@@ -149,8 +149,13 @@ def validate_code_index(
|
|
|
149
149
|
mode = manifest.get("mode")
|
|
150
150
|
status = manifest.get("code_index_status")
|
|
151
151
|
if mode == "full":
|
|
152
|
+
if status == "degraded":
|
|
153
|
+
reason = str(manifest.get("code_index_skip_reason", ""))
|
|
154
|
+
if reason != "code_index_publish_failed":
|
|
155
|
+
errors.append("degraded full mode requires code_index_publish_failed reason")
|
|
156
|
+
return
|
|
152
157
|
if status != "complete":
|
|
153
|
-
errors.append("full mode requires code_index_status=complete")
|
|
158
|
+
errors.append("full mode requires code_index_status=complete or degraded")
|
|
154
159
|
if manifest.get("code_index_skip_reason") != "none":
|
|
155
160
|
errors.append("full mode requires code_index_skip_reason=none")
|
|
156
161
|
for relative_path in CODE_INDEX_FILES:
|
|
@@ -454,7 +459,7 @@ def validate_domain_indexes(
|
|
|
454
459
|
)
|
|
455
460
|
|
|
456
461
|
for domain, expected_markers in expected_by_domain.items():
|
|
457
|
-
relative_path = f".context/spec/{domain}/index.md"
|
|
462
|
+
relative_path = f".devflow/context/spec/{domain}/index.md"
|
|
458
463
|
path = resolve_project_path(root, relative_path)
|
|
459
464
|
require_fresh_file(path, started_at, errors)
|
|
460
465
|
if not path.is_file():
|
|
@@ -26,8 +26,8 @@ description: "Use after backend-tech-spec, before integration-verify. Generates
|
|
|
26
26
|
|
|
27
27
|
## 产出位置
|
|
28
28
|
|
|
29
|
-
- `.planning/features/{功能名}/api-call-guide.md`
|
|
30
|
-
- `.planning/features/{功能名}/api-call-guide.meta.json`
|
|
29
|
+
- `.devflow/planning/features/{功能名}/api-call-guide.md`
|
|
30
|
+
- `.devflow/planning/features/{功能名}/api-call-guide.meta.json`
|
|
31
31
|
|
|
32
32
|
`api-call-guide.meta.json` 必须包含:
|
|
33
33
|
|
|
@@ -44,8 +44,8 @@ description: "Use after backend-tech-spec, before integration-verify. Generates
|
|
|
44
44
|
|
|
45
45
|
## 输入
|
|
46
46
|
|
|
47
|
-
- `.planning/features/{功能名}/api-contract.md` — **API 签名唯一权威源**
|
|
48
|
-
- `.planning/features/{功能名}/后端技术方案.md` — 后端实现细节和 seam 位置
|
|
47
|
+
- `.devflow/planning/features/{功能名}/api-contract.md` — **API 签名唯一权威源**
|
|
48
|
+
- `.devflow/planning/features/{功能名}/后端技术方案.md` — 后端实现细节和 seam 位置
|
|
49
49
|
|
|
50
50
|
## 核心原则
|
|
51
51
|
|
|
@@ -24,17 +24,17 @@ description: "Use after requirement-baseline, before dual-track fork. Defines sh
|
|
|
24
24
|
|
|
25
25
|
## 产出位置
|
|
26
26
|
|
|
27
|
-
- `.planning/features/{功能名}/api-contract.md`
|
|
28
|
-
- `.planning/features/{功能名}/api-contract.meta.json`
|
|
27
|
+
- `.devflow/planning/features/{功能名}/api-contract.md`
|
|
28
|
+
- `.devflow/planning/features/{功能名}/api-contract.meta.json`
|
|
29
29
|
|
|
30
30
|
The meta file must also set `traceability_status: "passed"` only after every API design has been written to `traceability.json.designs` and `traceability_check.py --stage design` succeeds; otherwise set `failed` and do not advance.
|
|
31
31
|
|
|
32
32
|
## 输入
|
|
33
33
|
|
|
34
|
-
- `.planning/requirements/baseline.md` — 需求基线(FP/BR/BC)
|
|
35
|
-
- `.planning/navigation/INDEX.md` 和相关 codebase navigation — 粗定位已有接口
|
|
36
|
-
- `.planning/code-index/`(如存在)— 查询已有 route/handler/API symbol 与 `routes_to` / `calls` 关系,确认接口复用和冲突
|
|
37
|
-
- `.planning/requirements/{feature}/traceability.json` — 每个接口必须回指它的 `REQ-*`,不能只写 FP 标题
|
|
34
|
+
- `.devflow/planning/requirements/baseline.md` — 需求基线(FP/BR/BC)
|
|
35
|
+
- `.devflow/planning/navigation/INDEX.md` 和相关 codebase navigation — 粗定位已有接口
|
|
36
|
+
- `.devflow/planning/code-index/`(如存在)— 查询已有 route/handler/API symbol 与 `routes_to` / `calls` 关系,确认接口复用和冲突
|
|
37
|
+
- `.devflow/planning/requirements/{feature}/traceability.json` — 每个接口必须回指它的 `REQ-*`,不能只写 FP 标题
|
|
38
38
|
|
|
39
39
|
使用 code-index 时,必须回读 `evidence_path:evidence_line` 附近源码后再把既有接口写入契约;不得只凭 Markdown navigation 或 relation 摘要判断。
|
|
40
40
|
|
|
@@ -46,7 +46,7 @@ The meta file must also set `traceability_status: "passed"` only after every API
|
|
|
46
46
|
4. **负载职责明确** — 事务命令、运营查询和统计查询不得在同一个接口语义中混写;统计查询必须引用已确认的 `METRIC-*`,并在响应中约定 `as_of`/新鲜度语义或明确强一致依据。
|
|
47
47
|
5. **数据模型共享** — 核心业务实体定义在这里,前后端共用一个数据模型
|
|
48
48
|
6. **切片对齐** — 若 baseline 包含 `SL-*`,先读取 `skill://workflow-pipeline/references/slice-safety-guide.md`,只为当前执行切片定义 API。后置切片接口不得提前进入契约。
|
|
49
|
-
7. **既有接口优先查事实索引** — 当 `.planning/code-index/` 存在时,先用 Symbol/Relation 定位候选接口、调用方和处理器,再读取源码证据;缺失或过期时再按 navigation 和 `rg` 兜底。
|
|
49
|
+
7. **既有接口优先查事实索引** — 当 `.devflow/planning/code-index/` 存在时,先用 Symbol/Relation 定位候选接口、调用方和处理器,再读取源码证据;缺失或过期时再按 navigation 和 `rg` 兜底。
|
|
50
50
|
|
|
51
51
|
## 可测试 API 契约(强制)
|
|
52
52
|
|
|
@@ -182,7 +182,7 @@ The meta file must also set `traceability_status: "passed"` only after every API
|
|
|
182
182
|
- [ ] 每个涉及 API 的 FP 至少映射到一个接口
|
|
183
183
|
- [ ] 若存在 `SL-*`,每个接口都标注当前 Slice ID,且未包含后置切片接口
|
|
184
184
|
- [ ] 每个接口有完整的请求/响应结构
|
|
185
|
-
- [ ] 若 `.planning/code-index/` 存在,已有接口复用/冲突判断已查询 code-index 并回读源码 evidence;未使用时已说明原因
|
|
185
|
+
- [ ] 若 `.devflow/planning/code-index/` 存在,已有接口复用/冲突判断已查询 code-index 并回读源码 evidence;未使用时已说明原因
|
|
186
186
|
- [ ] 核心数据模型已定义字段和类型
|
|
187
187
|
- [ ] 没有包含实现细节(SQL、表结构、代码片段)
|
|
188
188
|
- [ ] meta.json 中 `endpoint_count` 已记录接口总数
|
|
@@ -27,14 +27,14 @@ orchestrator 通过以下方式检测是否需要触发本 skill:
|
|
|
27
27
|
|
|
28
28
|
## 输入
|
|
29
29
|
|
|
30
|
-
- `.planning/features/{功能名}/api-contract.md` — 已有 API 契约
|
|
31
|
-
- `.planning/features/{功能名}/前端技术方案.md` — 刚刚完成的前端方案
|
|
32
|
-
- `.planning/features/{功能名}/UI-SPEC.md` — UI 设计规范
|
|
30
|
+
- `.devflow/planning/features/{功能名}/api-contract.md` — 已有 API 契约
|
|
31
|
+
- `.devflow/planning/features/{功能名}/前端技术方案.md` — 刚刚完成的前端方案
|
|
32
|
+
- `.devflow/planning/features/{功能名}/UI-SPEC.md` — UI 设计规范
|
|
33
33
|
|
|
34
34
|
## 产出
|
|
35
35
|
|
|
36
|
-
- `.planning/features/{功能名}/api-supplement-requests.md`
|
|
37
|
-
- `.planning/features/{功能名}/api-supplement-requests.meta.json`
|
|
36
|
+
- `.devflow/planning/features/{功能名}/api-supplement-requests.md`
|
|
37
|
+
- `.devflow/planning/features/{功能名}/api-supplement-requests.meta.json`
|
|
38
38
|
|
|
39
39
|
即使没有 API 补充需求,也要生成 no-op meta:
|
|
40
40
|
|
|
@@ -24,7 +24,7 @@ description: "Use after API contract and before frontend/backend technical speci
|
|
|
24
24
|
- `recommendation_option_id` 是建议,不是自动决策。
|
|
25
25
|
5. 对 `full` 评估,提交 `risk_type: architecture_option_risk` 的 `RISK` candidate,连接 `DECISION/WSH/WLC → RISK`,relation 为 `has_architecture_risk`。必须写失败模式、影响、处理、处理方式、负责人和复核条件。
|
|
26
26
|
6. 只用 `devflow_requirement_graph(action="confirm")` 确认 WSH/WLC、架构 DECISION 和架构 RISK。Core 必须展示确认对话;确认方案比较时,用户确认的是显示的 `recommendation_option_id`,确认风险时只确认处理责任,不宣称生产风险已消失。
|
|
27
|
-
7. 调用 `devflow_architecture_brief(action="render")` 生成 `.planning/features/{feature}/architecture-brief.md` 及 meta。不得手写或补写简报正文。
|
|
27
|
+
7. 调用 `devflow_architecture_brief(action="render")` 生成 `.devflow/planning/features/{feature}/architecture-brief.md` 及 meta。不得手写或补写简报正文。
|
|
28
28
|
|
|
29
29
|
## 不变量
|
|
30
30
|
|
|
@@ -12,26 +12,26 @@ argument-hint: <功能名>
|
|
|
12
12
|
user-invocable: true
|
|
13
13
|
pattern: generator+tool-wrapper
|
|
14
14
|
inputs:
|
|
15
|
-
- .planning/features/{功能名}/api-contract.md
|
|
16
|
-
- .planning/features/{功能名}/architecture-brief.md
|
|
17
|
-
- .planning/features/{功能名}/architecture-brief.meta.json
|
|
18
|
-
- .planning/requirements/baseline.md
|
|
19
|
-
- .planning/features/{功能名}/功能点梳理.md (optional, Track B context when already available)
|
|
20
|
-
- .planning/PROJECT.md
|
|
21
|
-
- .planning/navigation/INDEX.md
|
|
22
|
-
- .planning/rules/INDEX.md
|
|
23
|
-
- .planning/execution-contract.md
|
|
24
|
-
- .planning/toolchain.md
|
|
25
|
-
- .planning/lessons/README.md
|
|
26
|
-
- .context/spec/index.md
|
|
27
|
-
- .context/spec/stacks/
|
|
28
|
-
- .context/spec/backend/index.md
|
|
29
|
-
- .context/spec/backend/
|
|
30
|
-
- .context/workflow/
|
|
31
|
-
- .context/lessons/README.md(如存在)
|
|
32
|
-
- .planning/milestones/
|
|
15
|
+
- .devflow/planning/features/{功能名}/api-contract.md
|
|
16
|
+
- .devflow/planning/features/{功能名}/architecture-brief.md
|
|
17
|
+
- .devflow/planning/features/{功能名}/architecture-brief.meta.json
|
|
18
|
+
- .devflow/planning/requirements/baseline.md
|
|
19
|
+
- .devflow/planning/features/{功能名}/功能点梳理.md (optional, Track B context when already available)
|
|
20
|
+
- .devflow/planning/PROJECT.md
|
|
21
|
+
- .devflow/planning/navigation/INDEX.md
|
|
22
|
+
- .devflow/planning/rules/INDEX.md
|
|
23
|
+
- .devflow/planning/execution-contract.md
|
|
24
|
+
- .devflow/planning/toolchain.md
|
|
25
|
+
- .devflow/planning/lessons/README.md
|
|
26
|
+
- .devflow/context/spec/index.md
|
|
27
|
+
- .devflow/context/spec/stacks/
|
|
28
|
+
- .devflow/context/spec/backend/index.md
|
|
29
|
+
- .devflow/context/spec/backend/
|
|
30
|
+
- .devflow/context/workflow/
|
|
31
|
+
- .devflow/context/lessons/README.md(如存在)
|
|
32
|
+
- .devflow/planning/milestones/
|
|
33
33
|
- references/affected-module-exploration.md
|
|
34
|
-
output: .planning/features/{功能名}/后端技术方案.md
|
|
34
|
+
output: .devflow/planning/features/{功能名}/后端技术方案.md
|
|
35
35
|
allowed-tools:
|
|
36
36
|
- Read
|
|
37
37
|
- Write
|
|
@@ -46,7 +46,7 @@ allowed-tools:
|
|
|
46
46
|
|
|
47
47
|
## 需求追溯硬约束
|
|
48
48
|
|
|
49
|
-
读取 `.planning/requirements/{feature}/traceability.json`。每个设计章节必须列 `覆盖 REQ: REQ-*`;定时任务、批处理、导入和通知至少拆为“编排(扫描/触发/锁/重试)”与“业务算法(判定/计算/写入)”两个可独立验证的小节。不得把遍历全部活跃组织、发送通知、文件解析等编排事实藏在算法描述中。
|
|
49
|
+
读取 `.devflow/planning/requirements/{feature}/traceability.json`。每个设计章节必须列 `覆盖 REQ: REQ-*`;定时任务、批处理、导入和通知至少拆为“编排(扫描/触发/锁/重试)”与“业务算法(判定/计算/写入)”两个可独立验证的小节。不得把遍历全部活跃组织、发送通知、文件解析等编排事实藏在算法描述中。
|
|
50
50
|
|
|
51
51
|
当架构简报包含 `analytics_query`、`analytics_projection`、`METRIC-*` 或 `RM-*` 时,后端方案额外必须分别写明:业务事实源;指标粒度/纳入排除/时区与修正;读模型或直接聚合路径;索引/扫描范围;新鲜度;watermark/迟到数据;重建与对账。不得把统计 SQL 混进事务命令,或以“后续补统计”跳过这些字段。
|
|
52
52
|
|
|
@@ -67,17 +67,17 @@ allowed-tools:
|
|
|
67
67
|
|
|
68
68
|
### 第一阶段:理解需求
|
|
69
69
|
|
|
70
|
-
1. 读取 `.planning/requirements/baseline.md` 理解需求
|
|
71
|
-
2. 读取 `.planning/PROJECT.md` 了解项目上下文
|
|
72
|
-
3. 如果 baseline.md 不存在,询问用户需求或在 `.planning/milestones/` 中查找相关历史
|
|
73
|
-
4. 读取 `references/project-rule-contract.md`,按 Spec Read Contract 发现并加载目标项目的后端规则包:`.planning/rules/INDEX.md` → `.context/spec/index.md` → 命中的 stack spec → 命中的 backend codebase spec → navigation → code-index(如存在且需要关系事实)→ 源码
|
|
70
|
+
1. 读取 `.devflow/planning/requirements/baseline.md` 理解需求
|
|
71
|
+
2. 读取 `.devflow/planning/PROJECT.md` 了解项目上下文
|
|
72
|
+
3. 如果 baseline.md 不存在,询问用户需求或在 `.devflow/planning/milestones/` 中查找相关历史
|
|
73
|
+
4. 读取 `references/project-rule-contract.md`,按 Spec Read Contract 发现并加载目标项目的后端规则包:`.devflow/planning/rules/INDEX.md` → `.devflow/context/spec/index.md` → 命中的 stack spec → 命中的 backend codebase spec → navigation → code-index(如存在且需要关系事实)→ 源码
|
|
74
74
|
5. 读取 `references/code-explore-guide.md`,按项目导航和规则包做通用后端探索
|
|
75
75
|
6. 读取 baseline 的 `反向审视与用户拍板`、`待确认事项`、`下游输入契约`:
|
|
76
76
|
- 已确认的冲突/复用/替代方案决策必须进入技术方案
|
|
77
77
|
- 影响 scope、语义、归属、兼容性或实现成本的未确认项,不得被当成已确认需求
|
|
78
78
|
- 若未确认项阻塞后端方案,询问用户;`--auto` 或无法询问时写入待确认事项和风险
|
|
79
|
-
7. 读取 `.planning/features/{功能名}/api-contract.md`。在双轨模式下,后端方案必须以 API 契约和需求基线作为权威输入,不得等待 Track B 的 `功能点梳理.md` 才开始。
|
|
80
|
-
8. 读取 `.planning/features/{功能名}/architecture-brief.md` 和 `.meta.json`,在文档开头记录消费的 `brief_revision`、`graph_revision` 和 `static_context_snapshot_revision`。`comparison_status=confirmed` 的选择可作为实现依据;其他状态只能作为风险或待确认前提,不得把 recommendation 写成已决定实现。若 `assessment_level=full` 但未 confirmed,停止并回到架构评估。
|
|
79
|
+
7. 读取 `.devflow/planning/features/{功能名}/api-contract.md`。在双轨模式下,后端方案必须以 API 契约和需求基线作为权威输入,不得等待 Track B 的 `功能点梳理.md` 才开始。
|
|
80
|
+
8. 读取 `.devflow/planning/features/{功能名}/architecture-brief.md` 和 `.meta.json`,在文档开头记录消费的 `brief_revision`、`graph_revision` 和 `static_context_snapshot_revision`。`comparison_status=confirmed` 的选择可作为实现依据;其他状态只能作为风险或待确认前提,不得把 recommendation 写成已决定实现。若 `assessment_level=full` 但未 confirmed,停止并回到架构评估。
|
|
81
81
|
9. 若 `功能点梳理.md` 已存在,可作为测试可读上下文补充读取;若不存在,不阻塞 Track A。
|
|
82
82
|
10. 若 baseline、api-contract 或 `功能点梳理.md` 包含 `SL-*` 切片计划,读取 `skill://workflow-pipeline/references/slice-safety-guide.md`,只为当前执行切片生成后端方案。后置切片只可作为依赖上下文或后续范围,不得生成库表、接口、任务或运行时设计。
|
|
83
83
|
|
|
@@ -86,9 +86,9 @@ allowed-tools:
|
|
|
86
86
|
在设计前,探索相关实现:
|
|
87
87
|
|
|
88
88
|
1. **读取 PROJECT.md 的 Project Layout 章节**,确定后端代码所在目录
|
|
89
|
-
2. 按 `references/project-rule-contract.md` 的顺序读取项目规则包,优先使用 `.planning/rules/INDEX.md` 和 `.context/spec/index.md` 匹配 stack/codebase spec,兼容 `.context/spec/`、`.context/workflow/`、`.context/lessons/` 和根目录 `AGENTS.md` / `CLAUDE.md`
|
|
90
|
-
3. 读取 `.planning/navigation/INDEX.md` → 筛选后端/服务类型代码库 → 加载对应 `{name}.md` 导航文件,按目标项目实际结构识别领域/模型、服务、持久化、接口、任务、集成、配置和迁移入口
|
|
91
|
-
4. 若 `.planning/code-index/` 存在,用 Symbol Index 和 Relation Graph 查询相关入口、调用链、读写资源、测试和外部集成候选;读取 `evidence_path:evidence_line` 后再写现状结论
|
|
89
|
+
2. 按 `references/project-rule-contract.md` 的顺序读取项目规则包,优先使用 `.devflow/planning/rules/INDEX.md` 和 `.devflow/context/spec/index.md` 匹配 stack/codebase spec,兼容 `.devflow/context/spec/`、`.devflow/context/workflow/`、`.devflow/context/lessons/` 和根目录 `AGENTS.md` / `CLAUDE.md`
|
|
90
|
+
3. 读取 `.devflow/planning/navigation/INDEX.md` → 筛选后端/服务类型代码库 → 加载对应 `{name}.md` 导航文件,按目标项目实际结构识别领域/模型、服务、持久化、接口、任务、集成、配置和迁移入口
|
|
91
|
+
4. 若 `.devflow/planning/code-index/` 存在,用 Symbol Index 和 Relation Graph 查询相关入口、调用链、读写资源、测试和外部集成候选;读取 `evidence_path:evidence_line` 后再写现状结论
|
|
92
92
|
5. **现有功能复用检查**:编写任何新逻辑前,必须先在项目中搜索是否已有相同或相似功能的实现。优先使用 code-index 查询 symbols/relations;缺失或过期时再按导航和 `rg` 兜底。搜索范围包括:
|
|
93
93
|
- `pkg/` 目录(已有外部集成封装,如支付、红包、短信、二维码等)
|
|
94
94
|
- Service 层(已有业务能力)
|
|
@@ -160,12 +160,12 @@ allowed-tools:
|
|
|
160
160
|
|
|
161
161
|
### 第三阶段:生成文档
|
|
162
162
|
|
|
163
|
-
1. 创建 `.planning/features/{功能名}/` 目录
|
|
163
|
+
1. 创建 `.devflow/planning/features/{功能名}/` 目录
|
|
164
164
|
2. 读取 `assets/backend-spec-template.md` 模板
|
|
165
165
|
3. 按模板结构填充内容,并写入 `需求基线衔接`、`后端规范影响`、`能力抽象建议` 章节
|
|
166
|
-
4. 文件名格式:`.planning/features/{功能名}/后端技术方案.md`
|
|
166
|
+
4. 文件名格式:`.devflow/planning/features/{功能名}/后端技术方案.md`
|
|
167
167
|
|
|
168
|
-
If an older baseline still points to root `features/{功能名}/`, treat that as a legacy read path. New backend tech-spec output stays under `.planning/features/{功能名}/`.
|
|
168
|
+
If an older baseline still points to root `features/{功能名}/`, treat that as a legacy read path. New backend tech-spec output stays under `.devflow/planning/features/{功能名}/`.
|
|
169
169
|
|
|
170
170
|
### 第三阶段.5 — ADR 创建(按需)
|
|
171
171
|
|
|
@@ -201,7 +201,7 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
|
|
|
201
201
|
- 兼容性:无影响
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
**ADR 存放路径**:`.planning/architecture/adr/{序号}-{主题}.md`
|
|
204
|
+
**ADR 存放路径**:`.devflow/planning/architecture/adr/{序号}-{主题}.md`
|
|
205
205
|
|
|
206
206
|
**不满足条件时不要创建 ADR。** 常规决策(字段名选择、参数顺序等)直接写在方案里即可。
|
|
207
207
|
|
|
@@ -213,9 +213,9 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
|
|
|
213
213
|
|
|
214
214
|
### 第五阶段:结构化元数据
|
|
215
215
|
|
|
216
|
-
完成后写入 `.planning/features/{功能名}/后端技术方案.meta.json`。必须从 `architecture-brief.meta.json` 原样复制:`brief_revision → architecture_brief_revision`、`graph_revision → architecture_graph_revision`、`static_context_snapshot_revision → architecture_static_context_snapshot_revision`、`comparison_status → architecture_comparison_status`。不得凭记忆填写或改写这些值。
|
|
216
|
+
完成后写入 `.devflow/planning/features/{功能名}/后端技术方案.meta.json`。必须从 `architecture-brief.meta.json` 原样复制:`brief_revision → architecture_brief_revision`、`graph_revision → architecture_graph_revision`、`static_context_snapshot_revision → architecture_static_context_snapshot_revision`、`comparison_status → architecture_comparison_status`。不得凭记忆填写或改写这些值。
|
|
217
217
|
|
|
218
|
-
完成后写入 `.planning/features/{功能名}/后端技术方案.meta.json`,字段定义见 `feature-development.yaml` 中 `steps[backend-tech-spec].meta_output.fields`:`api_count`, `table_count`, `migration_count`。
|
|
218
|
+
完成后写入 `.devflow/planning/features/{功能名}/后端技术方案.meta.json`,字段定义见 `feature-development.yaml` 中 `steps[backend-tech-spec].meta_output.fields`:`api_count`, `table_count`, `migration_count`。
|
|
219
219
|
|
|
220
220
|
## 注意事项
|
|
221
221
|
|
|
@@ -227,8 +227,8 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
|
|
|
227
227
|
6. **必须描述现有功能** — 新功能如果影响现有功能,必须先描述现有功能的流程、字段、逻辑
|
|
228
228
|
7. **统计类功能要详细** — 对于涉及统计表的变更,必须说明:现有字段及含义、现有统计 SQL/逻辑、Job 调度频率、新增字段及统计逻辑
|
|
229
229
|
8. **只关注后端逻辑** — 流程图只描述后端服务的处理流程,不要包含前端行为
|
|
230
|
-
9. **必须体现项目规则包** — 若目标项目存在 `.planning/rules/` 或 `.context/spec/`,后端方案必须列出适用规范、相关经验教训、工具链要求、测试策略和审查门禁
|
|
231
|
-
10. **历史口径使用 `.planning`** — 与历史相关的判断优先来自 `.planning/milestones/`、`.planning/requirements/`、`.planning/lessons/` 和阶段 `CONTEXT.md`;`features/` 或 `.context/lessons/` 只作为目标项目存在时的兼容来源
|
|
230
|
+
9. **必须体现项目规则包** — 若目标项目存在 `.devflow/planning/rules/` 或 `.devflow/context/spec/`,后端方案必须列出适用规范、相关经验教训、工具链要求、测试策略和审查门禁
|
|
231
|
+
10. **历史口径使用 `.devflow/planning`** — 与历史相关的判断优先来自 `.devflow/planning/milestones/`、`.devflow/planning/requirements/`、`.devflow/planning/lessons/` 和阶段 `CONTEXT.md`;`features/` 或 `.devflow/context/lessons/` 只作为目标项目存在时的兼容来源
|
|
232
232
|
11. **现有功能复用优先** — 编写任何新逻辑前,必须先在项目内搜索已有实现,避免重复造轮子。重点检查:`pkg/` 外部集成封装、Service 层业务能力、Repository 层数据访问模式、公共工具方法。发现已有封装时直接复用,严禁绕过直接写裸调用
|
|
233
233
|
12. **遵循最佳实践标杆** — 新功能的设计(分层、命名、错误处理、参数封装、测试模式)必须与项目内已有标杆功能保持一致,不得引入与项目验证过的成熟模式相悖的新模式。若需偏离,必须在方案中说明理由
|
|
234
234
|
13. **能力抽象** — 新功能中具有独立复用价值的部分(外部集成、通用业务能力),必须抽象为 `pkg/` 级模块,定义清晰的 Client 接口和参数/结果结构体,形成可被后续功能消费的项目能力资产
|
|
@@ -241,7 +241,7 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
|
|
|
241
241
|
- [ ] 涉及调用上游 API 的,是否已向用户索要接口文档并确认对接方案?(不可猜测 API 契约,包括 URL、认证、请求/响应结构、错误码)
|
|
242
242
|
- [ ] 涉及的每个能力点(外部集成、业务逻辑、数据访问、工具方法),是否已在项目内完成复用搜索?**若已有封装却被绕过直接重写,方案不合格。**
|
|
243
243
|
- [ ] `references/affected-module-exploration.md` 的探索产出检查是否全部通过?(现状流程图、字段/方法表格、集成点列表、复用/扩展/新增决策)**若不通过,必须先补充代码探索,不得继续写文档。**
|
|
244
|
-
- [ ] 若 `.planning/code-index/` 存在,复用/影响范围/调用链/读写资源判断是否已查询 code-index 并回读源码 evidence?若未使用,是否说明缺失或过期原因?
|
|
244
|
+
- [ ] 若 `.devflow/planning/code-index/` 存在,复用/影响范围/调用链/读写资源判断是否已查询 code-index 并回读源码 evidence?若未使用,是否说明缺失或过期原因?
|
|
245
245
|
- [ ] 是否已找到项目内最佳实践标杆,并确认新功能的分层结构、命名、错误处理、参数封装模式与标杆一致?(若偏离,理由是否已写明?)
|
|
246
246
|
- [ ] 新功能中具有独立复用价值的部分,是否已识别并抽象为 `pkg/` 级能力模块?接口定义、参数/结果结构体是否清晰?
|
|
247
247
|
- [ ] 方案影响的现有功能是否已描述其**现状流程/字段/逻辑**?(先描述现状,再分析影响)
|
|
@@ -262,7 +262,7 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
|
|
|
262
262
|
|
|
263
263
|
- [ ] 方案包含:功能要点、影响范围、库表设计(DDL+ER)、流程设计、风险点
|
|
264
264
|
- [ ] 不含前端组件、前端路由(那属于前端技术方案)
|
|
265
|
-
- [ ] 若存在 `.planning/rules/` 或 `.context/spec/`,适用规范+经验教训+工具链+测试策略已列出
|
|
265
|
+
- [ ] 若存在 `.devflow/planning/rules/` 或 `.devflow/context/spec/`,适用规范+经验教训+工具链+测试策略已列出
|
|
266
266
|
- [ ] 审查结论已写入方案末尾
|
|
267
267
|
|
|
268
268
|
**审查结论不通过时不得报告 "Step 3c 完成"。**
|