✂️ chore(claude.md): extract trajectory DB definition to top-of-file glossary#135
Merged
Merged
Conversation
…glossary User-approved candidate 1: the verbose parenthetical inside the Context check bullet (30+ words mid-sentence) was hard to scan. Pulled the disambiguation to a single quoted-block line right after the trigger rule, so it loads once at the top and the rest of the file just says 'trajectory DB' without re-defining. CLAUDE.md: 109 → 110 lines (+1 net — one definition line in, several explanatory words removed from the Context check bullet).
ZaxShen
added a commit
that referenced
this pull request
May 20, 2026
…nts (#5) l5_run_claude (flow-helpers.sh) and l5_run_arm (ab-helpers.sh) now invoke `claude --output-format stream-json --include-hook-events --include-partial-messages --verbose -p <prompt>` and pipe the JSONL output to <project>/trajectory.jsonl. The previous text-grep capture path is replaced by structured per-message events: assistant.message.usage gives token counts including main-thread (no more #135 lower-bound). assistant.message.content[].name (where type == 'tool_use') gives tool calls directly — no more debug_trajectory dependency. Slim stderr summary line replaces the per-line text echo (assistant_msgs + duration_ms shown for log triage).
ZaxShen
added a commit
that referenced
this pull request
May 20, 2026
l5_score_cost, l5_score_trajectory_required, l5_score_trajectory_forbidden
now read from <project>/trajectory.jsonl via jq instead of querying
agent_runs / debug_trajectory.
- cost: sums assistant.message.usage.{input,output}_tokens across the JSONL.
Captures BOTH main-thread and subagent tokens — the #135 caveat from
TRU-76's stopgap is resolved.
- trajectory_required + trajectory_forbidden: extract tool_use names from
assistant content blocks. No env-coupling on TMB_DEBUG_TRAJECTORY.
- outcome: unchanged (SQL on the DB per spec).
Closes #5 (TRU-82). Supersedes the agent_runs cost source from #4 and
the main-thread capture follow-up from #135.
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.
Per user line-by-line audit (Candidate 1 from PR #134 follow-up): the trajectory-DB clarifier inside the Context check bullet was 30+ words mid-sentence, hurting scannability.
Pulled the disambiguation to a single quoted-block line right after the trigger rule:
> **trajectory DB** = `<project>/.claude/<plugin-name>/trajectory.db`, the MCP trajectory server's SQLite. Distinct from any database the user's project may have.The rest of the file just says 'trajectory DB' without re-defining.
CLAUDE.md: 109 → 110 lines (one definition line in, ~30 explanatory words out of the Context check bullet).