@chenmk/superflow 0.5.20 → 0.5.22
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/INSTALL.en.md +2 -0
- package/INSTALL.md +2 -0
- package/assets/scripts/superflow-delivery-check.sh +36 -6
- package/assets/scripts/superflow-review-coverage.mjs +34 -0
- package/assets/scripts/superflow-test-report-lint.py +125 -4
- package/assets/skill-registry.json +23 -8
- package/assets/skills/openspec-apply-change/SKILL.md +7 -0
- package/assets/skills/openspec-archive-change/SKILL.md +13 -1
- package/assets/skills/superflow-archive/SKILL.md +17 -0
- package/assets/skills/superflow-design/SKILL.md +15 -1
- package/assets/skills/superflow-docs/SKILL.md +11 -0
- package/assets/skills/superflow-implement/SKILL.md +22 -0
- package/assets/skills/superflow-pipeline/SKILL.md +6 -1
- package/assets/skills/superflow-pipeline/references/architecture-design-template.md +4 -2
- package/assets/skills/superflow-pipeline/references/batch-prompt-template.md +6 -1
- package/assets/skills/superflow-pipeline/references/document-review-coverage.md +26 -0
- package/assets/skills/superflow-pipeline/references/document-templates.md +7 -0
- package/assets/skills/superflow-pipeline/references/implementation-prompt-template.md +56 -35
- package/assets/skills/superflow-pipeline/references/managed-work.md +6 -0
- package/assets/skills/superflow-pipeline/references/mock-strategy-guide.md +28 -74
- package/assets/skills/superflow-pipeline/references/orchestration.md +43 -101
- package/assets/skills/superflow-pipeline/references/quality-gate.md +8 -4
- package/assets/skills/superflow-pipeline/references/reviewer-checklist.md +107 -3
- package/assets/skills/superflow-pipeline/references/superpower-technical-design-template.md +30 -0
- package/assets/skills/superflow-pipeline/references/test-execution-template.md +16 -12
- package/assets/skills/superflow-pipeline/references/test-guide.md +82 -30
- package/assets/skills/superflow-pipeline/scripts/superflow-archive.sh +57 -10
- package/assets/skills/superflow-pipeline/scripts/superflow-guard.sh +23 -6
- package/assets/skills/superflow-quick-dev/SKILL.md +3 -3
- package/assets/skills/superflow-verify/SKILL.md +28 -12
- package/assets/skills-en/openspec-apply-change/SKILL.md +8 -0
- package/assets/skills-en/openspec-archive-change/SKILL.md +17 -1
- package/assets/skills-en/superflow-archive/SKILL.md +20 -0
- package/assets/skills-en/superflow-design/SKILL.md +14 -1
- package/assets/skills-en/superflow-docs/SKILL.md +13 -0
- package/assets/skills-en/superflow-implement/SKILL.md +22 -0
- package/assets/skills-en/superflow-pipeline/SKILL.md +6 -0
- package/assets/skills-en/superflow-pipeline/references/architecture-design-template.md +3 -0
- package/assets/skills-en/superflow-pipeline/references/batch-prompt-template.md +7 -0
- package/assets/skills-en/superflow-pipeline/references/document-review-coverage.md +32 -0
- package/assets/skills-en/superflow-pipeline/references/document-templates.md +8 -0
- package/assets/skills-en/superflow-pipeline/references/implementation-prompt-template.md +33 -0
- package/assets/skills-en/superflow-pipeline/references/managed-work.md +10 -0
- package/assets/skills-en/superflow-pipeline/references/mock-strategy-guide.md +41 -11
- package/assets/skills-en/superflow-pipeline/references/orchestration.md +11 -0
- package/assets/skills-en/superflow-pipeline/references/quality-gate.md +9 -0
- package/assets/skills-en/superflow-pipeline/references/reviewer-checklist.md +132 -1
- package/assets/skills-en/superflow-pipeline/references/superpower-technical-design-template.md +36 -0
- package/assets/skills-en/superflow-pipeline/references/test-execution-template.md +5 -0
- package/assets/skills-en/superflow-pipeline/references/test-guide.md +106 -12
- package/assets/skills-en/superflow-pipeline/scripts/superflow-archive.sh +57 -10
- package/assets/skills-en/superflow-pipeline/scripts/superflow-guard.sh +23 -6
- package/assets/skills-en/superflow-quick-dev/SKILL.md +6 -3
- package/assets/skills-en/superflow-verify/SKILL.md +36 -12
- package/dist/app/cli.js +5 -5
- package/dist/app/cli.js.map +1 -1
- package/dist/app/commands/review-coverage.js +8 -3
- package/dist/app/commands/review-coverage.js.map +1 -1
- package/dist/app/commands/update.js +2 -0
- package/dist/app/commands/update.js.map +1 -1
- package/dist/build-info.json +1 -0
- package/dist/domains/config/cli-help.js +8 -0
- package/dist/domains/config/cli-help.js.map +1 -1
- package/dist/domains/managed-work/control.js.map +1 -1
- package/dist/domains/managed-work/failure.js +9 -0
- package/dist/domains/managed-work/failure.js.map +1 -1
- package/dist/domains/managed-work/prompts.js +29 -4
- package/dist/domains/managed-work/prompts.js.map +1 -1
- package/dist/domains/managed-work/runner.js +29 -24
- package/dist/domains/managed-work/runner.js.map +1 -1
- package/dist/domains/managed-work/service.js +147 -19
- package/dist/domains/managed-work/service.js.map +1 -1
- package/dist/domains/managed-work/types.js.map +1 -1
- package/dist/domains/quick-dev/gate.js +0 -2
- package/dist/domains/quick-dev/gate.js.map +1 -1
- package/dist/domains/review/coverage.js +12 -4
- package/dist/domains/review/coverage.js.map +1 -1
- package/dist/domains/review/report.js +67 -2
- package/dist/domains/review/report.js.map +1 -1
- package/dist/mcp/runtime-identity.js +19 -4
- package/dist/mcp/runtime-identity.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/platform/agent-process.js +48 -9
- package/dist/platform/agent-process.js.map +1 -1
- package/dist/platform/process-liveness.js +46 -0
- package/dist/platform/process-liveness.js.map +1 -1
- package/package.json +2 -1
- package/scripts/ensure-bin-modes.js +37 -2
- package/scripts/verify-changed.mjs +321 -0
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superflow-verify
|
|
3
|
-
description: Use when an SDD/OpenSpec
|
|
3
|
+
description: Use when reviewing code changes or verifying an SDD/OpenSpec implementation, test evidence, branch/worktree handling, or retry decisions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SDD Verify
|
|
7
7
|
|
|
8
|
+
## 验证信号复核
|
|
9
|
+
|
|
10
|
+
读取[测试指南](../superflow-pipeline/references/test-guide.md),核对当前差异、冻结用例及
|
|
11
|
+
实际执行数;区分逻辑、数据库和真实入口结论。先判断历史证据是否失效,再要求实施方
|
|
12
|
+
重跑受影响验证;仅报告格式变更不自动重跑全链路。评审方只读核验原始输出与源码。
|
|
13
|
+
|
|
8
14
|
Before semantic code review, run `superflow review-coverage --json` (or pass
|
|
9
15
|
`--base <ref>` for a branch review). Use its included/excluded inventory and
|
|
10
16
|
path-specific rules to account for every changed file. Review related Java
|
|
@@ -12,16 +18,23 @@ and Mapper XML files together when they share a bundle. Do not treat this
|
|
|
12
18
|
mechanical inventory as a correctness verdict: findings still need source
|
|
13
19
|
anchors, a fresh reading of the affected call path, and independent judgment.
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
复用检查存在 executionContext 声明时,独立核对当前命令、cwd、已选环境、源码、
|
|
22
|
+
构建和入口;调用环境与冻结要求不同时不能沿用 PASS。未声明旧证据保留原边界,
|
|
23
|
+
不以 JSON 存在或哈希一致代替执行真实性/业务充分性。
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 五维与独立评审入口
|
|
27
|
+
|
|
28
|
+
代码质量评审必须读取[统一 Reviewer 清单](../superflow-pipeline/references/reviewer-checklist.md),
|
|
29
|
+
按其中的实际影响分档、隔离包、五维覆盖、finding 证伪与合并步骤执行。
|
|
30
|
+
`review-coverage` 的 risk.tier 是路径提示,不能直接决定实际深度;打印提示与实际档位及依据。
|
|
31
|
+
普通代码评审可以直接进入此入口,不要求先创建 SDD 状态;有冻结合同则同时核验符合度。
|
|
32
|
+
主 Agent 持有最终判断,Reviewer 只提供只读独立视角,Runner 不裁决语义风险。
|
|
33
|
+
|
|
34
|
+
沿现有四状态报告执行 `superflow review-coverage --report <file> --json`,检查标记与锚点。
|
|
35
|
+
它不证明五维充分性;主 Agent 仍须逐项核验原始证据。BLOCKED/NEEDS_CONTEXT 先补证据,
|
|
36
|
+
DONE_WITH_CONCERNS 先调查全部 concern,再决定。原生子代理支持时,中档以上以隔离上下文
|
|
37
|
+
派发;高档按独立风险簇追加专项视角,不固定代理数或模型。无法独立评审时如实记录缺口。
|
|
25
38
|
|
|
26
39
|
## 评审回应纪律
|
|
27
40
|
|
|
@@ -55,7 +68,10 @@ revert that simplification. Keep simplification in a separate commit from the
|
|
|
55
68
|
feature, and stop if it reaches files outside the original change. This is a
|
|
56
69
|
readability pass, not a second code review or a license for unrelated cleanup.
|
|
57
70
|
|
|
58
|
-
## Entry Check
|
|
71
|
+
## Entry Check (SDD only)
|
|
72
|
+
|
|
73
|
+
普通代码评审完成上述五维/独立核验后直接返回评审结论;以下阶段状态、
|
|
74
|
+
测试交付、分支和归档步骤仅适用于关联的 SDD/OpenSpec 交付,不为裸 diff 新建状态。
|
|
59
75
|
|
|
60
76
|
Run:
|
|
61
77
|
|
|
@@ -11,6 +11,14 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
Implement tasks from an OpenSpec change.
|
|
13
13
|
|
|
14
|
+
## Superflow implementation verification entry
|
|
15
|
+
|
|
16
|
+
Within the Superflow workflow, before the first task read the
|
|
17
|
+
[test guide](../superflow-pipeline/references/test-guide.md) and frozen tests.md/project
|
|
18
|
+
tests. Execute inherited RED/GREEN and required real verification per task; mark
|
|
19
|
+
complete only with evidence. Missing contracts return to superflow-docs; missing
|
|
20
|
+
environments remain blocked. Plain OpenSpec work follows project verification rules.
|
|
21
|
+
|
|
14
22
|
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
23
|
|
|
16
24
|
**Steps**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-archive-change
|
|
3
|
-
description:
|
|
3
|
+
description: Use when the user wants to archive a completed pure OpenSpec change without .sdd/state.yaml.
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires openspec CLI.
|
|
6
6
|
metadata:
|
|
@@ -13,6 +13,22 @@ Archive a completed change in the experimental workflow.
|
|
|
13
13
|
|
|
14
14
|
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
15
|
|
|
16
|
+
## SDD Archive Routing (Run First)
|
|
17
|
+
|
|
18
|
+
Resolve the target change directory; if ambiguous, use the selection step below
|
|
19
|
+
to confirm it, then check that directory for `.sdd/state.yaml`. When it exists,
|
|
20
|
+
immediately load `$superflow-archive` and stop the remaining steps in this skill.
|
|
21
|
+
If verification has not passed or tasks remain incomplete, follow that skill back
|
|
22
|
+
to verification/implementation; do not fall back to this skill to archive.
|
|
23
|
+
SDD changes cannot use the incomplete-task confirmation, `Archive without syncing`,
|
|
24
|
+
or `mv` shortcuts below. `superflow-archive` owns readiness, confirmation, OpenSpec
|
|
25
|
+
merging, and state closeout. Moved SDD directories use that owner's recovery flow
|
|
26
|
+
with the explicit archive path.
|
|
27
|
+
|
|
28
|
+
Run the pure OpenSpec workflow below only when the target has no `.sdd/state.yaml`.
|
|
29
|
+
This is Agent semantic routing; the command Hook is not an operating-system-level
|
|
30
|
+
interceptor and must not be assumed to block arbitrary `mv` commands.
|
|
31
|
+
|
|
16
32
|
**Steps**
|
|
17
33
|
|
|
18
34
|
1. **If no change name provided, prompt for selection**
|
|
@@ -40,6 +40,26 @@ do not mark archived until the user confirms final closeout.
|
|
|
40
40
|
~/.codex/skills/superflow-pipeline/scripts/superflow-archive.sh <change-dir> --apply
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
## Recovery after archive relocation
|
|
44
|
+
|
|
45
|
+
If OpenSpec moved the directory but annotation/state closeout failed, preserve
|
|
46
|
+
artifacts and raw errors. Identify the exact `openspec/changes/archive/<archive-name>`
|
|
47
|
+
from this archive's output or actual operation record. Never guess a historical
|
|
48
|
+
same-name directory or repeat archive from the missing old path. Use the helper:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
~/.codex/skills/superflow-pipeline/scripts/superflow-archive.sh <explicit-archived-dir> --dry-run
|
|
52
|
+
# Check summary, original authorization, and remaining work; do not expand permission
|
|
53
|
+
~/.codex/skills/superflow-pipeline/scripts/superflow-archive.sh <explicit-archived-dir> --apply
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Moved directories resume only remaining annotations and the original state
|
|
57
|
+
transition, retaining validate/guard. Correct done + archived state returns
|
|
58
|
+
read-only idempotently. Nonstandard tasks keep the existing state-only fallback.
|
|
59
|
+
Check actual state.yaml, technical/design/plan annotations, and output; missing
|
|
60
|
+
or conflicting facts remain blocked. No automatic commit/push/merge, repeated
|
|
61
|
+
OpenSpec merge, or second closeout state machine.
|
|
62
|
+
|
|
43
63
|
## Rules
|
|
44
64
|
|
|
45
65
|
- Do not archive if verification failed or is only partially verified unless
|
|
@@ -44,6 +44,13 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
44
44
|
|
|
45
45
|
1. Read `.sdd/handoff/sdd-context.md` plus original `api.md`, `design.md`,
|
|
46
46
|
`tasks.md`, and `tests.md`.
|
|
47
|
+
Read applicable project rules and use the Host's normal skill discovery for
|
|
48
|
+
relevant skills referenced by those rules or applicable to the task. Read
|
|
49
|
+
each complete skill file and its relevant references before designing.
|
|
50
|
+
Do not scan personal skill directories, record personal absolute paths, or
|
|
51
|
+
copy user-level rule/skill text into project artifacts. Apply the discovered
|
|
52
|
+
content when designing; freeze only task-relevant constraints through the
|
|
53
|
+
existing `mandatoryEngineeringRules` handoff for implementation and review.
|
|
47
54
|
2. For a database change, verify `release-sql.md` before source-level HOW
|
|
48
55
|
design: one complete executable SQL block, exact destination, normalized
|
|
49
56
|
SHA-256, pre/post checks, and explicit verbatim-copy references in
|
|
@@ -72,7 +79,13 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
72
79
|
extension points, duplicate DTO/API layers, derivable persistence,
|
|
73
80
|
premature caches, and async compensation without measured need. Record
|
|
74
81
|
retained and removed counts; unresolved simpler alternatives keep the
|
|
75
|
-
design blocked.
|
|
82
|
+
design blocked. For data-intensive paths (large or growing collections,
|
|
83
|
+
batch processing, imports/exports, aggregation, repeated scans, or fan-out),
|
|
84
|
+
also record current/expected scale and growth boundary, work and primary cost
|
|
85
|
+
per request/job, alternatives considered, and evidence validating the choice.
|
|
86
|
+
Match evidence to risk: source/query analysis or representative functional
|
|
87
|
+
cases may suffice; do not require benchmarks for small tasks. Mark this not
|
|
88
|
+
applicable with a brief reason when data volume is not material.
|
|
76
89
|
7. For cross-repository, service-to-service, SDK, MQ, scheduler, device,
|
|
77
90
|
callback, third-party, mini-program, gateway, or adapter changes, include
|
|
78
91
|
`Architecture Boundary And Call Direction`. Prove owner module, call
|
|
@@ -5,6 +5,13 @@ description: Use when confirmed requirements or OpenSpec artifacts need SDD cont
|
|
|
5
5
|
|
|
6
6
|
# SDD Docs
|
|
7
7
|
|
|
8
|
+
## Test plan entry
|
|
9
|
+
|
|
10
|
+
Before writing tests.md, read the [test guide](../superflow-pipeline/references/test-guide.md).
|
|
11
|
+
Reuse project tests and environments, map affected behavior to signals, and freeze
|
|
12
|
+
cases, actual backends, mockBoundary, commands, and assertions here. Implementation
|
|
13
|
+
inherits the plan; required database verification is not an implementation-time choice.
|
|
14
|
+
|
|
8
15
|
For full document delivery, read and apply
|
|
9
16
|
[requirement × real-entry review](../superflow-pipeline/references/document-review-coverage.md).
|
|
10
17
|
Extend the existing three-round receipt with original-source, real-caller,
|
|
@@ -16,6 +23,12 @@ created the base OpenSpec artifacts. This skill is an SDD contract-doc wrapper;
|
|
|
16
23
|
it must not replace the installed OpenSpec skills for core artifact generation
|
|
17
24
|
and must not generate implementation prompts.
|
|
18
25
|
|
|
26
|
+
For cross-round checks sensitive to commands/directories/invocation environment,
|
|
27
|
+
freeze argv, relative cwd, and selected non-secret keys under the
|
|
28
|
+
[executionContext contract](../superflow-pipeline/references/document-review-coverage.md#declared-execution-context-and-evidence-reuse).
|
|
29
|
+
Historical unbound proof does not automatically satisfy new-context completeness.
|
|
30
|
+
|
|
31
|
+
|
|
19
32
|
## OpenSpec First
|
|
20
33
|
|
|
21
34
|
For new OpenSpec document generation, invoke `$openspec-propose` first. The
|
|
@@ -5,6 +5,19 @@ description: Use when SDD/OpenSpec contract docs and Superpowers technical desig
|
|
|
5
5
|
|
|
6
6
|
# SuperFlow Implement
|
|
7
7
|
|
|
8
|
+
## Verification contract inheritance
|
|
9
|
+
|
|
10
|
+
Before generating prompts, read the [test guide](../superflow-pipeline/references/test-guide.md).
|
|
11
|
+
Inherit frozen tests.md cases, commands, actual backends, and assertions; require
|
|
12
|
+
implementers to check them before editing, execute them, and record results. Missing
|
|
13
|
+
signals or real-environment obligations return to superflow-docs, not a second plan.
|
|
14
|
+
|
|
15
|
+
Prompts inherit frozen executionContext only. Execution entries generate actual
|
|
16
|
+
cwd/selected environment hashes for raw-event/receipt checks; Agents do not fill
|
|
17
|
+
expected observations. Missing bindings or changed contexts return to the document
|
|
18
|
+
owner or affected reruns without rewriting historical successful records.
|
|
19
|
+
|
|
20
|
+
|
|
8
21
|
## Role
|
|
9
22
|
|
|
10
23
|
This phase turns frozen contracts and source-level technical design into safe
|
|
@@ -49,6 +62,15 @@ Every implementation prompt must include these sections:
|
|
|
49
62
|
review checklist, traceability, and technical design.
|
|
50
63
|
- Context drift and state inheritance: clickable handoff link, handoff_hash,
|
|
51
64
|
current phase, and refresh rules.
|
|
65
|
+
- Applicable project rules selected in the frozen handoff and task-relevant
|
|
66
|
+
skills found through the Host's normal skill discovery. The Host reads the
|
|
67
|
+
relevant skill content and passes applicable rule statements through the
|
|
68
|
+
existing `mandatoryEngineeringRules` input. Names alone are insufficient;
|
|
69
|
+
do not scan personal configuration directories or copy personal rules into
|
|
70
|
+
project artifacts. Executor and Reviewer receive the same frozen statements.
|
|
71
|
+
- Data-intensive work carries technical-design scale, growth, processing-cost
|
|
72
|
+
trade-offs, and validation evidence. Keep proportional to risk; simple work
|
|
73
|
+
does not require a performance benchmark.
|
|
52
74
|
- Superpowers technical design inheritance: source-level HOW, TDD entry points,
|
|
53
75
|
team roles, reviewer/tester checkpoints, risky assumptions, and forbidden
|
|
54
76
|
improvisation.
|
|
@@ -3,6 +3,12 @@ name: superflow-pipeline
|
|
|
3
3
|
description: Use when a user asks for the SuperBridge Flow, SDD, OpenSpec, requirements clarification, contract docs, design docs, implementation prompts, verification, archive, or which SuperBridge Flow phase to run.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## Canonical test guidance entry
|
|
7
|
+
|
|
8
|
+
Read [test-guide.md](references/test-guide.md) for test documentation, implementation
|
|
9
|
+
preparation, or delivery review. Documents freeze required signals; implementation
|
|
10
|
+
inherits and review verifies. Mock examples cannot override canonical DB contracts.
|
|
11
|
+
|
|
6
12
|
# SuperBridge Flow Pipeline
|
|
7
13
|
|
|
8
14
|
When maintaining Superflow CLI itself, first read repository-root
|
|
@@ -18,3 +18,6 @@ Use this when designing a new module or a cross-service change.
|
|
|
18
18
|
|
|
19
19
|
Do not justify a design only because code can call another module. Prove that the
|
|
20
20
|
call direction matches ownership and the existing architecture contract.
|
|
21
|
+
|
|
22
|
+
Freeze signals using [test-guide.md](test-guide.md) and declare isolation using
|
|
23
|
+
[mock-strategy-guide.md](mock-strategy-guide.md); substitute engines cannot close required real DB proof.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Batch Prompt Template
|
|
2
2
|
|
|
3
|
+
Inherit verification only from tests.md and read [test-guide.md](test-guide.md).
|
|
4
|
+
Apply startup, API, DB, and team checklists to frozen applicable cases; give source
|
|
5
|
+
reasons for inapplicability, keeping missing required environments blocked. Reuse
|
|
6
|
+
healthy instances matching the tested build; load new code/configuration before
|
|
7
|
+
verification. Independently inspect raw evidence; implementers rerun invalidated
|
|
8
|
+
or contract-required paths, not every environment merely because roles changed.
|
|
9
|
+
|
|
3
10
|
## Header
|
|
4
11
|
|
|
5
12
|
- Batch: P{n} - {name}
|
|
@@ -176,3 +176,35 @@ boolean differs from number (true cannot prove one affected row), including nest
|
|
|
176
176
|
arrays/objects. Documents and independent review choose business keys and fields.
|
|
177
177
|
|
|
178
178
|
Git delivery compares normalized index objects for tracked report dependencies (receipts, raw events, builds, source, schema/contracts). A working-tree-only repair does not prove the commit snapshot. Private untracked evidence is not forced into Git; independent review still determines source/build applicability.
|
|
179
|
+
|
|
180
|
+
## Declared execution context and evidence reuse
|
|
181
|
+
|
|
182
|
+
Reuse coverage/receipt v1. When reusing checks sensitive to commands, working
|
|
183
|
+
directories, or invocation environments, the document owner freezes tests.md and
|
|
184
|
+
its case `executionContext={argv:[arguments],cwd:directory relative to change,environmentKeys:[names]}`.
|
|
185
|
+
argv is nonempty and explicit; cwd is relative without drive prefixes or absolute
|
|
186
|
+
paths. Task permissions and source/contracts still define read scope: cwd grants
|
|
187
|
+
no additional access. Implementers cannot redesign this contract.
|
|
188
|
+
|
|
189
|
+
Supported keys are PATH, PATHEXT, NODE_ENV, NODE_OPTIONS, LANG, LC_ALL, TZ, JAVA_HOME.
|
|
190
|
+
Select only keys affecting this verification command. Passwords, tokens, account
|
|
191
|
+
credentials, and full environments never enter contracts/receipts. Use project
|
|
192
|
+
verification entries with runtime authentication; never put secrets in argv/docs.
|
|
193
|
+
Absent and empty differ: each digest is UTF-8 SHA-256(JSON.stringify(string or null)).
|
|
194
|
+
Receipts and raw events record
|
|
195
|
+
`executionContext={cwd:actual canonical absolute directory,environmentSha256:{selectedName:digest}}`.
|
|
196
|
+
Actual execution entries generate observations, not Agents filling expected values.
|
|
197
|
+
|
|
198
|
+
Existing lint compares actual command.argv with frozen argv, receipt/event context,
|
|
199
|
+
cwd with the frozen directory relative to the current change, and selected hashes
|
|
200
|
+
with its current invocation environment. Run lint in the tests.md invocation
|
|
201
|
+
context. Unselected environment changes do not invalidate proof; selected keys,
|
|
202
|
+
commands, directories, source, builds, or targets changing prevent old proof from
|
|
203
|
+
closing current complete PASS. This does not prove remote-service startup
|
|
204
|
+
environments: engines, production chains, and sufficiency need independent review.
|
|
205
|
+
|
|
206
|
+
Historical contracts without the field retain existing source/build/entry checks
|
|
207
|
+
and their conclusions, without claiming this new context verification. Declared
|
|
208
|
+
contracts with missing/malformed/mismatched observations need evidence, not editing
|
|
209
|
+
old observations to expectations. Contract changes return to the document owner
|
|
210
|
+
for renewed review rather than weakening execution checks.
|
|
@@ -63,3 +63,11 @@
|
|
|
63
63
|
- DB/log evidence
|
|
64
64
|
- Hook output
|
|
65
65
|
- Blocked or skipped cases with reasons
|
|
66
|
+
|
|
67
|
+
## tests.md: frozen verification signals
|
|
68
|
+
|
|
69
|
+
Select applicable signals using [test-guide.md](test-guide.md), keeping project level numbers.
|
|
70
|
+
Table: `Change/risk | Case ID | Signal | Actual environment/backend | Command | Assertion | Evidence path | Inapplicability reason/blocker`.
|
|
71
|
+
Database layers inherit only `testLayer` / `mockBoundary` from
|
|
72
|
+
[document-review-coverage.md](document-review-coverage.md). Reuse project scenario
|
|
73
|
+
regression assets for critical business flows and bug reproductions.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Implementation Prompt Template
|
|
2
2
|
|
|
3
|
+
For code-quality review read [reviewer-checklist.md](reviewer-checklist.md):
|
|
4
|
+
select depth from actual impact, use isolated independent views, and have the
|
|
5
|
+
main Agent verify and merge findings. Templates do not redefine risk or agent counts.
|
|
6
|
+
|
|
7
|
+
Inherit verification only from tests.md and read [test-guide.md](test-guide.md).
|
|
8
|
+
Apply startup, API, DB, and team checklists to frozen applicable cases; give source
|
|
9
|
+
reasons for inapplicability, keeping missing required environments blocked. Reuse
|
|
10
|
+
healthy instances matching the tested build; load new code/configuration before
|
|
11
|
+
verification. Independently inspect raw evidence; implementers rerun invalidated
|
|
12
|
+
or contract-required paths, not every environment merely because roles changed.
|
|
13
|
+
|
|
3
14
|
Use this as the prefix for every implementation prompt.
|
|
4
15
|
|
|
5
16
|
## Context Drift And State Inheritance
|
|
@@ -13,6 +24,28 @@ If requirements, design, API, SQL, test contracts or task content change, rerun
|
|
|
13
24
|
superflow-handoff.sh --refresh. Task checkbox progress and test-report updates
|
|
14
25
|
do not invalidate the frozen contract hash.
|
|
15
26
|
|
|
27
|
+
### Project Rules, Host Rules, And Applicable Skills
|
|
28
|
+
|
|
29
|
+
- Read selected project rule files from the existing handoff/context manifest.
|
|
30
|
+
The Host uses its normal skill discovery to identify and read task-relevant
|
|
31
|
+
skills, then freezes the actually applicable rule statements in the existing
|
|
32
|
+
`mandatoryEngineeringRules` input. Do not pass skill names alone or manually
|
|
33
|
+
scan personal configuration directories.
|
|
34
|
+
- The Executor and independent Reviewer receive the same frozen rules; both
|
|
35
|
+
must read applicable project rule files completely. If a source is inaccessible
|
|
36
|
+
or a required rule was not frozen, report the concrete blocker instead of
|
|
37
|
+
guessing or weakening it.
|
|
38
|
+
- Pass only constraints relevant to the task. Do not copy personal rules or
|
|
39
|
+
entire skills into project artifacts.
|
|
40
|
+
|
|
41
|
+
### Data Scale And Processing Cost
|
|
42
|
+
|
|
43
|
+
For data-intensive paths only, carry forward the technical design's current and
|
|
44
|
+
expected scale, growth boundary, work and primary cost per request/job, design
|
|
45
|
+
trade-offs, and validation evidence. Scale validation to risk; query/source
|
|
46
|
+
analysis or a representative functional case can suffice for small tasks, with
|
|
47
|
+
no blanket performance benchmark. This adds no burden to non-data-intensive work.
|
|
48
|
+
|
|
16
49
|
## Contract Boundary
|
|
17
50
|
|
|
18
51
|
OpenSpec/SDD is canonical for requirements, API, DB, SQL, tests, and acceptance.
|
|
@@ -32,6 +32,16 @@ direction-changing API, data, concurrency, cross-repository, or owner choice,
|
|
|
32
32
|
return to clarification/documents instead of letting Runner regexes or Executor
|
|
33
33
|
improvisation replace Host judgment.
|
|
34
34
|
|
|
35
|
+
Before start, the Host also uses its existing host-native rule/skill discovery
|
|
36
|
+
to read applicable user-level engineering rules and skill bodies plus relevant
|
|
37
|
+
references. Do not scan personal configuration directories. Freeze the rule
|
|
38
|
+
statements relevant to this task through the existing `mandatoryEngineeringRules`
|
|
39
|
+
input so Executor and independent Reviewer receive the same content. Continue to
|
|
40
|
+
pass selected project rule paths and hashes through the context manifest; do not
|
|
41
|
+
pass skill names alone. If required content cannot be read or a required source
|
|
42
|
+
is inaccessible to execution/review, report the missing item and block affected
|
|
43
|
+
work instead of guessing.
|
|
44
|
+
|
|
35
45
|
When MCP is installed, the current host must prefer the `superflow_managed_*`
|
|
36
46
|
tools for submission, waiting, user guidance, and review submission. MCP is a
|
|
37
47
|
channel to the local state machine rather than a third model. Direct host review
|
|
@@ -1,16 +1,46 @@
|
|
|
1
|
-
# Mock Strategy Guide
|
|
1
|
+
# Mock Strategy and Boundary Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Scope and source of truth
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Read for isolation design or substituted-evidence reporting. Select signals with
|
|
6
|
+
[test-guide.md](test-guide.md). Database layers, mockBoundary, and execution
|
|
7
|
+
receipts inherit only
|
|
8
|
+
[document-review-coverage.md](document-review-coverage.md#database-layer-contract).
|
|
9
|
+
This guide describes isolation, not permission to reduce frozen real acceptance.
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
| Scenario | Isolatable boundary | Proven scope / remaining obligation |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Pure logic unit test | Data-access/HTTP/MQ dependencies outside tested logic | Branches, parameters, failure handling; not real SQL or persistence |
|
|
14
|
+
| Required persistence/transaction/CAS | External clients in mockBoundary.allowed | Never mock production Service/Mapper; execute production statements on the actual same-engine DB |
|
|
15
|
+
| External payment/SMS/device | Contract-approved clients, sandboxes, simulated messages | Local handling; real capabilities need separate sandbox/real-entry proof or blockers |
|
|
16
|
+
| MQ/Redis/OSS | Interface boundaries for pure logic | Memory queues, local cache/files cannot close real protocol, locking, persistence, or external-chain requirements |
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
Actual same-engine Docker/Testcontainers databases are not mocks. Reuse when the
|
|
19
|
+
frozen environment permits; never substitute for a required shared environment.
|
|
20
|
+
H2/SQLite cannot replace MySQL dialect, locking, transaction, or persistence
|
|
21
|
+
semantics. Without a DB preserve logic proof and mark required DB cases
|
|
22
|
+
BLOCKED/PARTIAL.
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
## Declaration and reporting
|
|
25
|
+
|
|
26
|
+
Record actual capability, replacement object, mockBoundary, assumptions, proven
|
|
27
|
+
scope, unverified scope, real verification commands/blockers, and evidence paths
|
|
28
|
+
in existing tests.md / test-report.md. Separate `Mock verification`, `Test endpoint
|
|
29
|
+
verification`, and `Real-entry verification`. Auxiliary logic cases may pass;
|
|
30
|
+
mock-only cannot close required database or real-chain cases of the same entry.
|
|
31
|
+
|
|
32
|
+
## Example: isolated payment client, actual persistence
|
|
33
|
+
|
|
34
|
+
When the contract permits isolating PaymentClient, return a fixed success response
|
|
35
|
+
to the **real** business Service and Mapper. On frozen MySQL, assert order-ID
|
|
36
|
+
before/after, amounts, state, and required side effects. This proves handling and
|
|
37
|
+
persistence, not actual gateway charging; verify charging separately or report a
|
|
38
|
+
blocker. A pure Service unit test may mock Mapper but reports logic only, never
|
|
39
|
+
successful database integration.
|
|
40
|
+
|
|
41
|
+
## Prohibited
|
|
42
|
+
|
|
43
|
+
- Mocking the tested subject or production Service/Mapper in required DB cases.
|
|
44
|
+
- Replacing business/DB-value assertions with fixed success, counts, HTTP 200, or nonzero affected rows.
|
|
45
|
+
- Mixing substituted and real evidence or counting skipped/unexecuted cases as complete passes.
|
|
46
|
+
- Silently changing frozen backends, weakening assertions under delivery pressure, or leaving mocks in production.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Workflow Orchestration
|
|
2
2
|
|
|
3
|
+
For code-quality review read [reviewer-checklist.md](reviewer-checklist.md):
|
|
4
|
+
select depth from actual impact, use isolated independent views, and have the
|
|
5
|
+
main Agent verify and merge findings. Templates do not redefine risk or agent counts.
|
|
6
|
+
|
|
7
|
+
Inherit verification only from tests.md and read [test-guide.md](test-guide.md).
|
|
8
|
+
Apply startup, API, DB, and team checklists to frozen applicable cases; give source
|
|
9
|
+
reasons for inapplicability, keeping missing required environments blocked. Reuse
|
|
10
|
+
healthy instances matching the tested build; load new code/configuration before
|
|
11
|
+
verification. Independently inspect raw evidence; implementers rerun invalidated
|
|
12
|
+
or contract-required paths, not every environment merely because roles changed.
|
|
13
|
+
|
|
3
14
|
SuperBridge Flow is a stateful orchestrator, not just a set of installed skills.
|
|
4
15
|
|
|
5
16
|
## Ownership
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Quality Gate Checklist
|
|
2
2
|
|
|
3
|
+
For code-quality review read [reviewer-checklist.md](reviewer-checklist.md):
|
|
4
|
+
select depth from actual impact, use isolated independent views, and have the
|
|
5
|
+
main Agent verify and merge findings. Templates do not redefine risk or agent counts.
|
|
6
|
+
|
|
7
|
+
Check frozen signals and applicability using [test-guide.md](test-guide.md).
|
|
8
|
+
Missing required environments remain blocked; inapplicability cannot remove frozen
|
|
9
|
+
gates. Reuse healthy instances matching the tested build; independently inspect
|
|
10
|
+
raw evidence and have implementers rerun invalidated or contract-required paths.
|
|
11
|
+
|
|
3
12
|
## Documentation Gate
|
|
4
13
|
|
|
5
14
|
- Requirements processed feature by feature and frozen.
|
|
@@ -1,8 +1,137 @@
|
|
|
1
1
|
# Reviewer Checklist
|
|
2
2
|
|
|
3
|
+
## Five-axis review and isolated context (canonical entry)
|
|
4
|
+
|
|
5
|
+
Use for ordinary code review, Quick verification, full SDD, and managed Host
|
|
6
|
+
review. Inputs are current changes, confirmed contracts, applicable path rules,
|
|
7
|
+
and raw evidence. Outputs reuse reviewer reports or existing Host review JSON.
|
|
8
|
+
This checklist owns axes, depth, isolation, and finding verification;
|
|
9
|
+
superflow-verify routes execution. Check requirement/design conformity against
|
|
10
|
+
existing contracts without creating another requirements-review entry. Scripts
|
|
11
|
+
check paths, state markers, and anchors, not review sufficiency. The main Agent /
|
|
12
|
+
Host owns actual risk and the final verdict.
|
|
13
|
+
|
|
14
|
+
### Axis coverage
|
|
15
|
+
|
|
16
|
+
| Axis | Focus | Minimum evidence |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| security | Authentication/authorization, injection, sensitive information, external input | Actual entry, parameter binding, permission call path |
|
|
19
|
+
| performance | Query scope/N+1, scale, CPU/memory/I/O, resource limits | Execution path and scale; benchmarks only when risk warrants |
|
|
20
|
+
| correctness | Boundaries, recovery, state, transactions, concurrency, idempotence | Real call/write path, assertions, failure paths |
|
|
21
|
+
| maintainability | Duplication, naming, complexity, exception handling, test seams | Existing reuse points, source, test boundaries |
|
|
22
|
+
| architecture | Module ownership, call direction, contract compatibility, abstraction | Callers/consumers and ownership evidence |
|
|
23
|
+
|
|
24
|
+
Record CHECKED / NOT_APPLICABLE / BLOCKED and source/evidence per axis. CHECKED
|
|
25
|
+
means examined, not defect-free. One reviewer may cover all axes; do not require
|
|
26
|
+
five agents. Specialists cover assigned axes; the main Agent merges coverage and
|
|
27
|
+
fills gaps. Unassigned/unread is not inapplicable. Full SDD real acceptance remains.
|
|
28
|
+
|
|
29
|
+
### Select depth from actual impact
|
|
30
|
+
|
|
31
|
+
`superflow review-coverage` emits `risk.basis=path-hint` and
|
|
32
|
+
`risk.requiresSemanticAssessment=true`. The main Agent reads changes, actual
|
|
33
|
+
callers, and write/consumer paths, recording hint tier, actual tier, source
|
|
34
|
+
anchors, and adjustment reasons. Names, line counts, and implementer claims do
|
|
35
|
+
not determine risk. Unknown risk gets at least medium investigation; inability
|
|
36
|
+
to judge means NEEDS_CONTEXT.
|
|
37
|
+
|
|
38
|
+
| Actual impact | Depth |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Small scope with verified absence of contract/write/concurrency/security/cross-module effects | Low, inline allowed; still cover applicable axes |
|
|
41
|
+
| Other changes with known scope | Medium, one isolated independent reviewer |
|
|
42
|
+
| Evidenced public-contract break, migration/data consistency, locks/shared state, security boundary, or cross-module impact | High, independent review plus focused views for named risks; fan out only for independent risk clusters when the Host supports it |
|
|
43
|
+
|
|
44
|
+
Example: a parameterized SELECT filter with unchanged contract/schema/write path
|
|
45
|
+
and checked consumers can move from Mapper path hint high to actual medium. An
|
|
46
|
+
ordinary file adding atomic claims/shared-state writes moves from path hint low to
|
|
47
|
+
actual high. Confirm against current source rather than applying example labels.
|
|
48
|
+
High does not prescribe agent counts, model names, or providers; use native Host
|
|
49
|
+
configuration. Record user depth overrides without removing required scope,
|
|
50
|
+
contract obligations, or known risks.
|
|
51
|
+
|
|
52
|
+
### Isolated bundle and dispatch
|
|
53
|
+
|
|
54
|
+
The main Agent prepares this bundle in a temporary directory and uses native
|
|
55
|
+
subagents without implementation chat history (`fork_turns=none` when supported).
|
|
56
|
+
If unavailable, prepare the same bundle for an independent reviewer and report
|
|
57
|
+
that independent review has not run. Self-review cannot be relabeled independent
|
|
58
|
+
or counted as complete independent coverage.
|
|
59
|
+
|
|
60
|
+
1. Confirmed goal, scope, exclusions, actual contract paths, review questions;
|
|
61
|
+
label implementer claims unverified.
|
|
62
|
+
2. Baseline/head or worktree state, exact diff, file inventory, related bundles;
|
|
63
|
+
diff statistics alone are insufficient.
|
|
64
|
+
3. Applicable path rules, relevant source/caller/consumer paths, necessary
|
|
65
|
+
environment and raw test evidence paths.
|
|
66
|
+
4. Actual risk assessment, assigned axes/files, this checklist, four-state and
|
|
67
|
+
anchored report requirements.
|
|
68
|
+
|
|
69
|
+
Include only necessary text/paths, not entire repositories, personal rule
|
|
70
|
+
folders, credentials, or chat history. Respect task read permissions. Start from
|
|
71
|
+
diff and expand to related callers only for named risks, recording why. Bundle /
|
|
72
|
+
source / contract drift yields NEEDS_CONTEXT rather than reviewing old context
|
|
73
|
+
against current code. Reviewers are read-only: no source edits, application
|
|
74
|
+
management, business DB operations, or nested supervision. New runtime evidence
|
|
75
|
+
returns to the implementer.
|
|
76
|
+
|
|
77
|
+
### Main Agent verification and merge
|
|
78
|
+
|
|
79
|
+
Read all reports, coverage, findings, and concerns. Re-read each file:line, callers,
|
|
80
|
+
frozen contracts, and corresponding raw test evidence; attempt to disprove claims
|
|
81
|
+
with actual source. Green tests alone neither accept nor reject a finding.
|
|
82
|
+
Deduplicate by root cause + affected path + business consequence, keeping reviewer
|
|
83
|
+
provenance and full impact. Do not merge solely by line number, wording, or
|
|
84
|
+
severity. Resolve conflicting judgments from evidence, not majority vote.
|
|
85
|
+
|
|
86
|
+
Record accepted / rejected / needs-evidence with reasons. Unsupported claims remain
|
|
87
|
+
unconfirmed rather than receiving invented severity. Severity follows actual
|
|
88
|
+
impact; separate advice from blocking defects. Do not force generic abstractions
|
|
89
|
+
without another caller or contract requirement. Once every axis and included file
|
|
90
|
+
has coverage, submit all material findings together. Managed work retains existing
|
|
91
|
+
finding IDs / acceptanceContractRefs, protocols, budgets, and state owners.
|
|
92
|
+
Subagent reports do not directly promote pass; format checks do not prove code
|
|
93
|
+
correctness. Rerun only invalidated or contract-required evidence.
|
|
94
|
+
|
|
95
|
+
### Reviewer report shape
|
|
96
|
+
|
|
97
|
+
Reuse the four-state report, not another machine protocol. Managed reviews keep
|
|
98
|
+
these records in temporary reports and project the result into existing Host
|
|
99
|
+
review JSON summary/findings/coverage. `--report` checks existing markers and
|
|
100
|
+
anchors only; the main Agent verifies axes, actual impact, and conclusions. Keep
|
|
101
|
+
historical reports without axis records, but do not call them complete under this
|
|
102
|
+
guide.
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
DONE
|
|
106
|
+
## Impact
|
|
107
|
+
Path hint / actual depth / source evidence / adjustment / diff and contract version
|
|
108
|
+
## Axes
|
|
109
|
+
Axis | CHECKED / NOT_APPLICABLE / BLOCKED | File scope and evidence
|
|
110
|
+
# Fill security / performance / correctness / maintainability / architecture
|
|
111
|
+
## Findings
|
|
112
|
+
- src/example.ts:12: [axis][severity] cause, consequence, proof, repair and acceptance
|
|
113
|
+
# Use None without findings; never a placeholder bullet
|
|
114
|
+
## Concerns
|
|
115
|
+
Unresolved questions and missing proof; required for DONE_WITH_CONCERNS
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Existing specialist checks remain path-scoped; inapplicable checks do not invent
|
|
119
|
+
runtime obligations or remove frozen requirements. They detail axes without
|
|
120
|
+
owning risk, dispatch, or final conclusions.
|
|
121
|
+
|
|
122
|
+
## Data Scale And Processing Cost
|
|
123
|
+
|
|
124
|
+
- For data-intensive paths, are current/expected data scale and growth
|
|
125
|
+
boundaries explicit?
|
|
126
|
+
- Is per-request/job work and primary CPU, memory, I/O, or round-trip cost
|
|
127
|
+
assessed, with alternatives and risk-proportionate validation evidence?
|
|
128
|
+
- If not applicable, is the lack of meaningful data-volume sensitivity
|
|
129
|
+
explained? Do not block simple work solely because a performance benchmark is
|
|
130
|
+
absent.
|
|
131
|
+
|
|
3
132
|
- Does the implementation match api.md, design.md, and tests.md?
|
|
4
133
|
- Are all required files present and cross-linked?
|
|
5
|
-
- Is
|
|
134
|
+
- Is the frozen handoff hash current in its canonical state file? Do not duplicate raw hashes in report bodies.
|
|
6
135
|
- Did Superpowers technical design cover source-level HOW?
|
|
7
136
|
- Were field/status and architecture-boundary risks checked?
|
|
8
137
|
- For monetary changes, were calculation and settlement states separated, were
|
|
@@ -32,3 +161,5 @@
|
|
|
32
161
|
- Are mock-only results clearly labeled?
|
|
33
162
|
- Did workers stay inside allowed file boundaries?
|
|
34
163
|
- Did hooks and guard scripts pass?
|
|
164
|
+
|
|
165
|
+
Use spaces and explicit closure for report container fences. Tab-delimited list/quote fences currently fail structural verification: normalize report formatting without using an earlier DONE/PASS to bypass it. Preserve tabs in original execution logs; do not rewrite evidence for formatting.
|