Skip to content

docs: update formula writing skill#11

Open
MeteorsLiu wants to merge 3 commits into
xgo-dev:mainfrom
MeteorsLiu:docs/write-formula-skill
Open

docs: update formula writing skill#11
MeteorsLiu wants to merge 3 commits into
xgo-dev:mainfrom
MeteorsLiu:docs/write-formula-skill

Conversation

@MeteorsLiu

@MeteorsLiu MeteorsLiu commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Update the formula-writing skill for the current LLAR Formula DSL and make it discoverable by Codex.

The implementation includes:

  • Replace obsolete Formula and matrix guidance with current API tables and source links.
  • Move XGo and classfile rules into a dedicated reference used before .gox edits.
  • Remove embedded package recipes and direct authors to current repository formula references.
  • Add an identical .agents/skills/write-formula copy for Codex repository discovery.
  • Define validation expectations for dependencies, installed output, metadata, matrices, and cache hits.

This gives formula authors source-backed guidance in both Claude and Codex without prescribing package-specific build recipes.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

  • ModuleF exposes Target(), Defaults, Filter, OnTest, OnRequire, OnBuild; target.require/target.options map to Target().Require()/Options(). Confirmed accurate.
  • There is no matrix top-level method and no ctx.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.md frontmatter — allowed-tools removed. The prior version scoped the skill to Read, 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 since Bash was already allowed, but this is a behavioral change arriving in a docs:-labeled PR. Please confirm it's intentional; a scoped allowed-tools list 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. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

1 participant