Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .claude/skills/t27f/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,51 @@ Traps:
until a fixture had fewer edges than `hops=` *and* still ended at B. Give every refusal a
fixture that only that refusal catches.

### Draw who uses a spec as a card (t27#10720)

`specs/t27f/deps_card.t27` draws one spec's neighbourhood. Its first three direct importers sit
above it and its first three direct imports below it, with `+N more` past three and the
transitive counts in the footer. A gold `ON AN IMPORT CYCLE` line appears when `deps_on_cycle`
holds. It imports why_card's `card_*` helpers rather than copying them, and its main reads
`DEPS_SPEC` and `DEPS_FONT`. Skill card: `t27/deps-card`. To build and render it, follow the
why-card recipe above with `deps_card` in place of `why_card`.

Pixel checks per row:

- fill at (106, y+6);
- stroke at (101, y+32);
- fill at both inner edges (110 and 970);
- backdrop in the gap at (300, y+70).

Rows start at y = 280 + 76k above the focus and 820 + 76k below it. Then check:

- the focus fill at (112, 650) and its 8 px stroke at (103, 688);
- the connector at (540, 630) above and (540, 745) below, or the backdrop at those points when a
band is empty;
- the white-pixel count in every row's text band.

On 255910235 (2483 edge lines, 813 specs named):

- 783 cards drew. `base/types` is the hub: 378 direct importers, reached by 400.
- 30 were refused:
- 29 because the spec's own name is over 58 bytes (`port/trios/...`);
- 1 because a shown neighbour's name is.
- No spec in the corpus is on an import cycle.
- 70 of 70 pixel checks held on the hub, leaf and mid cards.

Traps:

- **A shell helper that sets `tag` clobbers the caller's `tag`.** POSIX `sh` has no `local`:
`rows()` setting `tag=$4` sent every later check to `up.png`, which does not exist. Name each
helper's variables apart.
- **`sort -t "$TAB" -k3,3n -r` sorts ascending.** A key with its own ordering flag does not
inherit `-r`, so write `-k3,3nr`. In `sh`, `$'\t'` is two characters; use `TAB=$(printf '\t')`.
- **A one-byte-short fit test cannot tell `w > cap` from `w > cap + k`.** Both return `cap + 1`
there. The original and the mutant only differ when the room is 2..k+1 bytes short, so the
test that kills the mutant is three bytes short, not ten.
- **Bands are in edge-list order, so a hub shows `account/*` first.** That is the stated rule,
not a ranking; do not caption the first three as the most important.

## What this skill does not claim

