# Changelog

All notable changes to QIHENG are documented in this file.

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.

## [Unreleased]

## [1.1.17] - 2026-08-10

### Changed

- 将产品总入口 Skill 的界面名称统一为 `QIHENG｜齐衡总入口`，正文标题统一为 `QIHENG 齐衡总入口`；稳定机器标识、目录、`$qiheng` 调用方式和命令行接口保持不变，继续兼容全部支持的 Coding Agent。
- 将两个 npm 包、插件清单、Skills、SubAgents、能力目录与安装示例的版本统一为 `1.1.17`。

## [1.1.16] - 2026-08-07

### Changed

- 重构齐衡官方宣传材料的关键叙事页：P2保留总纲与关键追问，P3改为交付矛盾对照，P5改为双核心数据页，P6改为“过去—升级路径—现在”的解决方案路径，避免连续页面复制相同的左右栏与底部层级结构。
- 保持齐衡红黑白配色、统一标题字体与字号，并完成全20页渲染检查和文字越界检查。
- 将两个 npm 包、插件清单、Skills、SubAgents、能力目录与安装示例的版本统一为 `1.1.16`。

## [1.1.15] - 2026-08-07

### Changed

- 更新齐衡官方宣传材料，结合 NextAgent 约 46 MiB 已跟踪文本、约 1,500 万～2,000 万 tokens 的存量规模，以及 723 个已合入 PR 的长尾分布，说明人工检视的核心成本是持续维护设计规格、架构、实现、测试与历史变化的一致理解。
- 明确齐衡通过项目信息、按需加载上下文、专业分工、增量质量门禁和证据链降低人工全量阅读、重复定位与跨范围判断成本，而不是以 SubAgent 数量作为产品卖点。

## [1.1.14] - 2026-08-06

### Changed

- 在中英文 README 和官方演示文稿中统一说明“必需、按需、触发”三类能力，明确 21 个 Skills 与 19 个 SubAgents 的适用条件、加载边界和数量分布。
- 官方演示文稿新增 19 个 SubAgents 控制流与 21 个 Skills 按需挂载视图，帮助使用者区分固定主流程、项目画像选择和事件触发能力。
- 将 21 个 Skills、19 个 SubAgents 及其安装界面元数据和参考资料的职责、流程、边界与输出说明统一为中文；保留命令、稳定标识、本体关系和协议枚举，确保所有支持的 Coding Agent 安装格式继续兼容。
- 将全部 SubAgent 说明统一为“职责—标准—标准交接”三段式结构，并分别明确核心输出、必填交接字段、状态范围和证据约束。
- 新增仓库级 `AGENTS.md`，强制所有 Skills 与 SubAgents 使用中文说明，固定 SubAgent 三段式结构，并保护机器标识、协议枚举和跨宿主安装兼容性。
- 面向管理者重构全部 Markdown 说明：Skill 统一为“领导速读—管理视角—执行方法”，SubAgent 统一为“领导速读—职责—标准—标准交接”，并使用一级、二级、三级标题形成清晰阅读层级。
- 新增《核心流程与术语表》，用“输入设计规格—提取设计要求—查找实现位置—检查一致性—修复问题—验证结果”说明产品主线，并解释设计要求、BDD 场景、问题、验证、证据和质量门禁等常用概念。
- 删除容易产生法律或流程歧义的“设计义务”，统一使用行业常见的“设计要求”，并明确 BDD 场景只用于表达行为类要求。

## [1.1.13] - 2026-08-06

### Performance

- Added gate-scoped input fingerprints so an implementation-only Candidate
  change can reuse successful design-authority, cross-Spec, and Spec gates when
  their project profile, complete gate definition, design sources, evidence,
  and Subagent handoffs remain byte-identical.
- Preserved fail-closed behavior for implementation-sensitive and downstream
  gates, and added explicit `UNCHANGED_INPUTS` provenance to every result reused
  across Candidate versions.

## [1.1.12] - 2026-08-05

### Security

- Hardened installation and uninstallation with a cross-process lifecycle lock,
  ownership-safe lock release, file rollback transactions, and canonical path
  checks that reject symbolic-link escapes from managed roots.
- Removed the Codex-specific unmanaged-file overwrite exception. Codex now
  follows the same fail-closed collision policy as every other host and requires
  explicit `--force` authorization before replacing user-owned files.
