perf(bootstrap): compact JSON for agents; trim SKILL.md reference sections (TASK-2021)#873
Merged
Merged
Conversation
…tions Part A: `pad bootstrap --format json` now emits compact (no-indent) JSON via a new cli.PrintJSONCompact helper. Its canonical consumer is the /pad agent skill; pretty-print indentation was ~29% of the payload (49696 -> 35118 bytes on this workspace, saving 14578 bytes). Humans keep --format markdown. Part B (conservative): condense the Role Awareness section and the playbook-authoring guidance in skills/pad/SKILL.md to on-demand pointers, keeping the load-bearing core behavior + activation gotcha inline and ALL routing behavior intact. Saves 2764 bytes of fixed per-session overhead. No MCP tool-surface change; ToolSurfaceVersion unchanged. Claude-Session: https://claude.ai/code/session_019knGmnHcx5rrgWXQ8V8DZS
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.
TASK-2021
Part A — compact bootstrap JSON (primary)
pad bootstrap --format jsonnow emits compact (no-indent) JSON via a newcli.PrintJSONCompacthelper. Its canonical consumer is the/padagent skill, and pretty-print indentation was ~29% of the payload.Measured on this workspace: 49696 → 35118 bytes = 14578 bytes saved (29.3%) per bootstrap call.
Humans keep the readable view via
pad bootstrap --format markdown. The globalcli.PrintJSON(indented) is untouched, so every other command's JSON output is unchanged.Part B — SKILL.md trim (conservative)
Condensed the Role Awareness section and the playbook-authoring guidance in
skills/pad/SKILL.mdto on-demand pointers. The load-bearing core behavior (ask-role-on-context-load, auto-filter, thestatus=activeactivation gotcha) and all routing behavior stay inline; only the elaborated per-verb examples / exact CLI flags move to on-demand (pad role --help,pad item create playbook --help, web UI). Saves 2764 bytes of fixed per-session overhead. Deliberately conservative to avoid degrading skill function.Notes
ToolSurfaceVersionunchanged.go test ./...,go build. Compact output verified as single-line valid JSON; markdown path verified.https://claude.ai/code/session_019knGmnHcx5rrgWXQ8V8DZS