From 6f41c7332489816aca84c437f9f5d8d77d47b3ea Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Sun, 2 Aug 2026 00:05:06 +1000 Subject: [PATCH] Build outputs: thin-layout make.tcl sync (help pure dry-run + received report) Assisted-by: harness=claude; primary-model=claude-opus-5[1m]; api-location=anthropic.com --- .../vendor/punk/project-0.1/src/make.tcl | 81 ++++++++++++------- .../vendor/punk/basic/src/make.tcl | 81 ++++++++++++------- .../vendor/punk/project-0.1/src/make.tcl | 81 ++++++++++++------- 3 files changed, 153 insertions(+), 90 deletions(-) diff --git a/src/modules/punk/mix/#modpod-templates-999999.0a1.0/templates/project_layouts/vendor/punk/project-0.1/src/make.tcl b/src/modules/punk/mix/#modpod-templates-999999.0a1.0/templates/project_layouts/vendor/punk/project-0.1/src/make.tcl index a9aa5df2..e3266dee 100644 --- a/src/modules/punk/mix/#modpod-templates-999999.0a1.0/templates/project_layouts/vendor/punk/project-0.1/src/make.tcl +++ b/src/modules/punk/mix/#modpod-templates-999999.0a1.0/templates/project_layouts/vendor/punk/project-0.1/src/make.tcl @@ -3246,10 +3246,13 @@ if {[info exists ::env(PUNKBOOT_PLAIN)] && [string is true -strict $::env(PUNKBO help tool build -test 0 punkzip' shows the tool build form, as does appending -help to the command line itself ('make.tcl tool build -test 0 punkzip -help') - while a line it would reject shows the - same usage error the subcommand itself would produce (synopsis plus - per-form reasons, exit 1). A bare action word always renders that - action's usage, even where the real command needs more arguments - ('make.tcl help buildsuite build')." + same usage error the subcommand itself would produce (the error + table carries the forms' synopsis, argument rows and per-form + reasons; exit 1). An accepted line is confirmed with a one-line + report of where each word landed ('kitname = punk91 -confirm 0' + reveals flag-like words consumed as values); an action word alone + is dry-run too, so a form needing more arguments reports them via + the usage error ('make.tcl help buildsuite build')." buildsuite " Surface for the defined buildsuites under src/buildsuites (zig-built @@ -3964,43 +3967,61 @@ if {$do_help} { set usage_id (script)::punkboot::$help_subject } set usage_args [list] + set accepted_note "" if {[llength $help_words]} { #G-143 (refined 2026-08-01): help_words is the subject's own command line - #('make.tcl help tool build -test 0 punkzip') and help is a DRY-RUN of - #it: the words parse through the subject's declaration exactly as + #('make.tcl help tool build -test 0 punkzip') and help is a pure DRY-RUN + #of it: the words parse through the subject's declaration exactly as #dispatch would parse them (punk::args form auto-selection - literal #action leaders, choice prefixes). A line the subcommand would accept #renders the matched form's single-form usage (whole usage for - #single-form subjects); a line it would reject gets the same pointed - #punk::args diagnosis dispatch would give - synopsis plus per-form - #reasons - on stderr with exit 1, never a plain-help fallback. Note - #punk::args' positional model: flag-like words at or after the first - #value position are consumed as values, so such lines still render - #usage cleanly (and declaration-level passthroughs - shell args, - #buildsuite driver args - parse clean by design). - #One carve-out: a BARE action word (or unambiguous prefix) asks about - #that form rather than claiming a runnable line - forms with required - #values ('buildsuite build' needs a suitename) would fail a strict - #dry-run, so a single form-matching word renders the form directly. - set form_names [punk::args::forms $usage_id] - set fmatch "" - if {[llength $help_words] == 1 && [llength $form_names] > 1} { - set fmatch [tcl::prefix::match -error "" $form_names [lindex $help_words 0]] + #single-form subjects) plus a one-line report of where each received + #word landed; a line it would reject gets the same pointed punk::args + #diagnosis dispatch would give on stderr with exit 1 - the error table + #carries the all-forms synopsis, per-form reasons and argument rows, + #so it IS the form documentation. Deliberately no bare-action + #carve-out: 'help buildsuite build' shows the build form via the + #diagnosis that a suitename is still required. Note punk::args' + #positional model: flag-like words at or after the first value + #position are consumed as VALUES - the accepted-line report makes + #that visible ('kitname = punk91 -confirm 0'); declaration-level + #passthroughs (shell args, buildsuite driver args) parse clean by + #design. + if {[catch {punk::args::parse $help_words -errorstyle $::punkboot::errstyle withid $usage_id} argd]} { + puts stderr $argd + exit 1 } - if {$fmatch ne ""} { - lappend usage_args -form $fmatch - } else { - if {[catch {punk::args::parse $help_words -errorstyle $::punkboot::errstyle withid $usage_id} argd]} { - puts stderr $argd - exit 1 - } - if {[llength $form_names] > 1} { - lappend usage_args -form [dict get $argd form] + set form_names [punk::args::forms $usage_id] + if {[llength $form_names] > 1} { + lappend usage_args -form [dict get $argd form] + } + #interim 'where did my words land' clue (punk::args has no annotated + #success render yet): name = value pairs for RECEIVED args only + #(defaulted opts omitted), so a swallowed flag-like word shows up + #against the argument that consumed it. + set recnames [list] + foreach {rn ri} [dict get $argd received] { + if {$rn ni $recnames} {lappend recnames $rn} + } + set parts [list] + foreach section {leaders opts values} { + foreach {an av} [dict get $argd $section] { + if {$an in $recnames} {lappend parts "$an = $av"} } } + set accepted_note "dry-run: line accepted" + if {[llength $form_names] > 1} { + append accepted_note " (form [dict get $argd form])" + } + if {[llength $parts]} { + append accepted_note " - [join $parts { | }]" + } } if {![catch {punk::args::usage {*}$usage_args $usage_id} usage_out]} { puts stdout $usage_out + if {$accepted_note ne ""} { + puts stdout $accepted_note + } set availability_note [::punkboot::punkboot_availability_note] if {$availability_note ne ""} { puts stdout $availability_note diff --git a/src/project_layouts/vendor/punk/basic/src/make.tcl b/src/project_layouts/vendor/punk/basic/src/make.tcl index a9aa5df2..e3266dee 100644 --- a/src/project_layouts/vendor/punk/basic/src/make.tcl +++ b/src/project_layouts/vendor/punk/basic/src/make.tcl @@ -3246,10 +3246,13 @@ if {[info exists ::env(PUNKBOOT_PLAIN)] && [string is true -strict $::env(PUNKBO help tool build -test 0 punkzip' shows the tool build form, as does appending -help to the command line itself ('make.tcl tool build -test 0 punkzip -help') - while a line it would reject shows the - same usage error the subcommand itself would produce (synopsis plus - per-form reasons, exit 1). A bare action word always renders that - action's usage, even where the real command needs more arguments - ('make.tcl help buildsuite build')." + same usage error the subcommand itself would produce (the error + table carries the forms' synopsis, argument rows and per-form + reasons; exit 1). An accepted line is confirmed with a one-line + report of where each word landed ('kitname = punk91 -confirm 0' + reveals flag-like words consumed as values); an action word alone + is dry-run too, so a form needing more arguments reports them via + the usage error ('make.tcl help buildsuite build')." buildsuite " Surface for the defined buildsuites under src/buildsuites (zig-built @@ -3964,43 +3967,61 @@ if {$do_help} { set usage_id (script)::punkboot::$help_subject } set usage_args [list] + set accepted_note "" if {[llength $help_words]} { #G-143 (refined 2026-08-01): help_words is the subject's own command line - #('make.tcl help tool build -test 0 punkzip') and help is a DRY-RUN of - #it: the words parse through the subject's declaration exactly as + #('make.tcl help tool build -test 0 punkzip') and help is a pure DRY-RUN + #of it: the words parse through the subject's declaration exactly as #dispatch would parse them (punk::args form auto-selection - literal #action leaders, choice prefixes). A line the subcommand would accept #renders the matched form's single-form usage (whole usage for - #single-form subjects); a line it would reject gets the same pointed - #punk::args diagnosis dispatch would give - synopsis plus per-form - #reasons - on stderr with exit 1, never a plain-help fallback. Note - #punk::args' positional model: flag-like words at or after the first - #value position are consumed as values, so such lines still render - #usage cleanly (and declaration-level passthroughs - shell args, - #buildsuite driver args - parse clean by design). - #One carve-out: a BARE action word (or unambiguous prefix) asks about - #that form rather than claiming a runnable line - forms with required - #values ('buildsuite build' needs a suitename) would fail a strict - #dry-run, so a single form-matching word renders the form directly. - set form_names [punk::args::forms $usage_id] - set fmatch "" - if {[llength $help_words] == 1 && [llength $form_names] > 1} { - set fmatch [tcl::prefix::match -error "" $form_names [lindex $help_words 0]] + #single-form subjects) plus a one-line report of where each received + #word landed; a line it would reject gets the same pointed punk::args + #diagnosis dispatch would give on stderr with exit 1 - the error table + #carries the all-forms synopsis, per-form reasons and argument rows, + #so it IS the form documentation. Deliberately no bare-action + #carve-out: 'help buildsuite build' shows the build form via the + #diagnosis that a suitename is still required. Note punk::args' + #positional model: flag-like words at or after the first value + #position are consumed as VALUES - the accepted-line report makes + #that visible ('kitname = punk91 -confirm 0'); declaration-level + #passthroughs (shell args, buildsuite driver args) parse clean by + #design. + if {[catch {punk::args::parse $help_words -errorstyle $::punkboot::errstyle withid $usage_id} argd]} { + puts stderr $argd + exit 1 } - if {$fmatch ne ""} { - lappend usage_args -form $fmatch - } else { - if {[catch {punk::args::parse $help_words -errorstyle $::punkboot::errstyle withid $usage_id} argd]} { - puts stderr $argd - exit 1 - } - if {[llength $form_names] > 1} { - lappend usage_args -form [dict get $argd form] + set form_names [punk::args::forms $usage_id] + if {[llength $form_names] > 1} { + lappend usage_args -form [dict get $argd form] + } + #interim 'where did my words land' clue (punk::args has no annotated + #success render yet): name = value pairs for RECEIVED args only + #(defaulted opts omitted), so a swallowed flag-like word shows up + #against the argument that consumed it. + set recnames [list] + foreach {rn ri} [dict get $argd received] { + if {$rn ni $recnames} {lappend recnames $rn} + } + set parts [list] + foreach section {leaders opts values} { + foreach {an av} [dict get $argd $section] { + if {$an in $recnames} {lappend parts "$an = $av"} } } + set accepted_note "dry-run: line accepted" + if {[llength $form_names] > 1} { + append accepted_note " (form [dict get $argd form])" + } + if {[llength $parts]} { + append accepted_note " - [join $parts { | }]" + } } if {![catch {punk::args::usage {*}$usage_args $usage_id} usage_out]} { puts stdout $usage_out + if {$accepted_note ne ""} { + puts stdout $accepted_note + } set availability_note [::punkboot::punkboot_availability_note] if {$availability_note ne ""} { puts stdout $availability_note diff --git a/src/project_layouts/vendor/punk/project-0.1/src/make.tcl b/src/project_layouts/vendor/punk/project-0.1/src/make.tcl index a9aa5df2..e3266dee 100644 --- a/src/project_layouts/vendor/punk/project-0.1/src/make.tcl +++ b/src/project_layouts/vendor/punk/project-0.1/src/make.tcl @@ -3246,10 +3246,13 @@ if {[info exists ::env(PUNKBOOT_PLAIN)] && [string is true -strict $::env(PUNKBO help tool build -test 0 punkzip' shows the tool build form, as does appending -help to the command line itself ('make.tcl tool build -test 0 punkzip -help') - while a line it would reject shows the - same usage error the subcommand itself would produce (synopsis plus - per-form reasons, exit 1). A bare action word always renders that - action's usage, even where the real command needs more arguments - ('make.tcl help buildsuite build')." + same usage error the subcommand itself would produce (the error + table carries the forms' synopsis, argument rows and per-form + reasons; exit 1). An accepted line is confirmed with a one-line + report of where each word landed ('kitname = punk91 -confirm 0' + reveals flag-like words consumed as values); an action word alone + is dry-run too, so a form needing more arguments reports them via + the usage error ('make.tcl help buildsuite build')." buildsuite " Surface for the defined buildsuites under src/buildsuites (zig-built @@ -3964,43 +3967,61 @@ if {$do_help} { set usage_id (script)::punkboot::$help_subject } set usage_args [list] + set accepted_note "" if {[llength $help_words]} { #G-143 (refined 2026-08-01): help_words is the subject's own command line - #('make.tcl help tool build -test 0 punkzip') and help is a DRY-RUN of - #it: the words parse through the subject's declaration exactly as + #('make.tcl help tool build -test 0 punkzip') and help is a pure DRY-RUN + #of it: the words parse through the subject's declaration exactly as #dispatch would parse them (punk::args form auto-selection - literal #action leaders, choice prefixes). A line the subcommand would accept #renders the matched form's single-form usage (whole usage for - #single-form subjects); a line it would reject gets the same pointed - #punk::args diagnosis dispatch would give - synopsis plus per-form - #reasons - on stderr with exit 1, never a plain-help fallback. Note - #punk::args' positional model: flag-like words at or after the first - #value position are consumed as values, so such lines still render - #usage cleanly (and declaration-level passthroughs - shell args, - #buildsuite driver args - parse clean by design). - #One carve-out: a BARE action word (or unambiguous prefix) asks about - #that form rather than claiming a runnable line - forms with required - #values ('buildsuite build' needs a suitename) would fail a strict - #dry-run, so a single form-matching word renders the form directly. - set form_names [punk::args::forms $usage_id] - set fmatch "" - if {[llength $help_words] == 1 && [llength $form_names] > 1} { - set fmatch [tcl::prefix::match -error "" $form_names [lindex $help_words 0]] + #single-form subjects) plus a one-line report of where each received + #word landed; a line it would reject gets the same pointed punk::args + #diagnosis dispatch would give on stderr with exit 1 - the error table + #carries the all-forms synopsis, per-form reasons and argument rows, + #so it IS the form documentation. Deliberately no bare-action + #carve-out: 'help buildsuite build' shows the build form via the + #diagnosis that a suitename is still required. Note punk::args' + #positional model: flag-like words at or after the first value + #position are consumed as VALUES - the accepted-line report makes + #that visible ('kitname = punk91 -confirm 0'); declaration-level + #passthroughs (shell args, buildsuite driver args) parse clean by + #design. + if {[catch {punk::args::parse $help_words -errorstyle $::punkboot::errstyle withid $usage_id} argd]} { + puts stderr $argd + exit 1 } - if {$fmatch ne ""} { - lappend usage_args -form $fmatch - } else { - if {[catch {punk::args::parse $help_words -errorstyle $::punkboot::errstyle withid $usage_id} argd]} { - puts stderr $argd - exit 1 - } - if {[llength $form_names] > 1} { - lappend usage_args -form [dict get $argd form] + set form_names [punk::args::forms $usage_id] + if {[llength $form_names] > 1} { + lappend usage_args -form [dict get $argd form] + } + #interim 'where did my words land' clue (punk::args has no annotated + #success render yet): name = value pairs for RECEIVED args only + #(defaulted opts omitted), so a swallowed flag-like word shows up + #against the argument that consumed it. + set recnames [list] + foreach {rn ri} [dict get $argd received] { + if {$rn ni $recnames} {lappend recnames $rn} + } + set parts [list] + foreach section {leaders opts values} { + foreach {an av} [dict get $argd $section] { + if {$an in $recnames} {lappend parts "$an = $av"} } } + set accepted_note "dry-run: line accepted" + if {[llength $form_names] > 1} { + append accepted_note " (form [dict get $argd form])" + } + if {[llength $parts]} { + append accepted_note " - [join $parts { | }]" + } } if {![catch {punk::args::usage {*}$usage_args $usage_id} usage_out]} { puts stdout $usage_out + if {$accepted_note ne ""} { + puts stdout $accepted_note + } set availability_note [::punkboot::punkboot_availability_note] if {$availability_note ne ""} { puts stdout $availability_note