55 Commits

Author SHA1 Message Date
youxi798 0847a06355 feat: check architecture diagram relationships and geometry
Keep HTML as the geometry source and catch broken references, overlapping nodes, misattached edges and label-mask collisions through existing lint commands. Preserve the rendered templates and document the limits of static checks.
2026-09-15 14:44:29 +08:00
Tw93 77f6770672 test: verify the referenced responsive screen matrix
The skill now delegates screen sizes to the design reference. Check that route and retain baseline, breakpoint, and tablet coverage instead of requiring an obsolete inline width. Both guards were independently verified to fail when removed.
2026-09-12 14:08:26 +08:00
youxi798 4dab24cc4c docs: simplify copy and localize the Kami website
Explain product capabilities and privacy boundaries directly across locales. Align writing guidance and schemas so documents do not require filler captions, metaphors, or unsupported metrics.
2026-09-08 14:34:19 +08:00
Tw93 a72af5674a fix: preserve formula offsets and recover truncated fonts
Match HTMLParser line accounting to keep Unicode separators from hiding raw formulas. Restore incomplete checkout fonts from validated sources and retain healthy copies. Regression tests reproduce both failures on the previous code.
2026-09-06 09:53:29 +08:00
Tw93 c9617b6aad refactor: clarify validation and distribution boundaries
Separate HTML visibility evidence from document checks and group tests by responsibility without changing the CLI. Restore demo scan coverage after the layout split, reject missing repository surfaces, and keep generated examples out of source control.
2026-09-06 09:36:09 +08:00
youxi798 bd2f44fc49 refactor: split the repository into skills/kami and site/
The skill is now the whole of skills/kami and nothing else: the skills
CLI, the Claude and Codex plugin marketplaces (through the generated
plugins/kami copy), and the Claude Desktop archive all read that one
directory, so a bare npx skills add tw93/kami installs 1.6 MB instead of
the website. The website lives under site/ for Vercel's Root Directory
setting; its discovery files and the served SKILL.md are generated from
the skill. Commercial fonts and rendered examples stay at the repo root
outside the skill, dist/kami.zip is no longer tracked (release.yml builds
and uploads it), and the root vercel.json is a transitional rewrite that
keeps the site serving until the Vercel project points at site/.
2026-09-03 12:12:42 +08:00
youxi798 af1fcd3380 fix: carry the new install command through check-update, tests, and the package
check-update.sh printed the old universal-agent command on its own,
two tests pinned it, and the tracked kami.zip must match the changed
shared.py and check-update.sh.
2026-09-03 11:01:11 +08:00
Tw93 62d43c39df merge: add strict LaTeX math rendering (#47)
Regenerate the V1.14.0 plugin metadata and archive while preserving the contributor's hardened MathJax rendering changes.
2026-08-30 18:22:37 +08:00
Tw93 b29e925014 release: prepare V1.14.0 quieter pages
Align the shipped visual guidance with the templates, keep narrow landing pages usable, restore the approved showcase image, and make versioned release assets fail closed.
2026-08-30 17:52:20 +08:00
Tw93 ad391b005a feat: refine kami visuals and site guidance
Reduce decorative weight across document examples, refresh the generated artifacts, and keep multilingual installation and FAQ guidance concise and non-redundant.
2026-08-30 09:05:13 +08:00
Tw93 0b1373e482 refactor: simplify Kami visual system 2026-08-30 08:09:58 +08:00
Tw93 72d1223b14 fix: harden strict LaTeX rendering
Fail closed on malformed TeX, HTML, and SVG while bounding renderer resources. Lock MathJax installation behavior and keep generated package mirrors in sync.
2026-08-28 20:25:44 +08:00
xuefeihu 8610c5f41e feat: render LaTeX formulas as MathJax SVG 2026-08-28 18:48:29 +08:00
Tw93 ff3f63a091 release: prepare V1.13.0 2026-08-23 21:25:14 +08:00
skblue 3c4a2a9547 fix: resolve root variables in content coverage (#45)
Resolve document-level custom properties only when unconditional root declarations are unambiguous. Keep scoped, conditional, inline, registered, malformed, and case-mismatched values fail closed, with adversarial regression coverage.
2026-08-23 21:09:17 +08:00
Tw93 146c5f1744 fix: make update checks honest and cache-safe 2026-08-15 13:03:52 +08:00
Tw93 fbdb54f59b feat: strengthen artifact contracts and coverage 2026-08-02 00:46:56 +08:00
Tw93 e4a297390e feat: strengthen artifact and release verification
Make artifact briefs, capability checks, screenshots, and required assets fail closed. Preserve the last good render, move heavy tests onto the covered CI path, and require exact tag, SHA, and package identity before release upload.
2026-08-01 23:20:59 +08:00
Tw93 6179773c26 fix: build the density fixture instead of reading gitignored output
The single-page density test pointed at assets/examples/one-pager.pdf,
which is build output and gitignored, so it passed locally and failed on
every fresh checkout. CI has been red since the test landed, through a
release, because local runs were treated as the verdict.

The fixture is now synthesised: an A4 page filled with parchment and
inked across the top third, which also pins the expected verdict rather
than inheriting whatever the template currently renders. Without PyMuPDF
the test skips, matching how the rest of the density suite behaves in the
lint-and-test job.

Claude-Session: https://claude.ai/code/session_01KgPeQ4ApebVquCZQXWKCfx
2026-07-26 10:06:56 +08:00
Tw93 72a890b601 fix: close the gaps that relied on someone remembering
Three of these are the same shape: a convention with no gate behind it.

dist/kami.zip had no drift check. plugins/ has one and CI runs it, but
the archive Claude Desktop users download was verified for structure
only, so editing a source file and forgetting package-skill.sh left
every check green while the ZIP served the old content. The package test
now compares each entry against the file it was built from.

.callout shipped in two shapes: transparent in one-pager, ivory fill
plus radius in long-doc and equity-report, with the quick-reference
table describing only the first. One class, two forms, is what teaches a
reader that the shape is theirs to choose. It is now the filled form
everywhere, padding tightening per density, and the specs say so. The
neighbouring wording is settled too: .quote shares the rule but takes no
fill, and that is the line between a quotation and a raised passage.

CI never checked which family drew the CJK text, so a broken font
install would have shipped looking merely fine.

Claude-Session: https://claude.ai/code/session_01KgPeQ4ApebVquCZQXWKCfx
2026-07-26 09:22:12 +08:00
Tw93 0cc0870635 fix: settle the brand left rule at three weights, picked by role
The rule shipped at four widths. Three of them are a real distinction:
2.5pt opens a section or document, 2pt lifts an aside out of the reading
flow, 1.4pt edges a block whose fill already carries the weight. The
fourth was drift, one-pager's .callout sitting at 1.8pt while the same
component is 2pt in long-doc and equity-report.

Collapsing all four into one value was the tempting fix and the wrong
one: it would flatten three roles into a single mark. What was missing
was the rule itself, which lived only in the templates and had to be
inferred by reading all of them. design.md now states it, and a test
holds the set closed, because a component at two widths is what teaches
a reader of these templates that the number is theirs to pick.

Claude-Session: https://claude.ai/code/session_01KgPeQ4ApebVquCZQXWKCfx
2026-07-26 08:56:03 +08:00
Tw93 6c48d66f74 feat: lint the CSS snippets the reference docs teach from
An agent copies a documented recipe before it reads a template, so the
docs are a shipped artifact and nothing was scanning them. CHEATSHEET.md
taught a .card pairing a 0.5pt border with an 8pt radius, the double-ring
pitfall templates are failed for, against --border-cream, a token defined
nowhere in the repo. design.md carried the same recipe plus --border-warm,
--ring-warm and --ring-deep, all equally dead, and a slide line-height the
templates set 0.10 tighter.

--check-docs scans every fenced css/html block with the template rule set
and resolves every var() against tokens.json plus what the shipped
templates define. It reuses the exemptions the template scan already
makes: SVG colors answer to the diagram palette, a `--x: #hex` line
declares rather than spends, and a line tagged /* avoid */ is the lesson.

The quick-reference tables now point at components the templates ship
instead of handing out recipes. Assembling a container from a recipe is
how a page ends up carrying three unrelated emphasis languages, and the
two most copied entries, an 8pt-radius data card and a brand left bar on
every section head, were exactly the drift showing up in generated
documents.

Claude-Session: https://claude.ai/code/session_01KgPeQ4ApebVquCZQXWKCfx
2026-07-26 08:34:16 +08:00
Tw93 5b46394faf feat: gate rendered documents on the font that actually drew them
A missing CJK serif produces no fallback boxes. It silently substitutes a
sans that still reads, so a perceptual pass signs off on a page whose
typography is no longer the system's, and the commercial primary never
ships inside the skill package, so a sandboxed install hits this by
default.

--check-fonts reads the rendered PDF's span table and names the family
that drew the body ideographs, failing on a non-serif substitution or on
text split across two families. --check-visual runs it inline, since that
was checklist item 1 all along. --check-style applies the template lint
rules to a produced document, counting distinct emphasis fills so one
form reused stays clean while a new container per idea does not.
scan_density skipped page 1 as a cover exemption, which left one-page
documents with no scanned page at all.

Claude-Session: https://claude.ai/code/session_01KgPeQ4ApebVquCZQXWKCfx
2026-07-26 00:09:01 +08:00
Tw93 21fa0b19e8 feat: add content contracts and document verification 2026-07-19 23:41:20 +08:00
Tw93 b3d856266d fix: guard :root off-palette tokens and drop dead --brand-deep accent
check_off_palette blanks the :root block before scanning, so an
off-palette token defined but never used as a literal hex escaped every
guard. A dead #a64f33 terracotta second accent hid in portfolio this
way, against the single ink-blue accent invariant. Scan :root token
definitions too (print templates only; screen-local tokens and the
registered --breaking-* stay exempt), remove the dead token across the
portfolio locales, and correct the stale "orange highlight" comment in
resume that no longer matched the ink-blue .hl.
2026-07-11 19:29:35 +08:00
Tw93 e54efa2b6c fix: harden check pipeline against silent-green and coverage blind spots
Empty-scan guards for the four config checks and two KO tests, a site
version-badge assertion tied to VERSION, a packaging coverage gate so a
new tracked script cannot silently miss the zip, a sibling placeholder
parity test locking the #38 bug class, merged multi-block :root parsing,
one-sided cross-template var drift reporting, Marp CSS joining the lint
scan, shared walk/rel/pdf helpers, single-file update-check marker with
portable version sort, and PID-suffixed font temp files with EXIT trap.
2026-07-10 08:36:57 +08:00
Tw93 1d97f6f05f fix: harden changelog mono, PDF check guards, and test seams
changelog CN/KO templates referenced an undefined --mono var, so inline
<code> fell back to the serif stack instead of monospace; define it to
match changelog-en. Guard checks.py fitz.open against malformed PDFs so
the orphan/density/balance checks report ERROR instead of a traceback.
Make highlight.py palette lazy so importing it never reads tokens.json
on a half-installed checkout. Extract pure density/rhythm/orphan seams
and repoint the density test off its reimplemented thresholds onto the
real logic. Align README template count and refresh sitemap lastmod.
2026-07-05 16:04:41 +08:00
Tw93 ae65c11e5c fix: harden long-doc rendering checks 2026-07-04 14:50:13 +08:00
Tw93 098515e6f3 chore: tighten Kami distribution surfaces 2026-07-04 09:25:19 +08:00
Tw93 ea4bf42351 chore: harden Kami architecture checks 2026-07-03 22:10:10 +08:00
Tw93 fea0a6e28f feat: add report-scale architecture board diagram with board rules
Architecture panoramas kept getting crammed into the single 9-node
figure. Boards now have their own reference rules (five fixed layers,
bands over cards, judgment-style copy, 4px connector standoff), a
template with a real five-layer demo, and the diagram count moves to
18 across docs, site locales, the print demo, and the skill package.
2026-07-03 21:24:57 +08:00
Tw93 7882ed7bb0 chore: tighten skill packaging and update checks 2026-06-28 13:45:21 +08:00
Tw93 166e8f1d15 refactor: unify diagram registry and harden mermaid normalizer
Audit follow-ups. Move all template registries into shared.py so the
single-registry rule holds for diagrams too. Make the normalizer raise on
non-beautiful-mermaid input or any unresolved color instead of silently
emitting a broken diagram. Add a test that committed diagrams still carry
their .mmd source labels, guarding the no-Node regeneration gap.
2026-06-22 23:34:18 +08:00
Tw93 8083b33506 feat: mermaid diagram support
Hand-tuning diagram SVG coordinates was the painful path; now agents can
write Mermaid text and get Kami-styled sequence/class/ER diagrams. A pure-
Python normalizer re-themes any beautiful-mermaid SVG and makes it
WeasyPrint-safe, so no Node ships in the package.
2026-06-22 22:40:04 +08:00
Tw93 c638fc9a4d fix: pin Claude plugin marketplace version 2026-06-16 20:52:06 +08:00
Zephyr a5d3eff868 feat: add Codex plugin marketplace support 2026-06-16 20:52:06 +08:00
Tw93 680ed56510 release: 1.7.4 2026-06-15 16:06:10 +08:00
Tw93 a575bacd3e feat: tell installed users when a newer kami is available
Installed skills had no way to surface updates: the skills CLI has no
outdated check and the plugin path's auto-update is unreliable. Add a
quiet daily check (scripts/check-update.sh) that reads the public VERSION
file, compares it to the bundled VERSION, and prints one line when a newer
release exists. It only does a read-only GET, sends no data, runs at most
once per day via a cache marker, and fails silently offline, sandboxed, or
without curl, so it never blocks work. SKILL.md runs it at task start and
relays any notice; README documents the update commands; a VERSION file is
the single source of truth. Covered by test_check_update_script.
2026-06-14 23:09:49 +08:00
Tw93 fb24e634f1 fix: drop sub-1pt closed border on the one-pager hero frame (#30)
The optional .product-shot frame paired a 0.5pt closed border with a
border-radius, which the repo's own thin-border-radius lint rejects, so
build.py --check failed on main. Keep the rounded clip and a soft shadow
and drop the border (no double-ring risk) across the en/zh/ko one-pagers
and the Mole demo. Add a test that runs the full CSS lint, so a rule
violation can no longer slip past an otherwise green suite.
2026-06-14 14:29:48 +08:00
Tw93 e4c074c639 build: exclude demos from skill package
The demo PDFs and PNGs are human-facing README previews; SKILL.md never
references them, yet they made up over 90% of dist/kami.zip. Filter
assets/demos/ out of the package (and add it to the forbidden-entry
audit plus the test assertion). The zip drops from 5.2MB to ~0.45MB,
which also removes the size ceiling that blocked adding more demos.
2026-06-14 09:11:37 +08:00
Tw93 4777a95d4b refactor: drop the HTML stabilizer, covered by lint/verify gates
The stabilize pipeline (overflow solver plus palette/token normalization)
produced zero changes across all templates, and every invariant it enforced
is already gated: build.py --check covers rgba/cool-gray/off-palette/token
drift, build.py --verify covers page counts. The overflow solver also
contradicted the design rule against shrinking type to fit a page count.

Removes scripts/stabilize.py, stabilizer_profiles.json, cool_gray_buckets.json,
their tests, the CI smoke step, and TemplateSpec.stabilize_max_pages; refreshes
dist/kami.zip. Keeps COOL_GRAY_BLOCKLIST (lint) and PARCHMENT_RGB (density).
2026-06-07 12:44:06 +08:00
Tw93 1e47d07a15 refactor: drop unused build alias and dead regex, add marp token-sync test
Remove the --verify-filled alias and an unused CSS_VAR_RE left over from
earlier passes, fix the AGENTS marp note, and add a test asserting the
marp theme :root tokens stay in sync with tokens.json. Rebuild dist.
2026-06-05 23:53:09 +08:00
Tw93 4d500f1386 fix: align release readiness surfaces 2026-06-03 12:32:37 +08:00
Tw93 8bc79676b5 fix: improve Korean font fallback resolution 2026-06-01 20:14:07 +08:00
Tw93 6c8a4421ba refactor: enforce single-accent palette via off-palette lint and marp token guard
The single-accent invariant in design.md was review-enforced, so hardcoded
component colors (like the salmon-border regression) could bypass the token
guard and drift silently. Mechanize it instead: tokenize the changelog
breaking badge as the one sanctioned warm exception, extend sync_check to the
Marp theme CSS (the last untracked slide path), and add an off-palette lint
that rejects any non-token, non-cool-gray hex in editorial templates.
2026-05-30 07:21:11 +08:00
Tw93 cda60f2377 feat: add Korean (KO) template family with externalized fonts
Port the 9 KO templates + slides-ko.py from contributor PR #27, reworked
so Source Han Serif K does not re-bloat the package: the OTFs stay
git-tracked for the CDN @font-face fallback but are excluded from
dist/kami.zip, and ensure-fonts.sh downloads them to the external XDG
font dir on demand, mirroring the TsangerJinKai model. The 6MB package
cap is kept (ZIP stays at 4.6MB). lint/verify/test_build are generalized
to treat -ko as a recognized locale variant alongside -en.
2026-05-29 22:35:20 +08:00
Tw93 b9499b3dbc test: audit skill package contents 2026-05-26 08:17:31 +08:00
Tw93 3d8ff18cd7 fix: warn when Pygments is missing 2026-05-22 22:41:42 +08:00
Tw93 4119c5de4a refactor: split scripts/ modules, add CI verify gate and solver tests
build.py was 1062 lines and CI never ran weasyprint, so page-count
regressions slipped through lint-only CI and the kitchen-sink CLI
was getting hard to navigate. Splits into lint / checks / tokens /
verify / optional_deps modules (build.py drops to 361 lines) and
adds a verify-render CI job that installs weasyprint plus Noto CJK
and runs --verify on the four strict-page-count templates.

Overflow solver in stabilize.py gains end-to-end tests via a
templates_dir tmpdir fixture path so the most mutation-heavy code
stops being untested.

Smaller follow-ups: HTML_TEMPLATES becomes a NamedTuple,
cross-template :root consistency check with a font-stack allowlist,
rhythm / density / orphan / cool-gray thresholds move into
references/*.json, slides*.py accept --out to remove the
output.pptx rename race, and scan_file strips CSS block comments
before per-line scanning.

dist/kami.zip refreshed so the new helpers ship in the archive.
2026-05-21 10:30:24 +08:00
Tw93 e6b7eb305c fix: stabilize highlighting and landing page checks 2026-05-15 07:49:04 +08:00