dic-workflow-kit 1.1.2 → 1.1.4
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/.codex-plugin/plugin.json +14 -10
- package/CHANGELOG.md +124 -1
- package/INSTRUCTION.md +232 -10
- package/README.md +376 -113
- package/README.zh-CN.md +342 -130
- package/adapters/bdd/README.md +21 -0
- package/adapters/bitfun/README.md +12 -2
- package/agents/adversarial-challenger.md +23 -0
- package/agents/code-repairer.md +8 -1
- package/agents/contract-oracle.md +4 -1
- package/agents/evidence-auditor.md +23 -0
- package/agents/final-reviewer.md +26 -2
- package/agents/flow-auditor.md +1 -1
- package/agents/impact-analyst.md +21 -0
- package/agents/impl-inspector.md +7 -1
- package/agents/profile-builder.md +7 -3
- package/agents/repair-planner.md +10 -1
- package/agents/semantic-conflict-auditor.md +21 -0
- package/agents/spec-reader.md +4 -1
- package/agents/validation-runner.md +11 -1
- package/dist/dic-workflow-kit.mjs +18 -7
- package/package.json +5 -2
- package/schemas/final-result.schema.json +35 -2
- package/schemas/harness-plan.schema.json +143 -0
- package/schemas/harness-run.schema.json +75 -0
- package/schemas/ontology-action-record.schema.json +62 -0
- package/schemas/ontology-action.schema.json +118 -0
- package/schemas/ontology-attestation.schema.json +187 -0
- package/schemas/ontology-patch.schema.json +48 -0
- package/schemas/ontology-snapshot.schema.json +326 -0
- package/schemas/project-profile.schema.json +44 -0
- package/skills/knowledge-bdd/SKILL.md +14 -2
- package/skills/knowledge-change-impact/SKILL.md +43 -0
- package/skills/knowledge-change-impact/agents/openai.yaml +4 -0
- package/skills/knowledge-openspec/SKILL.md +2 -1
- package/skills/knowledge-repair-distill/SKILL.md +2 -1
- package/skills/quality-adversarial-challenge/SKILL.md +42 -0
- package/skills/quality-adversarial-challenge/agents/openai.yaml +4 -0
- package/skills/quality-ci-gate/SKILL.md +45 -0
- package/skills/quality-ci-gate/agents/openai.yaml +4 -0
- package/skills/quality-ci-gate/references/ci-gate.md +22 -0
- package/skills/quality-code-review/SKILL.md +32 -0
- package/skills/quality-code-review/agents/openai.yaml +4 -0
- package/skills/quality-code-review/references/code-review.md +13 -0
- package/skills/quality-cross-spec-consistency/SKILL.md +45 -0
- package/skills/quality-cross-spec-consistency/agents/openai.yaml +4 -0
- package/skills/quality-dt-review/SKILL.md +32 -0
- package/skills/quality-dt-review/agents/openai.yaml +4 -0
- package/skills/quality-dt-review/references/dt-review.md +14 -0
- package/skills/quality-evidence-audit/SKILL.md +41 -0
- package/skills/quality-evidence-audit/agents/openai.yaml +4 -0
- package/skills/quality-repository-gate/SKILL.md +38 -0
- package/skills/quality-repository-gate/agents/openai.yaml +4 -0
- package/skills/quality-repository-gate/references/repository-gate.md +13 -0
- package/skills/quality-review-orchestrator/SKILL.md +100 -0
- package/skills/quality-review-orchestrator/agents/openai.yaml +4 -0
- package/skills/quality-review-orchestrator/references/quality-model.md +73 -0
- package/skills/quality-spec-review/SKILL.md +40 -0
- package/skills/quality-spec-review/agents/openai.yaml +4 -0
- package/skills/quality-spec-review/references/spec-review.md +14 -0
- package/skills/quality-sr-ar-review/SKILL.md +32 -0
- package/skills/quality-sr-ar-review/agents/openai.yaml +4 -0
- package/skills/quality-sr-ar-review/references/sr-ar-review.md +14 -0
- package/skills/workflow-core/SKILL.md +109 -1
- package/skills/workflow-harness/SKILL.md +73 -0
- package/skills/workflow-harness/agents/openai.yaml +4 -0
- package/skills/workflow-intake/SKILL.md +9 -2
- package/skills/workflow-profile/SKILL.md +17 -1
- package/skills/workflow-repair/SKILL.md +8 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dic-workflow-kit",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.4",
|
|
4
|
+
"description": "QIHENG 候选版本约束的设计、开发、测试、证据与准入交付保障执行框架。",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TonyClaw"
|
|
7
7
|
},
|
|
@@ -16,21 +16,25 @@
|
|
|
16
16
|
],
|
|
17
17
|
"skills": "./skills/",
|
|
18
18
|
"interface": {
|
|
19
|
-
"displayName": "
|
|
20
|
-
"shortDescription": "
|
|
21
|
-
"longDescription": "
|
|
19
|
+
"displayName": "契衡 QIHENG",
|
|
20
|
+
"shortDescription": "候选版本约束的交付保障执行框架",
|
|
21
|
+
"longDescription": "冻结密码学候选版本身份,执行设计到交付门禁图,修复设计与实现不一致,审计证据完整性,并通过高层交付保障驾驶舱展示仓库准入结论。",
|
|
22
22
|
"developerName": "TonyClaw",
|
|
23
23
|
"category": "Developer Tools",
|
|
24
24
|
"capabilities": [
|
|
25
25
|
"Read",
|
|
26
26
|
"Write",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"验证",
|
|
28
|
+
"质量评审",
|
|
29
|
+
"交付保障",
|
|
30
|
+
"子智能体"
|
|
29
31
|
],
|
|
30
32
|
"defaultPrompt": [
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
33
|
+
"检查当前 OpenSpec 变更与实现和测试是否一致。",
|
|
34
|
+
"为当前设计变更建立实现义务矩阵。",
|
|
35
|
+
"依据证据修复设计与代码不一致问题。",
|
|
36
|
+
"执行并重跑受影响的质量门禁,然后决定提交前准入。",
|
|
37
|
+
"为当前候选版本生成 QIHENG 高层交付保障驾驶舱。"
|
|
34
38
|
],
|
|
35
39
|
"brandColor": "#C7000B"
|
|
36
40
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,132 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
3
|
+
All notable changes to QIHENG are documented in this file.
|
|
4
4
|
|
|
5
5
|
The project follows [Semantic Versioning](https://semver.org/). Both npm packages, `dic-workflow-kit` and `@tonyclaw/dic-workflow-kit`, always use the same version and runtime payload.
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [1.1.4] - 2026-07-28
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added an executable candidate-bound Delivery Assurance Harness with
|
|
14
|
+
`harness-init`, `harness-record`, `harness-check`, and `harness-report`.
|
|
15
|
+
- Added cryptographic candidate passports over Git HEAD, tracked binary diff,
|
|
16
|
+
untracked source hashes, and the project-profile hash.
|
|
17
|
+
- Added a 12-gate core design-to-delivery graph spanning authority, Spec,
|
|
18
|
+
architecture, CI planning, DIC convergence, code, developer test,
|
|
19
|
+
adversarial challenge, evidence audit, verification, and admission, plus
|
|
20
|
+
profile-driven security, performance, reliability, concurrency,
|
|
21
|
+
data-integrity, migration, and compatibility overlay gates.
|
|
22
|
+
- Added an executive Assurance Cockpit with coverage, blockers, Candidate
|
|
23
|
+
Passport, Digital Thread visualization, and gate decision matrix.
|
|
24
|
+
- Added the `workflow-harness` Skill plus machine schemas for Harness Plans and
|
|
25
|
+
Runs.
|
|
26
|
+
- Introduced the public brand **契衡 QIHENG**, positioned as a Design Integrity
|
|
27
|
+
Control Plane with the promise “Every design promise, proven in code.”
|
|
28
|
+
- Added the preferred `qiheng` CLI while retaining `dic-workflow-kit` as a
|
|
29
|
+
backward-compatible command, npm distribution name, and plugin identity.
|
|
30
|
+
- Added profile-driven semantic consistency candidate ranking, the
|
|
31
|
+
`semantic-conflict-auditor` and `impact-analyst` Subagents, and the
|
|
32
|
+
`quality-cross-spec-consistency` and `knowledge-change-impact` Skills.
|
|
33
|
+
- Added seven risk-selective delivery quality Skills for specification, SR/AR, code, developer-test, CI, repository-admission, and unified quality review.
|
|
34
|
+
- Added candidate-bound governance objects (`Candidate`, `GateRun`, `Claim`,
|
|
35
|
+
`Challenge`, `Counterexample`, `Waiver`, and `Policy`), typed relations,
|
|
36
|
+
authorized Actions, and fail-closed PASS invariants.
|
|
37
|
+
- Added the read-only `adversarial-challenger` and `evidence-auditor` Subagents
|
|
38
|
+
with risk-selective adversarial challenge and mandatory terminal evidence
|
|
39
|
+
audit Skills.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- Localized the Chinese README, plugin interface, command help, runtime errors,
|
|
44
|
+
Harness Skill, and generated executive report with concise Chinese terms
|
|
45
|
+
while preserving machine-facing commands, identifiers, and status codes.
|
|
46
|
+
- Made the version synchronization script tolerate READMEs that do not expose
|
|
47
|
+
maintainer-only release command examples.
|
|
48
|
+
- Reorganized both READMEs around the ontology-governed evidence chain, a three-minute quick start, and task-oriented documentation navigation.
|
|
49
|
+
- Moved maintainer-only dual npm release procedures into `docs/RELEASING.md`.
|
|
50
|
+
- Reframed quality orchestration as a candidate-bound gate graph: imported
|
|
51
|
+
Spec clearance, implementation, post-implementation DIC repair, affected-gate
|
|
52
|
+
reruns, and pre-commit admission.
|
|
53
|
+
- Added explicit gate invalidation and repeatability semantics so a changed
|
|
54
|
+
Spec, architecture, implementation, test, pipeline, or candidate cannot reuse
|
|
55
|
+
stale decisions.
|
|
56
|
+
- Distinguished DIC consistency, specialist quality, and repository admission,
|
|
57
|
+
with applicability, run history, invalidation reasons, and current evidence
|
|
58
|
+
retained under `reports/quality/`.
|
|
59
|
+
- Removed named-project branches from reusable Quality Skills; repository-local
|
|
60
|
+
policy is now discovered through the project profile and repository evidence.
|
|
61
|
+
- Organized roles into Lens, Forge, and Tribunal evidence responsibilities;
|
|
62
|
+
orchestration selects a minimal panel rather than maximizing Agent count.
|
|
63
|
+
|
|
64
|
+
## [1.1.3] - 2026-07-28
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- Added a portable ontology snapshot schema for typed objects, links, lifecycle, provenance, and invariant results.
|
|
69
|
+
- Added an auditable ontology action schema with role, scope, precondition, postcondition, evidence, and rollback fields.
|
|
70
|
+
- Added automatic OpenSpec-to-ontology snapshot generation and an `ontology-check` source helper command.
|
|
71
|
+
- Added computed PASS gates for source coverage, implementation disposition, validation coverage, and open blocking gaps.
|
|
72
|
+
- Added bundled `ontology-check`, `action-check`, and `action-record` runtime commands without publishing runtime source.
|
|
73
|
+
- Added append-only, SHA-256-addressed action audit records with idempotency and collision rejection.
|
|
74
|
+
- Added generic-project ontology initialization with candidate design sources.
|
|
75
|
+
- Added action-specific ontology patches for controlled object, link, and lifecycle effects.
|
|
76
|
+
- Added hash-verified, idempotent `ontology-reconcile` ledger replay with invariant-safe snapshot replacement.
|
|
77
|
+
- Added `ontology-query` views for uncovered obligations, open gaps, unevidenced validations, and bounded impact analysis.
|
|
78
|
+
- Added `ontology-drift` for content-hash change detection and incremental impact roots.
|
|
79
|
+
- Added canonical snapshot revisions and an integrity invariant for detecting direct semantic edits.
|
|
80
|
+
- Added optimistic concurrency protection for snapshot replacement during reconciliation.
|
|
81
|
+
- Added `ontology-plan` to map design-source drift and impact neighborhoods to minimal Agent-stage reruns.
|
|
82
|
+
- Added first-class English and Chinese Gherkin ingestion for Feature, Background, Scenario, Scenario Outline, Examples, tags, and source anchors.
|
|
83
|
+
- Added `ontology-explain` for object provenance, direct relations, and bounded evidence-chain inspection.
|
|
84
|
+
- Added a BDD adapter and strengthened the `knowledge-bdd` operating contract.
|
|
85
|
+
- Added `ontology-report` for a generated, high-density Markdown view of current semantic state.
|
|
86
|
+
- Added content-addressed ontology attestations bound to snapshot revision, action ledger, source hashes, and gate results.
|
|
87
|
+
- Added `ontology-attestation-check` to reject stale or tampered final evidence.
|
|
88
|
+
- Added sequence-numbered v2 action-ledger hash chains with v1-prefix compatibility.
|
|
89
|
+
- Added Snapshot-revision binding for newly recorded actions and optional authored `expectedSnapshotRevision` checks.
|
|
90
|
+
- Added `ontology-ledger-check` for chain head, record counts, and full-ledger digest inspection.
|
|
91
|
+
- Added external Attestation anchoring through `ontology-attestation-check --expected-hash`.
|
|
92
|
+
- Added `ontology-evidence-check` for content-addressed validation artifact verification.
|
|
93
|
+
- Added Evidence artifact hashes to final Attestations and generated ontology reports.
|
|
94
|
+
- Added `ObserveImplementation` to distinguish existing-code observation from repair output.
|
|
95
|
+
- Added `ontology-implementation-check` for content-addressed implementation verification.
|
|
96
|
+
- Added Validation input causality: each run binds its consumed DesignSource and ImplementationUnit hashes.
|
|
97
|
+
- Added `ontology-validation-check`; stale or incomplete validation inputs now block PASS and invalidate Attestations.
|
|
98
|
+
- Added ImplementationUnit hashes to final Attestations and generated ontology reports.
|
|
99
|
+
- Added an installation manifest with SHA-256 hashes for every managed file.
|
|
100
|
+
- Added `doctor` to verify installed files and Codex marketplace registration.
|
|
101
|
+
- Added safe `uninstall` for every supported host.
|
|
102
|
+
- Added `--json` output for installation lifecycle automation.
|
|
103
|
+
- Added collision, tamper detection, forced recovery, and Codex unregister tests.
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
|
|
107
|
+
- Moved Skill version markers into standards-compliant `metadata.version` while preserving release synchronization and legacy-install recognition.
|
|
108
|
+
- Reframed Subagent responsibilities as bounded ontology reads, proposals, actions, and evidence attachments.
|
|
109
|
+
- Added the ontology snapshot to the required workflow evidence and final artifacts.
|
|
110
|
+
- Added role/action, target type, terminal condition, evidence, and protected-path enforcement.
|
|
111
|
+
- Completed actions now require a non-empty, action-authorized ontology patch instead of direct snapshot edits.
|
|
112
|
+
- PASS now rejects changed, missing, or out-of-project tracked design sources.
|
|
113
|
+
- PASS now also rejects untracked design sources that lack a recorded content hash.
|
|
114
|
+
- Final review now treats prose as a generated ontology view and requires attestation verification before publication.
|
|
115
|
+
- New actions must be reconciled before another action can be recorded, preventing ambiguous multi-action base revisions.
|
|
116
|
+
- `VERIFIED_BY` now counts only current Validation objects whose status is `PASS`.
|
|
117
|
+
- `AttachEvidence` now requires a real project-relative artifact, SHA-256 provenance, and the `ContentAddressed` interface.
|
|
118
|
+
- PASS now rejects missing, changed, untracked, inactive, or out-of-project required Evidence artifacts.
|
|
119
|
+
- Ontology commands now separate the workflow evidence root from `snapshot.projectRoot`.
|
|
120
|
+
- Content checks now resolve real paths and reject symlink escapes and non-file artifacts.
|
|
121
|
+
- `IMPLEMENTED_BY` now counts only current ImplementationUnit objects.
|
|
122
|
+
- `ObserveImplementation` and `ApplyRepair` now require real, content-addressed implementation files.
|
|
123
|
+
- PASS now rejects missing, changed, untracked, inactive, invalid, or out-of-project required implementation artifacts.
|
|
124
|
+
- `ontology-plan` now selects different minimal recovery stages for design, implementation, and Evidence drift.
|
|
125
|
+
- Install now refuses to overwrite unmanaged or locally modified files unless `--force` is explicitly supplied.
|
|
126
|
+
- Uninstall now refuses to remove modified managed files unless `--force` is explicitly supplied.
|
|
127
|
+
- Install treats symbolic links and non-file targets as conflicts to prevent writes escaping managed roots.
|
|
128
|
+
- Codex uninstall preserves all unrelated personal marketplace entries.
|
|
129
|
+
|
|
7
130
|
## [1.1.2] - 2026-07-28
|
|
8
131
|
|
|
9
132
|
### Added
|
package/INSTRUCTION.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
# Design
|
|
1
|
+
# QIHENG Design Integrity Workflow
|
|
2
|
+
|
|
3
|
+
QIHENG (契衡) is the Design Integrity Control Plane: every design promise,
|
|
4
|
+
proven in code. DIC remains the technical consistency protocol used by the
|
|
5
|
+
workflow.
|
|
2
6
|
|
|
3
7
|
Use this workflow when a Coding Agent must check or repair whether implementation matches design intent.
|
|
4
8
|
|
|
@@ -14,33 +18,215 @@ This instruction is generic. It must not assume a contest, language, framework,
|
|
|
14
18
|
- Do not edit protected design sources unless explicitly instructed.
|
|
15
19
|
- Write intermediate evidence under `logs/trace/`.
|
|
16
20
|
- Write final evidence under `reports/` and `result/`.
|
|
21
|
+
- Treat `reports/ontology-snapshot.json` as the machine-readable semantic state.
|
|
22
|
+
- Change semantic state through typed, evidence-backed actions rather than untracked prose.
|
|
23
|
+
|
|
24
|
+
When workflow evidence is stored outside the repository, use the workflow root
|
|
25
|
+
to locate `reports/` and the Snapshot `projectRoot` to resolve design,
|
|
26
|
+
implementation, and Evidence paths. Do not conflate these roots.
|
|
27
|
+
|
|
28
|
+
## Ontology Contract
|
|
29
|
+
|
|
30
|
+
The workflow models design consistency as typed objects and links:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Change -> PROPOSES -> Requirement
|
|
34
|
+
Requirement -> DERIVED_FROM -> DesignSource
|
|
35
|
+
Scenario -> REFINES -> Requirement
|
|
36
|
+
Requirement -> IMPLEMENTED_BY -> ImplementationUnit
|
|
37
|
+
Requirement/Scenario -> VERIFIED_BY -> Validation
|
|
38
|
+
Gap -> VIOLATES -> Requirement
|
|
39
|
+
RepairAction -> RESOLVES -> Gap
|
|
40
|
+
Validation -> PRODUCES -> Evidence
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Every object must have a stable ID, lifecycle, properties, and provenance. Every
|
|
44
|
+
link endpoint must resolve. Reports are views over this semantic state; they are
|
|
45
|
+
not independent sources of truth.
|
|
46
|
+
|
|
47
|
+
Agents may only perform actions within their role:
|
|
48
|
+
|
|
49
|
+
- readers propose or confirm source-backed objects
|
|
50
|
+
- inspectors add observed implementation and gap links
|
|
51
|
+
- planners propose repair actions without editing code
|
|
52
|
+
- repairers execute approved, path-bounded actions
|
|
53
|
+
- validators attach validation and evidence objects
|
|
54
|
+
- final reviewers evaluate DIC invariants and transition consistency status
|
|
55
|
+
|
|
56
|
+
Before executing or recording a mutation, validate it with the installed runtime:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
qiheng action-check --root <project> --action <action.json>
|
|
60
|
+
qiheng action-record --root <project> --action <action.json>
|
|
61
|
+
qiheng ontology-reconcile --root <project>
|
|
62
|
+
qiheng ontology-ledger-check --root <project>
|
|
63
|
+
qiheng ontology-evidence-check --root <project>
|
|
64
|
+
qiheng ontology-validation-check --root <project>
|
|
65
|
+
qiheng ontology-implementation-check --root <project>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`action-record` appends an immutable, content-hashed entry to
|
|
69
|
+
`reports/ontology-actions.jsonl`. Reusing an action ID with different content is
|
|
70
|
+
an error. `ontology-reconcile` replays authorized `ontologyPatch` effects and
|
|
71
|
+
atomically replaces the snapshot only when structural invariants still pass.
|
|
72
|
+
Use `ontology-check --status PASS` before producing a terminal PASS.
|
|
17
73
|
|
|
18
|
-
|
|
74
|
+
Set `expectedSnapshotRevision` on authored actions. Newly recorded ledger
|
|
75
|
+
entries bind the current Snapshot revision and form a sequence-numbered hash
|
|
76
|
+
chain. Reconcile before recording the next action; otherwise recording fails.
|
|
77
|
+
|
|
78
|
+
A completed action must declare `parameters.ontologyPatch`. Its permitted
|
|
79
|
+
object types, link types, and lifecycle transitions are derived from the action
|
|
80
|
+
type. Agents must not edit `ontology-snapshot.json` directly to bypass these
|
|
81
|
+
rules.
|
|
82
|
+
|
|
83
|
+
Useful machine-readable queries:
|
|
19
84
|
|
|
20
85
|
```text
|
|
21
|
-
|
|
86
|
+
qiheng ontology-query --root <project> --query uncovered
|
|
87
|
+
qiheng ontology-query --root <project> --query gaps
|
|
88
|
+
qiheng ontology-query --root <project> --query unevidenced
|
|
89
|
+
qiheng ontology-query --root <project> --query impact --id <object-id>
|
|
90
|
+
qiheng ontology-drift --root <project>
|
|
91
|
+
qiheng ontology-plan --root <project> --json
|
|
92
|
+
qiheng ontology-explain --root <project> --id <object-id> --json
|
|
93
|
+
qiheng ontology-report --root <project> --status <status>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Snapshots carry a canonical `snapshotRevision`. Direct semantic edits invalidate
|
|
97
|
+
the revision and must fail structural review. Reconciliation uses optimistic
|
|
98
|
+
concurrency and refuses to replace a snapshot that changed after replay began.
|
|
99
|
+
|
|
100
|
+
A PASS gate includes source-drift evaluation. A changed, missing, or
|
|
101
|
+
out-of-project tracked source blocks PASS even when older implementation and
|
|
102
|
+
validation links are still present.
|
|
103
|
+
|
|
104
|
+
A `VERIFIED_BY` relation counts only when its Validation has a current lifecycle
|
|
105
|
+
and `properties.status: PASS`. The Validation must record `executedAt` and bind
|
|
106
|
+
every consumed DesignSource and ImplementationUnit as
|
|
107
|
+
`properties.inputs[] = { objectId, contentHash }`; otherwise an earlier run
|
|
108
|
+
could incorrectly approve newer design or code. Every Evidence produced by such a Validation
|
|
109
|
+
must reference a project-relative artifact, record its SHA-256
|
|
110
|
+
`provenance.contentHash`, and implement `ContentAddressed`.
|
|
111
|
+
|
|
112
|
+
An `IMPLEMENTED_BY` relation counts only when its ImplementationUnit has a
|
|
113
|
+
current lifecycle. The implementation must reference a project-relative regular
|
|
114
|
+
file, record its SHA-256 `provenance.contentHash`, and implement
|
|
115
|
+
`ContentAddressed`. Use `ObserveImplementation` for existing code and
|
|
116
|
+
`ApplyRepair` for approved repair output.
|
|
117
|
+
|
|
118
|
+
The portable schemas are:
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
schemas/ontology-snapshot.schema.json
|
|
122
|
+
schemas/ontology-action.schema.json
|
|
123
|
+
schemas/ontology-action-record.schema.json
|
|
124
|
+
schemas/ontology-attestation.schema.json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Quality Review Boundaries
|
|
128
|
+
|
|
129
|
+
Use `quality-review-orchestrator` to maintain a candidate-bound gate graph. It
|
|
130
|
+
selects only the specialist quality Skills justified by the imported Spec,
|
|
131
|
+
architecture, implementation, test, pipeline, and admission risk. The graph may
|
|
132
|
+
contain repeated gates and feedback edges; it is not a one-pass checklist.
|
|
133
|
+
|
|
134
|
+
Operate through these lifecycle boundaries:
|
|
135
|
+
|
|
136
|
+
1. **Import and design clearance.** Intake resolves the imported Spec/change
|
|
137
|
+
and governing baseline. Run `quality-cross-spec-consistency` when the
|
|
138
|
+
profile requires semantic cross-Spec search, then run `quality-spec-review`
|
|
139
|
+
before implementation.
|
|
140
|
+
Add `quality-sr-ar-review` when architecture or realization is affected.
|
|
141
|
+
2. **Gate planning.** Run `quality-ci-gate` with `phase: PLAN` to declare the
|
|
142
|
+
checks, evidence, runtime budgets, and failure policy expected for the
|
|
143
|
+
planned change surface.
|
|
144
|
+
3. **Implementation.** Advance implementation only from confirmed obligations.
|
|
145
|
+
Trigger code, DT, security, performance, and other specialist gates when
|
|
146
|
+
their risk becomes applicable; do not assume one fixed invocation.
|
|
147
|
+
4. **DIC consistency repair.** After implementation, compare the current
|
|
148
|
+
candidate with confirmed design, repair source-backed inconsistencies,
|
|
149
|
+
validate them, and repeat until invariants converge or a blocker is recorded.
|
|
150
|
+
5. **Affected-gate re-entry.** Any Spec, architecture, code, test, fixture,
|
|
151
|
+
pipeline, policy, or candidate change marks its dependent decisions `STALE`.
|
|
152
|
+
Run `knowledge-change-impact` and re-run only those affected gates against
|
|
153
|
+
the new candidate.
|
|
154
|
+
6. **Pre-commit admission.** Freeze the candidate, run `quality-ci-gate` with
|
|
155
|
+
`phase: VERIFY`. When high-risk claims apply, run
|
|
156
|
+
`quality-adversarial-challenge`; always audit terminal claim freshness with
|
|
157
|
+
`quality-evidence-audit`. Let `final-reviewer` compute DIC consistency and
|
|
158
|
+
verify the Attestation, then run `quality-repository-gate`.
|
|
159
|
+
|
|
160
|
+
Skipped specialist reviews require an applicability reason. `STALE` and
|
|
161
|
+
`SKIPPED` are lifecycle states, not successful quality decisions. Quality
|
|
162
|
+
findings must reference existing ontology objects and Evidence where possible
|
|
163
|
+
instead of creating a parallel truth model.
|
|
164
|
+
|
|
165
|
+
DIC consistency, specialist quality, and repository admission are separate
|
|
166
|
+
outcomes. DIC `PASS` proves design-implementation consistency; it does not by
|
|
167
|
+
itself prove all quality domains or grant admission. Preserve the applicability
|
|
168
|
+
plan, run history, invalidation reasons, and specialist outputs under
|
|
169
|
+
`reports/quality/` so the Repository Gate consumes only current evidence for
|
|
170
|
+
the same frozen candidate.
|
|
171
|
+
|
|
172
|
+
## Default Lifecycle
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
quality-review-orchestrator [OPEN]
|
|
176
|
+
-> workflow-core
|
|
177
|
+
-> workflow-intake
|
|
22
178
|
-> workflow-profile
|
|
23
|
-
-> spec-reader
|
|
24
179
|
-> profile-builder
|
|
180
|
+
-> workflow-harness [freeze candidate + materialize gate graph]
|
|
181
|
+
-> spec-reader
|
|
182
|
+
-> semantic-conflict-auditor
|
|
183
|
+
-> quality-cross-spec-consistency
|
|
184
|
+
-> quality-spec-review
|
|
25
185
|
-> contract-oracle
|
|
186
|
+
-> impact-analyst
|
|
187
|
+
-> knowledge-change-impact
|
|
188
|
+
-> quality-sr-ar-review [when architecture/realization is affected]
|
|
189
|
+
-> quality-ci-gate [PLAN required gates]
|
|
190
|
+
-> IMPLEMENT FROM CONFIRMED OBLIGATIONS
|
|
26
191
|
-> flow-auditor
|
|
27
192
|
-> impl-inspector
|
|
28
|
-
-> repair-planner
|
|
29
|
-
-> code-
|
|
30
|
-
->
|
|
31
|
-
->
|
|
193
|
+
-> [repair-planner -> code-repairer -> validation-runner]*
|
|
194
|
+
-> [quality-code-review / quality-dt-review / affected specialist gates]*
|
|
195
|
+
-> impact-analyst [after drift or repair]
|
|
196
|
+
-> [invalidate and re-enter earliest affected gate]*
|
|
197
|
+
-> quality-ci-gate [VERIFY frozen candidate]
|
|
198
|
+
-> adversarial-challenger [risk-selected; independent]
|
|
199
|
+
-> quality-adversarial-challenge [when material challenge hypotheses apply]
|
|
200
|
+
-> evidence-auditor
|
|
201
|
+
-> quality-evidence-audit
|
|
202
|
+
-> final-reviewer [DIC consistency + Attestation]
|
|
203
|
+
-> quality-repository-gate [PRE-COMMIT ADMISSION]
|
|
204
|
+
-> workflow-harness [check READY + generate executive cockpit]
|
|
205
|
+
-> quality-review-orchestrator [CLOSE]
|
|
32
206
|
```
|
|
33
207
|
|
|
208
|
+
`*` means zero or more risk-driven iterations. Dependencies constrain execution;
|
|
209
|
+
the textual layout does not require every conditional gate or force unrelated
|
|
210
|
+
gates into serial execution.
|
|
211
|
+
|
|
34
212
|
## Required Evidence
|
|
35
213
|
|
|
36
214
|
At minimum, produce:
|
|
37
215
|
|
|
38
216
|
```text
|
|
39
217
|
reports/project-profile.json
|
|
218
|
+
reports/harness-plan.json
|
|
219
|
+
reports/harness-run.json
|
|
220
|
+
reports/harness-report.md
|
|
40
221
|
reports/contract-obligations.json
|
|
41
222
|
reports/contract-obligations.md
|
|
223
|
+
reports/ontology-snapshot.json
|
|
224
|
+
reports/ontology-actions.jsonl
|
|
225
|
+
reports/ontology-report.md
|
|
226
|
+
reports/ontology-attestation.json
|
|
42
227
|
reports/final-consistency-report.md
|
|
43
228
|
reports/FINAL_RESULT.json
|
|
229
|
+
reports/quality/
|
|
44
230
|
result/output.md
|
|
45
231
|
logs/trace/
|
|
46
232
|
```
|
|
@@ -70,7 +256,14 @@ If OpenSpec files are present, use `knowledge-openspec` before repair planning.
|
|
|
70
256
|
- archived specs do not override current specs
|
|
71
257
|
- implementation does not silently exceed or contradict the accepted design
|
|
72
258
|
|
|
73
|
-
##
|
|
259
|
+
## BDD Rule
|
|
260
|
+
|
|
261
|
+
If `.feature` files are present, use `knowledge-bdd`. Preserve Feature,
|
|
262
|
+
Background, Scenario, Scenario Outline, Examples, tags, normalized steps, and
|
|
263
|
+
source lines. BDD acceptance contracts become ontology obligations, but they do
|
|
264
|
+
not become validation evidence until current executable checks are recorded.
|
|
265
|
+
|
|
266
|
+
## DIC Consistency Status
|
|
74
267
|
|
|
75
268
|
Use one of:
|
|
76
269
|
|
|
@@ -79,4 +272,33 @@ Use one of:
|
|
|
79
272
|
- `BLOCKED`
|
|
80
273
|
- `FAIL`
|
|
81
274
|
|
|
82
|
-
Do not use `SUCCESS`, `DONE`, or informal
|
|
275
|
+
Do not use `SUCCESS`, `DONE`, or informal labels for machine-readable DIC
|
|
276
|
+
consistency. Record specialist quality and repository admission in their
|
|
277
|
+
separate fields.
|
|
278
|
+
|
|
279
|
+
`PASS` is valid only when ontology invariants pass. At minimum:
|
|
280
|
+
|
|
281
|
+
- every active obligation has a source
|
|
282
|
+
- every active scenario refines a requirement
|
|
283
|
+
- every active requirement has an implementation disposition
|
|
284
|
+
- every required ImplementationUnit exists and matches its recorded SHA-256
|
|
285
|
+
- every active obligation is linked to validation
|
|
286
|
+
- every referenced Validation is current and successful
|
|
287
|
+
- every referenced Validation binds the current design and implementation hashes
|
|
288
|
+
- every required Evidence artifact exists and matches its recorded SHA-256
|
|
289
|
+
- no blocking gap remains open
|
|
290
|
+
|
|
291
|
+
Before publishing any terminal status, generate the ontology report, create a
|
|
292
|
+
content-addressed attestation, and verify it against the current snapshot,
|
|
293
|
+
action ledger, design sources, and gate:
|
|
294
|
+
|
|
295
|
+
```text
|
|
296
|
+
qiheng ontology-report --root <project> --status <status>
|
|
297
|
+
qiheng ontology-attest --root <project> --status <status> --summary "<summary>"
|
|
298
|
+
qiheng ontology-attestation-check --root <project>
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
If the final verification fails, the result is stale and must not be published.
|
|
302
|
+
Persist the emitted Attestation `contentHash` in external CI or release
|
|
303
|
+
metadata when available, then verify it with
|
|
304
|
+
`ontology-attestation-check --expected-hash <sha256>`.
|