dic-workflow-kit 1.1.3 → 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.
Files changed (65) hide show
  1. package/.codex-plugin/plugin.json +14 -10
  2. package/CHANGELOG.md +56 -1
  3. package/INSTRUCTION.md +108 -29
  4. package/README.md +234 -134
  5. package/README.zh-CN.md +280 -194
  6. package/adapters/bitfun/README.md +2 -2
  7. package/agents/adversarial-challenger.md +23 -0
  8. package/agents/code-repairer.md +1 -1
  9. package/agents/contract-oracle.md +1 -1
  10. package/agents/evidence-auditor.md +23 -0
  11. package/agents/final-reviewer.md +13 -2
  12. package/agents/flow-auditor.md +1 -1
  13. package/agents/impact-analyst.md +21 -0
  14. package/agents/impl-inspector.md +1 -1
  15. package/agents/profile-builder.md +7 -3
  16. package/agents/repair-planner.md +1 -1
  17. package/agents/semantic-conflict-auditor.md +21 -0
  18. package/agents/spec-reader.md +1 -1
  19. package/agents/validation-runner.md +1 -1
  20. package/dist/dic-workflow-kit.mjs +17 -13
  21. package/package.json +5 -2
  22. package/schemas/final-result.schema.json +16 -1
  23. package/schemas/harness-plan.schema.json +143 -0
  24. package/schemas/harness-run.schema.json +75 -0
  25. package/schemas/ontology-action.schema.json +9 -1
  26. package/schemas/ontology-snapshot.schema.json +75 -1
  27. package/schemas/project-profile.schema.json +42 -0
  28. package/skills/knowledge-bdd/SKILL.md +1 -1
  29. package/skills/knowledge-change-impact/SKILL.md +43 -0
  30. package/skills/knowledge-change-impact/agents/openai.yaml +4 -0
  31. package/skills/knowledge-openspec/SKILL.md +1 -1
  32. package/skills/knowledge-repair-distill/SKILL.md +1 -1
  33. package/skills/quality-adversarial-challenge/SKILL.md +42 -0
  34. package/skills/quality-adversarial-challenge/agents/openai.yaml +4 -0
  35. package/skills/quality-ci-gate/SKILL.md +45 -0
  36. package/skills/quality-ci-gate/agents/openai.yaml +4 -0
  37. package/skills/quality-ci-gate/references/ci-gate.md +22 -0
  38. package/skills/quality-code-review/SKILL.md +32 -0
  39. package/skills/quality-code-review/agents/openai.yaml +4 -0
  40. package/skills/quality-code-review/references/code-review.md +13 -0
  41. package/skills/quality-cross-spec-consistency/SKILL.md +45 -0
  42. package/skills/quality-cross-spec-consistency/agents/openai.yaml +4 -0
  43. package/skills/quality-dt-review/SKILL.md +32 -0
  44. package/skills/quality-dt-review/agents/openai.yaml +4 -0
  45. package/skills/quality-dt-review/references/dt-review.md +14 -0
  46. package/skills/quality-evidence-audit/SKILL.md +41 -0
  47. package/skills/quality-evidence-audit/agents/openai.yaml +4 -0
  48. package/skills/quality-repository-gate/SKILL.md +38 -0
  49. package/skills/quality-repository-gate/agents/openai.yaml +4 -0
  50. package/skills/quality-repository-gate/references/repository-gate.md +13 -0
  51. package/skills/quality-review-orchestrator/SKILL.md +100 -0
  52. package/skills/quality-review-orchestrator/agents/openai.yaml +4 -0
  53. package/skills/quality-review-orchestrator/references/quality-model.md +73 -0
  54. package/skills/quality-spec-review/SKILL.md +40 -0
  55. package/skills/quality-spec-review/agents/openai.yaml +4 -0
  56. package/skills/quality-spec-review/references/spec-review.md +14 -0
  57. package/skills/quality-sr-ar-review/SKILL.md +32 -0
  58. package/skills/quality-sr-ar-review/agents/openai.yaml +4 -0
  59. package/skills/quality-sr-ar-review/references/sr-ar-review.md +14 -0
  60. package/skills/workflow-core/SKILL.md +49 -2
  61. package/skills/workflow-harness/SKILL.md +73 -0
  62. package/skills/workflow-harness/agents/openai.yaml +4 -0
  63. package/skills/workflow-intake/SKILL.md +8 -2
  64. package/skills/workflow-profile/SKILL.md +16 -1
  65. package/skills/workflow-repair/SKILL.md +7 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dic-workflow-kit",
3
- "version": "1.1.3",
4
- "description": "Design-implementation consistency workflow with OpenSpec obligations, BDD knowledge, Skills, and Subagents.",
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": "DIC Workflow Kit",
20
- "shortDescription": "Design-to-code consistency workflow",
21
- "longDescription": "Auditable OpenSpec intake, obligation extraction, implementation inspection, repair planning, validation, Skills, and bounded Subagent handoffs.",
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
- "Validation",
28
- "Subagents"
27
+ "验证",
28
+ "质量评审",
29
+ "交付保障",
30
+ "子智能体"
29
31
  ],
