feat: implement @legioncodeinc/cli-kit v0.1.0 (PRD-001)#1
Merged
Conversation
Zero-runtime-dependency CLI mechanism kit for the Apiary CLI suite. Six modules: color, exit-codes, arg-parser, shutdown, telemetry, usage. 173 tests passing. Security + QA close-out clean. AC Ledger: 44/45 VERIFIED, 1 PARKED (AC-8 Hive adoption, cross-repo). Modules: - exit-codes: ExitCode enum (0/1/2), parseError(), declined() - color: SGR helpers with NO_COLOR/FORCE_COLOR/TTY honors - arg-parser: shared argv parser (collapses Nectar's 5 bespoke parsers) - shutdown: Windows-safe process teardown (undici close + handle unref + backstop) - telemetry: isTelemetryOptedOut(toolName) env resolver - usage: grouped usage-table formatter Refs: PRD-001, cli-contract.md, cli-parity-audit.md
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Replicates the release pipeline from hive/doctor/honeycomb/nectar: - ci.yaml: 3-OS gate (typecheck + test + build + pack) - release-gate.yaml: AI changeset (Sonnet 5), patch auto-bump, minor gated - release-approve.yaml: @thenotoriousllama 'Approved Release' comment bridge - tag-on-merge.yaml: push vX.Y.Z tag on merge (via RELEASE_PAT) - release.yaml: OIDC trusted publishing, release notes, Discord - scripts/release/: ai-changeset, apply-bump, bedrock, discord-notify Also adds 'typecheck' script to package.json.
Contributor
Author
|
Approved Release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the zero-runtime-dependency CLI mechanism kit for the Apiary CLI suite, consolidating the stable cross-cutting mechanisms currently re-implemented (and drifting) across honeycomb, doctor, hive, and nectar.
Modules (6)
exit-codesExitCodeenum (0/1/2),EXIT_OK/EXIT_ERROR/EXIT_USAGE,parseError(),declined()colorsetColorEnabled(),disableColor(),isColorEnabled(),bold/dim/red/green/yellow/cyan/amberarg-parserparseArgs(),FlagSpec,ParseOptions,ParsedArgs,ParseResultshutdownfinalizeOneShot()— Windows-safe process teardowntelemetryisTelemetryOptedOut(),forceOptOut(),resetOptOutOverride()usageformatUsage(),UsageGroup,UsageInputindex(barrel)VERSION173 tests passing. Build clean.
npm pack --dry-runshows zero source/test/config leak.AC Ledger: 44/45 VERIFIED
AC-8 (Hive adoption) is PARKED — requires a cross-repo PR to
legioncodeinc/hive. Tracked as BLK-1 in the execution ledger.Close-out
"dependencies": {}). No PII, no secrets, noeval/child_process/fsin published code. Clean npm pack surface.library/requirements/completed/prd-001-cli-kit/qa/prd-001-cli-kit-qa.md. Every AC traced to source + test.Key design decisions (resolved during PRD review)
=22.5.0floor, root-only exports (no subpaths)disableColor()for --json seamprocess._getActiveHandles()kept in try/catch, doc-only long-running exemptiondeclined()returnsEXIT_OK(stdout),EXIT_DECLINEDomitted entirely--limitstandard ismin: 1, no array flags,--bool=falseis usage errorisTelemetryOptedOut(toolName)ships (stateless env-only)Related