Repository navigation
entity-level-git: refresh for sem 0.27, re-verify Dart - #216
Merged
Merged
Conversation
Homebrew core's sem-cli now ships 0.27.0; the skill was written against
0.25.0. Built v0.27.0 from source and re-ran the skill's claims on a
synthetic repo holding a two-file Dart program and its TypeScript twin.
What changed underneath the skill:
- 0.27 folded the verbs: callers/refs/context/entities became
`find --callers|--refs|--context|--in`, log/blame became
`history [--blame]`, setup/update/telemetry moved under `sem config`,
login/review/xref under `sem cloud`. Old spellings still work, so the
allowlist keeps both and adds `history`.
- 0.26 fixed Dart call resolution (upstream #491). The skill's headline
Dart warning ("0 edges, a green 'No other entities are affected'")
no longer reproduces: constructor and typed-receiver calls resolve
exactly as in the TS twin, and what stays unresolved (an untyped
receiver) is unresolved in TS too. Re-verified synthetically only;
the section says to confirm on DittoXCactus before relying on it.
- Caller answers now carry an INCOMPLETE verdict and a possible-callers
list instead of a green check. That list is where cross-language name
matches still surface, labelled as unresolved.
- New `sem certify <range>`: local, read-only review certificate, with
`--arch --view` and a self-contained `--html` page (no external
resources; checked in the v0.27.0 source and rendered). Allowlisted.
- New `sem check` runs the project's checkers and tests. Deliberately
NOT allowlisted: it executes repo code.
preferred-tooling.md's compact table moves to the new spellings and
points at `sem certify` for "where's the risk".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MaMS38L5A67twbVeiRpQjn
Prompted by humanlayer's show-me skill, which renders code as pseudocode, call trees and Mermaid. Its diagrams come from the model reading the code, so an invented edge looks exactly as authoritative as a real one. This skill already has the real graph; what it lacked was a rendering. The rule: every node and edge comes from sem output. scripts/sem-mermaid.py (stdlib python3, already in core-packages) takes nodes from `sem impact --json` and edges from `sem graph --json`, filtered to that node set. Edges come from the graph rather than impact because impact's JSON gives each entity's depth but not which entity it was reached through, so depth-2 arrows drawn from impact alone would be guesses. Possible callers are drawn dotted and labelled `unresolved`. INCOMPLETE reasons and "no test reaches" go into `%%` comments. It refuses rather than mislead: - exit 2 when the graph has no edges in the target's *language* (not the repo): an empty graph drawn as a diagram reads as "nothing depends on this", the false negative Dart used to produce. Verified on a mixed repo where TS has edges and a Python file has none. - exit 3 above --max-nodes (default 20) instead of silently dropping nodes. - Cross-language possible callers are dropped and counted, since sem 0.27 matches unresolved names across languages (a Dart caller listed for a TS method). Extensions are grouped into families so JS->TS and .c->.h survive. Verified against sem 0.27.0 on the synthetic TS + Dart repo; both diagrams parsed and rendered by Mermaid 11.4.1 in headless Chromium. The skill's new section also covers the cases where Mermaid is the wrong tool: a diff-shaped entity tree for "what changed" (no edges, nothing to invent) and `sem certify --html` for module-level architecture. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MaMS38L5A67twbVeiRpQjn
Contributor
⊕ Entity-level changestools/agents/preferred-tooling.md
tools/agents/skills/entity-level-git/SKILL.md
- # exist only from 0.5.x, so on an older weave they simply do not resolve.
- allowed-tools: Bash(sem diff *), Bash(sem impact *), Bash(sem callers *), Bash(sem refs *), Bash(sem find *), Bash(sem blame *), Bash(sem log *), Bash(sem entities *), Bash(sem graph *), Bash(sem context *), Bash(weave preview *), Bash(weave summary *), Bash(weave explain *), Bash(weave check *), Bash(inspect diff *), Bash(inspect predict *), Bash(inspect pr *), Bash(inspect file *), Bash(git status), Bash(git log *), Bash(git diff *)
- ---
+ # exist only from 0.5.x, so on an older weave they simply do not resolve.tools/agents/skills/entity-level-git/scripts/pycache/sem-mermaid.cpython-313.pyc
tools/agents/skills/entity-level-git/scripts/sem-mermaid.py
Summary: 18 added, 6 modified, 4 deleted, 1 binary across 4 files (3 added orphans) functions and classes, not lines · sem |
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.
Homebrew core's sem-cli now ships 0.27.0; the skill was written against
0.25.0. Built v0.27.0 from source and re-ran the skill's claims on a
synthetic repo holding a two-file Dart program and its TypeScript twin.
What changed underneath the skill:
find --callers|--refs|--context|--in, log/blame becamehistory [--blame], setup/update/telemetry moved undersem config,login/review/xref under
sem cloud. Old spellings still work, so theallowlist keeps both and adds
history.Dart warning ("0 edges, a green 'No other entities are affected'")
no longer reproduces: constructor and typed-receiver calls resolve
exactly as in the TS twin, and what stays unresolved (an untyped
receiver) is unresolved in TS too. Re-verified synthetically only;
the section says to confirm on DittoXCactus before relying on it.
list instead of a green check. That list is where cross-language name
matches still surface, labelled as unresolved.
sem certify <range>: local, read-only review certificate, with--arch --viewand a self-contained--htmlpage (no externalresources; checked in the v0.27.0 source and rendered). Allowlisted.
sem checkruns the project's checkers and tests. DeliberatelyNOT allowlisted: it executes repo code.
preferred-tooling.md's compact table moves to the new spellings and
points at
sem certifyfor "where's the risk".Co-Authored-By: Claude Opus 5.5 [email protected]
Claude-Session: https://claude.ai/code/session_01MaMS38L5A67twbVeiRpQjn