Browse Source

G-015 detail: decided - script subcommand gets a lean dedicated app package

Not a mode of app-punkshell. The acceptance is defined by absence (no
shellfilter stacks, no logging side effects, no interactive fallback),
which a package that never loads that machinery guarantees by
construction; app-punkshell''s load-time behaviour (shellfilter stacks
with syslog/file targets writing punkshell_*.log into the caller''s cwd,
logging threads) is wrong for one-shot calls; isolation caps the blast
radius of shell-path machinery. Duplication mitigation: the default punk
shell module/alias environment definition is factored into a shared
module-level definition (punk::aliascore as seed) consumed by both app
packages - share definitions via modules, not launcher control flow.
Package shape previews the G-031 registration model, as app-tomlish
demonstrated.

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 1 week ago
parent
commit
158e025c65
  1. 16
      goals/G-015-script-subcommand-piped-stdin.md

16
goals/G-015-script-subcommand-piped-stdin.md

@ -41,6 +41,22 @@ punk_main.tcl's `punk` subcommand case).
## Approach ## Approach
- **Decided 2026-07-07: a leaner dedicated app package** (not a mode of
app-punkshell). Rationale: the acceptance is defined by absence (no
shellfilter stacks, no logging side effects, no interactive fallback) which
a package that never loads that machinery guarantees by construction;
app-punkshell's load-time behaviour (shellfilter stacks with syslog/file
targets writing punkshell_out.log/punkshell_err.log into the caller's cwd,
logging threads) is wrong for one-shot calls; and isolation caps the blast
radius of shell-path machinery (the 2026-07-06 silent-stdout failure lived
in exactly the code reuse would couple to). Duplication mitigation: the
substantive shared piece - the definition of the default punk shell
module/alias environment - is factored into a shared module-level definition
(punk::aliascore as the seed) consumed by both app packages; launcher
control flow is deliberately not shared (share definitions via modules, not
control flow). This package shape also previews the G-031 registration
model (subcommand -> small handler package), as app-tomlish demonstrated.
- `<punkexe> script <file> [<args>...]` - execute the file with conventional - `<punkexe> script <file> [<args>...]` - execute the file with conventional
::argv0/::argv semantics, exit with its status. ::argv0/::argv semantics, exit with its status.
- `... | <punkexe> script` - read the whole of stdin as the script when no - `... | <punkexe> script` - read the whole of stdin as the script when no

Loading…
Cancel
Save