Skip to content

Fix #20: init infers the stack commands no manifest declares - #22

Merged
kaiomp merged 2 commits into
mainfrom
issue-20
Aug 24, 2026
Merged

Fix #20: init infers the stack commands no manifest declares#22
kaiomp merged 2 commits into
mainfrom
issue-20

Conversation

@kaiomp

@kaiomp kaiomp commented Aug 24, 2026

Copy link
Copy Markdown
Member

Closes flykit-cc/flow#3

The problem

In a script-style Python repo — venv, requirements.txt, tests/test_*.py, an app.py, no pyproject.toml/flow:init detected nothing, left every *_cmd blank, and signed off with:

[flow init] Done. Next: edit .flow/config.md to fill in your project commands.

/flow:health reported the same blanks the same way. Every one of those commands was discoverable from the repo in under a minute, so this was homework handed back to the user for a step the agent can finish in one pass.

What changed

scripts/init.js

  • Detects from evidence that isn't a manifest: requirements*.txt dependencies (pytest, ruff, flake8, mypy, black), Makefile targets, and manage.py. A manifest command still wins over the Makefile wrapper around it.
  • Prefers the project's own venv copy of a tool — .venv/bin/pytest, not a bare pytest resolved against whatever is on PATH.
  • Ends by naming the keys that are still blank, read back from config.md, so a re-run against an already-initialised project reports its real state rather than a fresh detection. The wording is addressed to the agent: infer each one, verify it runs, write it in. The "edit config.md yourself" line is gone.

commands/init.md — new Step 3, "Fill in what detection missed": work each blank key out from the repo, verify by running it, write it with Edit. Steps renumbered; Edit/Glob/Grep added to allowed-tools.

commands/health.md — a blank *_cmd is now filled in and reported as FIXED, not read back to the user. Health stays diagnostic in every other respect, and the doc says so.

references/stack-command-inference.md (new) — the shared procedure both commands follow: where the evidence for each key lives, preferring the project's environment, how to verify each command without leaving a dev server running, and when a blank is a real decision.

Docs (README.md, SETUP.md, references/config-template.md) no longer tell users to fill blanks in by hand.

Version bumped 0.6.0 -> 0.7.0 across plugin.json, package.json, and marketplace.json.

Testing

$ cd plugins/flow && npm test
ℹ tests 188   ℹ pass 188   ℹ fail 0

$ cd plugins/steuer && npm test
ℹ tests 109   ℹ pass 109   ℹ fail 0

$ ./scripts/check-plugin-versions.sh --since main
ok    flow: bumped 0.6.0 -> 0.7.0

$ find plugins -name '*.js' -not -path '*/node_modules/*' | xargs -n1 node --check
38 scripts, clean

15 new tests cover the requirements/venv/Makefile/manage.py detection, readStackCommands / missingStackCommands, and the closing report — including an assertion that the output never tells the user to edit .flow/config.md.

End-to-end on the repro shape (venv + requirements.txt with pytest + tests/test_app.py + app.py, no pyproject.toml):

  detected: test_cmd = .venv/bin/pytest

[flow init] Done. Stack commands still blank: dev_cmd, lint_cmd, typecheck_cmd, build_cmd, format_cmd
  These are for the agent to finish, not the user. ...

Nova added 2 commits August 24, 2026 22:20
A script-style Python repo (venv, requirements.txt, tests/test_*.py, an
app.py, no pyproject.toml) came out of /flow:init with every *_cmd blank,
and the closing line told the *user* to go and edit .flow/config.md.
/flow:health repeated it. Every one of those commands was discoverable
from the repo in under a minute — that is the agent's work, not homework
to hand back.

init.js now:
- detects from requirements*.txt (pytest, ruff, flake8, mypy, black),
  Makefile targets, and manage.py, none of which needed a manifest;
- prefers the project's own venv copy of a tool (.venv/bin/pytest) over a
  bare name resolved against the ambient PATH;
- ends by naming the keys still blank — reading the existing config.md, so
  a re-run reports the real state — addressed to the agent, with the
  instruction to infer, verify by running, and write them in.

/flow:init grows a Step 3 that does exactly that, /flow:health fills a
blank *_cmd instead of reporting it back, and the procedure (evidence
sources per key, how to verify each without leaving a dev server running)
lives in references/stack-command-inference.md.
…ands

An unsubstituted `{COMMAND_TO_START_DEV_SERVER}` left in config.md read
back as a filled-in command, so a re-run reported the key as done and the
agent never inferred it. Values matching `{ALL_CAPS}` now read as blank,
exactly like an empty value.
@kaiomp
kaiomp merged commit 53acda6 into main Aug 24, 2026
1 check passed
@kaiomp
kaiomp deleted the issue-20 branch August 24, 2026 23:31
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