Skip to content

Claude Code Settings#13

Merged
kencyke merged 11 commits into
mainfrom
12-claude-code
Apr 23, 2026
Merged

Claude Code Settings#13
kencyke merged 11 commits into
mainfrom
12-claude-code

Conversation

@kencyke

@kencyke kencyke commented Apr 23, 2026

Copy link
Copy Markdown
Owner

fix #12

kencyke added 11 commits April 20, 2026 09:14
Rewrite six `f.comp g` call sites to the Mathlib infix `f ∘L g`
(defined in `Mathlib.Topology.Algebra.Module.LinearMap`). Paper-style
notation aligns with how operator-algebra literature writes composition
of continuous linear maps. Build verified via `lake env lean` on the
touched file.
New skill `.claude/skills/paper-notation-refactor/` that rewrites Lean
code toward publication-style notation. Two modes:

- Mode A applies existing Mathlib notation from a static table
  (inner product brackets, BigOperators, norm, Complex.I, Real.pi,
  ∘L / ∘ₗ for linear-map composition, adjoint, star).
- Mode B consumes the project's ingested paper knowledge under
  `references/<slug>/` (output of pdf-to-knowledge) to extract the
  paper's own symbol, then designs matching `scoped notation` /
  `syntax` + `macro_rules` declarations with companion `Coe`
  instances when bundled subtypes hide a type gap.

Key design decisions baked in:

- Paper is source of truth — the skill never invents a glyph the cited
  paper does not use. Restraint is part of correctness.
- Placeholder precedence `:max` is documented as the default for
  separators that overlap with Lean operators (`‖`, `|`, etc.).
- Lexer-gotcha escape (`α[g]` for subscripted prefixes) documented
  because Lean lexes `α_g` as one identifier.
- `meta def` requirement for `app_unexpander` under
  `module` + `@[expose] public section` promoted to notation-map.md.
- LaTeX → Unicode table includes Fraktur (𝔄 𝔉 𝔐) and script (𝒪 𝒩)
  glyphs needed for AQFT / operator-algebra papers.
Force-add the skill's inner references/notation-map.md (root
.gitignore pattern `references/` matches nested paths; only the
skill's own reference material belongs in-tree).

Contents:
- Part 1 — Mode A mapping table (inner product, BigOperators, norm,
  adjoint, star, Complex / Real scalars, .comp → ∘L with caveats).
- Part 2 — Mode B crib sheet + extraction recipe from
  references/<slug>/, LaTeX-to-Unicode table (Greek + Fraktur +
  script), lexer-gotcha escape for subscripted prefixes, `meta def`
  mandate, Coe companion checklist, colocation rule, paper-reference
  policy.
Rewrite the frontmatter description to cover Japanese phrasings
("記法 付けて / 付与 / 抽出", "paper styleにしたい", "読みやすく")
and verb variants ("convert / replace / swap / substitute") that were
empirically under-triggered in a manual `scripts.run_eval` optimization
pass (20 queries, 10 should-trigger + 10 should-not-trigger,
3 runs each).

Result on 20-query trigger-eval with claude-opus-4-7:
- Average trigger rate for should-trigger queries: 0.20 → 0.27 (+35%).
- Queries totally cold (rate 0.00): 6 → 1.
- should-not-trigger pass rate: 10/10 maintained across all iterations.

Binary pass rate regressed from 4/10 to 0/10 but this is an artifact of
raising runs-per-query from 2 to 3 under the default 0.5 threshold
(1/2 passes, 1/3 fails). Continuous trigger rate is the honest metric
and moved in the right direction.

Fundamental limit: claude-opus-4-7 triggers this skill probabilistically
and rarely hits ≥ 67% on any single query regardless of wording. Full
optimization to reliable triggering would require the skill-creator's
run_loop.py with an API key — out of scope for this session.

See skill-creator-tests/paper-notation-refactor/description-opt/SUMMARY.md
for per-query rates and the three descriptions tried.
@kencyke kencyke marked this pull request as ready for review April 23, 2026 12:16
@kencyke kencyke merged commit 4465f64 into main Apr 23, 2026
2 checks passed
@kencyke kencyke deleted the 12-claude-code branch April 23, 2026 12:20
@kencyke kencyke self-assigned this Apr 24, 2026
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.

Add files for coding agents (especially for Claude)

1 participant