Skip to content

chore(specs): land the stranded spec-regression-guard + DM-encryption ADR work - #327

Merged
ZhangHanDong merged 4 commits into
mainfrom
fix/dm-encryption-default
Aug 18, 2026
Merged

chore(specs): land the stranded spec-regression-guard + DM-encryption ADR work#327
ZhangHanDong merged 4 commits into
mainfrom
fix/dm-encryption-default

Conversation

@ZhangHanDong

Copy link
Copy Markdown

Summary

Rescues work that was stranded on fix/dm-encryption-default: PR #321 was merged with this branch as its base instead of main, so its content (3 commits, 20 files, +582 lines) never actually landed — which is also why GitHub kept highlighting this branch with a "Compare & pull request" banner after #320 merged.

Content (docs/tooling only, no runtime code):

  • scripts/spec-guard.sh + specs/structure-guards.txt — spec regression gate
  • specs/capabilities/dm-encryption.spec.md — capability spec for the DM-encryption behavior shipped in fix(dm): encrypt ordinary-user DMs; plaintext only for identified bots (#306) #320
  • knowledge/ — ADR-001 (DM encryption), LEP/REQ templates, canon artifact types
  • spec-guard tweak: don't hold project.spec.md to the task-level lint bar

The #320 code itself is already in main; this PR's diff is purely the #321 payload.

Testing

Docs/tooling only. scripts/spec-guard.sh can be smoke-run locally; no app testing needed.

🤖 Generated with Claude Code

ZhangHanDong and others added 4 commits August 18, 2026 18:09
…yption

Make the #306 invariants durable and mechanically enforced:

- `knowledge/` workspace (`agent-spec init --workspace`) with ADR-001
  "New direct messages are encrypted unless the target is a positively
  identified bot" (status: Accepted).
- `specs/capabilities/dm-encryption.spec.md`: long-lived capability spec
  carrying Rules dm-enc-1/dm-enc-2 (7 scenarios incl. 3 property tests),
  `satisfies: [ADR-001]`; `agent-spec trace ADR-001 --gate` → honored.
- `scripts/spec-guard.sh`: the single gate for pre-commit and CI —
  lint changed specs, structural guards (`specs/structure-guards.txt`),
  capability specs must fully pass + ADR liveness gate, changed task specs
  verified with the change set, all others as regression (tests only,
  `manual_test_*` skips tolerated). Mutation-checked: reverting the #306
  fix turns the gate red at all three levels.
- `.githooks/pre-commit` (opt-in via `git config core.hooksPath .githooks`),
  CI job `spec_gate` (`cargo test --lib` + spec-guard against the PR base),
  CODEOWNERS for `specs/**` and `knowledge/**`, CLAUDE.md docs.
- `.gitignore`: track `.agent-spec/config.yaml`, keep runtime state ignored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t bar

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…on-guards

chore(specs): spec regression gate, capability spec + ADR-001 for DM encryption
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

# Conflicts:
#	.github/workflows/main.yml
@ZhangHanDong
ZhangHanDong merged commit b047d43 into main Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant