Tree:
d0834c1d05
master
v0.1a
${ noResults }
717 Commits (d0834c1d05b874bde6e8d9863a43cabf44363ba0)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
d0834c1d05 |
make.tcl argdoc: adopt G-045 @normalize block-form authoring; AGENTS guidance for punk::args doc ergonomics
Fixes the constructed-definition indent leak user review spotted in 'make.tcl help' output (@cmd -help Description first line rendered less indented than continuations): HELPTEXTS and the inline shell/help/toplevel help values are now block-form (first value line whitespace-only) with a bare @normalize in every constructed definition, per G-045's preferred style. The braced option fragments never leaked (literal block-shaped parts get file-style normalization) and head-form values are contractually untouched by @normalize. Also adds a define-time capability probe (punk::args::get_spec on representative ids inside the guarded block) so a stale punk::args that accepts the raw text but cannot resolve a mechanism (e.g pre-@normalize snapshots) degrades to the plain fallback immediately instead of erroring at first parse. AGENTS infrastructure for future documentation work: src/modules/AGENTS.md "Documentation And Comments" gains a "punk::args definition authoring ergonomics" subsection (G-045 mechanisms: @normalize + block form for constructed defs, -unindentedfields, -& record continuation, container quoting rules; plus the G-030 lessons: explicit @form -synopsis for script-level ids, -optional 0 for pointed choiceviolation errors); src/AGENTS.md cross-references it and names ::punkboot::argdoc as the in-tree constructed-def exemplar. Follow-up recorded in the G-030 archive. Verified: flush Description rendering for toplevel/subcommand/shell/help usage; dispatch, degraded mode (PUNKBOOT_PLAIN) and usage-error paths re-verified; layout make.tcl copies re-synced via 'make.tcl bootsupport -confirm 0' (punkcheck channel); goals_lint unchanged (only the pre-existing G-078/G-081 index-mirror findings). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
d385738e20 |
bootsupport/layouts: sync punk::args 0.12.0 + punk 0.2.6, lib 0.4.3, ns 0.5.0, repl 0.5.1, tclcore moduledoc 0.3.4 (G-030)
Snapshot refresh via 'make.tcl modules -confirm 0' + 'make.tcl bootsupport -confirm 0' after punk::args joined the bootstrap-tracked staleness set (bootsupport had 0.5.0 vs source 0.12.0 - the new gate tripped as designed). Superseded versions pruned by punkcheck records; project-layout bootsupport trees and layout make.tcl copies followed via the established punkcheck channel (punk.basic, punk.project-0.1, punk.shell-0.1). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
7ea1deaae5 |
G-030 achieved: make.tcl dogfoods punk::args - tabled usage, declared subcommands, -confirm prompt policy
All 15 make.tcl subcommands are punk::args-declared ((script)::punkboot + (script)::punkboot::<sub>, built from single-source summary/help/opt dicts with shared option fragments and explicit @form -synopsis). Bare make.tcl / -help, 'help ?subcommand?' and '<subcommand> -help' render tabled usage; invalid flags/subcommands raise punk::args usage errors (exit 1) with unambiguous prefix resolution; 'shell' is a declared passthrough. Prompt policy: new -confirm 0|1 (default 1) on every confirmation point (bootsupport minor-staleness gate, vfscommonupdate REPLACE, kit-type mismatch). Default prompts only on an interactive terminal and aborts fast with guidance on non-interactive stdin (::punkboot::lib::stdin_is_interactive; Tcl 8.6 lacks the -inputmode probe and is assumed interactive). -confirm 0 proceeds (staleness, REPLACE) or skips the mismatched kit. The piped-y agent workflow is retired; the old vfscommonupdate decline half-abort (printed done, exit 0) now exits 1. Degrade rule: punk::args/punk::ansi/textblock boot requires guarded; definition load caught with fallback to a self-contained scan (-k/-dirty-abort/-confirm supported) + plain punkboot_gethelp (availability NOTE factored into punkboot_availability_note, shared by both paths); rendering degrades independently of parsing (errorstyle minimal / plain help when the ANSI stack is unhealthy); PUNKBOOT_PLAIN=1 forces degraded mode. punk::args joins the bootstrap-tracked _runtime_deps staleness set (parsing contract only - the rendering stack degrades instead; contract docs updated in src/bootsupport/AGENTS.md + src/modules/AGENTS.md, workflow docs in src/AGENTS.md + src/tests/shell/AGENTS.md). Verified: usage/help/error paths, vfscommonupdate fail-fast and -confirm 0 runs with closed stdin, staleness flag route live (args 0.5.0->0.12.0 tripped the gate), degraded-mode help/check/info, full 'project -k -confirm 0' kit build. Dogfooding finding recorded in the goal file: punk::args 0.12.0 reports generic overflow where 0.5.0 reported choiceviolation for optional-choice mismatches (worked around with required leaders; candidate error-selection improvement). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
5df5f65b4f |
punknative generator: nav index, per-form arg tables, terminal-black backdrop, integer row pitch
Improvements from user review of the punk::ansi trial page: - command index <nav> at page top (doctools-style jump list); hook to display @package info above it when specs carry package_info (guarded - key absent in older punk::args spec dicts) - multiform commands: punk::args::usage renders all form synopses but only the default form arg table (terminal UX expects i -form N) - the page now adds a per-form ARG TABLE for each form that has arguments, trimmed at the table-header separator so the command/description/synopsis panel is not repeated per form (renderspace lines are colour-self-contained, so slicing at a line boundary is safe); argument-less forms are skipped - pre backdrop is now true black (page body stays dark grey): overtype::renderspace overlay output emits explicit SGR 40 and example helpers treat default background as the terminal backdrop - on black they blend as in a terminal (proper fix = default-colour semantics, goal) - row pitch line-height:17px (integer, just under the 17.85px inline background height at font-size 15.36px) - the fractional 1.15em pitch put row boundaries at fractional positions and showed periodic hairline gaps through solid-bg runs - explicit package require punk::lib (tstr placeholder resolution uses punk::lib::undent; previously loaded only by transitive luck when usage ran before get_spec) Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
60dd6094c7 |
fontprep/punknative: settle ansi-art html rendering recipe; reproducible font builds; revert metric-normalization experiment
Outcome of empirical seam/aspect testing of the ansi2html rendering against src/testansi cp437 art (chrome + firefox, user-verified): - punkdoc-mono.woff2 rebuilt with STOCK line metrics. The interim normalize-to-win-metrics experiment (hhea/typo := win) is REJECTED and now documented: it grows browsers'"'"' inline content area to 1.3213em, so at row pitches below that every span'"'"'s background bleeds ~2.5px into neighbouring rows - wrong-coloured bars under solid blocks. Kept as commented-out normalize_line_metrics() in make_punkdoc_mono.py with rationale. - font builds are now byte-reproducible: TTFont(..., recalcTimestamp=False) keeps the source head.modified (two consecutive builds hash identically). README records the new output sha256 and the reproducibility note, plus a cell-geometry section for css authors (0.5859375em advance -> integer 9px cells at font-size 15.36px; blocks paint the 1.3213em win cell) and the settled art recipe: stock metrics + tight line-height:1.0 pitch + transform:scaleY(1.3212890625) for terminal aspect (accepted trade-off: minor residual sub-pixel seams; deterministic future fix would be inline-block cell-grid emulation). Larger pitches (17.85/20px) tested and rejected - stark row seams. - punkargs_punknative.tcl: font-size 13px -> 15.36px (integer cell width - fractional advances round differently at styled-span boundaries and seam block/border glyphs); line-height stays 1.15 for text-oriented doc tables. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
c457d4222a |
fontprep: convert vendored Cascadia OFL licence text to LF line endings
Repo policy is LF for text files; the as-downloaded copy had CRLF (also tripped the fossil crlf warning on checkin). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
c18ca90a70 |
doc tooling: vendor punkdoc-mono web font (OFL subset of Cascadia Mono 2404.23) + -assets embed|link|none in punknative generator
src/scriptapps/tools/fontprep/: pinned monospace web font for the punk-native html doc pipeline, closing the glyph-coverage gap the probe identified - unicode 16 octants (U+1CC00-1CEBF) and Symbols for Legacy Computing (U+1FB00-1FBFF) needed by ansicat/textblock rendering are absent from commonly-installed monospace fonts (even system Cascadia copies are commonly pre-2404 and lack them). - punkdoc-mono.woff2: glyph subset of Cascadia Mono v2404.23 VARIABLE ttf (wght axis 200-700 kept - true bold from one ~80KB file; 1561 cmap codepoints incl. full CP437 repertoire, box/blocks/geometric, braille, legacy computing + octants). Coverage verified 157/160 against the measured glyph inventory - identical to the full source font (misses are deliberate: em-space + fullwidth forms are converter-normalization/fallback territory). - renaming is REQUIRED by licence: Cascadia's SIL OFL 1.1 declares Reserved Font Name "Cascadia Code" and subsetting is modification. Name table is surgical: family records renamed, Microsoft copyright preserved verbatim (OFL requirement), trademark record removed (a renamed copy must not assert Microsoft's mark), OFL statement/url in licence records, provenance credit in the description record. - LICENSE-cascadia-OFL.txt (from the v2404.23 tag), punkdoc-unicodes.txt (whole-block ranges with headroom), make_punkdoc_mono.py (fonttools subset+ rename script), README.md (full provenance: source/output sha256s, exact command, regeneration steps). Python fonttools is one-time prep tooling only - the doc build never invokes it; generators just read the .woff2. Track licence in the G-063 inventory. punkargs_punknative.tcl: new -assets option consuming the vendored font: embed (default) = data-uri @font-face, fully self-contained page; link = copy punkdoc-mono.woff2 beside the output and reference relatively (shared+cached across a doc set); none = css stack only, with warn-and-degrade when the asset is missing. font-weight 200 700 descriptor, punkdoc-mono prepended to the fallback stack. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
c668cb85c1 |
doc tooling: punk::args -> doctools + punk-native html/md converter prototypes
Two G-candidate prototypes under src/scriptapps/tools/ for punk::args as the documentation source of truth (run against bootsupport modules with a plain tclsh, e.g: tclsh punkargs_to_doctools.tcl punk::path out.man): - punkargs_to_doctools.tcl: package's punk::args definitions -> doctools .man (Tcl-standard [arg]/[opt] synopsis conventions by design - punk s-style is out of scope for the doctools target). Covers @cmd summary/help, per-form [call] synopses, argument detail lists in argspace order (leaders/options/ trailing values), constraint sentences (defaults/choices/ranges), id aliases as cross-references. Validated via 'dtplite validate' (bin/dtplite.cmd); punk::path trial output renders clean through the html/text/nroff engines. - punkargs_punknative.tcl: doctools-free pipeline faithful to punk s-style. html = punk::args::usage ANSI output converted via a minimal SGR->CSS ansi2html (16/256/truecolour, bold/dim/italic/underline/strike/reverse) on punk::ansi::ta::split_codes - candidate for a punk::ansi public api (also the docs-screenshot enabler for ansicat/textblock output). markdown = GFM with verbatim s-style synopsis fences + per-form argument tables. -boxmap none (default) keeps faithful heavy box glyphs; -boxmap light maps to the light set as a portability fallback. Key findings baked into the code comments: - css font stacks must be set on the pre element itself - the UA stylesheet's 'pre {font-family:monospace}' overrides body inheritance (cause of an initially-misdiagnosed overlong-border rendering bug) - glyph coverage probe over src/testansi + textblock::periodic/frames + punk::args::usage (160 codepoints incl. unicode 16 octants and legacy computing blocks): Cascadia Mono >=2404.23 covers 157/160; embedding or referencing a pinned punkdoc-mono font remains the plan for doc-set output since octant/legacy glyphs are absent from commonly installed fonts. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
6 days ago |
|
|
49ec22a928 |
doc: restore 'dev doc.validate' - wrap tcllib dtplite as bin/dtplite.cmd
'dev doc.validate' invokes a bare dtplite command which the repl unknown-handler resolves via auto_execok on PATH - no dtplite executable existed (only the legacy misnamed bin/dtplite_run.bat), giving "invalid command name dtplite". - src/scriptapps/dtplite.tcl: LF-converted (polyglot payloads are embedded verbatim into the LF-only multishell output); fall back to the project-vendored tcllib (src/vendorlib_tcl9/<arch>/tcllib*) when the invoking tclsh lacks the dtplite package - src/scriptapps/dtplite_wrap.toml: new scriptset config (tclsh nextshell on all platforms) - bin/dtplite.cmd: generated polyglot via punk::mix::commandset::scriptwrap::multishell (checkfile-clean, LF-only) - src/tests/shell/testsuites/binscripts/dtplite.test: artifact pins (LF-only, checkfile, byte-identical round-trip re-wrap) + execution usecases (usage error, validate good/bad file, validate directory tree, html generation) - 8/8 pass under runtests - AGENTS.md (bin, src/scriptapps): record the dtplite scriptset, its test pin and the LF-only payload requirement - punkproject.toml: 0.12.22 -> 0.12.23 Verified: 'dev doc.validate' in punk902z src validates all 64 src/doc .man files clean. The doctools pipeline remains interim - punk::args is the intended doc source of truth. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
4e23a2c373 |
vfs: sync punk::args 0.12.0 and tclcore moduledoc 0.3.4 into _vfscommon.vfs (G-074)
make.tcl modules + vfscommonupdate; old versions (args-0.11.2, tclcore-0.3.3)
removed by the update. All four kits (punkbi, punksys, punk91, punk902z)
rebuilt from the updated vfs and verified in kit mode: punk902z (9.0.2) and
punksys (8.6.13) both load args=0.12.0 tclcore=0.3.4, punk::args::formcheck
reports ::after as 6 forms / 15 pairs / 1 sanctioned structural overlap
(cancelid/cancelscript, zero unsanctioned) and ::lseq as the two unsanctioned
type_weakness findings ({range start_count} {range count}) on both runtimes.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
7 days ago |
|
|
6af0fd541e |
punk::args 0.12.0: formcheck on-demand multiform ambiguity analysis + @form -overlapallowed sanction (G-074 achieved)
New punk::args::formcheck <id> ?-return dict|summary?: reports the form pairs of a multiform definition that some argument list could cleanly match simultaneously (the multipleformmatches inputs). Static pairwise pass over the resolved FORMS enumerates each form's positional word-slot chains (leaders then values; -optional and ?-wrapped clause-member branching; -multiple capped; options excluded - order-free), screens aligned equal-length chains per position (discriminator words via choiceword_match, type witnesses from a small table), and CONFIRMS every candidate witness arglist with a real single-form parse against both forms (parse_status - no raise, no user-supplied words, no define/resolve cost). Findings are therefore witnessed - discriminated form pairs cannot false-alarm; misses (exotic types, option-requiring forms, enumeration caps) are the documented conservative direction. Classes: type_weakness (discriminator aligned with a permissive non-validating type - any/none/string/ansistring/globstring/expr/script) vs structural (forms genuinely share an argument shape). New @form key -overlapallowed <formname-list> sanctions a KNOWN overlap on either pair member: the finding reports with sanctioned 1 and leaves the result's unsanctioned list (the actionable/gate subset). Parse behaviour is never affected; unknown form names are rejected at definition resolve (end-of-forms cycle). @form directive doc updated. tclcore moduledoc 0.3.4: the documented after cancelid/cancelscript overlap (runtime-liveness ambiguity, 0.3.0 record) sanctioned on the cancelid form - ::after now reports zero unsanctioned findings while 'after cancel <id-shaped>' still raises multipleformmatches. ::lseq deliberately unsanctioned: formcheck reports range/start_count (witness {1 count 1}) AND range/count (witness {1 by 1}) - both real, both rooted in the expr-typed end slot, kept visible pending an expr syntax-validating type (G-069/G-070). Tests: new args/formcheck.test (7) - no-finding cases (parse withid/withdef pair, afterish/sharedform fixtures), class+sanction fixture, unknown-form rejection, -return summary, ::lseq/::after pins with witnesses re-verified, sanction parse-neutrality. punk::args suite 210/210, punk::ns 57/57. G-074 achieved and archived (acceptance review in the detail file); G-055 verification gate gains the formcheck step (unsanctioned must be empty for regenerated multiform commands). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
7c49fc844e |
vfs: sync punk::args 0.11.2, punk::ns 0.5.0, punk::lib 0.4.3, punk 0.2.6, punk::repl 0.5.1, tclcore moduledoc 0.3.3 into _vfscommon.vfs
make.tcl modules + vfscommonupdate + project: all four kits rebuilt (punkbi, punksys, punk91, punk902z). Kit-mode verification: punk902z loads args=0.11.2 ns=0.5.0 tclcore=0.3.3 lib=0.4.3 punk=0.2.6, 'i join' emits no bad-@dynamic warning; punksys (8.6) loads args=0.11.2 and the after cancel-id discrimination resolves 'cancel someid' to the cancelscript form (harvested id prefix working on 8.6). A stale tcl_oauth2_library install leftover in the project's root lib/ tree (its src/vendorlib source was removed 2026-07-12; the libs install step does not prune targets whose source vanished) was swept into the vfs lib by vfscommonupdate and removed again before the kit build - it is deliberately not part of the vendored set yet (G-065..G-068 first-test candidate). The root lib/ leftover itself was removed after this commit was first authored; its rows remain in lib/.punkcheck. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
97ca1ceb1e |
punk::lib 0.4.3 + punk::repl 0.5.1 + punk 0.2.6: G-076 dead-console defect in 'help tcl' with mitigated axis, version-gated watchdog (project 0.12.21)
New goal G-076 (active): adopt the upstream tcl9 dead-console fix (ticket f10d91c2d3, root-caused in G-039) via a single version gate shared by the 'help tcl' warning and the repl watchdog arming. - punk::lib 0.4.3: has_tclbug_console_deadspin + pure classifier tclbug_console_deadspin_applies, gate variable check::tclbug_console_deadspin_fixed_in (empty = all Tcl 9 windows runtimes affected). Buginfo dicts gain a mitigated/mitigation axis orthogonal to level; the deadspin check reports mitigated when punk::repl >= 0.5.0 is available to the runtime. - punk::repl 0.5.1: repl::start arms the dead-console watchdog only when the check reports the runtime affected - recording a verified fixed release once flips both consumers. - punk 0.2.6: 'help tcl' renders mitigated warnings subdued (term-grey) with a "(mitigated)" annotation and the mitigation text; severity classification unchanged. - checkbugs.test: classifier truth table, live-check consistency, and mitigated-axis validation in the generic every-check sweep. The fixed_in flip is deliberately deferred until a released Tcl passes the G-039 kill-procedure re-verification (watchdog disabled, clean script-visible eof exit) - recorded as the goal's remaining acceptance item. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
7 days ago |
|
|
2157c01f6c |
tclcore 0.3.3: remove parse-inert @dynamic tags from split, array, join (project 0.12.20)
User-directed removal of the three tags the 0.3.2 sweep identified. None has round-2 substitution content and their placeholders are all display styling/examples, so the definitions now resolve as ordinary static definitions with display expansion cached per raw definition (previously @dynamic forced re-expansion on every render). Sweep of all 462 registered ids now emits zero bad-@dynamic warnings; renders and parses verified unchanged for all three. punk::args 203/204 (1 pre-existing skip), punk::ns 57/57. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
b35ea12896 |
punk::args 0.11.2: bad-@dynamic warn-once + round-1 caching; tclcore 0.3.2: fix malformed tcl_startOfNextWord (project 0.12.19)
User-reported: 'i join' emitted the bad-@dynamic warning 4 times ('i
join test' 6). Root cause was a real inefficiency, not just noisy
logging: a @dynamic definition whose round-1 tstr output has no
round-2 parameters bypassed argdefcache_unresolved entirely, so every
resolve in the 'i' flow (doc walk, advisory parse, get_spec for the
render, synopsis) redid display masking plus the full round-1 tstr and
re-warned. Such definitions now cache as a zero-param unresolved entry
- consistent with the round-1 freezing legitimately dynamic
definitions already get - so later resolves take the cheap cached
branch and the warning emits once per definition per interp.
Warning wording corrected: @dynamic is not a complete no-op for a
parse-inert definition - deferred display fields still re-expand per
render instead of caching - so the message says removal is appropriate
only if that display behaviour is unintended. Sweep of all 462
registered ids: ::split, ::array, ::join carry the parse-inert tag
(left in place pending the display-refresh decision).
Incidental finds from the sweep: the malformed ::tcl_startOfNextWord
tclcore definition (double-quoted -help with unescaped quotes in the
embedded man-page example) failed to resolve at all - now braced per
the define quoting rules, 'i tcl_startOfNextWord' works; and resolve's
malformed-record error path printed dev diagnostics (full records dump
+ ::testrecord global) - commented per the stray-debug convention.
Tests: new args/dynamic.test (warn-once + cached parse, legit-dynamic
round-2 freshness; stderr captured via channel transform). punk::args
203/204 (1 pre-existing skip), punk::ns 57/57. Live-verified: 'i join'
and 'i join test' each emit the warning exactly once (punk902z src).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
2e603413e6 |
tclcore 0.3.1: after id-shape harvest via tstr placeholders in the argdoc defspace (project 0.12.18)
Authoring-style change only, user-directed: the interim %AFTERIDPREFIX% string map is replaced by plain tstr placeholders, with the harvest variable set in the argdoc namespace - the defspace registered PUNKARGS definitions resolve placeholders in when an argdoc child exists (the rule documented in punk::args 0.11.1). One mechanism now serves both the -type parse field (expanded at first resolve) and the -help display fields (expanded at display time); the module showcases the placeholder style, with string map reserved for genuinely build-time cases. Behaviour identical to 0.3.0: resolved -type stringstartswith(after#), form discrimination, parity pins and rendered help re-verified. punk::args 201/202 (1 pre-existing skip), punk::ns 57/57. G-055 workflow note updated to name the tstr-in-argdoc pattern as preferred. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
f1c0ea10a0 |
punk::args 0.11.1: define doc - registration styles and tstr/defspace interpolation rules (project 0.12.17)
Documentation-only. The define -help gains two sections: 'Registration styles' (direct define vs deferred lappend-PUNKARGS registration - the lazy scan/on-demand definition mechanics, why moduledocs and the module template use it, PUNKARGS_aliases, punk::args::status timings) and 'Interpolation (tstr placeholders) and the defspace' (display-field deferral vs parse-field expansion vs @dynamic; the defspace rule with the argdoc-child subtlety; the silent-literal fallback; safe patterns for load-time-computed values). Motivated by the ::after id-shape harvest misattribution - corrected record in goals/G-055. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
a3d3088b03 |
tclcore/G-055: correct the parse-field tstr finding - expansion happens in the argdoc defspace, not never
The 0.3.0 record claimed tstr placeholders in non-display fields are not expanded for plain PUNKARGS definitions. Controlled probes show all authoring styles (direct define, registered PUNKARGS, argdoc-subns variable) DO expand parse-field placeholders - the ::after attempt failed because update_definitions resolves registered definitions in the argdoc subnamespace whenever one exists, while the harvest variable had landed in the parent namespace, and an unresolvable param is left silently literal. Module comment, buildversion changelog line and the G-055 workflow note corrected; the silent-literal fallback noted in G-055 as a diagnostic gap (a literal placeholder reaching a parse field is always an authoring error and could warn). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
5a553b4ff3 |
tclcore 0.3.0: after cancel-id discrimination via harvested id shape (project 0.12.16)
The cancelid and info forms' id argument is typed
stringstartswith(<prefix>) with the prefix harvested from the running
interpreter at define time (safe create+cancel probe; after# on 8.6.11
and 9.0.3) - substituted via a build-time %AFTERIDPREFIX% string map
because tstr placeholders in non-display fields are not expanded for
plain PUNKARGS definitions (G-046 defers display fields only; noted in
G-055 for the regeneration workflow). -typesynopsis id keeps the
synopsis as the man page's 'id'; both ids gain man-page-derived help.
Effect under G-041 form candidacy: 'i after cancel someid' resolves
cleanly to the cancelscript form, matching real Tcl's silent
script-match no-op; 'after info <non-id>' is model-rejected where real
errors at runtime (parity-true). An id-SHAPED word after cancel stays
truthfully ambiguous (cancelid+cancelscript) - real Tcl resolves that
junction by id liveness at runtime, which no static type expresses.
Dead-id over-acceptance on 'after info' recorded as the accepted
runtime-liveness boundary.
Tests: three parity pins added in tclcoreparity.test (id-shape harvest
agreement with live ids, cancel discrimination incl the liveness
ambiguity witness, info error-vs-ok parity + accepted dead-id
divergence). punk::args 201/202 (1 pre-existing skip), punk::ns 57/57.
Live-verified on punk902z src ('i after cancel someid' renders info
scheme).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
4707af6fc2 |
G-041 increment 2: doc surface presents the matching form (punk::ns 0.5.0, punk::args 0.11.0, project 0.12.15)
cmdhelp ('i'): the -form option defaults to * (was 0) with parse's
list semantics, and both render sites present the form the advisory
parse selected - 'i after cancel <id>' presents the cancel form's
argument table with its synopsis line underlined; 'i lseq 0 10 2'
presents the range form info-scheme. When no form matches, the ranked
candidates are passed to arg_error (best candidate's table, all
candidates marked, message naming each form's failure); when several
forms match, all matching forms are marked under the ambiguity message.
punk::ns::synopsis ('s'): trailing argument words after a multiform
command path underline the form(s) they match - matching forms from the
advisory parse's formstatus, or the best candidate when none fully
matches ('s after cancel someid' marks both cancel forms; 's lseq
0 10 2' marks the range form). Ordinal line position maps lines to
declaration-order forms in both full and summary renders; marking is
skipped under alias-currying excess or an explicit -form.
punk::args 0.11.0: the documented @form -synopsis override now renders
in punk::args::synopsis full and summary output (arg_error honoured it
already) - the adjacent forms.test GAP flipped
(forms_form_synopsis_override_rendered). Candidate ranking extended:
form_literal_affinity treats required RESTRICTED-choice arguments as
discriminators via choiceword_match (the tclcore models express
subcommand words as -choices), so 'after cancel' ranks the cancel
forms first instead of falling back to declaration order.
Real-model findings recorded in the goal detail: 'after cancel someid'
is genuinely ambiguous in the doc-faithful model (cancelid vs
cancelscript - real Tcl disambiguates semantically); 'lseq 1 count 5'
ambiguity traces to the expr-typed operands (noted in G-055 as a
model-tightening candidate alongside TIP 746).
Tests: cmdhelp.test gains the multiform doc-surface pins (autoselected
form presented, noformmatch best-candidate table + candidate naming,
synopsis marking present/absent). punk::ns 57/57, punk::args 198/199
(1 pre-existing skip); full source-tree suite in the detail record.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
d85608d685 |
G-041 increment 1: multi-form candidacy engine (punk::args 0.10.0, project 0.12.14)
punk::args::parse/get_dict with the default -form * (or any multi-form selection) now attempts every permitted form instead of effectively parsing form 0 only. Exactly one clean match auto-selects (result gains a 'form' key; 'formstatus' reports every candidate when candidacy ran). No match raises a 'noformmatch' validation error naming each candidate form's first-line failure, ranked best-candidate first (leading-literal affinity with the supplied words, then incomplete before invalid, then declaration order). Several clean matches raise 'multipleformmatches' naming the forms - deliberately no silent preference (recorded in the goal detail); callers pass -form to disambiguate. -form now accepts the documented list of form names/indices across get_dict, parse, parse_status and arg_error via a shared resolver (private::form_selection). arg_error renders the argument table for the first listed form and marks all listed forms' synopsis entries; parse's error render passes the ranked candidate list so the closest form's argument table shows under the no-match message. parse_status: 'form' is now the matched (or best-candidate) form - the per-argument statuses and badarg marking are built for it - and the new documented 'formstatus' key carries per-form status/failureclass/badarg/ message (caller-attributed), the per-form compatibility surface the G-044 completion/hinting consumer needs on partial argument lists. Engine restructure: the single-form parse body of get_dict extracted verbatim to private::get_dict_form (argspecs resolved in the caller's context before selection; no caller-frame use inside - verified). Single-form definitions take the direct path unchanged. Tests: forms.test GAP pins flipped (forms_parse_autoselect, forms_parse_formlist_restriction) plus new coverage: shared-prologue arity discrimination, noformmatch ranking + errorcode payload, multipleformmatches + explicit -form disambiguation, formstatus in results and parse_status. punk::args 198 pass / 1 pre-existing skip, punk::ns 53/53, punk::lib 35/35. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
deb8f17d72 |
G-051 achieved: doc-walk choice-prefix parity + truthful doconly cmdtype (punk::ns 0.4.0, punk::lib 0.4.1, project 0.12.13)
Space-form docid prefix parity: cmd_traverse's space-delimited child
docid jump, on an exact-word miss, now resolves the word against the
current level's choices-bearing first leader via
punk::args::choiceword_match (the shared G-040 resolver - -choiceprefix,
-nocase, -choicealiases, denylist, reservelist honoured) and retries
with the canonical word. 'i string is tr' resolves to the
"::tcl::string::is true" documentation exactly when 'string is tr 1'
executes; 'string is bool' -> boolean; ambiguous ('d'), unknown ('zz')
and denied words stay at the parent exactly when parse rejects them.
resolvedargs records the canonical, mirroring parse normalization. No
second matching rule exists.
Truthful cmdtype: cmdinfo classifies cmdwhich-notfound + non-empty docid
as 'doconly' (was 'notfound') - documentation-only levels below real
commands (per-class ids like "::tcl::string::is true", documented TclOO
method docids; the method case adopts doconly per the recorded design
decision, refinable by G-052). Consumers audited: cmdhelp/synopsis/eg
are docid-driven, cmdtrace tests only for 'proc', punk::help topic
fallback uses cmdwhich; punk::lib script analysis updated in step
(doconly accepted alongside notfound, bucketing unchanged).
Tests: the four G-051 GAP pins flipped and renamed
(cmdhelp_pseudo_command_cmdtype_doconly,
cmdhelp_spaceform_docid_prefix_honoured + ambiguous/unknown guard,
cmdhelp_string_is_true_pseudo_doconly,
cmdhelp_string_is_prefix_honoured). punk::ns 53/53 (cmdflow + non-GAP
cmdhelp unchanged), punk::args 193 pass / 1 pre-existing skip,
punk::lib 35/35; full source-tree suite result in the detail file.
Live verification (punk902z src): 'i string is tr' renders
byte-identical to 'i string is true' except the failure banner echoing
the typed words.
Flip edits: G-051 index entry to GOALS-archive.md (achieved 2026-07-13),
detail Status flipped with acceptance review and verification record,
reference sweep updates G-052 Notes. Detail-file move to goals/archive/
follows as a pure rename; goals_lint transiently unclean between the two
commits.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
72d50f91df |
punk::ns 0.3.0: restore bare-query failure banner in cmdhelp (project 0.12.12)
Regression report (user, vs older punk executables): "i if" / "i while" /
"i foreach" used to render the error-scheme box with a "Bad number of
trailing values..." message signalling the command cannot be called with
no arguments; recent builds rendered plain info-scheme usage with no
indication, while direct punk::args::parse {} withid ::foreach still
errored.
Root cause: deliberate suppression, not breakage - G-046 item 5 (ns
0.1.4) suppressed the failing advisory parse for the whole
no-supplied-words path because the message then carried internal-looking
attribution ("Bad number of leading values for punk::args::parse
$args_remaining ...", the "i string is" complaint). G-049 (ns 0.2.0,
same day) independently added -caller attribution making bare-query
messages accurate - but the suppression stayed, hiding now-useful
signal.
Fix: reversal rather than rewording (user decision) - both cmdhelp
render sites (alias path and main path) drop the no-supplied-words
special case; a failing advisory parse renders its message and error
scheme uniformly, and dict returns no longer rewrite the scheme to
info. "i if" now leads with "Bad number of trailing values for if. Got
0 values. Expected at least 2"; the original "i string is" case renders
an accurate "Bad number of leading values for string is. Got 0 leaders.
Expected exactly 1" instead of being hidden.
Tests: cmdhelp_leader_required_no_args_plain_usage flipped to
cmdhelp_leader_required_no_args_error_render (message present,
attribution never the internal parse); cmdhelp_return_dict_scheme
expects scheme error for the bare-query failure. punk::ns suite 53/53;
verified live in punk902z src.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
d4519f41d3 |
G-071 achieved: punk::args 0.9.0 allocation choice screen - lseq-class optional-element arglists parse in-form (project 0.12.11)
Root cause: get_dict_can_assign_value blanket-satisfied the member check
for any argument carrying choices, so an optional restricted-choice value
(the lseq '..'/'to' noise word) consumed any word whenever arity
permitted, starving later elements/clauses and failing validation with a
confusing trailing-choices error ('lseq 0 10 2' shape).
Fix: an allocation choice screen using choiceword_match (the shared G-040
implementation - exact/alias/prefix/nocase semantics; -choicemultiple
words screened per list member within min/max), applied only where
allocation has an alternative: -optional arguments and further
occurrences of -multiple arguments. Required arguments are deliberately
not screened - the word must fill them and validation's choiceviolation
reporting stays informative (the existing parsestatus/cmdhelp/choices
pins forced and now document both refinements). -choicerestricted 0
behaviour unchanged.
Results: the allocation.test GAPs flipped ('1 2 3' and '1 2 by 3' parse
with correct clause shapes {{} 3}/{by 3}; '1 2 3 4' gets the plain
excess-values rejection instead of blaming the unrelated optional);
prefix normalization survives the screen; all noise-word variants and
if-shape guards unchanged. lseq moduledoc matrix parses per lseq.n under
-form range, and 'i lseq 0 10 2' works end-to-end. Remaining lseq
divergences trace to G-041 form selection or the -type expr laxity
recorded in G-055 - not allocation.
Also corrected an increment-1 mis-premise: parse_status ALREADY accepts
-form before the withid/withdef tail per its documented synopsis - the
probe had passed it trailing. GAP replaced by
parsestatus_form_option_order (correct-order acceptance incl. the form
key, trailing rejection). No code change was needed for that acceptance
clause.
Verification: punk::args suite 193 pass / 1 pre-existing skip / 0 fail;
punk::ns 53/53; full source-tree suite 813 pass / 13 skip / 1 fail =
exec-14.3 only (known baseline) - zero regressions (tclsh 9.0.3; lseq
verification in punk902z src, Tcl 9.0.2).
Flip edits: G-071 index entry moved to GOALS-archive.md (achieved
2026-07-12), detail Status flipped with the acceptance review and
before/after record; reference sweep updates G-041 (prerequisite fixed,
parse_status correction) and G-072 Notes. The detail-file move to
goals/archive/ follows as a pure rename; goals_lint transiently unclean
between the two commits.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
17b8a6dbbd |
G-071 increment 1: allocation characterization suite + retreat-path debug silencing (punk::args 0.8.3, project 0.12.10)
G-071 flipped proposed -> active (user direction 2026-07-12).
New allocation.test (7 tests) with reduced fixtures isolating the failing
shape from the tclcore moduledoc: the lseq-range shape (start ?sep? end
?by-step clause?) reproduces the moduledoc failures exactly. Current
mis-allocation pinned as GAP tests ("1 2 3" -> invalid blaming sep,
"1 2 by 3" -> incomplete blaming end, "1 2 3 4" correctly invalid but
misblaming sep), noise-word variants and the if-shape noise-word clauses
pinned as regression guards, parse_status -form absence pinned as GAP.
Also silenced four more unconditional debug puts on get_dict allocation
retreat paths ((111)/(222)/(333)/(444)) - these printed to stderr during
NORMAL successful parses at every optional-skip retreat, polluting
interactive help/parse output for noise-word-modelled commands. Behaviour
unchanged; the retreat logic they marked is exactly this goal fix target.
Full punk::args suite 193 pass / 1 pre-existing skip / 0 fail (tclsh
9.0.3).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
58da288d45 |
G-041 prework: if/switch/try/lseq real-vs-model probe findings recorded; punk::args 0.8.2 debug-leak fix (project 0.12.9)
Probing (punk902z kit, Tcl 9.0.2) of the tclcore moduledoc models against the real builtins, driven by user concerns about variable-length clauses with optional elements before G-041 activation. Findings recorded in the G-041 detail file (auto-selection evidence on real commands, the allocator prerequisite, parse_status -form gap) and the G-055 detail file (modelability over-acceptance list: try compound handler types, reserved-word clause allocation, "-" fallthrough constraints, switch two-argument option suppression, unvalidated -type expr, TIP 746 version-conditionality for lseq operands; plus the user doc-direction guidance that definitions split into @form entries where source docs simplify). Key result: the per-form models are doc-faithful (lseq.n synopsis maps 1:1; switch separate/block parse correctly under explicit -form; try mixed on/trap interleaving and finally positioning all agree with the real command) - but the value allocator mishandles an optional single-word choice value followed by a required value plus trailing optional-member clause, so lseq range arglists without the ../to noise word ("0 10 2", "0 10 by 2") fail in-form. No lseq form accepts them, so G-041 form selection alone cannot fix "i lseq 0 10 2" - allocator fix flagged as a candidate prerequisite goal. Fix included (punk::args 0.8.2): unconditional debug puts on the clause type-check path (get_dict_can_assign_value) commented, companion to the 0.2.3 find. Full punk::args suite 186 pass / 1 pre-existing skip / 0 fail. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
66df76c82e |
G-045 achieved: punk::args 0.8.1 define quoting documentation; flip + archival edits (project 0.12.8)
Increment 5 (final): the container quoting rules pinned by defquoting.test now appear in the punk::args::define -help documentation - braced values fully literal (backslash sequences survive as typed); double-quoted values get Tcl backslash semantics at record parse while $ and [] stay literal with no substitution outside tstr placeholders; the backslash-escaped placeholder idiom renders a literal placeholder. Rendered section verified in punk902z src (meta-escapes display correctly). punk::args suite 186 pass / 1 pre-existing skip / 0 fail. Acceptance review recorded in the detail file: all criteria satisfied across increments 1-5 (@cmd -unindentedfields 0.6.1, i help alignment punk 0.2.4, -& record continuation 0.7.0, @normalize + define_docs consumer proof 0.8.0/punk 0.2.5, quoting documentation 0.8.1; suite grown 128 -> 187 tests, GAPs flipped, none weakened, full source-tree suite zero regressions). Flip edits: G-045 index entry moved to GOALS-archive.md (achieved 2026-07-12), detail file Status flipped with evidence in Progress, reference sweep updates G-053 notes. The detail file move to goals/archive/ follows in the next commit as a pure rename (per the goals/AGENTS.md archive rules) - goals_lint is transiently unclean between the two. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
22606faebe |
G-045 increment 4: punk::args 0.8.0 @normalize directive; define_docs converts as consumer proof (project 0.12.7)
New bare @normalize directive: opts a definition into indent normalization of BLOCK-FORM multi-line field values (first line whitespace-only, as authored by opening a braced literal with a newline). The structural first newline and a whitespace-only trailing line are dropped, the content lines' common leading whitespace is the block's base indent, the first content line is unindented fully and subsequent lines are re-based to the standard 4-space continuation convention (deeper relative indents preserved; whitespace-only inner lines become empty). Fields in a record's -unindentedfields are exempt. Implemented as a resolve pre-pass over the split records (private::normalize_records / rebase_multiline_value); @normalize with options is an error. Head-form values are never altered - their base indent is unknowable (continuations uniformly at 6 may be base-4 with the deliberate +2 relative convention, or base-6 flush; re-basing would flatten the former). The idempotence test caught exactly that on a file-style definition during implementation, narrowing the user-confirmed re-base semantics to block form only - which also makes @normalize a proven no-op on conforming file-style definitions. Consumer proof (punk 0.2.5, per the recorded user decision): ::punk::helptopic::define_docs converts from interim left-margin authoring to indented block-form values under @normalize, dropping its -unindentedfields declarations; 'i help' and 'i help_chunks' verified aligned in punk902z src, including the blank-line separator in the combined basehelp+extra block. Tests: new normalize.test (5 tests: block re-base, block left-margin, head-form boundary, exemption byte-exactness, file-style idempotence); rendering.test P4 characterization stays pinned as the deliberate unopted default with its text updated to reference @normalize. punk::args suite 186 pass / 1 pre-existing skip / 0 fail; punk::ns 53/53; full source-tree suite 806 pass / 13 skip / 1 fail = exec-14.3 only (known baseline) - zero regressions (tclsh 9.0.3). define doc documents the directive. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
52ad1211a2 |
G-045 increment 3: punk::args 0.7.0 - record-continuation token -& (project 0.12.6)
An unquoted trailing -& element on a definition record line continues the
record on the next line. Implemented in
private::split_definition_records: the token is dropped and the next line
joins after a single space with its leading whitespace collapsed - exactly
how the Tcl parser joins backslash-newline continuations before a braced
definition ever reaches the splitter - so a -& record assembles
byte-identical to its backslash-continued equivalent. Motivation:
constructed (string-built) definitions cannot author backslash-newline
ergonomically (the building code's own quoting consumes it); -& is plain
text and survives any construction.
Collision rules (analysis and decision recorded in the goal detail file):
bare word preceded by whitespace (or whole line), trailing whitespace
tolerated; braced/quoted -& is data ({-&} escapes a literal trailing
value); mid-line -&, word-suffix abc-&, and -& inside still-open
braced/quoted values are data. Element-count disambiguation rejected
(action-at-a-distance; positional rule is locally decidable). Backslash
authoring unchanged - continuation is additive.
Tests: new recordcontinuation.test (6 tests) incl. backslash-twin
parse+render byte-equality and the constructed-def chaining case. Full
punk::args suite 181 pass / 1 pre-existing skip / 0 fail; full source-tree
suite 801 pass / 13 skip / 1 fail = exec-14.3 only (known baseline) - zero
regressions (tclsh 9.0.3). define doc documents -& alongside backslash
continuation.
Also recorded: tclparser considered and rejected for the splitter (ANSI
unbalanced-bracket data, dialect semantics outside Tcl grammar, binary
dependency vs G-004); dev-time parse cross-check lint flagged as candidate.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
12f9f16097 |
G-045 increment 2: punk 0.2.4 - i help renders aligned via -unindentedfields (project 0.12.5)
::punk::helptopic::define_docs now authors its help text at the left
margin and declares -unindentedfields {-help} on the generated @cmd line
(honoured as of punk::args 0.6.1, increment 1) and on the topic argument
line (a gate that existed all along but was never applied here).
Previously: the @cmd -help braced literal carried ~16 spaces of source
indent into the constructed definition (constructed defs get no
whole-block normalization, pinned P4 characterization), so the
Description block rendered continuations +12 right of the first line;
the \n-relative topic -help rendered its first line +4 (the injected
display prefix). Both blocks now render flush. Help text content
unchanged (manual ~70-col folding retained).
Verified in punk902z src (arg_error render + i help end-to-end);
punk::ns suite 53/53; make.tcl modules builds clean. Planning note
recorded in the goal detail file: the constructed-def normalization
increment picks its consumer proof (define_docs re-conversion vs
ensemble_subcommands_definition) when it lands.
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
bb9ff66f51 |
G-045 increment 1: punk::args 0.6.1 - @cmd honours -unindentedfields for -help (project 0.12.4)
arg_error's cmd-help display transform (undent " "+help, max 4 - the '#unindentedfields ?' todo site) is now gated by "-help" membership in the @cmd line's -unindentedfields list, mirroring the existing per-argument gate. The single transform site feeds both the table and string renderers, so left-margin-authored @cmd help renders its first line flush with continuations in both. @cmd -summary carries no indent transform in any renderer, so -unindentedfields for -summary is vacuously honoured. No in-tree definitions set -unindentedfields on @cmd - existing rendering is unchanged. define doc for -unindentedfields now states where the option is valid. Tests: rendering_unindentedfields_cmd_help_GAP flipped to rendering_unindentedfields_cmd_help (aligned expectation, both renderers measured). Full punk::args suite 175 pass / 1 pre-existing skip / 0 fail; punk::ns suite 53/53 (arg_error consumer); make.tcl modules builds clean (tclsh 9.0.3). Also: G-045 flipped proposed -> active (user direction 2026-07-12); progress and remaining-work recorded in the detail file. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
15c1063796 |
vfs: sync punk::args 0.6.0 payload into _vfscommon.vfs (module work committed in c309ed47)
Replaces args-0.5.0.tm with the built 0.6.0 (small restricted choice sets display as literal alternates in synopses). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
bac122da9f |
G-039 achieved: punk::repl 0.5.0 dead-console watchdog stops orphaned-shell CPU spin (project 0.12.2)
An interactive shell orphaned by its hosting console dying (killed conhost/terminal) previously spun ~2 cores forever: the Tcl 9 windows console driver never delivers the dead-console state to the script as a fileevent (tclWinConsole.c ConsoleEventProc only notifies on buffered data) while its reader thread busy-loops on the persistent channel error, so the script level is completely blind and nothing ever closes the channel. Fix: repl::console_watchdog - a self-rescheduling liveness poll (default 5s, repl::console_watchdog_ms; read-only GetConsoleMode probe via chan configure -inputmode) armed by repl::start only for a tcl9 console input channel serving the process-default console on windows. On probe failure it closes the input channel (stopping the driver's reader thread) and finishes the repl via the normal eof done-path; app-punkshell then finds no console reopenable and exits cleanly. Piped, foreign-console and tcl 8.6 inputs never arm it. repl::start's post-vwait reader deregistration now tolerates a watchdog-closed channel. Verification (2026-07-12): kill procedure post-fix exits the orphan in 1.5-2.0s with no traceback (src mode and rebuilt kits punkbi/punk91/ punk902z); 25s live-console soak shows no spurious trigger, CPU delta 0; piped stdin unaffected; repl consolebackends 3/3 and punk::console suites 88 pass / 1 skip; root cause verified against plain tclsh 9.0.3. Upstream ticket filed: https://core.tcl-lang.org/tcl/tktview/f10d91c2d3 Included: - goals: G-039 flipped achieved 2026-07-12 and archived (index entry to GOALS-archive.md, detail file to goals/archive/ with full root-cause, repro and verification record); reference sweep adds the eof done-value producer note to G-038 - src/modules/punk/AGENTS.md: watchdog contract documented - project version 0.12.1 -> 0.12.2 + CHANGELOG entry - vfs payload sync: _vfscommon.vfs punk/repl 0.4.0 -> 0.5.0 Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
c309ed4782 |
punk::args 0.6.0: small restricted choice sets display as literal alternates in synopses
An argument whose choice pool (-choices plus -choicegroups members, deduplicated) has 1-3 members and -choicerestricted true (the default) now renders those words unitalicised joined by | in synopses - e.g 'after cancel' shows literal cancel, a 3-choice option shows (left|centre|right) - matching the display style of literal()/literalprefix() type-alternates. Larger or unrestricted choice sets keep the italicised argname/<type> display, and an explicit -typesynopsis always takes precedence (textblock::frame -type unchanged). New shared helper punk::args::private::synopsis_choice_literals feeds both synopsis render paths (leaders/values via synopsis_form_arg_display, options inline in synopsis); applies only to single-element -type lists. Superseded commented-out single-choice sketches removed; define doc for -choices documents the rule. tests: synopsis.test 4 -> 13 - characterization coverage for literal/literalprefix/stringstartswith/stringendswith type-alternates, option alternate parenthesization, multi-element clause display (?type? members, argname tail-word hints), -typesynopsis value-element lists and option passthrough incl documenter ANSI, plus the new choice-literal rule (leader/option/value positions, choicegroups counting, >3 and unrestricted fallbacks, -typesynopsis precedence). rendering.test choicelabel fixtures padded to 4 choices so markercol keeps matching the choices cell rather than the now-literal synopsis line. Known residue (deliberate): option-path -typesynopsis ?-trim edge cases remain (todo comments at the render site) - resolve-time rejection deferred; any future normalization surgery belongs to punk::ansi::ansistring/opunk::Str. project 0.12.0 Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
b3d42ca406 |
bootsupport/vfs: sync punk::repl 0.4.0 and opunk::console::tk 0.2.0 (G-001)
Re-vendor the G-001 modules into bootsupport, the project-layout bootsupport copies, and the runtime vfs: punk::repl 0.4.0 replaces 0.3.0 and opunk::console::tk 0.2.0 replaces 0.1.0. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
83c1e3e82b |
tests: repl-through-console-backend verification suite (G-001 acceptance)
New modules/punk/repl/testsuites/repl/consolebackends.test drives an interactive repl through TestConsole (chan pipe pair), SshConsole (socket pair with a scripted remote terminal answering CSI 6n - size 100x30 resolved over the socket) and TkConsole (wired text widget; self-gates on Tk availability in the child) to a clean exit: prompt-by-prompt conversation, results, diverted code-interp stdout/stderr. Each case execs testsupport/repl_console_driver.tcl in a child tclsh - a repl cannot run inside the shared runtests testinterp because the codethread's quit/exit callbacks thread::send to the thread's MAIN interp (documented in src/tests/AGENTS.md). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
7e8d819663 |
opunk::console::tk 0.2.0: widget field, -in/-out channels, live console wiring, resize-aware size (G-001)
TkConsole holds the widget in a subclass o_widget field (always the authority for size/eof/capability; new 'widget' accessor) and accepts optional -in/-out constructor channels. New minimal widget-console wiring ::opunk::console::tk::console: a reflected output channel rendering into the widget (ansi-stripped when punk::ansi is present) plus an input pipe fed by the <Return> binding or programmatic submit/feed, with <Destroy> teardown flagging backend eof and closing the feed end - so a channel- driven repl runs against the widget via 'repl::init -console'. The size override now reports the widget's ACTUAL character dimensions while mapped (current pixel size / font metrics - tracks live window resizing); the requested -width/-height still answer for unmapped widgets, keeping construction-time behaviour and existing test pins unchanged. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
ab75a78b06 |
punk::repl 0.4.0: launch-time console selection (G-001)
repl::init -console <spec> selects the console the repl reads/writes (any punk::console::console_spec_resolve form); repl::start's inchan is now optional, defaulting to the selected console's input. Per-repl channel state (conin/conout/conerr) routes rputs (stdout/stderr mapped per-repl) and doprompt; for a foreign console the code interp's stdout/stderr are diverted via shellfilter 'var' junction stacks and emitted to the console after each run (repltype punk/0). New helpers console_is_default/console_at_eof/ console_get_size dispatch eof/size to the selected ::opunk::Console object's (possibly overridden) methods. Process-console behaviours (tcl_interactive prompt gating, stdin reopen on eof, raw-mode re-enable, windows utf-16be line re-decode experiment, mode-line on exit) now apply only to the default console. Default stdin/stdout behaviour unchanged. Also fixes rputs pseudo- channel mapping in the 3-arg -nonewline form (mapped value previously written over the -nonewline flag). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
9cfeaaadb2 |
vfscommonupdate: sync punkboot::utils 0.2.0 into _vfscommon.vfs
make.tcl vfscommonupdate output: punkboot::utils 0.1.1 -> 0.2.0 (scoped vcs_dirty_warnings supporting the dirty-src provenance gate). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
803f3ca5ff |
bootsupport + layout sync: punkboot::utils 0.2.0, pending 0.2.0 module snapshots
make.tcl modules + make.tcl bootsupport outputs (punkcheck-managed, batched per src/AGENTS.md): punkboot::utils 0.1.1 -> 0.2.0 (scoped vcs_dirty_warnings) plus the pending libunknown / mix::commandset::loadedlib / args::moduledoc tclcore 0.2.0 snapshot updates from the lib.search work, superseded versions pruned. Layout make.tcl copies picked up the dirty-src provenance gate via the same bootsupport propagation. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
1fa2988a3f |
make.tcl: dirty-src provenance gate for build/promotion commands (G-026 direction)
Build/promotion commands (project packages modules libs vfs vfslibs bin bootsupport vfscommonupdate) now warn when src/ has uncommitted fossil/git changes - artifacts built from dirty src have no committed provenance. Warn-only by default; new -dirty-abort flag makes the check aborting. With '<builtexe> src' available for evaluating uncommitted source directly, building is the promotion step this treats it as. - punkboot::utils 0.2.0: vcs_dirty_warnings gains optional scope arg so only changes under a subpath (src) count; unscoped vendorupdate call unchanged. - Warnings print with a plain column-0 PROVENANCE-WARNING: token (greppable in redirected output) + ANSI colour, shared with vendorupdate's dirty source-project check, and are recapped at end-of-run via a wrapped ::exit so they survive scrolling chatty build output. - Interactive terminal runs (stdin -inputmode probe, tcl 8.7+/9) get a 3s ctrl-c grace countdown before a dirty build proceeds; piped/agent/CI runs pay no delay. - 'make.tcl check' reports src provenance status and what the build commands would do. - Guarded require: stale/missing punkboot::utils snapshot degrades the check to a skip notice, but -dirty-abort then aborts rather than silently losing the requested strictness. Project 0.10.2 -> 0.10.3. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
3970b8e695 |
punk::libunknown 0.1 -> 0.2.0: adopt major.minor.patch + manual-versioning guidance
Verified nothing depends on the old version or filename before renaming: all 'package require punk::libunknown' sites are unversioned; punk_main.tcl and punk::repl locate the module by globbing libunknown-*.tm and picking the highest by vcompare (so the renamed dev copy now also outversions the stale bootsupport and project.vfs 0.1 copies deterministically, instead of relying on tm path order for a same-version tie); bootsupport's include_modules.config lists it by name only. The 0.2.0 number retroactively versions the two changes shipped against the 0.1 filename earlier today (register_all_tm deep discovery - a minor API addition - and the source_pkgindex sourcing-scope fix). A version-history comment block in the module header now substitutes for the buildversion.txt changelog other modules carry. src/modules/AGENTS.md: the punk::libunknown exception bullets now spell out the manual-versioning mechanics for agents - same Patch/Minor/Major bump rules as buildversion-tracked modules, executed as a file rename plus Meta line, manpage_begin, provide-block and version-history updates, with a check for exact-version/filename dependents before any first bump. discovery.test/libsearch.test: the source-tree libunknown locator now picks the highest libunknown-*.tm by vcompare instead of plain lsort (robust to future version bumps). Verified live in punk902z src: package provide reports 0.2.0, register_all_tm present, lib.search deep discovery intact. Suites green under tclsh90 and tclsh87. Build artifacts synced (root modules/ and _vfscommon.vfs carry only libunknown-0.2.0.tm). punkshell 0.10.2. Stale 0.1 copies remain in src/bootsupport/modules (pending 'make.tcl bootsupport') and src/vfs/project.vfs (pending layout maintenance) - both now cleanly outversioned at runtime. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
d35e055efc |
punk::libunknown: isolate pkgIndex.tcl sourcing - stop clobbering global 'dir'
zipfs_tclPkgUnknown previously declared 'global dir' and executed pkgIndex.tcl scripts via 'namespace eval ::' - the pkgIndex $dir contract was met by writing the global namespace's dir variable, silently overwriting any user global named 'dir' whenever a package require fell through to the pkg unknown handler (observed misdirecting a file write into the user's Tcl installation during test development), and each index's stray unqualified variables (ver, pkg, script, _CawtSubDirs, ...) leaked into ::. Index scripts now execute in a source_pkgindex proc frame: $dir is a formal parameter and auto_path/env are global links - exactly the environment stock tclPkgUnknown documents (its indexes see dir as the handler's proc-local plus 'global auto_path env'), without stock's incidental exposure of all its other proc locals. tcl::Pkg::source uplevels into the caller's frame, so the scheme works unchanged for the 8.6 pre-tip459 fallback. The legacy non-epoch branch already sourced in the handler frame and simply gains stock parity from the 'global dir' removal. Reviewed against tcllib 2.0's vendored index behaviours (all compatible): qualified '$dir ni $::auto_path'/'lappend ::auto_path' extension in the top-level index, its own apply-scoped subindex sweep (the same isolation idiom), vsatisfies guards with early return, 'package provide' during index sourcing (try/pkgIndex.tcl on 9+), and critcl-generated ifneeded strings (md5c, tcllibc) whose proc definitions run at require time, not source time. One deliberate divergence from stock: each index file gets its own frame, so unqualified variables no longer persist between index files within one sweep (stock shares its handler frame across the sweep) - nothing in tcllib relies on that. discovery.test: the GAP pin flips to libunknown_pkgunknown_preserves_global_dir, plus new pins for the index contract - $dir-based ifneeded/source works, unqualified 'lappend auto_path' extension reaches the real ::auto_path, and stray index-script sets don't leak to ::. Verified live in punk902z src: ::dir no longer set at startup, user dir global survives package activity, tcllib md5/struct::set/json load through the new frame, lib.search deep discovery unaffected. Remaining startup globals def/pkg/ver come from punkshell's own boot code (punk_main.tcl foreach loops), not the handler. punkshell 0.10.1. punk::libunknown remains manually versioned at 0.1; vfs artifact synced, bootsupport copy untouched as before. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
0c243a9ba9 |
dev lib.search: deep module discovery by default; -refresh = genuine re-scan
punk::libunknown gains register_all_tm: walks every tcl:™️:list path
recursively and registers ifneeded scripts for .tm modules at every
namespace depth (the tm unknown handler only registers siblings at the
requested depth, leaving never-requested subfolders like test::* invisible
to 'package names'). First registration wins - parity with the handler and
the shadowing pins. Reuses/populates the per-epoch directory index cache
(zipfs whole-tree listing; per-dir globs for filesystem paths; #modpod-*,
#tarjar-* and _build skipped) and runs at most once per tm epoch per
interp - the guard is the interp-local tm_fullscan variable, deliberately
not in the shareable epoch dict since ifneeded registrations are
interp-local.
punk::mix::commandset::loadedlib 0.2.0: search runs register_all_tm plus
the auto_path pkgIndex sweep by default when punk::libunknown is active,
so 'dev lib.search test' now shows deep modules without -refresh.
-refresh is repurposed to mean a genuine filesystem re-scan: package epoch
incr (invalidating the scan caches) then rediscovery - picking up .tm
files added/removed on disk. Without punk::libunknown (or with an older
copy lacking register_all_tm) -refresh falls back to the previous
dummy-require deep walk. Dependency fixes: highlight ansi computed only
when -highlight 1 via qualified punk::ansi with inline require (previously
relied on the shell-global a+ alias unconditionally and errored in bare
interps), inline requires for punk::path (fallback walk) and textblock
(table output).
New test suites (green under tclsh90 and tclsh87):
- modules/punk/libunknown/testsuites/discovery/discovery.test: lazy-depth
sibling registration, register_all_tm all-depths/cached-per-epoch/
head-wins-parity, package epoch shape and trace-driven increments,
epoch-cache short-circuit + incr recipe, and a GAP pin of
zipfs_tclPkgUnknown clobbering a user global 'dir' variable (stock
tclPkgUnknown keeps dir proc-local; fix candidate).
- modules/punk/mix/testsuites/loadedlib/libsearch.test: search match
semantics, default deep discovery, -refresh re-scan contract, highlight
without shell-global ansi aliases.
Both suites source the source-tree punk::libunknown directly by path:
'package require' would tie-break the same-version bootsupport copy by tm
path order (testinterp order favours bootsupport; child-interp
'tm::add {*}list' reverses precedence).
Verified live in 'punk902z src'. Build artifacts synced via make.tcl
packages + vfscommonupdate (loadedlib-0.2.0.tm, libunknown-0.1.tm).
Note: src/bootsupport copy of punk::libunknown intentionally untouched -
becomes stale until the next 'make.tcl bootsupport' sync; loadedlib
degrades gracefully against it. punk::libunknown remains manually
versioned at 0.1.
punkshell 0.10.0 (see CHANGELOG.md; also records the 0.9.1 doc-only
-refresh help rewrite).
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
|
1 week ago |
|
|
4924fca21b |
vfscommonupdate: sync pending built modules into _vfscommon.vfs
Catch-up vfs sync for module work committed earlier without a vfscommonupdate pass: opunk::console backend modules (G-001 increment 1), punk::sshrun 0.1.0, punk::args::moduledoc::tclcore 0.1.0 -> 0.2.0, app-punkscript punkscript.tcl. All copies verified byte-identical to their committed sources modulo build version stamping. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
ce31d8623c |
update punk::sshrun with wiki documentation
|
1 week ago |
|
|
3bafc2f195 |
GOALS + src/tests: test provenance comments and superseded/abandoned test-sweep rules
- src/tests/AGENTS.md: agent-added tests carry a one-line provenance comment `#added <YYYY-MM-DD> (agent[, G-<id>])[ - <short note>]` - immutable facts only (never "G-NNN will flip this" expectations, which live in _GAP_ test names and goal files); user-added tests optional; no bulk retrofit of existing suites. Rationale: provenance must survive where VCS history does not travel - packaged test modules (G-029), git+fossil dual history, file regeneration/moves - GOALS.md maintenance rules: marking a goal superseded/abandoned includes a test sweep - grep G-<old id> (at minimum src/tests) plus the tests named in the goal's detail-file Acceptance, and record each test's disposition (transfers to the superseding goal / stands down to plain characterization / lapses) in the appropriate detail file; the sweep never deletes, skips, or weakens tests on its own - the provenance lines are what keep the supersession sweep's grep reliable over time; closes the dangling-GAP-pin risk analyzed for superseded goals - no project version bump: governance docs only Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
ae04b3f8c9 |
GOALS: two-tier index restructure - summary-only GOALS.md, canonical Goal/Acceptance in detail files, archive-on-flip
- GOALS.md collapsed to summary entries (ID/status/title/Scope/detail pointer): 104.6KB -> 23KB so a full read stays cheap; Scope lines kept verbatim so path-grep goal discovery still works - canonicality split: index canonical for ID/status/title/Scope, detail file canonical for Goal:/Acceptance:; all 61 detail-file headers reconciled from the index (fixes stale copies, e.g. G-036 detail acceptance predated the achieved rework), bodies preserved untouched - detail files created for the three index-only goals G-017, G-034, G-054; every goal now has one - 10 achieved goals (G-007 G-015 G-036 G-037 G-040 G-046 G-049 G-054 G-058 G-059) archived: summary records appended to GOALS-archive.md, detail files moved to goals/archive/; archive-on-flip replaces the ~30-achieved-entries trigger - GOALS.md preamble/rules reworked: read workflow (read index in full, then detail files of scope-intersecting goals before editing), contract spans both tiers with proposal-first unchanged, next-free-ID counts the archive, achieved flip judged against the detail-file Acceptance and includes archiving - progress convention codified from G-001 increment-1 practice: index entries carry status only, never progress; incremental progress lives in the detail file's ## Progress section (landed/remaining); achieved flip requires the remaining-work list resolved - a partial increment never flips a goal - goals/AGENTS.md rewritten for the split (required 4-field header, one detail file per goal, orphan rules covering archive/); root AGENTS.md Child DOX Index + Repo-wide Notes updated; GOALS-archive.md preamble updated - stale detail-file paths updated to goals/archive/ in src/lib/app-punkscript/punkscript.tcl (comment), runtimebash_wsl.test, wslprobe.tcl and the G-042 detail file; propagated copies (root lib/, src/vfs/_vfscommon.vfs, src/_build) left to refresh via normal build steps - no project version bump: governance docs and source comments only, no user-visible shell behaviour Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
aec77ca0d1 |
G-001 increment 1: pluggable ::opunk::Console backends - test double, ssh-channel, tk-widget (punkshell 0.9.0)
- three new backend modules under src/modules/opunk/console/, base ::opunk::Console and punk::console UNCHANGED (the G-001 acceptance constraint - verified diff-clean): * opunk::console::test / ::opunk::TestConsole - deterministic channel-pair test double: fixed size via -columns/-rows, is_console_or_tty/can_respond 1 (settled value wins), at_eof = plain chan eof with NO probe (pending bytes never consumed - pinned). The console seam identified by the G-044 repl characterization work * opunk::console::ssh / ::opunk::SshConsole - socket-carried terminal sessions: construction-time capability (detection is the wrong tool - per goal detail), chan-eof without byte-consuming probes, size via the registered ANSI size-query provider over the connection. Flagship test: a scripted remote terminal answers CSI 6n over a socket pair and size resolves 100x30 through punk::console machinery querying the socket * opunk::console::tk / ::opunk::TkConsole - Tk text widget as terminal: widget path in the inherited in/out slots (documented non-channel reuse), terminal_class tk-text, size from widget char dims, at_eof via backend marker (opunk::console::tk::set_eof) or widget destruction; no Tk require at module load. Verified live under punk91 src (the tk-loading experiment kit) - voo -extends subclassing pattern recorded in opunk/AGENTS.md: children inherit public accessors + field INDEX variables (not parent-private my.* accessors) - constructors initialise inherited private fields via index vars, method bodies use parent public accessor methods; virtual dispatch via the slot-0 tag needs no base changes - tests: modules/opunk/console backends.test (8 tests: dispatch, spec_resolve acceptance of subclass values, probe-free eof, settled-capability precedence, ssh capability/eof/size-over-socket/settled-0-no-emission, tk gated behind env PUNK_TEST_TK=1) - 7 green + tk skip on tcl 9.0.3 and 8.7; tk case verified standalone under punk91 - goal detail records progress + remaining work (repl -console launch wiring, output-channel parameterization, interactive acceptance verification); goal stays active Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |
|
|
4bb7b3d68f |
G-054 achieved: tclcore string is class choices harvested from the running interpreter (tclcore moduledoc 0.2.0, punkshell 0.8.2)
- the ::tcl::string::is definition harvests its class set at define time from the bad-class error message of a deliberately invalid probe (safe, side-effect-free) - accept/reject parity with the loading interpreter by construction: 8.6.13 = 21 classes (no dict - the previous static 9.0 list wrongly ACCEPTED string is dict there), 8.7a6 = 23 (+dict +unicode), 9.0.3 = 22 (unicode removed). Fallback to the 9.0 set if the message format ever changes - hand-written man-page descriptions (kept verbatim, tstr-processed as before so the A_WARN highlights are unchanged) apply only to classes the runtime accepts; accepted-but-undescribed future classes get a generic label; static version notes added to dict (not in 8.6) and the new unicode entry (unreleased 8.7 only - removed in tcl 9). The per-class virtual docids (::tcl::string::is <class>) follow the harvested set automatically - new tclcoreparity.test (4 tests, gated on have_tclcoredocs): choices equal the live-harvested set and every documented choice is really accepted; per-class docids exist for every class; error-vs-ok outcome agrees between real string is and parse_status across the 23-shape probe matrix (missing args, trailing flag-like str, option/class prefixes + ambiguity, unknown option/class, -failindex var consumption, per-version dict/unicode presence, divergent-classification shapes); version-note labels conditional on presence. Expectations derived from the LIVE interpreter, never version arithmetic - green on 9.0.3, 8.7a6 and (via a direct tcltest driver, since runtests infrastructure does not run under the plain 8.6 kit) 8.6.13 - full punk/args + punk/ns trees green (219 pass + 1 pre-existing skip) incl the have_tclcoredocs cmdhelp pins Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
1 week ago |