- Added regression coverage for Codex collisions, concurrent lifecycle
  mutation, and complete rollback after marketplace registration failure.
- Upgraded rollback to a durable on-disk transaction with hashed backups and
  automatic recovery after an interrupted process, and added stale-owner lock
  quarantine without allowing one process to release another owner's lock.

### Performance

- Added bounded concurrent hashing for untracked Candidate files and gate
  evidence, with per-run path deduplication and configurable concurrency from
  `1` to `32` through `QIHENG_IO_CONCURRENCY`.
- Added a content-addressed successful-gate cache bound to the plan, Candidate,
  project profile, and complete gate definition. Cache reuse rehashes every
  evidence and handoff artifact and reports hits and misses during Harness init.
- Added dependency-derived execution batches: independent read gates are
  exposed for parallel execution while source-repair batches remain exclusive.
- Serialized entry and Harness control-plane writes with a stale-owner-aware
  repository lock to prevent lost updates across Coding Agent processes.

## [1.1.11] - 2026-08-04

### Added

- Added complete NextAgent execution evidence to the official QIHENG
  presentation, including the four-stage context-inheritance sequence and the
  skill-fork convergence result.
- Added a dedicated installation and first-run slide using the current runtime's
  locally generated HTML guide, with npm installation, host selection,
  integrity checking, guide generation, and workflow startup commands.

### Changed

- Expanded the official presentation to fourteen slides, preserved complete
  screenshots without cropping, refreshed all page markers, and retained
  speaker-note source traceability across the deck.

## [1.1.10] - 2026-08-04

### Added

- Added the `$qiheng` product-level entry Skill and `qiheng start`, `status`,
  `next`, and `resume` commands so users can launch and continue the complete
  workflow without memorizing internal Skills or Subagents.
- Added a portable `qiheng.entry.v1` intent contract. It stores only the user
  mode and Spec/Change pointer while preserving Harness as the sole gate-state
  authority.

### Changed

- Expanded the full product inventory to 21 Skills and 19 Subagents. The new
  entry Skill is a thin main-agent control facade; it does not duplicate the
  review orchestrator or add another Subagent.

## [1.1.9] - 2026-07-31

### Added

- Added a machine-readable commercial capability catalog covering all 20
  Skills and 19 Subagents with product version, workflow order, capability
  pack, Chinese responsibility, role mapping, minimum permissions, and the
  supported/compatible host contract.
- Added `qiheng catalog` and dependency-closed `--pack` installation for
  foundation, design, implementation, assurance, and full product bundles.
- Added a commercial capability and acceptance guide plus release checks that
  prevent catalog, component identity, or component version drift.
- Added enterprise adoption, security, support, and proprietary distribution
  policies for controlled pilots and production procurement.
- Added a machine-readable release readiness check covering synchronized
  versions, the 20-Skill / 19-Subagent inventory, runtime-only package content,
  bundled enterprise documents, and the runtime SHA-256 digest.
- Added an explicit commercial readiness gate that blocks while formal license
  approval is absent.

### Changed

- Made installation manifests record requested/resolved capability packs and
  exact component inventory; pack reduction removes only unchanged managed
  components and fails closed on customer-modified files.
- Focused Repository Gate and enterprise guidance on the Skills/Subagents
  product boundary; organization identity, approval, signing, compliance, and
  immutable storage remain external integration inputs.
- Included Chinese user documentation and commercial capability documents in
  both source-free npm runtime packages.
- Made dual-package dry-run and publish commands execute technical release
  readiness checks before tests and publication.

### Removed

- Removed the experimental standalone enterprise-governance and DSSE signing
  control planes, commands, schemas, tests, and package documentation because
  they expanded QIHENG beyond the Skills/Subagents delivery-assurance product.
- Removed contest-specific adapters, defense guides, demo artifacts, and
  superseded presentations from the commercial repository surface.

## [1.1.8] - 2026-07-29

### Added

- Expanded the QIHENG IPD presentation to five slides with a dedicated cover
  and closing page while preserving the three substantive workflow views.

### Changed

- Unified all presentation text, including Chinese copy, English identifiers,
  pinyin, and page markers, on Microsoft YaHei while retaining the established
  hierarchy, Huawei title lock, and high-density red-black-white visual system.

## [1.1.7] - 2026-07-29

### Added

