Add reusable stack-health harness and one-switch privacy mode for agent-pack auditing #767
Open
opencoca wants to merge 15 commits intogarrytan:mainfrom
Open
Add reusable stack-health harness and one-switch privacy mode for agent-pack auditing #767opencoca wants to merge 15 commits intogarrytan:mainfrom
opencoca wants to merge 15 commits intogarrytan:mainfrom
Conversation
…alth harness documentation and CLI functionality
…; update README with usage instructions
…EADME for clarity on .env usage and account state mounting
…TH_TOKEN and service-specific auth handling
…ore command, and update README for clarity on usage
…nd new make command for interactive usage
…cal-only state and secrets
…kefile and package.json
…lation and update README with security check commands
…OS with current focus and future planning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a config-driven Health Harness for auditing agent packs (skill packs,
prompt packs, tool bundles, browser automation) against three categories of risk:
hype, coercive urgency, dependency-building copy
It also introduces a one-switch
network_egress offmode that hard-disables allhosted egress paths while preserving local-only analytics and local health checks.
Why a harness (not just one-off grep)
Agent packs are prompt-heavy, generation-heavy codebases where:
Dark patterns compound silently. A preamble resolver injects persuasion copy
into every generated SKILL.md. A single manipulation pattern in a shared template
propagates to dozens of skills. Grep catches one instance; the harness catches the
propagation rule.
Integrity checks are already scattered. Freshness checks, touchfile consistency,
and audit dry-runs exist but run in separate test tiers. The harness unifies them
under one
bun run stack:healthentry point with--json,--strict-warnings,and
--only <check-id>filtering.Policy debt needs a ratchet, not a cliff. Not every finding is an immediate
blocker. The harness supports
warn→errorseverity promotion so you canreport debt on day one and enforce it incrementally as cleanup lands.
Reuse across packs. The harness accepts
--rootand--configflags to auditany pack from a single checkout. The portable unit is
scripts/stack-health.ts+stack-health.config.json. An example config for a generic agent pack is includedin
docs/examples/.Why
masteris needed on the forkThe upstream repo uses
mainas its default branch. This fork maintains bothmain(tracking upstream) andmasterfor two reasons:Continuous Deployment (CD) target.
masterserves as the fork's own stabledeployment branch — the audited, harness-passing state that gets installed into
~/.claude/skills/gstack/. Upstreammainmoves independently and may introducenew egress surfaces or policy regressions between audits.
masteronly advanceswhen the harness passes and the delta has been reviewed.
Record master / audit trail.
masteracts as the canonical record of whathas been reviewed and cleared. Each advance of
masterrepresents a deliberatedecision: "this state has passed integrity checks, egress audit, and manipulation-
pattern policy." It's the branch you point compliance and audit tooling at and not
the fast-moving upstream
mainthat may contain unreviewed changes.