@guanlin4924/devflow-pi 0.1.105 → 0.1.106
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 +10 -8
- package/package.json +1 -1
- package/plugins/devflow-core/extensions/devflow-core.ts +105 -305
- package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +3 -1
- package/plugins/devflow-core/runtime/hooks/hook_common.py +6 -5
- package/plugins/devflow-core/runtime/hooks/index_gate.py +19 -26
- package/plugins/devflow-core/skills/wireframe-proposal/SKILL.md +2 -0
- package/plugins/devflow-core/skills/wireframe-render/SKILL.md +2 -0
- package/plugins/devflow-core/skills/wireframe-review/SKILL.md +2 -0
- package/plugins/devflow-core/skills/wireframe-validate/SKILL.md +2 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +34 -50
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +40 -191
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/artifact_specs.rb +12 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +38 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_policy.rb +11 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_result.rb +12 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_runtime.rb +4 -9
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +13 -86
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_recover.rb +24 -13
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/repair_control_plane.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +3 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +8 -39
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_commit.rb +39 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +2 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/regression-acceptance.yaml +0 -1
- package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +10 -5
- package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +1 -1
- package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +2 -0
- package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +2 -0
- package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +3 -1
- package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +2 -0
- package/plugins/devflow-design/skills/workflow-architecture-feasibility/SKILL.md +2 -0
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +6 -4
- package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +2 -0
- package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +2 -0
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +6 -4
- package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +3 -1
- package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +4 -2
- package/plugins/devflow-implementation/agents/implementation-worker.md +2 -8
- package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +2 -0
- package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +3 -1
- package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +3 -1
- package/plugins/devflow-intel/skills/code-index-query/SKILL.md +2 -0
- package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +2 -0
- package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +2 -0
- package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +3 -1
- package/plugins/devflow-quality/skills/code-review/SKILL.md +4 -2
- package/plugins/devflow-quality/skills/workflow-acceptance-test-design/SKILL.md +3 -1
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/SKILL.md +2 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +2 -0
- package/plugins/devflow-quality/skills/workflow-human-acceptance/SKILL.md +2 -0
- package/plugins/devflow-quality/skills/workflow-regression-test-design/SKILL.md +2 -0
- package/plugins/devflow-quality/skills/workflow-release-closeout/SKILL.md +7 -5
- package/plugins/devflow-quality/skills/workflow-run-acceptance-tests/SKILL.md +8 -6
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +2 -0
- package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +2 -0
- package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +2 -0
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +6 -2
- package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +2 -0
- package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +2 -0
- package/src/constants.ts +1 -1
- package/templates/omp/AGENTS.md +6 -2
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
import argparse
|
|
7
7
|
import json
|
|
8
|
+
import os
|
|
8
9
|
import subprocess
|
|
9
10
|
import sys
|
|
10
11
|
from pathlib import Path
|
|
@@ -163,7 +164,8 @@ def stop_hook() -> int:
|
|
|
163
164
|
print(
|
|
164
165
|
json.dumps(
|
|
165
166
|
{
|
|
166
|
-
"decision": "
|
|
167
|
+
"decision": "approve",
|
|
168
|
+
"soft_gate": True,
|
|
167
169
|
"reason": reason,
|
|
168
170
|
"stop_block_count": stop_block_count,
|
|
169
171
|
},
|
|
@@ -444,8 +444,8 @@ def tool_requests_protected_source(
|
|
|
444
444
|
|
|
445
445
|
# Core control store protection (approval records live in control.db). This is
|
|
446
446
|
# misuse prevention, not a defence against a hostile same-user process. It is
|
|
447
|
-
# always
|
|
448
|
-
#
|
|
447
|
+
# always detected; index_gate emits warnings rather than
|
|
448
|
+
# denial. Hook-config may only add extra protected path globs.
|
|
449
449
|
CONTROL_STORE_NAME_RE = re.compile(r"^control\.db(?:$|[-.])", re.IGNORECASE)
|
|
450
450
|
CANONICAL_ACCEPTANCE_RE = re.compile(
|
|
451
451
|
r"(?:^|/)\.devflow/planning/test-runs/[^/]+/acceptance-results(?:\.meta)?\.json$",
|
|
@@ -713,7 +713,7 @@ def tool_touches_control_store(event: dict[str, Any], root: Path) -> tuple[bool,
|
|
|
713
713
|
|
|
714
714
|
# MCP authorization and audit data are user-local security state. This guard
|
|
715
715
|
# is deliberately narrower than DEVFLOW_HOME: only mcp.json and mcp-audit/
|
|
716
|
-
# are
|
|
716
|
+
# are detected here; index_gate applies the soft/strict policy to the finding.
|
|
717
717
|
def path_is_mcp_protected(raw: str, cwd: Path) -> bool:
|
|
718
718
|
candidate = Path(_expand_shell_path(str(raw)))
|
|
719
719
|
if not candidate.is_absolute():
|
|
@@ -792,8 +792,9 @@ def tool_touches_mcp_config(event: dict[str, Any], root: Path) -> tuple[bool, li
|
|
|
792
792
|
|
|
793
793
|
|
|
794
794
|
# Run artifacts are user-local evidence, not agent-readable source. Keep this
|
|
795
|
-
# guard separate from the control-store guard:
|
|
796
|
-
# read exception is the Core-produced result.json summary.
|
|
795
|
+
# guard separate from the control-store guard: detection always runs and its
|
|
796
|
+
# only read exception is the Core-produced result.json summary. The caller
|
|
797
|
+
# chooses warning or denial according to the soft/strict policy.
|
|
797
798
|
def _run_root(cwd: Path) -> Path:
|
|
798
799
|
# macOS commonly exposes /var as a symlink to /private/var; use the
|
|
799
800
|
# canonical cwd so lexical and realpath checks compare in one namespace.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""PreToolUse
|
|
2
|
+
"""PreToolUse checks: report access risks without workflow blocking."""
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
6
|
import json
|
|
7
|
+
import os
|
|
7
8
|
|
|
8
9
|
from hook_common import (
|
|
9
10
|
direct_tool_paths,
|
|
@@ -22,50 +23,42 @@ from hook_common import (
|
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
def
|
|
26
|
-
print(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"hookEventName": "PreToolUse",
|
|
31
|
-
"permissionDecision": "deny",
|
|
32
|
-
"permissionDecisionReason": reason,
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
ensure_ascii=False,
|
|
36
|
-
)
|
|
37
|
-
)
|
|
26
|
+
def advise(reason: str) -> int:
|
|
27
|
+
print(json.dumps({"hookSpecificOutput": {
|
|
28
|
+
"hookEventName": "PreToolUse", "permissionDecision": "allow",
|
|
29
|
+
"additionalContext": "Workflow warning: " + reason,
|
|
30
|
+
}}, ensure_ascii=False))
|
|
38
31
|
return 0
|
|
39
32
|
|
|
40
33
|
|
|
41
34
|
def main() -> int:
|
|
42
35
|
event = read_event()
|
|
43
36
|
root = project_root(event)
|
|
44
|
-
#
|
|
37
|
+
# Check protected targets first; advise() reports findings.
|
|
45
38
|
mcp_blocked, mcp_paths = tool_touches_mcp_config(event, root)
|
|
46
39
|
if mcp_blocked:
|
|
47
|
-
return
|
|
40
|
+
return advise(
|
|
48
41
|
"MCP_CONFIG_PROTECTED: $DEVFLOW_HOME/mcp.json and $DEVFLOW_HOME/mcp-audit/ are reserved for "
|
|
49
|
-
"Devflow MCP authorization and audit records;
|
|
50
|
-
"
|
|
42
|
+
"Devflow MCP authorization and audit records; use the runtime authorization tools. "
|
|
43
|
+
"Access findings are advisory. Target: " + ", ".join(mcp_paths) + "."
|
|
51
44
|
)
|
|
52
45
|
control_blocked, control_paths = tool_touches_control_store(event, root)
|
|
53
46
|
if control_blocked:
|
|
54
|
-
return
|
|
47
|
+
return advise(
|
|
55
48
|
"CONTROL_STORE_PROTECTED: Devflow control.db, the Devflow data-home projects tree and writes to canonical "
|
|
56
|
-
"acceptance results are reserved for Core runtime tools; this misuse-prevention hook
|
|
57
|
-
"shell access
|
|
49
|
+
"acceptance results are reserved for Core runtime tools; this misuse-prevention hook warns about ordinary agent file and "
|
|
50
|
+
"shell access, but is not a same-user process sandbox. "
|
|
58
51
|
"Canonical acceptance-results*.json may be read with the Read/Grep file tools. "
|
|
59
|
-
f"Use devflow_approval(action=\"propose\"|\"list\") for approvals.
|
|
52
|
+
f"Use devflow_approval(action=\"propose\"|\"list\") for approvals. Target: {', '.join(control_paths)}."
|
|
60
53
|
)
|
|
61
54
|
run_blocked, run_paths = tool_touches_run_artifacts(event, root)
|
|
62
55
|
if run_blocked:
|
|
63
|
-
return
|
|
56
|
+
return advise(
|
|
64
57
|
"RUN_ARTIFACTS_PROTECTED: .devflow/runs/ contains trace, screenshots, runtime logs and other "
|
|
65
|
-
"user-local evidence
|
|
58
|
+
"user-local evidence; ordinary Agent access warns in soft mode and is denied in strict mode. Trace and screenshots "
|
|
66
59
|
"are for the user to inspect locally with Playwright in a terminal; Agent failure analysis must read "
|
|
67
60
|
"the Core-produced result.json summary instead. Only pure-read access to a feature execution's "
|
|
68
|
-
"result.json
|
|
61
|
+
"result.json needs no access warning. Target: " + ", ".join(run_paths) + "."
|
|
69
62
|
)
|
|
70
63
|
policy = load_policy(root)
|
|
71
64
|
session_id = ensure_session(root, event)
|
|
@@ -79,7 +72,7 @@ def main() -> int:
|
|
|
79
72
|
missing = [path for path in required if path not in observed]
|
|
80
73
|
strict = str(policy.get("mode", "strict")).lower() == "strict"
|
|
81
74
|
if strict and required and missing and blocked:
|
|
82
|
-
return
|
|
75
|
+
return advise(
|
|
83
76
|
"INDEX_GATE_BLOCKED: protected source access requires observed index evidence. "
|
|
84
77
|
f"Read these files first, in order: {', '.join(missing)}. "
|
|
85
78
|
f"Blocked target: {', '.join(paths)}. The gate records successful tool reads, not assistant promises."
|
|
@@ -3,6 +3,8 @@ name: wireframe-proposal
|
|
|
3
3
|
description: Generate or revise a low-fidelity wireframe proposal from controlled requirements. Use during the wireframe-proposal workflow step.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
门禁策略:默认软门禁,门禁行为以本段为准。本文及引用材料中的前置检查、审查、质量、完成条件和 CP 确认用于诊断;未满足时记录缺项、风险与后续处理,继续可执行的工作,不自动阻断阶段推进。保留真实的 failed/blocked/未审批状态,不把继续执行写成通过或人工批准。硬门禁及其恢复开关已移除。
|
|
7
|
+
|
|
6
8
|
# Wireframe Proposal
|
|
7
9
|
|
|
8
10
|
Run only when Core reports `wireframe-proposal` as the current step. A no-UI decision is evaluated and recorded by Core after CP-1; do not infer it from requirement prose, edit workflow state, or self-skip this step.
|
|
@@ -3,6 +3,8 @@ name: wireframe-render
|
|
|
3
3
|
description: Render validated canonical wireframe JSON into deterministic Markdown and SVG previews. Use after wireframe-validate.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
门禁策略:默认软门禁,门禁行为以本段为准。本文及引用材料中的前置检查、审查、质量、完成条件和 CP 确认用于诊断;未满足时记录缺项、风险与后续处理,继续可执行的工作,不自动阻断阶段推进。保留真实的 failed/blocked/未审批状态,不把继续执行写成通过或人工批准。硬门禁及其恢复开关已移除。
|
|
7
|
+
|
|
6
8
|
# Wireframe Render
|
|
7
9
|
|
|
8
10
|
Run only when Core reports `wireframe-render` as the current step. A no-UI decision is evaluated and recorded by Core after CP-1; do not infer it from requirement prose, edit workflow state, or self-skip this step.
|
|
@@ -3,6 +3,8 @@ name: wireframe-review
|
|
|
3
3
|
description: Present validated wireframe previews and unresolved questions for explicit user review. Use at the wireframe-review checkpoint.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
门禁策略:默认软门禁,门禁行为以本段为准。本文及引用材料中的前置检查、审查、质量、完成条件和 CP 确认用于诊断;未满足时记录缺项、风险与后续处理,继续可执行的工作,不自动阻断阶段推进。保留真实的 failed/blocked/未审批状态,不把继续执行写成通过或人工批准。硬门禁及其恢复开关已移除。
|
|
7
|
+
|
|
6
8
|
# Wireframe Review
|
|
7
9
|
|
|
8
10
|
Run only when Core reports `wireframe-review` as the current step. A no-UI decision is evaluated and recorded by Core after CP-1; do not infer it from requirement prose, edit workflow state, or self-skip this step.
|
|
@@ -3,6 +3,8 @@ name: wireframe-validate
|
|
|
3
3
|
description: Run deterministic validation for a wireframe proposal and build canonical JSON. Use after wireframe-proposal.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
门禁策略:默认软门禁,门禁行为以本段为准。本文及引用材料中的前置检查、审查、质量、完成条件和 CP 确认用于诊断;未满足时记录缺项、风险与后续处理,继续可执行的工作,不自动阻断阶段推进。保留真实的 failed/blocked/未审批状态,不把继续执行写成通过或人工批准。硬门禁及其恢复开关已移除。
|
|
7
|
+
|
|
6
8
|
# Wireframe Validate
|
|
7
9
|
|
|
8
10
|
Run only when Core reports `wireframe-validate` as the current step. A no-UI decision is evaluated and recorded by Core after CP-1; do not infer it from requirement prose, edit workflow state, or self-skip this step.
|
|
@@ -3,6 +3,11 @@ name: workflow-orchestrator
|
|
|
3
3
|
description: Use when the user asks to continue, resume, advance, inspect, or route a .devflow/planning-based workflow; when the OMP development agent must decide the next workflow skill from project state; or when a checkpoint must be handled before proceeding.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## 默认软门禁策略
|
|
7
|
+
|
|
8
|
+
工作流硬门禁已移除。下文及各步骤中的产物、索引、合同、审查、质量、恢复和 CP 审批条件均为诊断建议:保留失败证据和缺项,允许继续执行。用户说“下一步”即可推进,无需额外批准弹窗;不得把继续执行记录成人工批准,也不得把失败、未执行的测试改写为通过。真实读写/执行失败、无法解析的状态和并发版本冲突须如实报告。硬门禁及其恢复开关已移除。
|
|
9
|
+
|
|
10
|
+
|
|
6
11
|
# Workflow Orchestrator
|
|
7
12
|
|
|
8
13
|
## Overview
|
|
@@ -13,9 +18,9 @@ This skill is the **single source of truth for all execution-time rules**: gate
|
|
|
13
18
|
|
|
14
19
|
## Chain-skill mode (current)
|
|
15
20
|
|
|
16
|
-
The
|
|
21
|
+
The chain skill owns dispatch and sequencing. Core contract, checker, output, and review gates are diagnostic only and must not hard-block skill execution. Call the current step skill, verify its declared inputs and outputs, collect its result, and continue the chain; preserve missing facts and failed checks as structured findings for the next skill or the user. Do not invoke Core gate APIs to force a step through, and report operations that cannot execute because of unsafe paths, corrupted state, or genuinely missing execution inputs. CP confirmation is advisory by default.
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
Hard workflow gates and their configuration switches have been removed.
|
|
19
24
|
|
|
20
25
|
## Quick Start
|
|
21
26
|
|
|
@@ -60,10 +65,10 @@ When the invocation contains `<devflow-runtime-directive>`, run the workflow con
|
|
|
60
65
|
1. Inspect state and execute exactly the returned action.
|
|
61
66
|
2. After a successful step transition and artifact synchronization, inspect state again.
|
|
62
67
|
3. Continue with the newly returned action and load only that step's Skill.
|
|
63
|
-
4.
|
|
64
|
-
5.
|
|
68
|
+
4. On `await_user_confirmation`, follow the soft checkpoint rules below and continue without fabricating approval. Stop on `workflow_complete`, an explicit user interruption, an unrecoverable operation failure, or an actual control-plane error reported as `blocked`.
|
|
69
|
+
5. When explicit CP confirmation is enabled, present the checkpoint and yield to the user at `await_user_confirmation`; resume after confirmation and a successful `devflow_transition`. Otherwise report the checkpoint diagnostics and continue through the soft transition.
|
|
65
70
|
|
|
66
|
-
|
|
71
|
+
Apply the configured gate policy during automatic execution. Preserve diagnostics and approval facts; re-inspect before retrying a stale revision. An operation that actually failed remains failed. If context pressure requires a new turn, preserve project truth in `.devflow/planning`, finish required context synchronization, and use `/devflow resume` rather than inventing state from the conversation.
|
|
67
72
|
|
|
68
73
|
## Step Execution Protocol
|
|
69
74
|
|
|
@@ -80,58 +85,37 @@ Each step execution follows this fixed sequence:
|
|
|
80
85
|
|
|
81
86
|
**After execution:**
|
|
82
87
|
6. Verify the step's outputs exist and record the revision returned by `devflow_state(action="inspect")`. **Do not call `devflow_transition` or write `xd://devflow_transition`: the Devflow Runtime owns the user confirmation and the atomic state transition after this agent turn.**
|
|
83
|
-
7. If the YAML step has `meta_output`, verify the `.meta.json` file exists and has the required fields. If missing,
|
|
88
|
+
7. If the YAML step has `meta_output`, verify the `.meta.json` file exists and has the required fields. If missing, record an advisory with reason "missing_meta_output" and continue without inventing metadata.
|
|
84
89
|
8. `devflow_transition` validates the proposed state before writing and rejects inconsistent updates. Never repeat the transition after it reports success.
|
|
85
90
|
9. Call `devflow_artifact(action="sync", preserve=false)` only when the registry still shows stale `planned`/`generated` statuses for completed steps.
|
|
86
91
|
|
|
87
92
|
## Checkpoint Rules
|
|
88
93
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
When the inspector returns `await_user_confirmation
|
|
92
|
-
|
|
93
|
-
1. Read the checkpoint definition from YAML: `checkpoints.<cp-id>`.
|
|
94
|
-
2. Prefer structured checkpoint fields when present:
|
|
95
|
-
- `producing_step`
|
|
96
|
-
- `required_outputs`
|
|
97
|
-
- `required_meta_output`
|
|
98
|
-
- `required_meta_fields`
|
|
99
|
-
- `summary_fields`
|
|
100
|
-
- `prompt`
|
|
101
|
-
- `confirm_options`
|
|
102
|
-
- `skip_policy`
|
|
103
|
-
3. Read the producing step's `meta_output` or checkpoint `required_meta_output` → `.meta.json` to get structured field values (e.g., `fp_count`, `br_count`).
|
|
104
|
-
4. Verify the listed required outputs exist.
|
|
105
|
-
5. Check artifact registry content_valid status for the listed outputs.
|
|
106
|
-
6. Use `ask` to present the CP prompt, filling in the `summary_fields` from `.meta.json` data.
|
|
107
|
-
7. If the user confirms, inspect the current revision and call `devflow_transition(action="confirm-checkpoint", expectedRevision=<revision>)`.
|
|
108
|
-
8. If the user asks for fixes or rejects the checkpoint, keep `.devflow/planning/STATE.md` at `status: waiting_checkpoint`, inspect the current revision, call `devflow_transition(action="checkpoint-decision", decision="needs_fix", expectedRevision=<revision>)`, and route to the requested remediation.
|
|
109
|
-
|
|
110
|
-
CP skip rules:
|
|
111
|
-
- CP-1, CP-API, CP-2, CP-3, CP-4: **never skip**.
|
|
112
|
-
- CP-2 is the Merge Gate. It cannot be skipped in the dual-track workflow.
|
|
94
|
+
CP definitions (prompts, options, fields) are in the active workflow YAML (`feature-development.yaml` → `checkpoints`). By default, report missing outputs and checks, then use the Core transition to continue with `continued_with_warning`; no additional approval prompt is required. This records continuation, never human approval. Explicit review decisions remain available when the user requests them; they are not prerequisites for continuation.
|
|
95
|
+
|
|
96
|
+
When the inspector returns `await_user_confirmation`, inspect the current revision, report missing outputs and check results, and continue through the Core transition with `continued_with_warning`. Do not create an approval record or freeze candidate facts merely to advance. If the user requests fixes or rejects an output, follow that request.
|
|
113
97
|
|
|
114
98
|
## Global Gate Rules
|
|
115
99
|
|
|
116
|
-
After each step completes,
|
|
100
|
+
After each step completes, evaluate the following checks and carry any failures forward as advisories:
|
|
117
101
|
|
|
118
|
-
| Step |
|
|
102
|
+
| Step | Check | Advisory handoff |
|
|
119
103
|
|------|------|---------|
|
|
120
|
-
| requirement-triage | triage.meta.json `status` is `routed` AND `route` is `ready_for_wayfinder` |
|
|
121
|
-
| requirement-wayfinder | 决策地图.meta.json `status=ready_for_baseline` AND `ready_for_baseline=true` |
|
|
122
|
-
| domain-modeling | 领域模型记录及 meta 存在且标识当前功能 |
|
|
123
|
-
| requirement-feasibility-review | 可实现性审查.meta.json `status=ready_for_baseline`、`baseline_gate=pass`、`blocking_gap_count=0` 且无 critical finding;`gap_count` 记录全部发现数 |
|
|
124
|
-
| requirement-baseline | baseline.md review conclusion is "通过" AND baseline.meta.json `review_status` / `traceability_status` are `passed` AND blocking counters are all 0 |
|
|
125
|
-
| api-contract | api-contract.meta.json `review_status` / `traceability_status` are `passed` AND `pending_contract_count` is 0 |
|
|
126
|
-
| architecture-feasibility | Core-derived `architecture-brief.md` / meta exist. If `assessment_level=full`, require `assessment_status=ready` and `comparison_status=confirmed`; a lightweight incomplete result may proceed only as an explicitly unresolved downstream input. |
|
|
127
|
-
| ui-spec | UI-SPEC.md review conclusion is "通过" |
|
|
128
|
-
| feature-breakdown | 功能点梳理.md review conclusion is "通过" |
|
|
129
|
-
| api-call-guide | api-call-guide.meta.json `frontend_consumable` and `mock_ready` are true, pending_items is empty |
|
|
130
|
-
| frontend-tech-spec + backend-tech-spec | Both review conclusions are "通过" |
|
|
131
|
-
| integration-verify | integration-report.meta.json `merge_gate_status` / `traceability_status` are `passed` and all mismatch/blocking counters are 0 |
|
|
132
|
-
| change-plan | 变更清单.md review conclusion is "通过" AND 变更清单.meta.json traceability_status is `passed` with zero uncovered/orphan counts |
|
|
133
|
-
|
|
134
|
-
|
|
104
|
+
| requirement-triage | triage.meta.json `status` is `routed` AND `route` is `ready_for_wayfinder` | Carry findings to requirement-wayfinder |
|
|
105
|
+
| requirement-wayfinder | 决策地图.meta.json `status=ready_for_baseline` AND `ready_for_baseline=true` | Carry findings to domain-modeling |
|
|
106
|
+
| domain-modeling | 领域模型记录及 meta 存在且标识当前功能 | Carry findings to requirement-feasibility-review |
|
|
107
|
+
| requirement-feasibility-review | 可实现性审查.meta.json `status=ready_for_baseline`、`baseline_gate=pass`、`blocking_gap_count=0` 且无 critical finding;`gap_count` 记录全部发现数 | Carry findings to requirement-baseline |
|
|
108
|
+
| requirement-baseline | baseline.md review conclusion is "通过" AND baseline.meta.json `review_status` / `traceability_status` are `passed` AND blocking counters are all 0 | Carry findings to api-contract |
|
|
109
|
+
| api-contract | api-contract.meta.json `review_status` / `traceability_status` are `passed` AND `pending_contract_count` is 0 | Carry findings to dual tracks |
|
|
110
|
+
| architecture-feasibility | Core-derived `architecture-brief.md` / meta exist. If `assessment_level=full`, require `assessment_status=ready` and `comparison_status=confirmed`; a lightweight incomplete result may proceed only as an explicitly unresolved downstream input. | Carry findings to dual tracks for an incomplete full assessment |
|
|
111
|
+
| ui-spec | UI-SPEC.md review conclusion is "通过" | Carry findings to feature-breakdown |
|
|
112
|
+
| feature-breakdown | 功能点梳理.md review conclusion is "通过" | Carry findings to tech-specs |
|
|
113
|
+
| api-call-guide | api-call-guide.meta.json `frontend_consumable` and `mock_ready` are true, pending_items is empty | Carry findings to merge review |
|
|
114
|
+
| frontend-tech-spec + backend-tech-spec | Both review conclusions are "通过" | Carry findings to integration-verify |
|
|
115
|
+
| integration-verify | integration-report.meta.json `merge_gate_status` / `traceability_status` are `passed` and all mismatch/blocking counters are 0 | Carry findings to change-plan |
|
|
116
|
+
| change-plan | 变更清单.md review conclusion is "通过" AND 变更清单.meta.json traceability_status is `passed` with zero uncovered/orphan counts | Carry findings to execute |
|
|
117
|
+
|
|
118
|
+
Retain failures as diagnostic findings and continue with usable artifacts. Report any operation that cannot execute.
|
|
135
119
|
|
|
136
120
|
## Requirement Writeback Gate
|
|
137
121
|
|
|
@@ -180,7 +164,7 @@ When the inspector returns `run_parallel_window`:
|
|
|
180
164
|
|
|
181
165
|
## State Writeback Rules
|
|
182
166
|
|
|
183
|
-
Use `devflow_transition` for deterministic state updates.
|
|
167
|
+
Use `devflow_transition` for deterministic state updates. The OMP extension warns about direct file edits and direct calls to writer scripts without blocking workflow progress. Use Core tools to preserve consistent state and revision checks.
|
|
184
168
|
|
|
185
169
|
Common operations:
|
|
186
170
|
|
|
@@ -247,7 +231,7 @@ Steps with `meta_output` in the workflow YAML must produce a `.meta.json` file a
|
|
|
247
231
|
1. After step execution, check if the YAML step has `meta_output`.
|
|
248
232
|
2. If yes, verify the `.meta.json` file at `meta_output.path` exists.
|
|
249
233
|
3. Verify all `required: true` fields are present and non-null.
|
|
250
|
-
4. If missing or incomplete,
|
|
234
|
+
4. If missing or incomplete, retain the failed check and missing evidence as an advisory and continue with the available inputs.
|
|
251
235
|
|
|
252
236
|
The `.meta.json` data feeds CP prompts — e.g., CP-1 reads `baseline.meta.json` to show `fp_count: 7` instead of having the AI count manually.
|
|
253
237
|
|
|
@@ -257,7 +241,7 @@ This skill must be portable. Do not require manually-created `.devflow/planning`
|
|
|
257
241
|
|
|
258
242
|
If `.devflow/planning/STATE.md` is missing and project context files are also missing, route to `workflow-project-context` instead of asking for `init_state.rb`. If `.devflow/planning/STATE.md` is missing but project context files already exist, keep the existing `init_state.rb` recovery path.
|
|
259
243
|
|
|
260
|
-
If `.devflow/planning/STATE.md` contains
|
|
244
|
+
If `.devflow/planning/STATE.md` contains findings with `type: PENDING_TEMPLATE`, report the missing depth spec template and continue normal dispatch in soft mode. Include the codebase, topic, matched path, missing template path, and impact.
|
|
261
245
|
|
|
262
246
|
Use these generators:
|
|
263
247
|
|