Skip to content

docs: stop describing the session as one global state.json - #47

Merged
anilcancakir merged 1 commit into
masterfrom
docs/session-model-sweep
Aug 20, 2026
Merged

docs: stop describing the session as one global state.json#47
anilcancakir merged 1 commit into
masterfrom
docs/session-model-sweep

Conversation

@anilcancakir

Copy link
Copy Markdown
Contributor

Why this is not cosmetic

0.0.10 moved the session to ~/.artisan/sessions/<hash>/. The code changed; ten documentation files did not.

The field report behind #45 has an agent saying it had corrupted a sibling's state.json when the two were never sharing one. It was not confused: artisan_start's own description told it "ONLY ONE Flutter app per machine can be tracked at a time (single-slot state)". The agent reasoned correctly from a document that was wrong. #45 fixed that one description; this is the rest of them.

Swept

File
skills/fluttersdk-artisan/SKILL.md law 2 stated the old model as a rule
references/mcp-tools.md 8 mentions across tool descriptions
references/tinker-eval.md, references/state-and-recovery.md
doc/mcp/{overview,setup,tool-reference}.md "writes a single JSON file"
doc/getting-started/quickstart.md, doc/commands/{index,start,tinker,mcp-serve}.md

25 replacements plus 4 hand-written passages.

What deliberately stays

Every remaining ~/.artisan/state.json mention is still true: the legacy pointer exists, is read as a fallback when a project has no session of its own, and is what the documented hand-written recovery targets. I read each in context rather than replacing on sight.

Also corrected

  • The "no app detected" recovery said to rm ~/.artisan/state.json. That clears the pointer, not the session, so the advice did not work. It now names the session directory and says why the pointer is not enough.
  • The troubleshooting table quoted two error strings that no longer exist.
  • Neither carried the booting: true path from fix(state): record the session before the scrape, and recover a lost URI #45, which is now the most likely reason a session looks incomplete.

Skill version 0.0.5 -> 0.0.6.

Testing

Docs only, no code touched. dart format zero diff, dart analyze zero issues, 1226 tests green.

0.0.10 moved the session to `~/.artisan/sessions/<hash>/` and the code
changed with it. Ten documentation files did not, and kept telling readers
that `~/.artisan/state.json` is where the running app is recorded.

That is not cosmetic. The field report behind 0.0.12 has an agent concluding
it had corrupted a sibling's session, because the tool description it was
reading said there was only one slot to corrupt. It reasoned correctly from
a document that was wrong.

Swept the skill (including law 2, which stated the old model as a rule), the
MCP tool descriptions, and the command and MCP doc pages. What remains is
what is still true: the legacy pointer exists, is read as a fallback, and is
the target of the hand-written recovery recipe.

Corrected while there: the "no app detected" recovery said to remove
`~/.artisan/state.json`, which clears the pointer and not the session; the
troubleshooting table quoted two error strings that no longer exist; and
neither carried the `booting: true` path.
@anilcancakir
anilcancakir merged commit f23f75c into master Aug 20, 2026
2 checks passed
@anilcancakir
anilcancakir deleted the docs/session-model-sweep branch August 20, 2026 20:04
anilcancakir added a commit that referenced this pull request Aug 20, 2026
Ships #47, the documentation sweep.

Worth a release rather than a wait: `skills/` is in the pub archive and is what an agent loads, so an unreleased correction means agents keep reading that the session is one global `~/.artisan/state.json` file. That is exactly the misreading that produced the report behind 0.0.12.
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