30
32
  "defaultPrompt": [
31
- "Check this OpenSpec change against implementation and tests.",
32
- "Build an obligation matrix for this design change.",
33
- "Repair design-to-code inconsistencies with evidence."
33
+ "检查当前 OpenSpec 变更与实现和测试是否一致。",
34
+ "为当前设计变更建立实现义务矩阵。",
35
+ "依据证据修复设计与代码不一致问题。",
36
+ "执行并重跑受影响的质量门禁,然后决定提交前准入。",
37
+ "为当前候选版本生成 QIHENG 高层交付保障驾驶舱。"
34
38
  ],
35
39
  "brandColor": "#C7000B"
36
40
  }
package/CHANGELOG.md CHANGED
@@ -1,11 +1,66 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to DIC Workflow Kit are documented in this file.
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
7
  ## [Unreleased]
8
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
+
9
64
  ## [1.1.3] - 2026-07-28
10
65
 
11
66
  ### Added
package/INSTRUCTION.md CHANGED
@@ -1,4 +1,8 @@
1
- # Design-Implementation Consistency Workflow
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
 
@@ -47,18 +51,18 @@ Agents may only perform actions within their role:
47
51
  - planners propose repair actions without editing code
48
52
  - repairers execute approved, path-bounded actions
49
53
  - validators attach validation and evidence objects
50
- - final reviewers evaluate invariants and transition final status
54
+ - final reviewers evaluate DIC invariants and transition consistency status
51
55
 
52
56
  Before executing or recording a mutation, validate it with the installed runtime:
53
57
 
54
58
  ```text
55
- dic-workflow-kit action-check --root <project> --action <action.json>
56
- dic-workflow-kit action-record --root <project> --action <action.json>
57
- dic-workflow-kit ontology-reconcile --root <project>
58
- dic-workflow-kit ontology-ledger-check --root <project>
59
- dic-workflow-kit ontology-evidence-check --root <project>
60
- dic-workflow-kit ontology-validation-check --root <project>
61
- dic-workflow-kit ontology-implementation-check --root <project>
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>
62
66
  ```
63
67
 
64
68
  `action-record` appends an immutable, content-hashed entry to
@@ -79,14 +83,14 @@ rules.
79
83
  Useful machine-readable queries:
80
84
 
81
85
  ```text
82
- dic-workflow-kit ontology-query --root <project> --query uncovered
83
- dic-workflow-kit ontology-query --root <project> --query gaps
84
- dic-workflow-kit ontology-query --root <project> --query unevidenced
85
- dic-workflow-kit ontology-query --root <project> --query impact --id <object-id>
86
- dic-workflow-kit ontology-drift --root <project>
87
- dic-workflow-kit ontology-plan --root <project> --json
88
- dic-workflow-kit ontology-explain --root <project> --id <object-id> --json
89
- dic-workflow-kit ontology-report --root <project> --status <status>
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>
90
94
  ```
91
95
 
92
96
  Snapshots carry a canonical `snapshotRevision`. Direct semantic edits invalidate
@@ -120,28 +124,100 @@ schemas/ontology-action-record.schema.json
120
124
  schemas/ontology-attestation.schema.json
121
125
  ```
122
126
 
123
- ## Default Stages
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
124
173
 
125
174
  ```text
126
- workflow-intake
175
+ quality-review-orchestrator [OPEN]
176
+ -> workflow-core
177
+ -> workflow-intake
127
178
  -> workflow-profile
128
- -> spec-reader
129
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
130
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
131
191
  -> flow-auditor
132
192
  -> impl-inspector
133
- -> repair-planner
134
- -> code-repairer
135
- -> validation-runner
136
- -> final-reviewer
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]
137
206
  ```
138
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
+
139
212
  ## Required Evidence
140
213
 
141
214
  At minimum, produce:
142
215
 
143
216
  ```text
144
217
  reports/project-profile.json
218
+ reports/harness-plan.json
219
+ reports/harness-run.json
220
+ reports/harness-report.md
145
221
  reports/contract-obligations.json
146
222
  reports/contract-obligations.md
147
223
  reports/ontology-snapshot.json
@@ -150,6 +226,7 @@ reports/ontology-report.md
150
226
  reports/ontology-attestation.json
151
227
  reports/final-consistency-report.md
152
228
  reports/FINAL_RESULT.json
229
+ reports/quality/
153
230
  result/output.md
154
231
  logs/trace/
155
232
  ```
@@ -186,7 +263,7 @@ Background, Scenario, Scenario Outline, Examples, tags, normalized steps, and
186
263
  source lines. BDD acceptance contracts become ontology obligations, but they do
187
264
  not become validation evidence until current executable checks are recorded.
188
265
 
189
- ## Final Status
266
+ ## DIC Consistency Status
190
267
 
191
268
  Use one of:
192
269
 
@@ -195,7 +272,9 @@ Use one of:
195
272
  - `BLOCKED`
196
273
  - `FAIL`
197
274
 
198
- Do not use `SUCCESS`, `DONE`, or informal status labels in final machine-readable output.
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.
199
278
 
200
279
  `PASS` is valid only when ontology invariants pass. At minimum:
201
280
 
@@ -214,9 +293,9 @@ content-addressed attestation, and verify it against the current snapshot,
214
293
  action ledger, design sources, and gate:
215
294
 
216
295
  ```text
217
- dic-workflow-kit ontology-report --root <project> --status <status>
218
- dic-workflow-kit ontology-attest --root <project> --status <status> --summary "<summary>"
219
- dic-workflow-kit ontology-attestation-check --root <project>
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>
220
299
  ```
221
300
 
222
301
  If the final verification fails, the result is stale and must not be published.