[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DGRWA30C3T16NFD7HPVMXA":3,"skill-same:01M7DGRWA30C3T16NFD7HPVMXA":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7DGRWA30C3T16NFD7HPVMXA","cli-software",null,"Working rules for implementing or extending a command-line program from a written specification (subcommands, flags, exit codes, text and JSON output, error types). Use for every task whose prompt is a CLI spec; it shows how to turn the spec into a checklist, implement it, and prove each item by running the program before finishing.","jemdiggity\u002Fkojo","jemdiggity","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1940552?v=4","01M7DGK797SRB0B74KVSKQ44GZ","Jeremy Hale","01M7DGK7ABQPV6AA6CPDC2NNP7",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fluna-hc\u002Fsuperseded\u002Fr2d-postcondition-fidelity\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cli-software\ndescription: Working rules for implementing or extending a command-line program from a written specification (subcommands, flags, exit codes, text and JSON output, error types). Use for every task whose prompt is a CLI spec; it shows how to turn the spec into a checklist, implement it, and prove each item by running the program before finishing.\n---\n# CLI from spec: the checklist method\n\nThe spec is the test suite written in prose. Every table row, bullet, and example is checked by a hidden test, and every earlier part stays tested forever. Work in three passes.\n\n## Pass 1: extract the checklist (before writing code)\n\nWrite a numbered list into `scratch\u002FCHECKLIST.md`, one line per item, copied from the spec:\n\n1. Each command and flag, with its default and where it is allowed.\n2. Each error type: exit code, exact trigger, and where the bad input comes from (command-line value, file contents, semantic check). Take the exit code from the row naming the type; a general sentence such as \"parse errors exit 2\" never overrides an explicit number.\n3. Each output shape: field names, order, value formatting (prefixes, widths, sorting), text versus JSON, stdout versus file, and the form the example uses for each kind of value (scalar, vector, count).\n4. Each sentence containing \"must\", \"never\", \"only\", \"exactly\", \"sorted\", \"deterministic\", \"still\", \"unchanged\", or \"from this part onward\". Each numbered postcondition on an output is its own item.\n5. Each example invocation with its printed output and exit code.\n6. Each value syntax accepted on the command line (new characters, sized forms, case variants, separators), separately from what files may contain.\n\nExpect 20 to 60 items. Fewer means you skipped part of the spec; reread it.\n\n## Pass 2: implement against the list\n\n- Read all existing code first. Find every place that enumerates commands, flags, operators, error types, or formats (usage, dispatch, error emitter, tables) and extend each one. Stale hard-coded lists are the usual reason a new part misbehaves.\n- One error emitter: receives the command name and the error, looks the exit code up in one table, prints the envelope. The command field is the subcommand typed whenever one is present, even when a global flag or option value was bad.\n- One value parser and one value formatter, shared by all commands; add a parameter, never a copy. The formatter chooses the printed form by the declared kind of the signal as the spec defines it (scalar versus vector), never by width alone; a new command prints a value by calling the same function the existing command calls.\n- Command-line values and file contents map the same bad text to different error types. If the runtime parser delegates to the file parser, catch and re-raise the command-line type, and extend the runtime grammar with what the new part allows.\n- Any uncaught exception is a bug (internal-error exit, which no test expects). Translate missing files, bad JSON, failed int conversions, KeyError or IndexError on user names into the spec's types where the input origin is known.\n- Never name variables or classes after builtins or helpers you call (`format`, `type`, `input`, `id`, `hash`, builtin exception names).\n\n## Commands that write files or transform their input\n\nTheir tests check properties of the output, not one expected string:\n\n- Round trip: feed every file the program writes back into your own reader (the checking command, or whichever command reads that format). It must succeed. If the output holds a construct your parser rejects, such as a bare constant operand, fix the parser, then the writer.\n- Idempotence: run the transform on its own output; the second output must be byte-identical and any report must say nothing changed.\n- Preservation: when the spec promises behaviour is kept, compare input and output on several input vectors with your own evaluation or comparison command.\n- Postcondition scanner: for each numbered postcondition write a short `grep`-style check over the output text (nested same-operator calls, duplicate arguments, constant operands, an operand that also appears inside a sibling operand, non-canonical operators) and run it on three inputs built to violate that rule through an intermediate named signal, not only directly. Apply rewrites to a fixed point: one pass misses patterns that appear after another rule fires.\n- Reports, counts, tables: each named count follows the spec's definition of that term for that input format; feed the same design in two formats and compare. Row count as specified, no empty or null rows, header exact.\n\n## Pass 3: prove each item by running (mandatory)\n\nRunning the spec's own examples is part of implementing it; no framework or dependency is needed. Invoke with the interpreter path the spec's examples use; `python3` on PATH may print cache warnings, which are noise. Fixtures live inside the workspace under `scratch\u002F`.\n\n- Every example: fixture exactly as given, compare stdout and `echo $?` byte for byte (JSON key order, prefixes, sorting, blank lines).\n- Every error row: with `--json` and without; type, exit code, command field, nothing on stdout in text mode.\n- Every new value syntax: one success. Every new input or output format: run with the richest existing features (multi-bit values, nested expressions), not only the scalar example.\n- For every value-printing command: one scalar, one width-1 vector, one wide vector; forms must match the spec's example for each kind and the existing command's output for the same signal.\n- For every earlier part: one success command and one error command. Shared-code changes must not alter earlier output.\n- Tick an item only after its run passed. Fix and rerun until all are ticked. Spend at least a third of your effort here.\n\n## Finish\n\nDelete `scratch\u002F`. In your summary, list the commands you ran and name any item left unverified. Never finish with \"did not run\" while an interpreter is available.\n","# CLI from spec: the checklist method\n\nThe spec is the test suite written in prose. Every table row, bullet, and example is checked by a hidden test, and every earlier part stays tested forever. Work in three passes.\n\n## Pass 1: extract the checklist (before writing code)\n\nWrite a numbered list into `scratch\u002FCHECKLIST.md`, one line per item, copied from the spec:\n\n1. Each command and flag, with its default and where it is allowed.\n2. Each error type: exit code, exact trigger, and where the bad input comes from (command-line value, file contents, semantic check). Take the exit code from the row naming the type; a general sentence such as \"parse errors exit 2\" never overrides an explicit number.\n3. Each output shape: field names, order, value formatting (prefixes, widths, sorting), text versus JSON, stdout versus file, and the form the example uses for each kind of value (scalar, vector, count).\n4. Each sentence containing \"must\", \"never\", \"only\", \"exactly\", \"sorted\", \"deterministic\", \"still\", \"unchanged\", or \"from this part onward\". Each numbered postcondition on an output is its own item.\n5. Each example invocation with its printed output and exit code.\n6. Each value syntax accepted on the command line (new characters, sized forms, case variants, separators), separately from what files may contain.\n\nExpect 20 to 60 items. Fewer means you skipped part of the spec; reread it.\n\n## Pass 2: implement against the list\n\n- Read all existing code first. Find every place that enumerates commands, flags, operators, error types, or formats (usage, dispatch, error emitter, tables) and extend each one. Stale hard-coded lists are the usual reason a new part misbehaves.\n- One error emitter: receives the command name and the error, looks the exit code up in one table, prints the envelope. The command field is the subcommand typed whenever one is present, even when a global flag or option value was bad.\n- One value parser and one value formatter, shared by all commands; add a parameter, never a copy. The formatter chooses the printed form by the declared kind of the signal as the spec defines it (scalar versus vector), never by width alone; a new command prints a value by calling the same function the existing command calls.\n- Command-line values and file contents map the same bad text to different error types. If the runtime parser delegates to the file parser, catch and re-raise the command-line type, and extend the runtime grammar with what the new part allows.\n- Any uncaught exception is a bug (internal-error exit, which no test expects). Translate missing files, bad JSON, failed int conversions, KeyError or IndexError on user names into the spec's types where the input origin is known.\n- Never name variables or classes after builtins or helpers you call (`format`, `type`, `input`, `id`, `hash`, builtin exception names).\n\n## Commands that write files or transform their input\n\nTheir tests check properties of the output, not one expected string:\n\n- Round trip: feed every file the program writes back into your own reader (the checking command, or whichever command reads that format). It must succeed. If the output holds a construct your parser rejects, such as a bare constant operand, fix the parser, then the writer.\n- Idempotence: run the transform on its own output; the second output must be byte-identical and any report must say nothing changed.\n- Preservation: when the spec promises behaviour is kept, compare input and output on several input vectors with your own evaluation or comparison command.\n- Postcondition scanner: for each numbered postcondition write a short `grep`-style check over the output text (nested same-operator calls, duplicate arguments, constant operands, an operand that also appears inside a sibling operand, non-canonical operators) and run it on three inputs built to violate that rule through an intermediate named signal, not only directly. Apply rewrites to a fixed point: one pass misses patterns that appear after another rule fires.\n- Reports, counts, tables: each named count follows the spec's definition of that term for that input format; feed the same design in two formats and compare. Row count as specified, no empty or null rows, header exact.\n\n## Pass 3: prove each item by running (mandatory)\n\nRunning the spec's own examples is part of implementing it; no framework or dependency is needed. Invoke with the interpreter path the spec's examples use; `python3` on PATH may print cache warnings, which are noise. Fixtures live inside the workspace under `scratch\u002F`.\n\n- Every example: fixture exactly as given, compare stdout and `echo $?` byte for byte (JSON key order, prefixes, sorting, blank lines).\n- Every error row: with `--json` and without; type, exit code, command field, nothing on stdout in text mode.\n- Every new value syntax: one success. Every new input or output format: run with the richest existing features (multi-bit values, nested expressions), not only the scalar example.\n- For every value-printing command: one scalar, one width-1 vector, one wide vector; forms must match the spec's example for each kind and the existing command's output for the same signal.\n- For every earlier part: one success command and one error command. Shared-code changes must not alter earlier output.\n- Tick an item only after its run passed. Fix and rerun until all are ticked. Spend at least a third of your effort here.\n\n## Finish\n\nDelete `scratch\u002F`. In your summary, list the commands you ran and name any item left unverified. Never finish with \"did not run\" while an interpreter is available.\n",{"name":5,"description":7},"main","90c4e234b13d749b2f69ddcb1c759e5f667f6413","skills\u002Fluna-hc\u002Fsuperseded\u002Fr2d-postcondition-fidelity","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo","https:\u002F\u002Fgithub.com\u002Fjemdiggity","2026-11-01 06:04:44",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add jemdiggity\u002Fkojo --skill cli-software",{"tool":36,"command":37},"bunx","bunx skills add jemdiggity\u002Fkojo --skill cli-software",{"tool":39,"command":40},"pnpm","pnpm dlx skills add jemdiggity\u002Fkojo --skill cli-software","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fluna-hc\u002Fsuperseded\u002Fr2d-postcondition-fidelity\u002FSKILL.md",true,[],[45,52,57,62,67,72],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M7DGWAMS2Z08G9S6KYEBM4YG","service-spec","Invoke before reading any code, for any task whose prompt is a multi-part spec for a service, API or CLI built up over successive parts (part 1, part 2, ... each adding or changing behavior). Apply its rules while reading the spec literally and while choosing behavior where the spec is silent.","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3e-accept\u002FSKILL.md",[],[],{"skillNo":53,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7DGW5T9M4EXVHNTNW1NY6MR","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3d-exact-words\u002FSKILL.md",[],[],{"skillNo":58,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7DGW1S560QM0M72BSYP42XB","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3c-omit\u002FSKILL.md",[],[],{"skillNo":63,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7DGVXQS07PEJQBS7VJC9B7R","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3b-inherit\u002FSKILL.md",[],[],{"skillNo":68,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7DGVSEXFX35NZPSPBN9833Q","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround3\u002Fd3a-gate-lean\u002FSKILL.md",[],[],{"skillNo":73,"name":47,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7DGVNNTDB3EGQHJXTNM986H","Use for any task whose prompt is a multi-part spec for a service, API, or CLI built up over successive parts (part 1, part 2, ... each adding or changing behavior). Guides literal reading of the spec and the choices to make where it is silent.","https:\u002F\u002Fgithub.com\u002Fjemdiggity\u002Fkojo\u002Fblob\u002Fmain\u002Fskills\u002Fsonnet-dcs\u002Fround2\u002Fd2e-lean\u002FSKILL.md",[],[]]