Skip to content

docs: anchor the shell → intent rescope (§3/§4) in DESIGN.md - #6815

Merged
briansrls merged 11 commits into
mainfrom
shell-intent-design
Jul 18, 2026
Merged

briansrls merged 11 commits into
mainfrom
shell-intent-design

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Anchors the shell→dag rescope the operator and I aligned on 2026-07-17, per your request to put it in DESIGN.md with real .dag references.

What this says

The .dag intent may not name a target language. A workflow is an ordinary dependency graph over modeled operations (§4: a program is Node+Edge) — the intent is the .dag graph, not a Pipeline (that's optional sugar). Rendering to bash is a separate, target-parametrized concern, and it splits into two distinct layers that we'd been conflating:

  • emit (§4): emit(intent, Bash) — one grammar read backward, target as a parameter.
  • realization (§2): pure-spec → host-effect, N transports (LocalShell/SshShell) — consumes emit's output.

Bash ends up exactly where Rust is: its grammar spec (src/v2/extdeps/languages/bash.dag) and the emit rows, never in the intent.

The enforceable invariant

The intent imports no language-construction vocab (bash_build, the ShellStmt coproduct, serialize_bash) — that's emit-internal. This is realization_vocabulary_containment generalized with the intent layer in scope; green = conforms to §3/§4. Not a vibe — an executable wall.

Why now

Names the residual flagged 2026-07-17: (1) raw concat shell (gunbc_ci_deploy_invoke — untouched by the bash_build migration, which only moved the ShellStmt/program.dag consumers) and (2) structured-but-still-bash (floor_diff_observe). The sidecar delete (PR-A/PR-B merged) is demoted to Phase 0 of a bigger arc; git.diff/floor_diff_observe is the flagship for intent→emit→realization.

Contents

  • DESIGN.md: one Open-threads anchor bullet (real .dag references throughout).
  • docs/plans/shell-intent-emit-realization-design.md: the full design — layering table, invariant, residual, rescoped phases, coupled HostEffect.ShellCommand{script} lane, non-goals.

Docs-only. A residual-count census is running; exact per-class/per-layer numbers will land as a follow-up commit into the plan doc's census section.

🤖 Generated with Claude Code

briansrls and others added 5 commits July 17, 2026 20:39
Restates §3/§4 for the shell case: the .dag intent may not name a target
language. A workflow is an ordinary dependency graph over modeled operations;
rendering to bash is a separate, target-parametrized concern (emit), distinct
from realization (pure-spec → host-effect). Bash appears only in its grammar
spec + emit rows, never in the intent — exactly where Rust appears.

Enforceable invariant: the intent imports no language-construction vocab
(bash_build, the ShellStmt coproduct, serialize_bash) — realization_vocabulary_
containment generalized with the intent layer in scope, green = conforms.

Names the residual the operator flagged 2026-07-17: (1) raw concat shell
(gunbc_ci_deploy_invoke, untouched by the bash_build migration) and
(2) structured-but-still-bash (floor_diff_observe). Phases the rescope with the
sidecar delete demoted to Phase 0; git.diff/floor_diff_observe as the flagship.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
~110 raw-concat shell builders + ~9 structured-bash sites across ~50 files,
concentrated in dag/gunbc (std/lens/compiler are clean). Collapses to ~10
operation families to model once each — not 110 independent problems. Adds the
per-layer/per-operation breakdown, per-file hotspots, and the §3 policy note on
the extdeps extern-tool wrappers (legitimate as one-of-N transport handlers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DESIGN.md is generated from dag/gunbc/design_document.dag (DesignArtifact);
the anchor lives in the source's open_threads_blocks() li and DESIGN.md is its
rendered output. An auto-commit had reverted the generated DESIGN.md, leaving
source-with-anchor vs generated-without = drift. Restores the rendered bullet so
committed DESIGN.md == expected_design_md() again (review 39352 finding 1).

Plan doc: relabel "Class 1 + 3" to "Class 1" — the census fragment-helper
sub-kind is a raw-string builder (Class 1), not a separate undefined Class 3
(review 39352 finding 2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Both findings addressed in a42b3a943a — thanks for catching them, especially the anchor one.

Finding 1 (DESIGN.md anchor reverted / git diff empty): Root cause is that DESIGN.md is a generated artifact — dag/gunbc/design_document.dag expected_design_md() (the DesignArtifact in the generated-artifact registry) renders it, and the drift gate enforces committed DESIGN.md == expected_design_md(). My first pass hand-edited the generated output, which correctly drifted; the WIP commit you saw was an auto-commit of my revert while I moved the content to the real source. The anchor now lives in design_document.dag's open_threads_blocks() as an li(...), and DESIGN.md is its rendered form — both carry the bullet, so the diff is no longer empty and the drift gate is satisfied (CI re-running to confirm byte-match).

Finding 2 (docs/plans/...:44 undefined Class 3): Fixed — relabeled Class 1 + 3 to Class 1. The census's fragment-helper sub-kind (flag/path string builders) is a raw-String builder, i.e. Class 1; there was no separate Class 3. The residual section now reads consistently against the ~110 figure.

— sent from calm-ferret-849

…n_document.dag open-threads conflict

#6821 added the effect-namespace-grants open-thread bullet in the same
open_threads_blocks() list where #6815 added the shell → intent bullet.
Both are distinct threads — keep both li() rows (effect-grants then
shell → intent) and render both in DESIGN.md in matching order. Resolved in
the design_document.dag source first; DESIGN.md reconstructed to match
(drift gate is the oracle). Doc-reachability verified orphans=0.
@briansrls
briansrls merged commit f8939a3 into main Jul 18, 2026
3 checks passed
@briansrls
briansrls deleted the shell-intent-design branch July 18, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant