Skip to content

docs: sync SKILL.md permissions with actual file access + fix session notes#30

Merged
stozo04 merged 1 commit into
mainfrom
docs/skill-md-permissions-sync
Jul 6, 2026
Merged

docs: sync SKILL.md permissions with actual file access + fix session notes#30
stozo04 merged 1 commit into
mainfrom
docs/skill-md-permissions-sync

Conversation

@stozo04

@stozo04 stozo04 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

What

Fixes four advertised-vs-actual gaps found reviewing SKILL.md against the code, and pins the permissions block with a new immutable guard test.

SKILL.md corrections

  1. files.read now declares the working-directory .env — the loader reads it via godotenv.Read() (internal/config/config.go), but the permissions block never advertised the read. The entry notes the safeguard: only SPEEDIANCE_* keys are consulted, parsed to a map, never exported into the process environment.
  2. files.write now declares config.jsonconfig set writes it (internal/cli/config.go setConfigKey, 0600), but the write block only listed the token cache and library.json.
  3. "Empty shape" bullet corrected — it flatly claimed detail is [] for kind:"free", contradicting the doc's own table: a guided free-namespace session (e.g. Aerobic Rowing) has a populated detail. An agent reading only that bullet would skip real rowing data.
  4. Auto-detection note matches the real probe ordersession <id> defaults program-first, but today picks each session's probe order from the record list's authoritative type (free-first for non-program types, api.modeForType). Output shape is identical; the sentence now says so accurately.
  5. (nit) The library section states that --search still saves the full catalog to --out — the write was always announced on stderr but not obvious from the examples.

Guard test

TestSkillDocAdvertisesFileAccess (internal/config/skill_doc_test.go) extends the §0 advertised == actual guard from env vars to the files.read/files.write permissions lists: any real file access missing from the block fails the build. Same negative-assertion pattern as TestSkillDocAdvertisesEveryEnvVar; verified red when an entry is removed, green as committed.

Verification

  • go build ./... && go vet ./... && go test -race ./... all pass; gofmt -l clean.
  • Guard verified load-bearing: deleting the config.json files.write entry turns the test red.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A8iTURjzM2PCGj1AAZx2GZ

… notes

The permissions block under-declared two real capabilities: the loader
reads a working-directory .env (allowlisted SPEEDIANCE_* keys only) and
config set writes config.json. Both are now advertised, keeping
advertised == actual (CLAWHUB_STANDARDS section 4, CLI_CONVENTIONS
section 0).

Also corrects three consumer notes: the "Empty shape" bullet no longer
claims kind:"free" detail is always [] (guided free sessions populate
it, per the doc's own table), the auto-detection note now matches
today's type-driven free-first probe order, and the library section
states that --search still saves the full catalog.

TestSkillDocAdvertisesFileAccess pins the permissions block: a real
file read/write missing from files.read/files.write now fails the
build, the same negative-assertion pattern as the env-var guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8iTURjzM2PCGj1AAZx2GZ
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@stozo04 stozo04 merged commit 7857392 into main Jul 6, 2026
2 checks passed
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