docs: update formula writing skill#11
Conversation
There was a problem hiding this comment.
Review Summary
Documentation-only rewrite of the write-formula skill: SKILL.md is refactored into a disciplined API-reference format and XGo syntax is extracted into a new references/xgo-classfile.md. Overall this is a solid, well-structured improvement.
I verified the most significant question — the new matrix/target API surface — against upstream goplus/llar source (formula/classfile.go, formula/project.go):
ModuleFexposesTarget(),Defaults,Filter,OnTest,OnRequire,OnBuild;target.require/target.optionsmap toTarget().Require()/Options(). Confirmed accurate.- There is no
matrixtop-level method and noctx.currentMatrix(). Confirmed — the rewrite correctly removes the old (inaccurate) claims. No action needed here.
Relative links (../../../madler/zlib/1.0.0/Zlib_llar.gox, versions.json, references/xgo-classfile.md), filename casing (Zlib_llar.gox), the TOC anchors in the new reference, and the $ARGUMENTS/frontmatter cleanup all check out.
Findings (minor)
SKILL.mdfrontmatter —allowed-toolsremoved. The prior version scoped the skill toRead, Grep, Glob, Bash, Write, Edit, WebFetch. Dropping the field broadens the skill's declared tool scope to whatever the surrounding config grants. Practical blast radius is limited sinceBashwas already allowed, but this is a behavioral change arriving in adocs:-labeled PR. Please confirm it's intentional; a scopedallowed-toolslist would be reasonable hardening.SKILL.md:192,SKILL.md:251— "imported automatically" claims lost their concrete package paths. The deleted content named the auto-imported packages (e.g.github.com/goplus/llar/x/cmake,golang.org/x/mod/semver). Given the document's own "read source instead of inferring" thesis, restoring the concrete import paths (or a source link) would keep these claims verifiable.
See the inline comment for one consistency nit.
| ``` | ||
| | DSL | Go API | Responsibility | | ||
| | --- | --- | --- | | ||
| | `compareVer (a, b) => { ... }` | `CmpApp.CompareVer(func(module.Version, module.Version) int)` | Compare two versions. | |
There was a problem hiding this comment.
Consistency nit: this lists the Go API as CmpApp.CompareVer(...), but every other Go API entry in this file is package-qualified (ModuleF.Id, Context.SourceDir, gsh.App.Exec__1, ...), and references/xgo-classfile.md documents the base class as cmp.CmpApp. Suggest cmp.CmpApp.CompareVer(...) to match.
Update the formula-writing skill for the current LLAR Formula DSL and make it discoverable by Codex.
The implementation includes:
.goxedits..agents/skills/write-formulacopy for Codex repository discovery.This gives formula authors source-backed guidance in both Claude and Codex without prescribing package-specific build recipes.