From 8b68010a6f2c3063c220c04ffd2477df3d06296e Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Sun, 2 Aug 2026 05:44:38 +1000 Subject: [PATCH] Goals: G-070 pure-Tcl tclparser proposed -> active (user-directed) Activation freshness survey (goals_xref score G-070) found no new overlaps; strong hit G-019 already Related in G-070 - reciprocal back-pointer added to G-019 Notes. goals_lint clean (84 active / 70 archived). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- GOALS.md | 2 +- goals/G-019-dependency-scan-module-trimming.md | 4 ++++ goals/G-070-pure-tcl-tclparser.md | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GOALS.md b/GOALS.md index c2190d44..967fecd2 100644 --- a/GOALS.md +++ b/GOALS.md @@ -269,7 +269,7 @@ Detail: goals/G-068-vendored-moduledoc-workflow.md Scope: lint surface (location settled in the work: punk::args dev helper, dev commandset, or scriptlib/developer script); src/modules/punk/args-999999.0a1.0.tm (split_definition_records as consumed, no new dependency); src/tests/modules/punk/args/ (capability-gated suite) Detail: goals/G-069-splitter-tclparser-lint.md -### G-070 [proposed] Pure-Tcl tclparser: parse-command API fallback with behavioural parity against the C library +### G-070 [active] Pure-Tcl tclparser: parse-command API fallback with behavioural parity against the C library Scope: src/modules/punk/lib-999999.0a1.0.tm (tclparser_tcl stub + dispatch; new module if size warrants - decided in the work); src/tests/modules/punk/lib/ (parity + fallback suites); external fork repo c:/repo/jn/tclparser_punk (read-only reference snapshots + the zig-built parser dll oracle - G-154, achieved - see goals/archive/G-154-tclparser-punk-zig-build.md) Detail: goals/G-070-pure-tcl-tclparser.md diff --git a/goals/G-019-dependency-scan-module-trimming.md b/goals/G-019-dependency-scan-module-trimming.md index 951a245b..5e88320a 100644 --- a/goals/G-019-dependency-scan-module-trimming.md +++ b/goals/G-019-dependency-scan-module-trimming.md @@ -62,6 +62,10 @@ here. ## Notes +- Related: G-070 (pure-Tcl tclparser fallback; activated 2026-08-02) - directly + supplies this goal's candidate scanning basis without the native-binary + coupling: the tclparser_tcl stub this file cites becomes a working pure-Tcl + 'parse' implementation, so the scan can run inside build tooling on any tclsh. - Interacts with G-005/G-006 (how the c-only tclparser binary is provisioned if chosen) and G-018 (the spectrum of executable flavours). - G-115 relationship (recorded 2026-07-24; G-115 achieved 2026-07-31 - see diff --git a/goals/G-070-pure-tcl-tclparser.md b/goals/G-070-pure-tcl-tclparser.md index 6095b49b..8029eea2 100644 --- a/goals/G-070-pure-tcl-tclparser.md +++ b/goals/G-070-pure-tcl-tclparser.md @@ -1,6 +1,6 @@ # G-070 Pure-Tcl tclparser: parse-command API fallback with behavioural parity against the C library -Status: proposed +Status: active Scope: src/modules/punk/lib-999999.0a1.0.tm (tclparser_tcl stub + dispatch; new module if size warrants - decided in the work); src/tests/modules/punk/lib/ (parity + fallback suites); external fork repo c:/repo/jn/tclparser_punk (read-only reference snapshots + the zig-built parser dll oracle - G-154, achieved - see goals/archive/G-154-tclparser-punk-zig-build.md) Goal: punk::lib's script-analysis machinery (tclword_to_scriptlist and the dependent analysis paths) runs on runtimes without the tclparser C binary, via a pure-Tcl implementation of the tclparser 'parse' command API covering at least the subcommands and token shapes punk::lib consumes - with behavioural parity verified against the C library rather than assumed, and the C parser still preferred where present (performance). Acceptance: the punk::lib tclparser_tcl error stub is replaced by a working pure-Tcl implementation of the 'parse' subcommands punk::lib currently uses ('parse command' at minimum; the full covered set enumerated in this file during the work), returning the same parse-tree shapes (ranges, token types, expansion handling) the C library returns for those calls; a parity testsuite compares pure-Tcl output against the C tclparser across a recorded probe corpus (representative punkshell module scripts plus edge cases: {*} expansion, comments, backslash-newline continuation, nested command substitution, braces/quotes in words) - parity tests capability-gated on the binary, pure-Tcl-only tests running everywhere; a documented punk::lib analysis entry point (e.g. tclword_to_scriptlist) demonstrably works under a plain tclsh with no parser binary on the package path; dispatch prefers the C parser when available with the fallback engaging automatically otherwise; the reference source consulted (the tclparser_punk fork repo - snapshot and checkin/commit identity per its src/reference provenance table) is recorded in this file.