From 7c34362fd2fc7ba944c272be65ec99c48fad6bfc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 10 Nov 2026 11:32:08 +0000 Subject: [PATCH] Remove docs that go stale when code changes (#70) Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01HwLsLtFgHv4ix6TZzPYRcT --- CLAUDE.md | 29 +---------------------------- README.md | 26 -------------------------- 2 files changed, 1 insertion(+), 54 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index cf95c6b..6baf3df 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,30 +1,3 @@ # argparse -## CI is pinned - -Every input to CI is pinned in the source (bats-lang/repository-prototype#269), -so a commit that passes keeps passing: - -* `bats.lock` is committed: CI never runs `bats lock` for the package, so - `bats check` and `bats build` fetch exactly the locked versions, and fail - when the lock is missing or does not match `bats.toml`. A library's lock - pins only its own CI and tests; its dependents still resolve their own. -* The compiler is the commit in `.github/bats-version`, read by every - workflow that builds bats (and by the publish workflow). -* The package repository is fetched at the commit in - `.github/repository-version`, so what the test packages under `tests/` - lock (`bats lock --dev`) is pinned too. -* `publish.yml` and `relock-pins.yml` in bats-lang/repository-prototype are - called by commit, never `@main`. - -Pins move only through a reviewed pull request that runs the same CI. The -daily `relock.yml` (the shared `relock-pins.yml`) relocks against the -newest, moves the compiler and repository pins, pushes `relock/`, -opens a pull request listing the old and new versions and dispatches -`check.yml` on it, so a breaking publish shows as a red relock pull -request and main stays green. GITHUB_TOKEN cannot change workflow files, -so without a `RELOCK_TOKEN` secret that pull request lists a workflow pin -that would move instead of moving it: move it in a pull request of its -own. A pull request that needs newer packages runs `bats lock ---repository ` and commits `bats.lock` (and -`.github/repository-version`) with the change. +CI: see bats-lang/repository-prototype's CLAUDE.md, "A library's check.yml is a caller of package-check.yml" and "CI Pattern: every input is pinned". diff --git a/README.md b/README.md index bd3eee0..b544ebb 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,6 @@ Command-line argument parser for the [Bats](https://github.com/bats-lang) programming language. -## Features - -- Flag arguments (`--verbose`, `-v`) -- String options (`--name value`) -- Positional arguments -- Help text generation -- Parses from raw `/proc/self/cmdline`-style null-separated buffers - -## Usage - -```bats -#use argparse as AP - -val p = $AP.parser_new(name_bv, name_len, desc_bv, desc_len) -val @(p, h_verbose) = $AP.add_flag(p, name_bv, name_len, $R.some(118) (* -v *), help_bv, help_len) -val @(p, h_file) = $AP.add_string(p, name_bv, name_len, $R.none(), help_bv, help_len, false) -val @(p, h_jobs) = $AP.add_int(p, name_bv, name_len, $R.none(), help_bv, help_len, 1, $AP.IntBetween(1, 8)) -val result = $AP.parse(p, cmdline_bv, cmdline_max, argc) -``` - -A short name is `$R.some(c)` or `$R.none()`; an int's range is `AnyInt()` or -`IntBetween(low, high)`; the subcommand chosen (`get_subcmd`) is an option. -A failure is a `parse_error`: `err_unknown_long` (with the closest option, -if any), `err_unknown_short`, `err_range`, `err_not_int`, `err_exclusive`, -`err_choice` or `err_too_long`. - ## API See [docs/lib.md](docs/lib.md) for the full API reference.