From b0c92567a34a2b3a6e12fa08eae781cc8dca621b Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Wed, 5 Aug 2026 19:45:39 +1000 Subject: [PATCH] G-151 achieved: punk::args::parse_report landing report + ansistring TRUNCATE (args 0.18.0, ansi 0.2.0) User-directed activation and implementation in one arc (proposed -> active at the user's word with the activation-freshness overlap survey recorded, -> achieved + archived on acceptance). punk::args 0.18.0 - new parse_report: the annotated SUCCESS render (the arg_error usage table's success-side sibling). One row per value-holding argument (received, or -default in effect) in declaration-section order (leaders, opts, values), columns Argument | Source | Value; Source carries received / received xN / default (the plain-mode twin of the colour marking: CLR(check)/CLR(parsekey_hint)); absent optionals get no row. Entry forms per acceptance: a punk::args::parse result dict, or ' withid ' (the parse is performed first - a rejected line raises the same validation error parse would; errorcode parity pinned). Returns: table (bordered textblock block, default), tableobject, string (plain lines; also the degraded no-textblock path), dict (machine form - never elided). The canonical demonstration pinned: {build punk95 -confirm 0} lands 'args (received x2) = -confirm 0' - a flag-like word consumed as a VALUE visibly attributed to its consuming argument (the make.tcl dry-run 'kitname = punk91 -confirm 0' class from the G-143 sessions). Display elision is type-aware, deterministic, always marked: strings single-line-ized (ansistring VIEW -lf 1 -vt 1 -sp 0 - controls and embedded ANSI render visibly so a value cannot disturb the table, real spaces stay real) then grapheme-capped with '...' + ' (len N)'; -multiple/-type list values element-capped '(+N more)'; -type dict values pair-capped '(+N pairs)'. Width cascade per the G-149 plumbing precedent: caller -valuewidth > new @cmd directive key -reportvaluewidth (documented in define -help) > built-in 48; 0 = no cap; never console-derived (the G-007 emit-then-query lesson). Row data rides the G-049 private::parse_status_build structure - no second status assembler; display-level bridging recovers the value-in-effect across the parse result's storage-key folds (-parsekey renames, aliased optionsets' last-|-member finalopts fold) so received aliased args keep their row - engine-level rationalization recorded as a G-084 follow-on disposition. The registered two-form definition (parsed/withid) follows parse_status's structure - per-form @leaders first, then the shared @opts via a re-widened @form selection (the resolver rejects leaders declared after a form's options). punk::ansi 0.2.0 - new ansistring TRUNCATE ?-ellipsis marker? string maxgraphemes (design lean 4: the ANSI/grapheme-safe truncate primitive homes in ansistring beside RANGE/VIEW): fits => byte-identical passthrough (trailing and non-SGR codes included); truncation => RANGE-extracted prefix (merged SGR re-application per the contract documented at 0.1.4) + marker totalling exactly maxgraphemes, with an SGR reset appended before the marker when the prefix carries codes; the marker is charged against the budget and itself truncated when it alone meets/exceeds it; maxgraphemes 0 => empty string. Grapheme-count based (column-aware variant a recorded follow-on). Strict option handling (deliberately unlike VIEW's pinned silent tolerance). Ensemble export + PUNKARGS argdoc + doctools comment. Tests: new args/parsereport.test (13 - canonical attribution, entry parity, dict shape/row order/row policy, solo+multi xN multiplicity, per-type elision markers, dict-never-elided, width cascade, single-line-ization, alias bridging, bordered/tableobject renders, failure parity, bad calls, own-definition render); ansi/ansistring.test +2 TRUNCATE pins (budget/passthrough/errors; ANSI-reset + CJK + combining-cluster safety). Full punk/args subtree 331 passed / 3 pre-existing skips / 0 failed and punk/ansi subtree 73/73 - each on native tclsh90 (9.0.3) AND tclsh87; failure-side rendering unchanged per acceptance. Minted modules/punk/args-0.18.0.tm + ansi-0.2.0.tm via make.tcl modules; bootsupport/vfscommon promotion left to the next cycle - make.tcl keeps its interim one-line report (and its 4-copy 'no annotated success render yet' comment) until the promotion-gated follow-on lands. Goals: G-151 entry moved to GOALS-archive.md, detail file to goals/archive/ with verification evidence and 5 Follow-on lines (make.tcl interim-report retirement open; arg_error value-truncation via the same helpers open; storage-key rationalization => goal G-084; column-aware TRUNCATE open; word-oriented inverse view open). Activation-survey Related: lines recorded (G-166, G-084, G-167 back-pointer); reference sweep updated G-170 (sequencing lean honoured - its dry-run arm consumes this render), G-167 archive marker, G-084 back-pointer note. src/tests/modules AGENTS.md punk/args + punk/ansi bullets extended. goals_lint clean (83 active / 87 archived). Claude-Session: https://claude.ai/code/session_0156PuejSCGjgeGb7jiABrDU Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- GOALS-archive.md | 4 + GOALS.md | 4 - goals/G-084-punkargs-parsekey-completeness.md | 9 + ...G-151-punkargs-annotated-success-render.md | 72 --- ...167-punkargs-version-delta-availability.md | 5 +- goals/G-170-launcher-help-depth.md | 16 +- ...G-151-punkargs-annotated-success-render.md | 175 +++++++ src/modules/punk/ansi-999999.0a1.0.tm | 81 +++- src/modules/punk/ansi-buildversion.txt | 3 +- src/modules/punk/args-999999.0a1.0.tm | 454 ++++++++++++++++++ src/modules/punk/args-buildversion.txt | 3 +- src/tests/modules/AGENTS.md | 4 +- .../punk/ansi/testsuites/ansi/ansistring.test | 50 ++ .../args/testsuites/args/parsereport.test | 309 ++++++++++++ 14 files changed, 1101 insertions(+), 88 deletions(-) delete mode 100644 goals/G-151-punkargs-annotated-success-render.md create mode 100644 goals/archive/G-151-punkargs-annotated-success-render.md create mode 100644 src/tests/modules/punk/args/testsuites/args/parsereport.test diff --git a/GOALS-archive.md b/GOALS-archive.md index a5b0dbab..f758041d 100644 --- a/GOALS-archive.md +++ b/GOALS-archive.md @@ -20,6 +20,10 @@ Do not edit archived records here except to fix a broken path. Archived detail f ## Archived goals +### G-151 [achieved 2026-08-05] punk::args annotated success render (received-args landing report) → detail: goals/archive/G-151-punkargs-annotated-success-render.md +Scope: src/modules/punk/args-999999.0a1.0.tm (parse-result presentation); src/tests/modules/punk/args/testsuites/args/ +Acceptance: given a successful parse result (or the words plus definition id), a punk::args surface renders per-argument received-vs-default annotation covering leaders, opts and values including -multiple aggregation - the canonical demonstration being a flag-like word consumed as a VALUE (the 'punk91 -confirm 0'-as-three-values class) visibly attributed to its consuming argument; failure-side rendering is unchanged (existing arg_error pins pass); the behaviour is pinned in the args testsuite. make.tcl retiring its interim one-line 'dry-run: line accepted ...' report in favour of this render is recorded as consumer follow-through after a bootsupport promotion, not part of this acceptance. (Achieved as punk::args::parse_report - result-dict and words+withid entry forms, Argument|Source|Value landing table in table/tableobject/string/dict returns with the dict form never elided; type-aware always-marked display elision over the new ansistring TRUNCATE grapheme primitive (punk::ansi 0.2.0); caller -valuewidth > @cmd -reportvaluewidth > 48 width cascade; punk::args 0.18.0, new parsereport.test, args+ansi subtrees green on tclsh90 and tclsh87.) + ### G-149 [achieved 2026-08-05] punk::args: configurable multi-form synopsis hint labels → detail: goals/archive/G-149-punkargs-formhint-labels.md Scope: src/modules/punk/args-999999.0a1.0.tm (usage/arg_error multi-form Synopsis hint column); src/tests/modules/punk/args/testsuites/args/ Acceptance: a punk::args mechanism (definition directive and/or usage/arg_error caller option) replaces the ' i -form N ...' hint labels with caller-supplied text and can suppress the column entirely; unconfigured definitions render byte-identical to today (existing synopsis/usage/arg_error pins pass unchanged); the mechanism is pinned in the args testsuite. make.tcl adopting it (e.g a 'make.tcl help tool ' phrasing) is recorded as consumer follow-through after a bootsupport promotion, not part of this acceptance. (Achieved with both arms: '@cmd -formhint