The graph IR is a schema (`specs/t27f/spec_graph.t27`) and `specs/t27f/spec_graph_export.t27` turns source into it, but only exact declarations, spans and edges within the IR's capacity, with `specs/t27f/spec_graph_derive.t27` adding the derived and unknown part by stated rules, and no host calls either yet; no renderer draws a T27F view in the Trinity UI, no
Expand Down
28 changes: 28 additions & 0 deletions .trinity/seals/skills_skill_t27_deps_card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:416288691c04ceaabc9f206bafc063de6a4fe2bf76eed4cec1e8ed7facbd23a4",
"gen_hash_rust": "sha256:1c2f00377a1c61e676f3ce92dcb7f9c0bcf7ef10750b16f7ad3b5b88b75c15a9",
"gen_hash_verilog": "sha256:4158a6d406b22bfef789ca15dc84c3d867e96e0ccb4aaca4d536fed85da9c8cd",
"gen_hash_zig": "sha256:fb59aa9ded647f4e34da11c01542d1a5ee40454dee7a5f36d7fb1379269b45b0",
"module": "skill_t27_deps_card",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T00:03:42Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:2a603711c22872cdbd2f5898ac5980e9b920cd85857f881d6f40f482996f4cf2",
"spec_path": "specs/skills/t27-deps-card.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 1,
"total": 1,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:8512b80da533b79289110fca4a65f3336abd7a059ca4b72ea595d5e33ff8ad10",
"zig": "0.16.0"
}
}
53 changes: 53 additions & 0 deletions .trinity/seals/t27f_t27f_deps_card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [
{
"spec": "specs/ci/affected.t27",
"spec_hash": "sha256:38a7bdc245f1974f0d5f1a55a45966decd70098afdb89e882f568da3650ee9f9"
},
{
"spec": "specs/claw/t27f_gate.t27",
"spec_hash": "sha256:856be049f9ef3de20cce2f7d18ca3b78a5f4a8ad660dddd8f2cf1aa97bc61ee7"
},
{
"spec": "specs/policy/text_lines.t27",
"spec_hash": "sha256:13c90895a4a44c760cce6b3b65f72f937298633062f040f8489486108ab0c2d1"
},
{
"spec": "specs/t27f/spec_deps.t27",
"spec_hash": "sha256:c6e6c03537dd7238ce7cceb937dfe307294ab59d4946de95f7d96e40333cb070"
},
{
"spec": "specs/t27f/spec_graph_view.t27",
"spec_hash": "sha256:d4c318162bf52405208d4016d0505c8037cd648b58feb3ad5240a2695c6730fe"
},
{
"spec": "specs/t27f/why_card.t27",
"spec_hash": "sha256:01381c902fe4b5702dc26505a0d081faa0895bfaf60ef51a529cfef894a8ae68"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:e0771c20aea80a2d085ea8151707616be36da0a1075f48dcc81471b21dfb3624",
"gen_hash_rust": "sha256:8b918de8a45d5fb657999906ab375c03b0f4f75289bb4662a1d34143ba99886d",
"gen_hash_verilog": "sha256:ed6c7559eb3bb422722770679c14d41c53a6a56fe3521d444cdfc408b22eb66c",
"gen_hash_zig": "sha256:eecc2a4bc35cf81dff2bde43f15e53903728aa66d5898de7c916e60fefff1c38",
"module": "t27f_deps_card",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T00:03:40Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:05e744da11ef490c883a7a46c9d5ee7869a1b21f50f1999e6dda0706d68b5f0d",
"spec_path": "specs/t27f/deps_card.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 11,
"total": 11,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:8512b80da533b79289110fca4a65f3336abd7a059ca4b72ea595d5e33ff8ad10",
"zig": "0.16.0"
}
}
51 changes: 51 additions & 0 deletions specs/skills/t27-deps-card.t27
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// SPDX-License-Identifier: Apache-2.0
; specs/skills/t27-deps-card.t27 -- skill t27/deps-card
; Source of truth for the skill card on t27.ai (#/skills?skill=t27/deps-card).
; How TRI CLAW answers "who uses this spec, and what does it use" with a picture: pipe
; `t27c use-edges` into deps_card with DEPS_SPEC and DEPS_FONT set, and render the
; graph it prints with ffmpeg as a 1080x1350 card: the spec's direct importers above
; it, its direct imports below it, `+N more` past three, the transitive counts in the
; footer, and a gold ON AN IMPORT CYCLE line when it is on one. The law lives once, in
; specs/t27f/deps_card.t27 (dcard_* functions and their tests), the walk in
; specs/t27f/spec_deps.t27 (deps_walk) and the drawing helpers in
; specs/t27f/why_card.t27; this card points at them and copies none. Posting a card is
; the owner's call. There is no SKILL.md behind it yet, so the card is spec-only (see
; "Witness labels" in specs/skills/README.md). Issue gHashTag/t27#10720, epic
; gHashTag/trinity#1648.
; The JSON the site serves is generated from this file by the real compiler;
; nothing below is parsed with a regex.
; phi^2 + 1/phi^2 = 3 | TRINITY

module skill_t27_deps_card;

pub const KIND : str = "skill";
pub const ID : str = "t27/deps-card";
pub const NAME : str = "Deps Card";
pub const REPO : str = "t27";
; No SKILL.md exists for this card.
pub const SOURCE : str = "";
pub const SUMMARY_EN : str = "Draw who uses a spec and what it uses as a social card: its direct importers and imports t27c resolved, the transitive counts both ways, a cycle flag, and no card at all when the spec is not in the edge list";
pub const COMMAND : str = "/deps-card";
; Specs this skill stands on: the card layout and the walk it draws.
pub const SPECS : [2]str = ["specs/t27f/deps_card.t27", "specs/t27f/spec_deps.t27"];
pub const TAGS : [4]str = ["social-visual", "t27f", "deps", "card"];
pub const ENABLED : bool = true;
; Default budget; no SKILL.md declares a timeout.
pub const TIMEOUT_MIN : u16 = 30;

test basic_constants {
assert KIND == "skill";
assert ID == "t27/deps-card";
assert NAME == "Deps Card";
assert REPO == "t27";
assert SOURCE == "";
assert COMMAND == "/deps-card";
assert ENABLED == true;
assert TIMEOUT_MIN == 30;
assert TAGS.len == 4;
assert TAGS[0] == "social-visual";
assert TAGS[2] == "deps";
assert SPECS.len == 2;
assert SPECS[0] == "specs/t27f/deps_card.t27";
assert SPECS[1] == "specs/t27f/spec_deps.t27";
}
Loading
Loading