{
  "version": "0.5.0-beta.9",
  "description": "Five coordinated improvements accumulated since beta.8: (1) task.json schema unified across all writers + phase.py/create_bootstrap.py orphan cleanup, (2) workflow tightening — task-creation triggers + research sub-agent delegation, (3) Qoder session-boundary commands split out of the skill matcher into native /trellis-{continue,finish-work}, (4) polyrepo layout detection via sibling .git scan, (5) joiner onboarding task auto-generated for new developers on existing Trellis projects + both bootstrap / joiner PRDs rewritten as AI-facing instructions.",
  "breaking": false,
  "recommendMigrate": false,
  "changelog": "**Internal cleanup (no user-facing behavior change):**\n- chore(schema): `task.json` shape unified across all three writers. `packages/cli/src/utils/task-json.ts` introduces a shared `TaskJson` type + `emptyTaskJson(overrides)` factory mirroring the 24-field canonical shape produced by `.trellis/scripts/common/task_store.py cmd_create`. `init.ts getBootstrapTaskJson` and `update.ts` migration-task block now route through the factory. Follows the `quality-guidelines.md` spec lesson 'Schema Deprecation: Audit ALL Writers, Not Just the Creator' captured in 0.5.0-beta.0 — `cmd_create` was cleaned up at the time, but the two TS writers were missed.\n- chore(schema): migration tasks no longer write legacy `current_phase: 0` / `next_action: [...]` fields. These reference the removed Multi-Agent Pipeline and no active reader consumes them in 0.5.\n- chore(bootstrap): bootstrap task's project-type checklist moves from structured `subtasks: [{name, status}]` in task.json to markdown `- [ ]` items in prd.md. Task.json `subtasks` is now canonical `string[]` (child task dir names) across all tasks.\n- chore(cleanup): `.trellis/scripts/common/phase.py` removed. Orphan code (no importers in 0.5); was kept around from the Multi-Agent Pipeline era and not captured by 0.5.0-beta.0's 138-entry safe-file-delete (which only targeted `multi_agent/*`). Hash-verified delete — pristine copies auto-removed, locally modified copies preserved with a warning.\n- chore(cleanup): `.trellis/scripts/create_bootstrap.py` removed. Legacy 4th task.json writer with its own 13-field divergent shape; replaced by `init.ts getBootstrapTaskJson` in 0.4 but the Python file was never deleted. Never invoked by any command. Same hash-verified delete mechanism; three historical hashes included to cover 0.3+ users.\n- chore(cleanup): `TaskData` TypedDict (`common/types.py`) no longer declares `current_phase: int` / `next_action: list[dict]` — dead schema fields.\n- docs: spec directory-trees in `script-conventions.md` (template + local) drop `phase.py` / `create_bootstrap.py` / the full `multi_agent/` block (which was actually removed in 0.5.0-beta.0 but kept appearing in shipped spec docs).\n- chore(pkg): remove 5 orphan `.md` files from `packages/cli/src/templates/markdown/spec/` (`spec/backend/{index,directory-structure,script-conventions}.md` + `spec/guides/{code-reuse,cross-platform}-thinking-guide.md`). These were accidentally added in early 0.1.x releases alongside the proper `.md.txt` stub templates but never imported by `markdown/index.ts` — they shipped in dist/ as dead weight (~35 KB) but never landed on user disks, so no migration entry is needed. Fixes a ~2-year-old duplication bug.\n\n**Workflow tightening (all platforms):**\n- feat(workflow): `workflow.md [workflow-state:no_task]` block + `shared-hooks/inject-workflow-state.py` + OpenCode plugin now enumerate explicit trigger words (`重构` / `抽成` / `独立` / `分发` / `拆出来` / `搞一个` / `做成` / `接入` / `集成` / `refactor` / `rewrite` / `extract` / `productize` / `publish` / `build X` / `design Y`) that REQUIRE task creation, plus a strict three-condition exemption rule (zero file writes + one-reply answer + no external research). Default stance: when in doubt, create a task.\n- feat(workflow): `common/skills/brainstorm.md` gains a 'Delegate to trellis-research sub-agent' section with explicit anti-pattern guidance — 10+ inline WebFetch/WebSearch calls in the main conversation burn tokens and leak raw tool output into context. Correct pattern: spawn trellis-research via Task tool; the sub-agent persists findings to `{TASK_DIR}/research/<topic>.md` and returns only path + one-line summary.\n- feat(workflow): `workflow.md [workflow-state:in_progress]` flow names the actual agent types (`trellis-implement → trellis-check → trellis-update-spec → finish`) instead of generic verbs.\n\n**Qoder UX fix:**\n- feat(qoder): deliver session-boundary commands as native Qoder Custom Commands (`.qoder/commands/trellis-{finish-work,continue}.md`) with YAML frontmatter (`name` + `description`), per docs.qoder.com/en/cli/user-guide/command. Previously these were buried in the skill matcher alongside the 5 auto-trigger workflows, so users had no deterministic way to invoke them — they had to hope their chat wording matched the skill's description. Now they type `/trellis-finish-work` or `/trellis-continue` explicitly.\n- chore(qoder): the 5 auto-trigger workflows (brainstorm, before-dev, check, update-spec, break-loop) stay as `.qoder/skills/trellis-{name}/SKILL.md`. `start` is filtered out because Qoder is agent-capable and its SessionStart hook already injects the workflow overview (same rule that applies to every other agent-capable platform).\n- chore(shared): new `wrapWithCommandFrontmatter` + `COMMAND_DESCRIPTIONS` registry in `configurators/shared.ts` — short, human-facing, imperative one-liners for the `/` palette, distinct from the long auto-trigger prose in `SKILL_DESCRIPTIONS` (written for the skill matcher, not a command list).\n- chore(migration): upgraders have their old `.qoder/skills/trellis-{finish-work,continue}/SKILL.md` hash-verified and auto-deleted on `trellis update` (pristine copies removed silently, locally-modified copies land on the standard confirm prompt).\n\n**New features:**\n- feat(cli): polyrepo detection via sibling `.git` scan. `detectMonorepo()` now has a 7th parser that scans up to 2 levels deep for sibling `.git` directories or worktree gitlinks, firing only when all 6 workspace parsers miss and no submodules are declared (workspace configs always win). `DetectedPackage` gains `isGitRepo` (mutually exclusive with `isSubmodule`); `writeMonorepoConfig` emits `git: true` to bridge to the runtime schema already consumed by `get_git_packages()` in `config.py`. `--monorepo` failure now prints a 7-marker checklist and a manual `config.yaml` example. Init confirm prompt labels polyrepo packages with `(git repo)`.\n- feat(cli): joiner onboarding task auto-generated when a new developer runs `trellis init` on an existing Trellis project (fresh clone / new machine). Three-branch dispatch on `.trellis/` × `.trellis/.developer`: no `.trellis/` = creator bootstrap (unchanged), `.trellis/` + no `.developer` = **joiner** (`00-join-<slug>`), both = no-op. The `.developer` file is gitignored, so it's a clean per-checkout signal; `workspace/<name>/` cannot be used because it's committed. Wired in both the main dispatch AND `handleReinit`'s `doAddDeveloper` branch (the latter is the default path for `trellis init --user <name>` on existing checkouts). Failures surface as `console.warn` instead of being silently swallowed.\n- feat(cli): `trellis init` bootstrap + joiner PRDs rewritten as AI-facing instructions. Previously framed as user-facing docs (`Welcome, do X, ask AI Y`); now framed as instructions TO the AI agent that runs the onboarding task (`You (the AI) are running this task; here's how to onboard them`). Includes runtime-mechanics explainer (SessionStart hook, workflow-state tag, implement/check sub-agents, jsonl manifests) and a suggested opening line. Same content reach, much better first-session UX.",
  "migrations": [
    {
      "type": "safe-file-delete",
      "from": ".trellis/scripts/common/phase.py",
      "description": "Remove orphan phase.py — no importers; legacy from Multi-Agent Pipeline",
      "allowed_hashes": [
        "412b7096ef0e48b8a95a79060121a586e0d9d44f1b350d6ed818c6f84330bb01"
      ]
    },
    {
      "type": "safe-file-delete",
      "from": ".trellis/scripts/create_bootstrap.py",
      "description": "Remove dead create_bootstrap.py — replaced by TS init.ts getBootstrapTaskJson in 0.4; never invoked by any command",
      "allowed_hashes": [
        "33b40df671ba7828fd8d3ba8c019823a8b03e938797b1cae218c55d6c7ebe57a",
        "ce1503c052dadf2470ddb1cade42f331c0fd70d34e895d8d07044ba27548e17e",
        "aa5dd1f39a77b2f4bb827fd14ce7a83fb51870e77f556fe508afce3f8eac0b4e"
      ]
    },
    {
      "type": "safe-file-delete",
      "from": ".qoder/skills/trellis-finish-work/SKILL.md",
      "description": "Qoder session-boundary skill → moved to .qoder/commands/trellis-finish-work.md",
      "reason": "In 0.5.0-beta.9, Qoder session-boundary commands move out of the skill matcher into native Custom Commands so users can invoke them deterministically as `/trellis-finish-work`.",
      "allowed_hashes": [
        "c0f3ffa74e1e9990f93e5d44d03bd088c8698da1db4750b74d3eee4809a84aea",
        "2027d8ea610e0a929a7ce147b29045406db8a8c9c2a767f98d779e5d53162f0c"
      ]
    },
    {
      "type": "safe-file-delete",
      "from": ".qoder/skills/trellis-continue/SKILL.md",
      "description": "Qoder session-boundary skill → moved to .qoder/commands/trellis-continue.md",
      "reason": "In 0.5.0-beta.9, Qoder session-boundary commands move out of the skill matcher into native Custom Commands so users can invoke them deterministically as `/trellis-continue`.",
      "allowed_hashes": [
        "914545dab290e508a4c6b84d0a9f8debe68bcf9117cebe0fa85be0ef709d8fc1",
        "3d2c83ad710b3b667851e28a473fb259a1330475e6b7417c769432f4a55a76f9"
      ]
    }
  ],
  "notes": "Code cleanup + additive features; no user task.json mutations. Python readers (`task.py`, `get_context.py`) treat missing canonical fields as null, so legacy tasks keep working. Newly-created bootstrap / migration tasks from this version onward produce the canonical shape. Qoder users who had the two session-boundary skills installed will see them auto-removed (pristine) or prompted for confirm (modified); the new `.qoder/commands/*.md` are written by the standard configure step on `trellis update`."
}
