Skip to content

perf(bootstrap): compact JSON for agents; trim SKILL.md reference sections (TASK-2021)#873

Merged
xarmian merged 1 commit into
mainfrom
perf/task-2021-compact-bootstrap-json
Jul 8, 2026
Merged

perf(bootstrap): compact JSON for agents; trim SKILL.md reference sections (TASK-2021)#873
xarmian merged 1 commit into
mainfrom
perf/task-2021-compact-bootstrap-json

Conversation

@xarmian

@xarmian xarmian commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

TASK-2021

Part A — compact bootstrap JSON (primary)

pad bootstrap --format json now emits compact (no-indent) JSON via a new cli.PrintJSONCompact helper. Its canonical consumer is the /pad agent 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 global cli.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.md to on-demand pointers. The load-bearing core behavior (ask-role-on-context-load, auto-filter, the status=active activation 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

  • No MCP tool-surface change → ToolSurfaceVersion unchanged.
  • Gates green: golangci-lint (0 issues), go test ./..., go build. Compact output verified as single-line valid JSON; markdown path verified.

https://claude.ai/code/session_019knGmnHcx5rrgWXQ8V8DZS

…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
@xarmian xarmian merged commit 7aa5cb9 into main Jul 8, 2026
3 of 4 checks passed
@xarmian xarmian deleted the perf/task-2021-compact-bootstrap-json branch July 8, 2026 19:08
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