Skip to content

perf(skill): split artifact guidance into focused references - #9350

Closed
kaoru0822-kitauji wants to merge 5 commits into
mainfrom
codex/context-skill-entry
Closed

kaoru0822-kitauji wants to merge 5 commits into
mainfrom
codex/context-skill-entry

Conversation

@kaoru0822-kitauji

@kaoru0822-kitauji kaoru0822-kitauji commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Related to #8084. First of two focused skill-context changes; follows the compatibility and measurement lessons in #7127, #9046, #9151 and #7228.

At the original baseline, a firmware or archive task loaded an 835-line native guide. Move its offline format, package and firmware sections into three condition-named references. Every original native-guide paragraph is preserved (whitespace-normalized comparison), and old file/heading links forward to the new owners. Native lifecycle/annotation guidance remains in its original file. No new target authority or MCP contracts.

Setup, doctor, uninstall and installed-guidance search share the extended managed-file inventory. The setup test now compares that inventory with every packaged Markdown file, verifies installed bytes, backups, idempotency and local links, and computes conformance commitments from the same owner. Added four installed-guidance retrieval cases. Generated skill metadata advances to 61; ignored outputs are regenerated, not committed.

Text-only context comparison against main 72d5e72e6, tokenx 1.3.0 estimates, summing authored SKILL.md plus the complete selected guide:

Selected guide Before After
Native 23,844 17,809
Raw / ESP 23,844 11,415
Archives 23,844 11,932
Offline formats 23,844 14,942

The entry grows 133 estimated tokens temporarily to expose the new paths; the follow-up shortens it. Counts exclude unchanged MCP definitions, arguments and results, filesystem-tool wrappers and model reasoning. These are conditional read-path estimates, not observed agent consumption or proof of routing quality. A bounded single-process counter read all nine before/after paths: first pass 33.75 ms wall / 40.69 ms user+system CPU / 65.70 MiB peak RSS; warm in-process pass 23.15 ms / 23.40 ms CPU / 67.36 MiB cumulative peak. There are no child processes in this counter, so its peak is also the process-family peak. Filesystem caches were not flushed. These numbers profile the text counter, not REA analysis. No analysis-time or whole-agent CPU/memory benefit is claimed.

Executed with Node 24.22.1 and npm 11.16.0:

  • npm run build:cached, npm run check:fast, npm run docs:check — passed (9 README consistency cases).
  • npm run test:focused -- tests/boundary/filesystem/setupSkill.test.ts tests/boundary/filesystem/generatedSkill.test.ts tests/boundary/guidanceSearch.test.ts tests/acceptance/setup/selectedSkillSetup.test.ts — 38/38 passed.
  • git diff --check — passed.
  • The optional skill-creator Python validator could not start because PyYAML is unavailable; repository frontmatter, generation and installed-link checks passed instead.

Automated review found that duplicate forwarding headings won guidance-search ranking. Consolidated those pointers under explicit legacy anchors, leaving the substantive sections as the heading owners. First-result assertions now cover raw/Cortex-M, ESP, Bun and PE-import queries; the Bun assertion reproduced the final leftover forwarding section before its correction. The inventory comparison now normalizes the OS path separator. The affected 25 setup/search cases passed across the focused reruns; docs and pre-push typecheck/lint also passed.

macOS arm64 only. Real Ghidra/IDA/Hopper and model routing are not verified in this preparatory change. No lifecycle implementation changes; existing cleanup regressions remain intact. Scope decision: not applicable, documentation/packaging within existing capabilities.

Latest integration: merged main 8358cfcab3 into 4ca8ff52ab, preserving its desktop-build reference and Go static-string guidance in the moved format owner. Managed metadata is version62. build:cached, typecheck/lint, and all25 focused setup/routing tests passed after the merge. No MCP-owned files differ from the pinned base.

Author readiness

Human owner: @kaoru0822-kitauji

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Splits artifact guidance into focused references and shortens SKILL.md into a routing entry point.

  • The skill routes each task to a focused guide.
  • Artifact and workflow topics live in focused guides with links to their new owners.
  • Setup and packaging include every managed reference in the installed skill.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Authored entry and references"] --> G["Generate and pin commands"]
  G --> P["Packaged skill"]
  P --> S["Setup and freshness checks"]
  P --> Q["Guidance search"]
  M["MANAGED_SKILL_FILES"] --> S
  M --> Q
  M --> U["Uninstall"]
Loading

Reviews (4) · Last reviewed commit: "perf(skill): load target guidance throug..." · Reviewed by Greptile

kaoru0822-kitauji and others added 2 commits November 9, 2026 03:35
* perf(skill): load target guidance through a concise entry point

* fix(skill): keep recovery and capture guidance reachable

* fix(skill): preserve native guide bookmarks across renderers

* fix(skill): keep the managed anchor in its owning section

* docs(skill): explain CLI summary export envelopes

* chore(skill): retain upstream test formatting

Copy link
Copy Markdown
Collaborator Author

Maintenance claim for this session (2026-11-12): I am updating this PR in a fresh isolated worktree, merging current main a8527d4 into codex/context-skill-entry, reviewing existing feedback and preserving its focused scope. I will push normally after checking the remote head and refresh validation evidence. Please coordinate here before concurrent edits to this branch.

@morluto morluto added area: evidence Evidence, artifacts, and reconstruction performance Performance regressions, scaling limits, and bounded-resource work labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction performance Performance regressions, scaling limits, and bounded-resource work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants