Add sub-project 0: the SDK wrap point#38
Merged
Conversation
Brainstormed the two open decisions from the sub-project 0 scoping brief (wrapped-script placement, noise classification) and ran a diagnostic spike against IntelliJ. The spike found IntelliJ launches runs as a direct `flutter run --machine` with --dart-define values in plain argv — so injection is an argv rewrite, no daemon JSON-RPC proxy needed. Also syncs the architecture doc and scoping brief from the design branch so this work sits on the current design base. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Task-by-task TDD plan for the SDK wrap point: dart-define injection, project resolution, session sink, PTY/pipe transport, the wrap run command, the bash shim template, the mirror installer, the probe app, and the manual smoke test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements `RunCommand` and `app/bin/wrap.dart`: resolves project context, injects `--dart-define=FW_MARKER=<token>`, runs under the transport with session capture, and degrades to a plain pass-through when outside a flutterware project. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements installMirror() which builds a per-project facade at <projectRoot>/flutterware/sdk/ — real bin/ directory with flutter/dart shims, all other entries symlinked to the shared SDK — and wires it up as the `install` subcommand of the wrap CLI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace single cascade `..createSync()` with `.createSync()` in installer_test.dart to satisfy avoid_single_cascade_in_expression_statements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First sub-project of the command-wrapper tool — the riskiest piece. Wraps the
flutter/dartscripts an IDE invokes so every run (CLI, AI, or IDE) is intercepted, classified, observed, and can have a--dart-defineinjected, degrading to plain passthrough on any failure.docs/.../subproject-0-ide-launch-finding.md): IntelliJ launches runs as a directflutter run --machinewith--dart-definevalues in plain argv — so injection is a simple argv rewrite. The feared "daemon JSON-RPC proxy" branch was eliminated before any code was written.<project>/flutterware/sdk/, symlinks the pristine SDK + two bash shims), a pure-bash fast path (marker walk-up → classify → audit log → dispatch), theflutterware wrap run/installCLI (argv-rewrite--dart-defineinjection, PTY/pipe transport reusing phase-1 passthrough, local session sink), and anFW_MARKERprobe widget in the example app.wrap install, and the shim only intercepts when aflutter_versionmarker is present (none is committed). The only modified production files are an optional, backward-compatiblecaptureSinkparam onrunUnderPtyand a 5-line probe widget inexamples/example.config.dart, and the walker/bootstrapper/SDK-download.Test plan
cd app && flutter test test/wrap/ test/passthrough/) — dart-define injection, project/worktree resolution, session sink, transport, thewrap runcommand + degrade paths, and an end-to-end test driving the rendered bash shim.dart tool/prepare_submit.dartproduces no diff.docs/superpowers/specs/2026-05-15-subproject-0-manual-smoke.md(compile the wrap exe, install the mirror, point IntelliJ at it, confirmflutter runis intercepted andFW_MARKERreaches the running app).🤖 Generated with Claude Code