Skip to content

fix: harden forge-global and always-on-guidance skills for compression resilience - #59

Open
jflowers wants to merge 2 commits into
unbound-force:mainfrom
jflowers:opsx/harden-skill-compression
Open

fix: harden forge-global and always-on-guidance skills for compression resilience#59
jflowers wants to merge 2 commits into
unbound-force:mainfrom
jflowers:opsx/harden-skill-compression

Conversation

@jflowers

@jflowers jflowers commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Restructures two embedded skill files to improve constraint survival under DCP context compression, addressing six specific vulnerabilities identified in #51.

forge-global: Replaces parallel "do/don't" lists with a decision table (Signal/Forge/Skip columns), inlines TTL parameter into the reservation step, and adds temporal ordering markers (FIRST/THEN/FINALLY) to protocol steps.

always-on-guidance: Adds a dedicated ## Critical Safety section for safety-critical rules, moves hivemind_find from last to first position in Tool Usage, and splits Code Quality/Testing/Error Handling lists into sub-headed groups of 2-3 items each.

All changes are structural reorganization -- no rules were added, removed, or weakened.

Closes #51

How to Test

# Build passes (embedded content compiles via go:embed)
make build

# All tests pass including agentkit tests (file existence, count, frontmatter)
make test

# Verify semantic equivalence
git diff main -- internal/agentkit/content/skills/

Acceptance criteria from specs:

  • Critical Safety section appears before all other rule sections
  • Decision table has Signal/Forge/Skip columns with all 6 original criteria
  • Each protocol step contains a temporal marker (FIRST/THEN/FINALLY)
  • hivemind_find is the first item in Tool Usage
  • TTL is inlined into the comms_reserve call (no standalone TTL bullet)
  • All sub-lists contain no more than 3 items

How to Demo

Inspect the restructured skill files:

cat internal/agentkit/content/skills/forge-global/SKILL.md
cat internal/agentkit/content/skills/always-on-guidance/SKILL.md

Compare the decision table format in forge-global and the sub-headed groups in always-on-guidance against the original flat list structure.

Key Files Changed

File Description
internal/agentkit/content/skills/forge-global/SKILL.md Decision table, inline TTL, temporal ordering
internal/agentkit/content/skills/always-on-guidance/SKILL.md Critical Safety section, repositioned hivemind_find, sub-headed groups
.opencode/skills/forge-global/SKILL.md Synced with canonical embedded source
.opencode/skills/always-on-guidance/SKILL.md Synced with canonical embedded source
openspec/changes/harden-skill-compression/* OpenSpec artifacts (proposal, design, specs, tasks)

This PR was generated by /uf.finale (AI-assisted).

…n resilience

Restructure two embedded skill files to improve survival under DCP
context compression, addressing six specific vulnerabilities (unbound-force#51):

- Replace parallel do/don't lists with decision table in forge-global
- Inline TTL parameter into reservation step, add temporal ordering
- Add Critical Safety section in always-on-guidance for safety rules
- Move hivemind_find from last to first position in Tool Usage
- Split Code Quality, Testing, Error Handling into sub-headed groups
- Sync .opencode/skills/ copies with canonical embedded source

No semantic changes to any rules -- structural reorganization only.

Closes unbound-force#51

Assisted-by: claude-opus
Generated with AI assistance (claude-opus)
@jflowers
jflowers requested a review from a team as a code owner August 2, 2026 20:35
@jflowers
jflowers requested a review from yvonnedevlinrh August 2, 2026 20:50
@jflowers jflowers self-assigned this Aug 2, 2026
@jflowers jflowers moved this to In Review 👀 in Unbound Force Planning Aug 2, 2026

@sonupreetam sonupreetam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Council

Ran the review council (6 Divisor agents). The restructuring patterns (decision table, temporal markers, priority positioning) are sound but needs structural tests and drift detection.

Cross-PR note: The Curator filed a blog opportunity issue for the prompt hardening methodology: unbound-force/website#198.


## Critical Safety

- Never force push to main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] Inconsistent keyword casing

Suggested change
- Never force push to main
- NEVER force push to main

All other PRs in this batch use uppercase RFC 2119 keywords (MUST, NEVER, ALWAYS) as a core hardening technique. This uses lowercase "Never" — inconsistent with the pattern.

3. Set `ttl_seconds` to auto-release after timeout
4. Always release when done: `comms_release(paths=[...])`
5. Coordinator can emergency release: `comms_release_all()`
1. FIRST, workers MUST call `comms_reserve(paths=[...], ttl_seconds=300)` before editing any files — reservations are exclusive by default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] Hardcoded TTL without explanation

The original said "Set ttl_seconds to auto-release after timeout" (generic guidance). This prescribes ttl_seconds=300 without explaining why 300 seconds.

Consider adding a brief note, e.g.:

Suggested change
1. FIRST, workers MUST call `comms_reserve(paths=[...], ttl_seconds=300)` before editing any files — reservations are exclusive by default
1. FIRST, workers MUST call `comms_reserve(paths=[...], ttl_seconds=300)` before editing any files (5-minute auto-release) — reservations are exclusive by default


Rules that apply to every coding session.

## Critical Safety

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] No structural tests for either skill file

PRs #54, #57, #58 add structural tests. This PR restructures 4 files with specific structural properties (Critical Safety positioning, decision table format, temporal markers, list size reduction) but adds no tests. The spec defines 6 testable requirements.

Please add structural tests:

  • always-on-guidance: ## Critical Safety exists and appears before ## Tool Usage Discipline, hivemind_find is first item in Tool Usage
  • forge-global: decision table format exists (contains | Signal |), temporal markers (FIRST/THEN/FINALLY) in reservation protocol, ttl_seconds inlined in step 1

Also add a drift detection test verifying both embedded/opencode copies are byte-identical (TC-007).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review 🏁

Development

Successfully merging this pull request may close these issues.

bug: forge-global and always-on-guidance skills contain compression-vulnerable decision logic and quality rules

2 participants