Skip to content

chore: add protect tags to slash command files for DCP context preservation - #222

Merged
jflowers merged 4 commits into
unbound-force:mainfrom
jflowers:opsx/dcp-protect-tags
Aug 16, 2026
Merged

jflowers merged 4 commits into
unbound-force:mainfrom
jflowers:opsx/dcp-protect-tags

Conversation

@jflowers

Copy link
Copy Markdown
Collaborator

Summary

Add <protect> tags to three scaffolded slash command files to prevent DCP (Dynamic Context Pruning) from compressing execution-critical sections during long sessions.

Changes

File Protect Regions What's Protected
gaze-fix.md 3 Workflow detection, batch remediation pipeline (Steps 1-4), error handling
speckit.testreview.md 2 Operating constraints (read-only, constitution authority), execution steps + operating principles
gaze.md 1 Delegation instructions to gaze-reporter

What's NOT protected (reconstructible)

  • Usage examples and option tables
  • Report format templates
  • Descriptions and background context

Testing

  • Added TestProtectTagPlacement — table-driven test verifying 5 dimensions per file: tag count, balanced pairs, no frontmatter tags, no nesting, own-line placement
  • All existing tests pass (drift detection, file delivery, manifest)
  • CI parity: go build, go test -race -count=1 -short ./..., golangci-lint run all pass

Scaffold Delivery

  • gaze-fix.md and speckit.testreview.md are tool-owned → existing projects receive updates via gaze init
  • gaze.md is user-owned → only new projects receive the protect-tagged version

Spec Artifacts

OpenSpec change at openspec/changes/dcp-protect-tags/ (proposal, design, specs, tasks).

Closes #221

Add proposal, design, specs, and tasks for GitHub issue unbound-force#221.
Adds <protect> tags to 3 slash command files for DCP context
preservation. Reviewed by all four council members (APPROVE).
…vation

Add <protect> tags to three scaffolded slash command files to prevent
DCP (Dynamic Context Pruning) from compressing execution-critical
sections during long sessions:

- gaze-fix.md: 3 protect regions (workflow detection, batch pipeline,
  error handling)
- speckit.testreview.md: 2 protect regions (operating constraints,
  execution steps + operating principles)
- gaze.md: 1 protect region (delegation instructions)

Add TestProtectTagPlacement to scaffold_test.go verifying tag count,
balanced pairs, no frontmatter tags, no nesting, and own-line placement.

Closes unbound-force#221
Move protect tags to wrap the full body (everything after YAML
frontmatter) of each command file rather than selectively protecting
individual sections. Report templates and other content that was
previously left unprotected is used downstream and must survive
DCP compression.

- gaze-fix.md: 3 protect regions → 1 (full body)
- speckit.testreview.md: 2 protect regions → 1 (full body)
- gaze.md: protect region extended to cover full body
- TestProtectTagPlacement: updated expected counts to 1 pair each
@jflowers
jflowers force-pushed the opsx/dcp-protect-tags branch from b23eafc to d86666f Compare August 16, 2026 16:40
@jflowers
jflowers merged commit 54be159 into unbound-force:main Aug 16, 2026
5 checks passed
@jflowers
jflowers deleted the opsx/dcp-protect-tags branch November 15, 2026 21:34
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.

chore: add <protect> tags to slash command files for DCP context preservation

1 participant