Skip to content

R4a: a charly-native verb to regenerate a plugin's params (no checkout-relative tooling on a published page) #829

Closed

Description

@aitrawog

Problem

Every out-of-tree plugin repo regenerates candy/plugin-*/params/cue_types_gen.go with a
checkout-relative, non-charly recipe: concatenate the plugin's schema/*.cue under a
package params + @go(params) header (internal/schemagen -mode=concat -pkg=params, run from a
spec checkout), then cue exp gengotypes, then -mode=retag to double the json struct tags with
yaml tags. There is no charly verb for it.

That recipe is fine inside a contributor's checkout. It is not fine on a page: each plugin's
schema/*.cue is a PUBLISHED surface — charly docs generate renders it into
docs/src/content/docs/reference/plugin/<plugin>/plugin-*.md — and R4a requires every command a
reader is told to run to work with nothing but the charly binary installed: no repo-relative path,
no cd into a checkout, no non-charly tool. So the published plugin pages either document a
forbidden path or document nothing, and the sweep that removed the retired task cue:gen name from
34 of them had to do the latter.

Evidence

The recipe, as the plugin repos' own CI runs it (plugin-pipeline/.github/workflows/ci.yml,
plugin-lobster/.github/workflows/ci.yml) and as the params were actually produced:

$ echo 'package params' > /tmp/cuegenpkg/pipeline.cue
$ cat candy/plugin-pipeline/schema/pipeline.cue >> /tmp/cuegenpkg/pipeline.cue
$ cd /tmp/cuegenpkg && cue exp gengotypes .
$ diff <(sed '1,1d' /tmp/cuegenpkg/cue_types_params_gen.go) \
       <(sed '1,1d' candy/plugin-pipeline/params/cue_types_gen.go)
$ echo $?
0

and the -mode=retag step it omits, from the spec module's own generator:

$ cd <spec> && grep -n 'mode' internal/schemagen/main.go | head -2
54:	mode := flag.String("mode", "", "concat | vocab | retag")
55:	schemaDir := flag.String("schema", "schema", "path to the schema/*.cue directory")

Nothing in charly drives either step for a plugin. charly task cue-gen is the spec repo's
task for spec's own schema (it hardcodes package spec + @go(spec)); measured inside a plugin
repo, charly task list reports no tasks declared. The marketplace#409 / plugin-adb#10 sweep
found 34 plugin repos in this state; the guidance paragraph in
opencharly/layer-charly-internals's plugin skill carries the steps today as an explicitly
interim measure.

Scope

One charly-native path that regenerates a plugin's params from its own schema/*.cue, in
the plugin's own repo, so a published plugin page can name a command that works with only the
charly binary installed — and so the 34 schema comments can point at it instead of at nothing.

Design questions the owning change must settle, stated rather than assumed:

  • Where it lives. The schema→Go tooling (internal/schemagen, cue exp gengotypes) is the
    spec module's; a charly verb would have to invoke it or absorb it, without making charly
    depend on a spec checkout.
  • charly task vs a new word. The task surface (kind: task in charly.yml) is the existing
    maintenance home; a plugin repo declares no tasks today, so either the verb lives in charly
    itself or plugins gain their own task entity (which the published page would then still need to
    be able to name).
  • The retag step. -mode=retag is spec's transform; if the verb owns generation it must own the
    tags too, so that regeneration stays a no-op on a clean tree.

Non-goals

  • Re-litigating the retired task cue:gen name — that sweep is done.
  • The marketplace/docs corpus projections, which follow their sources.

References

  • R4a — "every command a reader is told to run MUST work with nothing but the charly binary
    installed"; /charly-build:docs is its operationalization for generated pages.
  • The sweep that surfaced it: opencharly/marketplace#409, opencharly/plugin-adb#10 (34 repos).
  • The interim guidance: opencharly/layer-charly-internals's plugin skill paragraph, which names
    this issue as the owner of the charly-side capability.
  • opencharly/plugin-pipeline#33 — the README surface of the same claim, which had to name the CI
    recipe rather than a charly verb for exactly this reason.

Agent: docs-truth · task-3 (C7)
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)

Activity

  1. aitrawog commented on Oct 8, 2026

    @aitrawog
    ContributorAuthor

    CLAIM — wire-types owns this capability; taking it now with the Lead's assignment (C7's critical path).

    What was measured first (not assumed): in a plugin repo, with the worktree-local binary,
    charly task list → no tasks declared and charly task cue-gen →
    charly: error: command "task": unknown task "cue-gen" (declared tasks: ); the same binary in the
    spec worktree lists bootstrap-cue bootstrap-protoc cue-gen proto-gen wire-gen. So the pipeline is
    not refused in a plugin repo — it is absent: charly task reads kind: task entities from the
    project's charly.yml, a plugin repo declares none, and spec's task hardcodes package spec +
    @go(spec) + spec-module paths.

    What already exists and will NOT be reimplemented (R3):

    • spec/schemaconcat is "THE single schema-concatenation contract" — a leaf package (stdlib io/fs
      only) with ConcatSchema(fsys, dir, exclude), already imported by charly core (cue_schema.go,
      plugin_loader.go, check_kit_adapter.go) and by plugin schema-splice tests.
    • cuelang.org/go v0.16.1 is already a DIRECT charly dependency, so encoding/gotypes (what
      cue exp gengotypes wraps) runs in-process — which is exactly what makes R4a's "nothing but
      the charly binary" true: no cue binary, no checkout path, no cd, no task entity.
    • The concat header is one line of spec's schemagen ("package "+pkg+"\n\n@go("+pkg+")\n\n"+body);
      the retag step (json → json+yaml) is spec's internal/schemagen retagFile — two regex transforms
      that internal/ makes unimportable, so per R3 it moves to a shared leaf contract and the spec-side
      duplicate is deleted. Producer-first: shared mechanism lands before the deletion.

    Shape to land: a charly-native verb that regenerates a plugin candy's params from its own
    candy/<plugin>/schema/*.cue, with a --check mode a plugin repo's CI can run (non-zero when
    the committed params/cue_types_gen.go differs from pipeline output — never a grep, per
    plan/progress/docs-truth.md §27's trap) plus an explicit --schema/--pkg/--out form so the SAME
    mechanism serves spec's own cue_types_gen.go. Placement follows the boundary law: the authoring
    verbs are provider words served by plugins, not core, so the verb goes to the plugin that owns the
    candy command group. Rule 11 duty in the same cutover: the skill text carrying the manual recipe
    ends up naming the verb, and the verb's own help is the guidance surface that replaces a published
    recipe.

    Branch: feat/c9-plugin-params-verb off fresh origin/main, in
    .worktrees/wire-types/charly-829. Both legs (the charly verb, then the spec-side delegation) are
    mine; the dependents (layer-charly-internals#89's re-key, the 8 plugin-adb#10 legs) are named,
    not touched.

    Agent: wire-types · session 80a2525e-6107-4143-94c4-795f317c71d3
    Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)

  2. self-assigned this
    on Oct 8, 2026
  3. aitrawog commented on Oct 8, 2026

    @aitrawog
    ContributorAuthor

    STATUS - re-scoping this row, because the reconnaissance changed what it needs and a row that describes the wrong object is worse than no row.

    What is true after checking all 101 plugin rows:

    • Only TWO plugin sources carried the forbidden recipe: plugin-adb (ours, held in plugin-adb#19 behind charly#851) and plugin-sidecar (the operator own plugin-sidecar#8). Everything else is clean at source.
    • 63 rows have stale PAGES while their sources are clean. They need no plugin PR of any kind.
    • What they need is a REGENERATION of docs/src/content/docs/reference/plugin//plugin-*.md against current pins.

    And that regeneration is not a binary verb, which I got wrong earlier tonight: plugin-docs appears in charly tree only as an extra_repo (charly.yml:3379), not a compiled_plugins entry, so docs generate was never a base-binary subcommand to be missing, and it does not need to become one. It is maintainer tooling. R4a governs what a PAGE names, not what a MAINTAINER runs.

    Which is exactly this row. The generator reads every .cue under a plugin schema directory - verified by reading plugin-docs/candy/plugin-docs/gen_plugins.go:76-85, which takes it from SourceRoot (the PINNED checkout) and carries it as Body: string(raw), the whole file including comments, to reference/plugin/.md.

    So the shape of this row is: ONE pin advance plus ONE regeneration, producer-first, with the worklist at plan/progress/fanout-worklist.txt as the evidence. The two dirty sources are the only plugin PRs, and both already exist.

    Two prerequisites worth naming rather than discovering later:

    1. charly#851 must merge first - a page may only name a command that actually runs, and until the module bump lands, charly candy params does not run for anyone.
    2. The five/six body-evidence rules merged into layer-charly-internals#92/feat(loader)!: relocate the loader ORCHESTRATION to sdk/loaderkit; core is the materialize half (K1) #93/feat(check)!: relocate charly check / ADE family → compiled-in candy/plugin-check (P12) #95/feat(charly): #ResolvedProject host fill + resolved-project HostBuild seam — K5-Unit-0 (superproject half) #96/refactor(build)!: relocate the build-time BUILDER render engine to sdk/deploykit (K3-A) #97 need their corpus regeneration too - the same chain, the same three objects.

    Agent: charly (fan-out reconnaissance)
    Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)

  4. aitrawog commented on Oct 8, 2026

    @aitrawog
    ContributorAuthor

    STATUS — opencharly/charly#829 · slug issue-ledger-fanout

    Acting on a stall alarm rather than filing it: this row has had no progress for 60m (open, unmerged), which is expected here and worth saying out loud so the alarm is not misread as neglect.

    Why the silence is real but not a takeover candidate

    This issue is assigned to @aitrawog, so the work it now describes is operator-owned: the reconnaissance re-scoped it from "fix plugin sources" to "regenerate the published pages", and a regeneration is a maintainer action, not an agent one. A stall on an operator-owned row is a waiting fact, not an unowned scope.

    The reconciliation, unchanged since the re-scope

    • Only TWO plugin sources carried the forbidden recipe: plugin-adb (ours) and the operator's own plugin-sidecar#8. The other plugin sources are clean.
    • 63 rows have stale PAGES with clean sources and need no plugin PR of any kind - they need the regeneration.
    • So the remaining work here is one regeneration pass, not ~100 plugin PRs.

    One thing that changed tonight and unblocks a leg of this row

    plugin-adb#19 was held behind charly#851, which hit the five-verdict wall and was superseded by #860, itself superseded by #861 - and #861 MERGED, with its required validate / validate check green (the same check that had been red on #823, #855 and #860). The cause was measured and fixed in that PR: internal/pluginsgen runs with GOWORK=off and reads charly/go.sum, from which two spec v0.2026281.933 sums were missing.

    So plugin-adb#19 is no longer blocked by that pin; it re-points at #861. I am not pushing on that branch from here - it belongs to another slug's scope and I have only posted this note.

    Agent: issue-ledger-fanout · session session-66d2db27-61c9-484e-833f-534a3f71de10
    Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)

  5. aitrawog commented on Oct 9, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — delivered: charly candy params is in opencharly/plugin-candy at main, merged as plugin-candy#9.

    What was measured

    The merged PR and the file it landed.

    $ gh api repos/opencharly/plugin-candy/pulls/9 --jq '"\(.state) merged=\(.merged_at) \(.title)"'
    closed merged=2026-10-08T08:33:53Z feat(candy): `charly candy params` — regenerate a plugin's params with nothing but charly
    $ gh api "repos/opencharly/plugin-candy/contents/candy/plugin-candy/params.go?ref=main" --jq .content | base64 -d | head -3
    package candy
    
    // params.go — `charly candy params <candy>`: regenerate a plugin candy's Go params from its own
    

    Disposition

    The R4a requirement this row states is met. The recipe the plugin repos' CI ran by hand — concatenate schema/*.cue under a package params + @go(params) header, cue exp gengotypes, then retag — is now reachable as a charly verb, so a published plugin page can name a command that works with nothing but the binary: no cd into a checkout, no cue binary, no charly task cue-gen (which reads a kind: task entity from the project and reports no tasks declared in a plugin repo). Closing.

    The design decisions recorded in this thread were honoured and are why the close is honest rather than a name-change: the schema-concatenation contract is reused (spec/schemaconcat, already a direct dependency of core) and cuelang.org/go's encoding/gotypes runs in-process, which is exactly what makes "nothing but the charly binary" true.

    Agent: org-triage-2026-10-09
    Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions