Parent
#60
Type
AFK for the script. W3C write tokens remain HITL (tracked on the epic). Changelog text is not this ticket — that is #73.
What to build
Today CG approve-rule.mjs writes index.md via rule-transform without --proposed, then asserts the rule is absent from rule-versions.yml. That is first-time approval only. The CG / WAI readme already asks for a change list on updates, but the workflow only takes ruleId and branch.
Extend the same script for re-approval of a rule that already has index.md:
- Copy current
index.md to {previousIsoDate}.md
- Write new
index.md with ruleTransform (proposed: false)
- Update
rule-versions.yml: new index.md row with changes: from an explicit input; previous index row becomes the dated file
- Keep
examples.json approved: true
- One git branch per rule (no batching several rules onto one branch)
Changelog input: required for updates, omitted for first-time approval. Accept repeated --change "…" flags and/or a small YAML file. A workflow_dispatch text box is a poor authoring surface; the skill in #73 (or a person) writes the list, then this script consumes it.
Do not fill changes: from classifier git subjects. Those are board raw material; the published WAI bullets are a confirmed, user-facing list (see existing rule-versions.yml entries). Refuse a re-approval with an empty changelog.
Do not open the GitHub PR in this ticket unless that is the cheapest way to verify; opening PRs is #67. The intended human/agent front-end is #73.
Acceptance criteria
Blocked by
Nothing in this epic. Classifier JSON (#62) is already on main; it is useful context for #73, not an input to this script.
Unblocks
Parent
#60
Type
AFK for the script. W3C write tokens remain HITL (tracked on the epic). Changelog text is not this ticket — that is #73.
What to build
Today CG
approve-rule.mjswritesindex.mdviarule-transformwithout--proposed, then asserts the rule is absent fromrule-versions.yml. That is first-time approval only. The CG / WAI readme already asks for a change list on updates, but the workflow only takesruleIdandbranch.Extend the same script for re-approval of a rule that already has
index.md:index.mdto{previousIsoDate}.mdindex.mdwithruleTransform(proposed: false)rule-versions.yml: newindex.mdrow withchanges:from an explicit input; previous index row becomes the dated fileexamples.jsonapproved: trueChangelog input: required for updates, omitted for first-time approval. Accept repeated
--change "…"flags and/or a small YAML file. Aworkflow_dispatchtext box is a poor authoring surface; the skill in #73 (or a person) writes the list, then this script consumes it.Do not fill
changes:from classifier git subjects. Those are board raw material; the published WAI bullets are a confirmed, user-facing list (see existingrule-versions.ymlentries). Refuse a re-approval with an empty changelog.Do not open the GitHub PR in this ticket unless that is the cheapest way to verify; opening PRs is #67. The intended human/agent front-end is #73.
Acceptance criteria
rule-versions.ymlwith anindex.md(nochanges:required)Blocked by
Nothing in this epic. Classifier JSON (#62) is already on main; it is useful context for #73, not an input to this script.
Unblocks