Use host-generic graphify skill instructions#1530
Conversation
Implemented Delta - Replaced literal `skill` tool invocation wording in the Codex AGENTS always-on template, generated artifact, expected snapshot, registration helper, and translated README examples. - Added regression coverage for the AGENTS template and `_skill_registration()` helper so `skill: "graphify"` wording does not return. - Narrowed the always-on historical roundtrip exception to the exact approved agents-md sentence replacement. - Made skillgen git blob reads decode as UTF-8 explicitly for Windows. Decision Path - The bad wording is generated by Graphify install surfaces, so the fix belongs upstream instead of patching downstream repositories. - The AGENTS template source, packaged output, and expected artifact were updated together to keep skillgen checks coherent. - The roundtrip guard remains strict except for the one intentional sentence delta. Discarded Candidates - Downstream per-repo AGENTS patches were rejected because `graphify codex install` would regenerate the bad text. - A file-level agents-md roundtrip exemption was rejected because it could hide unrelated drift. - Translation rewrites were rejected; the stale lines were English code-block examples, so literal replacement was sufficient. Failure Modes - Full local pytest over `tests/test_install_strings.py tests/test_install.py tests/test_skillgen.py` has pre-existing Windows/source-checkout failures unrelated to this patch: pytest import/source artifact, Windows path separator assertion, and missing installed package metadata causing `__version__` to be `unknown`. - Git emits LF-to-CRLF warnings in this Windows checkout because global `core.autocrlf` is enabled. Verification - `graphify query "How does tests/test_skillgen.py check always_on_roundtrip and agents-md generated artifacts?"` - `python -m pytest tests/test_skillgen.py::test_always_on_roundtrip_is_byte_faithful -q` - `python -m pytest tests/test_install_strings.py -k "agents_section or skill_registration"` - `python -m pytest tests/test_install.py -k agents_install` - `python -m pytest tests/test_skillgen.py -k always_on` - `python -m tools.skillgen --check` - `rg -n 'invoke the Skill tool|invoke the `skill` tool|skill: "graphify"|`skill` tool' -S . --glob '!tests/**' --glob '!graphify-out/**' --glob '!.git/**'` - `git diff --check` - `graphify update .` - `git diff --cached --name-only` Current-State Snapshot - Branch `icarus/fix-codex-agents-template-pr` is based on `upstream/v8`. - Staged and committed scope is limited to ten intended tracked files. - `graphify update .` completed; HTML visualization was skipped because the graph has more than 5,000 nodes. Provenance-Type: bugfix Blocked-Workflow: not-applicable Environment-Cause: windows-line-ending-warnings Package-Intent: keep:graphifyy Install-Command: not-applicable Verification-Command: python -m pytest tests/test_install_strings.py -k "agents_section or skill_registration" Returned-To-Task: true Affects-Package: graphifyy Affects-Workflow: codex-install
Generated install/skill guidance told agents to invoke a literal `skill` tool with `skill: "graphify"`, which is host-specific and not valid in every environment. The always-on AGENTS fragment, packaged artifact, expected snapshot, and _skill_registration() output now use host-generic wording: "use the installed graphify skill or instructions". Also decodes skillgen git blob reads as UTF-8 for Windows and replaces stale English code-block examples in the translated READMEs. The always-on roundtrip guard deliberately freezes the v8 baseline, so an intentional wording change would otherwise fail it. Rather than only patching the pytest mirror (which left the blocking CLI guard --always-on-roundtrip red, as the original PR did), this adds an explicit, reviewable ALWAYS_ON_SANCTIONED_EDITS registry: the guard applies the approved old->new substitution to the baseline before the byte-for-byte compare, so this exact sentence is allowed while any other drift still fails. CLI guard and pytest test now agree and CI passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Merged into One thing I had to add before it could land: the change passed |
Covers #1499 (Ruby type-aware resolution), #1308/#1541 (workspace exports map), #1529 (alias/workspace import-edge regression), #1531 (tsconfig paths fallbacks), #1527 (semantic cache pruning), #1475 (three ObjC fixes), #1533 (Swift static-call confidence), #1442 (secondary LLM timeout), #1502 (GraphML null coercion + save-result --answer-file), #1530 (host-generic skill wording), and the Dependabot dep bumps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…#1530) Generated install/skill guidance told agents to invoke a literal `skill` tool with `skill: "graphify"`, which is host-specific and not valid in every environment. The always-on AGENTS fragment, packaged artifact, expected snapshot, and _skill_registration() output now use host-generic wording: "use the installed graphify skill or instructions". Also decodes skillgen git blob reads as UTF-8 for Windows and replaces stale English code-block examples in the translated READMEs. The always-on roundtrip guard deliberately freezes the v8 baseline, so an intentional wording change would otherwise fail it. Rather than only patching the pytest mirror (which left the blocking CLI guard --always-on-roundtrip red, as the original PR did), this adds an explicit, reviewable ALWAYS_ON_SANCTIONED_EDITS registry: the guard applies the approved old->new substitution to the baseline before the byte-for-byte compare, so this exact sentence is allowed while any other drift still fails. CLI guard and pytest test now agree and CI passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Covers Graphify-Labs#1499 (Ruby type-aware resolution), Graphify-Labs#1308/Graphify-Labs#1541 (workspace exports map), Graphify-Labs#1529 (alias/workspace import-edge regression), Graphify-Labs#1531 (tsconfig paths fallbacks), Graphify-Labs#1527 (semantic cache pruning), Graphify-Labs#1475 (three ObjC fixes), Graphify-Labs#1533 (Swift static-call confidence), Graphify-Labs#1442 (secondary LLM timeout), Graphify-Labs#1502 (GraphML null coercion + save-result --answer-file), Graphify-Labs#1530 (host-generic skill wording), and the Dependabot dep bumps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Purpose
Fix Graphify-generated install guidance so Codex/agent-facing surfaces do not tell hosts to invoke a literal
skilltool withskill: "graphify". The generated wording now stays host-generic and points users to the installed graphify skill or instructions.Implemented Delta
graphify/always_on/agents-md.md, and expected skillgen snapshot to use host-generic/graphifyguidance._skill_registration()so Claude/CodeBuddy registration snippets use the same host-generic wording.Current Behavior
graphify codex installand related generated/registration examples can surface wording that tells agents to invoke a literalskilltool withskill: "graphify", which is host-specific and not valid in every environment.Desired Behavior
Generated install guidance should say that
/graphifyshould use the installed graphify skill or instructions before doing anything else, without naming a literal tool API that may not exist.Key Interfaces / Modules
tools/skillgen/fragments/always-on/agents-md.md: source AGENTS wording.graphify/always_on/agents-md.md: packaged always-on artifact.tools/skillgen/expected/graphify__always_on__agents-md.md: generated snapshot.graphify/__main__.py:_skill_registration()output and UTF-8 git blob reads.tests/test_install_strings.pyandtests/test_skillgen.py: regression coverage.Decision Path
The bad text is produced by Graphify install surfaces, so the durable fix is upstream in the template/generator path rather than downstream edits in every consuming repository. The historical roundtrip guard remains strict: the test now proves the rendered AGENTS block equals the v8 baseline with only the exact approved sentence replacement.
Discarded Candidates
graphify codex installwould regenerate the old wording.agents-mdroundtrip exemption was rejected because it could hide unrelated drift.Verification
python -m pytest tests/test_skillgen.py::test_always_on_roundtrip_is_byte_faithful -qpython -m pytest tests/test_install_strings.py -k "agents_section or skill_registration"python -m pytest tests/test_install.py -k agents_installpython -m pytest tests/test_skillgen.py -k always_onpython -m tools.skillgen --checkrg -n 'invoke the Skill tool|invoke theskilltool|skill: "graphify"|skilltool' -S . --glob '!tests/**' --glob '!graphify-out/**' --glob '!.git/**'git diff --checkgraphify update .Noted but not caused by this PR: broader local pytest over
tests/test_install_strings.py tests/test_install.py tests/test_skillgen.pyhas pre-existing Windows/source-checkout failures around pytest import/source state, Windows path separator expectations, and missing installedgraphifyypackage metadata causing__version__to beunknown.Failure Modes / Residual Risk
Line-ending warnings appear in this Windows checkout because global
core.autocrlfis enabled. The committed diff is limited to the intended wording, test, and generator changes.Reviewer Guidance
Start with
tests/test_skillgen.py::test_always_on_roundtrip_is_byte_faithfulto check the intentionally narrow historical-baseline exception, then review the AGENTS fragment and_skill_registration()wording.Out of Scope
Related Issues
None.