- Added the generic `coding-agent` host for Claude Code-compatible products,
  including `codeagent` and `code-agent` aliases, environment-variable and
  common-directory discovery, safe ambiguity handling, and explicit
  `--skills-root` / `--agents-root` overrides for split layouts.

### Changed

- Unified the public Chinese brand as **齐衡 QIHENG**, inspired by
  《尚书·舜典》“在璇玑玉衡，以齐七政”, while retaining
  `DICWorkflowKit`, npm package names, plugin identity, and compatibility
  commands as stable technical identifiers.
- Added a single brand standard and carried the name origin, pinyin, meaning,
  and engineering mapping into the READMEs, CLI, offline guide, reports,
  plugin metadata, FAQ, presentation, and speaking guide.

## [1.1.6] - 2026-07-29

### Added

- Added an adaptive terminal flow diagram after interactive installation so
  users immediately see candidate freezing, feedback reruns, assurance,
  consistency signing, and two-stage admission closure.
- Added `qiheng guide` to generate a responsive, offline HTML swimlane from the
  same flow definition used by the console diagram.

## [1.1.5] - 2026-07-29

### Added

- Added six dedicated Subagents for specification quality, architecture,
  implementation quality, developer-test quality, continuous-integration
  gating, and repository admission.
- Added the `quality-consistency-gate` Skill so design-implementation
  consistency signing remains independent from the repository admission
  decision.
- Added candidate-bound `dic.agent-handoff.v1` records to Harness gate
  execution, including required-role enforcement, content hashes, status
  validation, and stale-handoff detection.
- Added `--handoff` to `harness-record` and `--for-admission` to
  `harness-check`, allowing the Harness to distinguish
  `READY_FOR_ADMISSION` from the final `READY` state.
- Added host-facing Skill metadata for the core workflow and knowledge Skills,
  completing the installable Skill/Subagent surface across Codex, Claude Code,
  OpenCode, MiMo Code, and BitFun.
- Added a two-slide IPD and QIHENG workflow presentation under `docs/`, with
  separate views for the reference IPD flow and the QIHENG delivery assurance
  flow.

### Changed

- Made every Harness gate declare its accountable Agent, collaborating Agents,
  and mandatory handoffs; the executive report now exposes responsibility and
  evidence/handoff counts.
- Reordered terminal assurance so frozen-candidate verification precedes
  evidence audit, consistency signing, and repository admission.
- Normalized Subagent terminal statuses to `PASS`,
  `PASS_WITH_FOLLOW_UP`, `BLOCKED`, `FAIL`, and `SKIPPED`.
- Clarified in the operating guide and READMEs that Skills provide reusable
  methods, Subagents own bounded decisions, and the Harness controls candidate
  identity, dependencies, invalidation, and admission closure.
- Refined BitFun permissions so write access is limited to artifact-producing
  roles while evidence-only gatekeepers retain read-only source access and
  receive execution permission only when required.
- Made release package inspection skip nested npm lifecycle scripts, preventing
  intermittent Windows file-lock failures when the already-built runtime is
  validated from inside the test suite.

## [1.1.4] - 2026-07-28

### Added

- Added an executable candidate-bound Delivery Assurance Harness with
  `harness-init`, `harness-record`, `harness-check`, and `harness-report`.
- Added cryptographic candidate passports over Git HEAD, tracked binary diff,
  untracked source hashes, and the project-profile hash.
- Added a 12-gate core design-to-delivery graph spanning authority, Spec,
  architecture, CI planning, DIC convergence, code, developer test,
  adversarial challenge, evidence audit, verification, and admission, plus
  profile-driven security, performance, reliability, concurrency,
  data-integrity, migration, and compatibility overlay gates.
- Added an executive Assurance Cockpit with coverage, blockers, Candidate
  Passport, Digital Thread visualization, and gate decision matrix.
- Added the `workflow-harness` Skill plus machine schemas for Harness Plans and
  Runs.
- Introduced the public brand **齐衡 QIHENG**, positioned as a Design Integrity
  Control Plane with the promise “Every design promise, proven in code.”
- Added the preferred `qiheng` CLI while retaining `dic-workflow-kit` as a
  backward-compatible command, npm distribution name, and plugin identity.
- Added profile-driven semantic consistency candidate ranking, the
  `semantic-conflict-auditor` and `impact-analyst` Subagents, and the
  `quality-cross-spec-consistency` and `knowledge-change-impact` Skills.
- Added seven risk-selective delivery quality Skills for specification, SR/AR, code, developer-test, CI, repository-admission, and unified quality review.
- Added candidate-bound governance objects (`Candidate`, `GateRun`, `Claim`,
  `Challenge`, `Counterexample`, `Waiver`, and `Policy`), typed relations,
  authorized Actions, and fail-closed PASS invariants.
- Added the read-only `adversarial-challenger` and `evidence-auditor` Subagents
  with risk-selective adversarial challenge and mandatory terminal evidence
  audit Skills.

### Changed

- Localized the Chinese README, plugin interface, command help, runtime errors,
  Harness Skill, and generated executive report with concise Chinese terms
  while preserving machine-facing commands, identifiers, and status codes.
- Made the version synchronization script tolerate READMEs that do not expose
  maintainer-only release command examples.
- Reorganized both READMEs around the ontology-governed evidence chain, a three-minute quick start, and task-oriented documentation navigation.
- Moved maintainer-only dual npm release procedures into `docs/RELEASING.md`.
- Reframed quality orchestration as a candidate-bound gate graph: imported
  Spec clearance, implementation, post-implementation DIC repair, affected-gate
  reruns, and pre-commit admission.
- Added explicit gate invalidation and repeatability semantics so a changed
  Spec, architecture, implementation, test, pipeline, or candidate cannot reuse
  stale decisions.
- Distinguished DIC consistency, specialist quality, and repository admission,
  with applicability, run history, invalidation reasons, and current evidence
  retained under `reports/quality/`.
- Removed named-project branches from reusable Quality Skills; repository-local
  policy is now discovered through the project profile and repository evidence.
- Organized roles into Lens, Forge, and Tribunal evidence responsibilities;
  orchestration selects a minimal panel rather than maximizing Agent count.

## [1.1.3] - 2026-07-28

### Added

- Added a portable ontology snapshot schema for typed objects, links, lifecycle, provenance, and invariant results.
- Added an auditable ontology action schema with role, scope, precondition, postcondition, evidence, and rollback fields.
- Added automatic OpenSpec-to-ontology snapshot generation and an `ontology-check` source helper command.
- Added computed PASS gates for source coverage, implementation disposition, validation coverage, and open blocking gaps.
- Added bundled `ontology-check`, `action-check`, and `action-record` runtime commands without publishing runtime source.
- Added append-only, SHA-256-addressed action audit records with idempotency and collision rejection.
- Added generic-project ontology initialization with candidate design sources.
- Added action-specific ontology patches for controlled object, link, and lifecycle effects.
- Added hash-verified, idempotent `ontology-reconcile` ledger replay with invariant-safe snapshot replacement.
- Added `ontology-query` views for uncovered obligations, open gaps, unevidenced validations, and bounded impact analysis.
- Added `ontology-drift` for content-hash change detection and incremental impact roots.
- Added canonical snapshot revisions and an integrity invariant for detecting direct semantic edits.
- Added optimistic concurrency protection for snapshot replacement during reconciliation.
- Added `ontology-plan` to map design-source drift and impact neighborhoods to minimal Agent-stage reruns.
- Added first-class English and Chinese Gherkin ingestion for Feature, Background, Scenario, Scenario Outline, Examples, tags, and source anchors.
- Added `ontology-explain` for object provenance, direct relations, and bounded evidence-chain inspection.
- Added a BDD adapter and strengthened the `knowledge-bdd` operating contract.
- Added `ontology-report` for a generated, high-density Markdown view of current semantic state.
- Added content-addressed ontology attestations bound to snapshot revision, action ledger, source hashes, and gate results.
- Added `ontology-attestation-check` to reject stale or tampered final evidence.
- Added sequence-numbered v2 action-ledger hash chains with v1-prefix compatibility.
- Added Snapshot-revision binding for newly recorded actions and optional authored `expectedSnapshotRevision` checks.
- Added `ontology-ledger-check` for chain head, record counts, and full-ledger digest inspection.
- Added external Attestation anchoring through `ontology-attestation-check --expected-hash`.
- Added `ontology-evidence-check` for content-addressed validation artifact verification.
- Added Evidence artifact hashes to final Attestations and generated ontology reports.
- Added `ObserveImplementation` to distinguish existing-code observation from repair output.
- Added `ontology-implementation-check` for content-addressed implementation verification.
- Added Validation input causality: each run binds its consumed DesignSource and ImplementationUnit hashes.
- Added `ontology-validation-check`; stale or incomplete validation inputs now block PASS and invalidate Attestations.
- Added ImplementationUnit hashes to final Attestations and generated ontology reports.
- Added an installation manifest with SHA-256 hashes for every managed file.
- Added `doctor` to verify installed files and Codex marketplace registration.
- Added safe `uninstall` for every supported host.
- Added `--json` output for installation lifecycle automation.
- Added collision, tamper detection, forced recovery, and Codex unregister tests.

