Skip to content

✂️ chore(claude.md): extract trajectory DB definition to top-of-file glossary#135

Merged
ZaxShen merged 1 commit into
devfrom
chore/claude-md-extract-trajectory-db-glossary
Apr 26, 2026
Merged

✂️ chore(claude.md): extract trajectory DB definition to top-of-file glossary#135
ZaxShen merged 1 commit into
devfrom
chore/claude-md-extract-trajectory-db-glossary

Conversation

@ZaxShen
Copy link
Copy Markdown
Contributor

@ZaxShen ZaxShen commented Apr 26, 2026

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).

…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 ZaxShen merged commit 16e962c into dev Apr 26, 2026
5 checks passed
@ZaxShen ZaxShen deleted the chore/claude-md-extract-trajectory-db-glossary branch April 26, 2026 23:16
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.
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