@guanlin4924/devflow-pi 0.1.105 → 0.1.107
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 +287 -394
- 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-dynamic/SKILL.md +41 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +37 -50
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +46 -191
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/artifact_specs.rb +12 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dynamic_plan.rb +504 -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 +19 -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 +7 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +17 -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 +13 -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 +5 -0
- package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +3 -1
- package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +6 -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/agents/code-reviewer.md +2 -0
- package/plugins/devflow-quality/skills/code-review/SKILL.md +7 -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 +11 -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 +5 -0
- package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +2 -0
- package/src/constants.ts +1 -1
- package/src/dynamic-workflow.ts +31 -0
- package/templates/omp/AGENTS.md +8 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Presentation only. The revisioned Core plan owns every execution fact. */
|
|
2
|
+
export function renderDynamicWorkflow(snapshot: Record<string, unknown>, showHistory = false): string {
|
|
3
|
+
const tasks = (snapshot.workflow_steps ?? []) as Array<Record<string, unknown>>;
|
|
4
|
+
const marks: Record<string, string> = { completed: "✓", cancelled: "—", pending: "○", running: "●", checking: "●", failed: "✗" };
|
|
5
|
+
const labels: Record<string, string> = { cancelled: "已取消", waiting_decision: "待确认", waiting_external: "等待外部条件", failed: "未通过", checking: "验证中" };
|
|
6
|
+
const visible = !showHistory && tasks.length > 8 ? tasks.filter(task => !["completed", "cancelled"].includes(String(task.status))) : tasks;
|
|
7
|
+
const lines = visible.map(task => `${marks[String(task.status)] ?? "○"} ${task.label}${labels[String(task.status)] ? `(${labels[String(task.status)]})` : ""}${task.verification === "stale" ? "(需要重新验证)" : ""}${task.reason ? `:${task.reason}` : ""}`);
|
|
8
|
+
if (visible.length < tasks.length) lines.push(`已折叠 ${tasks.length - visible.length} 项历史记录,可在 /devflow control 查看全部步骤。`);
|
|
9
|
+
const decisions = (snapshot.decisions ?? []) as Array<Record<string, unknown>>;
|
|
10
|
+
for (const decision of decisions.filter(item => item.status === "pending")) lines.push(`待确认:${decision.question}`);
|
|
11
|
+
return [String(snapshot.current_feature ?? "需求工作流"), `需求说明:${snapshot.document}`, ...lines,
|
|
12
|
+
snapshot.delivery === "ready" ? "验收证据齐备,可以交付。" : snapshot.delivery === "cancelled" ? "需求已取消,历史结果已保留。" : snapshot.reason ? `需要调整计划:${snapshot.reason}` : "",
|
|
13
|
+
].filter(Boolean).join("\n");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function dynamicWorkflowDirective(snapshot: Record<string, unknown>): string {
|
|
17
|
+
return [
|
|
18
|
+
"<devflow-dynamic-workflow>",
|
|
19
|
+
"读取 skill://workflow-dynamic。当前是动态计划模式,按需求选择工作,不套用固定阶段和逐步审批。",
|
|
20
|
+
"Core STATE 是计划与结果的唯一写入入口。通过 devflow_plan inspect/revise/claim/report/verify 管理任务。",
|
|
21
|
+
"先读需求主文档和下列真实状态。没有计划时,核实项目后在主文档验收要求下维护稳定的 ### R-1: 描述 条目,提交中文任务计划。",
|
|
22
|
+
"已有计划时,执行 Core 选中的任务,读取它的精确 skill。缺项先补证据,技术失败自动修复。完成后继续可执行任务,不逐步询问用户。",
|
|
23
|
+
"只有真实业务取舍或未获授权的操作才调用 devflow_plan decision,给出 2–3 个选项,首项为推荐并说明影响。",
|
|
24
|
+
"已有 running/checking 任务先检查实际产物与执行状态;不得盲目重复外部操作。确认旧执行已结束才 recover。",
|
|
25
|
+
"不生成无关前端任务、空白方案或每技能一份报告。修改需求主文档;源码、测试、API 契约等必要产物照常维护。",
|
|
26
|
+
"验证必须用 verify 运行声明的命令;review 必须派发 devflow-code-reviewer 独立只读 task,返回 JSON {summary:string,findings:array},再用 review_result 提交捕获的原始结果。",
|
|
27
|
+
"Agent 回合结束不等于任务完成;缺失证据、失败、取消与通过必须保持区别。",
|
|
28
|
+
JSON.stringify(snapshot),
|
|
29
|
+
"</devflow-dynamic-workflow>",
|
|
30
|
+
].join("\n");
|
|
31
|
+
}
|
package/templates/omp/AGENTS.md
CHANGED
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This repository uses an OMP-native, project-scoped software delivery runtime.
|
|
4
4
|
|
|
5
|
+
## Gate policy
|
|
6
|
+
|
|
7
|
+
New requirements use dynamic plans: continue dependency-ready work and automatically repair technical findings. Delivery requires current verification and applicable independent review evidence. Preserve failed, stale, waiting and cancelled results; none means passed. Business choices use concise runtime option cards. Actual operation errors, unreadable control state and revision conflicts reject the affected operation. Existing fixed workflows retain their advisory checkpoint policy; do not apply their fixed stage/document requirements to dynamic tasks.
|
|
8
|
+
|
|
5
9
|
## Control plane
|
|
6
10
|
|
|
7
|
-
- Start only through `/devflow start <feature>|<phase>` after `/devflow doctor`
|
|
11
|
+
- Start only through `/devflow start <feature>|<phase>` after checking `/devflow doctor` and reporting its diagnostics; resume with `/devflow resume`.
|
|
8
12
|
- Inspect workflow state with `devflow_state`; do not infer state from chat history.
|
|
9
13
|
- Initialize delivery with `devflow_bootstrap`.
|
|
10
|
-
-
|
|
14
|
+
- When the inspector reports `mode: dynamic`, load `workflow-dynamic` and use `devflow_plan` for task proposals, execution results and verification. The requirement document owns intent; Core owns progress and observed results. Do not generate irrelevant UI tasks or per-skill Markdown/meta pairs.
|
|
15
|
+
- For existing fixed workflows, mutate checkpoints and steps only with `devflow_transition`.
|
|
11
16
|
- To abandon an active feature, use the runtime-confirmed `devflow_transition`
|
|
12
17
|
`cancel-feature` operation or `/devflow abandon`; never edit control files.
|
|
13
18
|
- Never directly edit `.devflow/planning/STATE.md`, `.devflow/planning/.next-intent`, `.devflow/planning/workflows/`, or `.devflow/planning/artifacts/index.yaml`.
|
|
@@ -35,4 +40,4 @@ An index accelerates discovery; it never overrides source code, executable tests
|
|
|
35
40
|
- A model assertion is not validation evidence.
|
|
36
41
|
- Record exact commands and results for tests, builds, migrations, and acceptance checks.
|
|
37
42
|
- When context reconciliation is requested, follow `skill://workflow-context-sync`, validate the required level, then acknowledge through `devflow_context_sync`.
|
|
38
|
-
-
|
|
43
|
+
- Legacy soft checkpoints continue with `continued_with_warning`. Dynamic plans continue from actual task results and never treat an Agent turn ending as successful completion. Never synthesize human approval.
|