Skip to content

feat(flow): 0.7.0 — init infers stack commands from the repo when manifest detection finds nothing - #21

Closed
kaiomp wants to merge 1 commit into
mainfrom
issue-20
Closed

feat(flow): 0.7.0 — init infers stack commands from the repo when manifest detection finds nothing#21
kaiomp wants to merge 1 commit into
mainfrom
issue-20

Conversation

@kaiomp

@kaiomp kaiomp commented Aug 24, 2026

Copy link
Copy Markdown
Member

Closes flykit-cc/flow#3

What changed

When /flow:init's manifest detection comes up empty (a script-style Python repo with requirements.txt + venv but no pyproject.toml/package.json), the init script and skill used to hand the user homework: "edit .flow/config.md to fill in your project commands" / "add one by hand if the detection missed it". This PR makes the agent close that gap instead — infer the commands from the repo, verify each one actually runs, and write the verified value into .flow/config.md.

  • scripts/init.js — extracted doneMessage(); the closing output now reports which *_cmd fields the manifests did not evidence and addresses the follow-up to the agent ("inspect the repo… infer each blank *_cmd, verify it actually runs, and write the verified value into .flow/config.md"), never to the user. A re-run over an existing config asks for nothing. detectStackCommands is untouched — the evidence-only invariant ("never invents a command that isn't evidenced by a file on disk") is preserved and still pinned by tests.
  • commands/init.md — new Step 4: glob for the evidence a manifest didn't carry (venv interpreter, test_*.py/tests/, dev entrypoint, Makefile/justfile/Taskfile.yml target), run each inferred command before writing it (never leave a dev server running), then Edit the verified value into .flow/config.md. Added Edit, Glob to allowed-tools.
  • references/config-template.md, SETUP.md, commands/health.md, README.md — a blank *_cmd now means "nothing in the repo supported one", not "your turn".
  • scripts/init.test.js — 7 new tests: each doneMessage() branch, and the issue's own repro end-to-end (requirements.txt + venv + test_*.py ⇒ output directs the agent, never the user).

Version

flow bumped 0.6.0 → 0.7.0 (minor: new behavior) in plugins/flow/.claude-plugin/plugin.json, plugins/flow/package.json, and .claude-plugin/marketplace.json.

Testing

  • cd plugins/flow && npm test — 180/180 pass (was 173; +7 new)
  • node --check plugins/flow/scripts/init.js and init.test.js — pass
  • ./scripts/check-plugin-versions.sh --since main — pass (ok flow: bumped 0.6.0 -> 0.7.0)
  • Sanity run of init.js against the issue's repro repo — output carries the agent-directed inference step, no "edit config.md by hand" text

…ifest detection finds nothing (fixes #20)

Manifest detection is evidence-only by design: no package.json script, no
pyproject/ruff/pytest config, no go.mod or Cargo.toml means every *_cmd comes
back blank. That part is correct and stays. What was wrong is what happened
next — the script signed off with "edit .flow/config.md to fill in your project
commands", the skill said the user supplies what the script cannot infer, and
the template told them to add one by hand. In a script-style Python repo (a
requirements.txt, a venv, a runnable test_*.py) that is homework handed to the
user for work the agent can do in one step: the evidence is right there on disk.

- scripts/init.js: extract doneMessage(), which reports which *_cmd fields the
  manifests did not evidence and addresses closing that gap to the agent —
  infer from the repo, verify the command runs, write it into config.md.
  A re-run over an existing config detected nothing and so asks for nothing.
  detectStackCommands is untouched; it still never invents an unevidenced
  command.
- commands/init.md: new Step 4 — glob for the evidence a manifest did not carry
  (venv interpreter, test files, dev entrypoint, Makefile/justfile target),
  run each inferred command before writing it, then Edit it into config.md.
  Report and health move to Steps 5 and 6.
- references/config-template.md, SETUP.md, commands/health.md, README.md:
  a blank field now means "nothing in the repo supported one", not "your turn".
- scripts/init.test.js: captureStdout() plus coverage for each doneMessage
  branch and the issue's own repro end-to-end.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kaiomp

kaiomp commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

Test run of the Nova→dsh→Claude pipeline. Closing to redo with live-watch delegation; same fix will be resubmitted.

@kaiomp kaiomp closed this Aug 24, 2026
@kaiomp
kaiomp deleted the issue-20 branch August 24, 2026 22:11
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.

init: when manifest detection finds nothing, infer stack commands from the repo instead of punting to the user

1 participant