### Changed

- Moved Skill version markers into standards-compliant `metadata.version` while preserving release synchronization and legacy-install recognition.
- Reframed Subagent responsibilities as bounded ontology reads, proposals, actions, and evidence attachments.
- Added the ontology snapshot to the required workflow evidence and final artifacts.
- Added role/action, target type, terminal condition, evidence, and protected-path enforcement.
- Completed actions now require a non-empty, action-authorized ontology patch instead of direct snapshot edits.
- PASS now rejects changed, missing, or out-of-project tracked design sources.
- PASS now also rejects untracked design sources that lack a recorded content hash.
- Final review now treats prose as a generated ontology view and requires attestation verification before publication.
- New actions must be reconciled before another action can be recorded, preventing ambiguous multi-action base revisions.
- `VERIFIED_BY` now counts only current Validation objects whose status is `PASS`.
- `AttachEvidence` now requires a real project-relative artifact, SHA-256 provenance, and the `ContentAddressed` interface.
- PASS now rejects missing, changed, untracked, inactive, or out-of-project required Evidence artifacts.
- Ontology commands now separate the workflow evidence root from `snapshot.projectRoot`.
- Content checks now resolve real paths and reject symlink escapes and non-file artifacts.
- `IMPLEMENTED_BY` now counts only current ImplementationUnit objects.
- `ObserveImplementation` and `ApplyRepair` now require real, content-addressed implementation files.
- PASS now rejects missing, changed, untracked, inactive, invalid, or out-of-project required implementation artifacts.
- `ontology-plan` now selects different minimal recovery stages for design, implementation, and Evidence drift.
- Install now refuses to overwrite unmanaged or locally modified files unless `--force` is explicitly supplied.
- Uninstall now refuses to remove modified managed files unless `--force` is explicitly supplied.
- Install treats symbolic links and non-file targets as conflicts to prevent writes escaping managed roots.
- Codex uninstall preserves all unrelated personal marketplace entries.

## [1.1.2] - 2026-07-28

### Added

- Added native BitFun installation for user and project scopes.
- Added BitFun-specific Subagent frontmatter conversion using its `schema_version: 1` custom-agent contract.
- Added isolated BitFun installation, directory mapping, and least-privilege runtime-tool permission tests.

### Changed

- Extended version synchronization to keep BitFun adapter installation examples aligned with each release.

## [1.1.1] - 2026-07-27

### Added

- Added this changelog.
- Added complete Chinese and English user guides covering installation, workflow prompts, OpenSpec Change usage, output interpretation, and troubleshooting.

### Changed

- Made the unscoped `npx dic-workflow-kit@<version>` command the recommended one-shot installation entry for consistent Windows behavior.
- Updated version synchronization so both scoped and unscoped npm examples advance with each release.

### Security and packaging

- Kept the npm release as a runtime-only package: no development CLI source, Python helper, tests, release scripts, PowerPoint files, temporary files, or source maps.
- Retained only the minified installer runtime and the Skills, Subagents, schemas, adapters, manifests, and user documentation required to use the kit.

## [1.1.0] - 2026-07-27

### Added

- Added one npm installer for Codex, Claude Code, OpenCode, and MiMo Code.
- Added user-level and project-level installation for supported hosts.
- Added host-specific Subagent frontmatter adaptation.
- Added convergent dual publishing for `dic-workflow-kit` and `@tonyclaw/dic-workflow-kit`.
- Added isolated installation tests for all four hosts.

### Changed

- Promoted the package from a Codex-only installer to a multi-host runtime.
- Published the CLI as a minified runtime and removed development source files from npm artifacts.

## [1.0.0] - 2026-07-27

### Added

- Initial npm release.
- Included seven workflow and knowledge Skills.
- Included nine evidence-producing Subagents.
- Added Codex personal marketplace installation.
- Added OpenSpec intake, obligation extraction, BDD knowledge, repair planning, validation, and final evidence contracts.
