feat(launch): CodeGraph usage block in the entry file; --next prints the whole task - #20
Merged
Merged
Conversation
Every task in a real plan runs past one line, and the line below the checkbox is usually where the decision sits. `--next` returns one task, so clipping it to the checkbox line sent the reader to the file — the exact cost the reading surface exists to remove. --next now ignores --width and prints the checkbox line whole plus the continuation as it sits in the file. The listings still clip to one line, because a list of sixty-one-line tasks is not a list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9ofAKiYuCCyUnqjfgyNkw
An index nobody knows how to query is an index nobody queries. `scc launch` already indexes the workspace before the session starts; it now also writes a CodeGraph usage block into CLAUDE.md/AGENTS.md, the way it writes RTK's. Three constraints, each tested. The block goes in only once the binary is present, because guidance naming a command the machine cannot run costs the whole entry file its credibility. It is written before the index, so a failed index still leaves the agent knowing how to rebuild one. And a plan-only run writes nothing: --dry-run that edited a file the user owns would be the one flag nobody expects to change anything doing exactly that. The markers are scc's own, which is deliberately the opposite of the RTK decision: sharing RTK's markers is what makes `rtk init` and `scc rtk` converge on one copy of a block they both write, while CodeGraph writes nothing into the entry file at all. internal/mdblock is the splice both now share — choosing the markers is the integration's decision, everything after that choice is one implementation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9ofAKiYuCCyUnqjfgyNkw
The `scc graph` section described the decisions behind the integration and never the commands. It now leads with what to run and when to reach for it over Read, plus the launch-time usage block, the --next reading rule, and internal/mdblock in the package table. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9ofAKiYuCCyUnqjfgyNkw
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.
Three changes, one branch.
--nextwas dropping the line below the checkboxReported against a real task:
The parser was fine —
Task.EndandDetailalready covered line 2. The loss was in display:taskLineprintsSummary(width), the checkbox line only. That is right for a list and wrong for--next, which returns one task, so a description stopping mid-sentence sent the reader to the file — the exact cost the reading surface exists to remove.--nextnow ignores--widthand prints the checkbox line whole plus the continuation as it sits in the file. Listings still clip.Task.Continuation()is the raw lines with flags removed;Task.Detailstays the one-line collapse for table rows.scc launchwrites a CodeGraph usage block intoCLAUDE.md/AGENTS.mdAn index nobody knows how to query is an index nobody queries. Launch already indexes; it now also splices the block, the way it does RTK's. Three constraints, each tested:
scc graph explorewhere that command fails costs the whole entry file its credibility, and CodeGraph is usually absent wheninitruns;--json/--dry-run— a flag nobody expects to change anything must not edit a file the user owns.The markers are scc's own (
<!-- scc:codegraph-instructions v1 -->), deliberately the opposite of the RTK decision: sharing RTK's markers is what makesrtk initandscc rtkconverge on one copy of a block they both write, while CodeGraph writes nothing into the entry file at all.internal/mdblockThe marker-delimited splice, extracted so RTK and CodeGraph share it. Choosing the markers is the integration's decision; find/compare/replace/append and CRLF preservation are one implementation rather than two sets of edge cases. Its test pins the property that is actually new: two blocks coexist in one document and each updates without touching the other.
assets.Versionis deliberately not bumped —codegraph.mdis a fragment likertk.md, not inWorkspace(h)and not manifest-tracked, so a bump would change nothing forscc update.CLAUDE.md gains a runnable "how to actually use it" section for
scc graph, which was documented only as decisions and never as commands.🤖 Generated with Claude Code
https://claude.ai/code/session_01U9ofAKiYuCCyUnqjfgyNkw