woostack-init
Create or repair .woostack/ support without creating development authority. Initialization never
creates a spec, plan, fix, issue, project, branch, PR, or lifecycle state.
Commands
/woostack-init [path]
/woostack-init [path] --migrate-legacy
Every run attempts automatic Linear setup. --migrate-legacy remains an explicit optional mode and
does not change the setup or artifact-selection boundaries below.
Procedure
<wi> below means the installed woostack-init skill directory.
- Resolve the canonical target repository without changing it. Verify repository root, branch,
working state, existing
.woostack/ files, and collision/symlink/path safety.
- Read existing configuration under the
effective configuration contract
and preserve every valid user-owned value. Never clobber reports or policy without an exact
approved repair.
- Create missing local support paths only:
.woostack/config.json from the shipped non-secret template;
- local diagnostic report roots for doctor, audit, and QA;
- worktree/recovery support declared by the canonical worktree contract; and
- the three managed project OMP role agents by running
bash <wi>/scripts/provision-omp-agents.sh <canonical-repository>. This
deterministic provisioner updates only woostack-fast, woostack-standard, and
woostack-deep under .omp/agents/, preserves every other agent, ensures exactly one scoped
woostack-*.md rule without overwriting consumer-owned .omp/agents/.gitignore lines, and
never reads model configuration.
- the managed project OMP session-naming extension, settings entry, and ignore rules by running
bash <wi>/scripts/provision-omp-session-name.sh <canonical-repository>. This
deterministic provisioner updates only .omp/extensions/woostack-session-name.ts,
.omp/settings.json, and .omp/.gitignore, preserves other extensions, settings keys, and
ignore lines, and rejects tracked settings.
- Perform the automatic read-only Linear setup. Its configured,
preserved, skipped, or setup-blocked outcome is separate from local initialization. When
artifacts.provider: "github" is selected in configuration, perform the selected-provider
read-only GitHub discovery.
- Validate JSON/schema/path permissions, ignore policy, report roots, managed OMP role agents, and
cross-links. Run the shipped doctor checks.
- Report created, repaired, preserved, skipped, and blocked local paths with exact validation
results. Report the Linear configured, preserved, skipped, or setup-blocked outcome separately;
when GitHub was selected, report the GitHub discovery outcome (configured, preserved, skipped,
or discovery-blocked) separately; provider outcomes never change a successful ordinary
local-init result.
Automatic Linear setup
On every run, discover official host-exposed Linear MCP capability. When it is available, use only
the minimum authenticated read calls needed to resolve and validate the canonical repository
association, one workspace/team, and the native project-status and issue-state names accepted by
the existing config schema. Authenticated read access is sufficient: do not require, probe, or use
provider write or post-mutation read-back capability. Credentials remain in the host's MCP/OAuth
store.
Preserve every valid existing tracked .woostack/config.json value under the
effective configuration contract.
Semantically add only missing,
validated, non-secret artifacts.linear repository/workspace/team/native-name defaults; never replace a
valid value merely because discovery differs. After a local config write, independently reopen and
parse the file, compare the intended fields and preserved siblings, and report the write configured
only when that read-back succeeds.
This setup is the narrow read-only exception defined by the shared
artifact contract and
Linear provider profile. It never selects artifact mode,
reads an issue/project, creates or mutates a provider resource, or authorizes later provider access.
If the official MCP is absent, report Linear setup as skipped. If it is unauthenticated,
insufficient, partial, ambiguous, or conflicts with a preserved value, report setup-blocked. In
both cases continue ordinary local initialization and doctor validation. Never hard-code provider
tool names, read credential values, use direct GraphQL/HTTP, or test connectivity with a provider
write.
Selected-provider GitHub discovery
When artifacts.provider: "github" is selected in configuration, Init may use the host-authenticated
gh CLI only for narrow read-only discovery and validation of missing or unverified non-secret owner,
ownerType, canonical Git repository identity, and Project Status field/options. Authenticated read-only
access is sufficient: Init never selects persistence, reads development artifact content, probes writes,
tests connectivity with a mutation, or modifies GitHub Projects or repository issues.
Optional guarded legacy migration
Tracked legacy .woostack/specs/, .woostack/plans/, .woostack/fixes/, and overnight records are
ordinary user-owned files. Never migrate or delete them implicitly.
For --migrate-legacy, follow the
canonical legacy migration contract. The route is explicitly
one-way: any unknown or partial outcome preserves every local source, and deletion requires the
contract's fresh terminal proof plus explicit approval.
Hard constraints
- Artifact persistence remains explicit. Automatic Linear setup and selected-provider GitHub discovery
are read-only, select no artifact, and are never required for successful local initialization or repair.
- No source edit outside
.woostack/ except the three init-managed .omp/agents/woostack-*.md
role definitions and the local managed OMP session-naming assets
(.omp/extensions/woostack-session-name.ts, .omp/settings.json, and .omp/.gitignore); no
application scaffold.
- No credential read/write, implicit migration, destructive cleanup, commit, push, PR, or merge.
- Preserve user-owned content and fail closed on symlink/path/collision ambiguity.
1---2name: woostack-init3description: Initialize or repair a repository's .woostack workspace, diagnostic stores, non-secret policy, and safe Linear defaults. Guarded legacy migration is optional.4---56# woostack-init78Create or repair `.woostack/` support without creating development authority. Initialization never9creates a spec, plan, fix, issue, project, branch, PR, or lifecycle state.1011## Commands1213```text14/woostack-init [path]15/woostack-init [path] --migrate-legacy16```1718Every run attempts automatic Linear setup. `--migrate-legacy` remains an explicit optional mode and19does not change the setup or artifact-selection boundaries below.2021## Procedure22`<wi>` below means the installed `woostack-init` skill directory.2324251. Resolve the canonical target repository without changing it. Verify repository root, branch,26 working state, existing `.woostack/` files, and collision/symlink/path safety.272. Read existing configuration under the28 [effective configuration contract](references/artifact-backends.md#effective-repository-configuration-and-precedence)29 and preserve every valid user-owned value. Never clobber reports or policy without an exact30 approved repair.313. Create missing local support paths only:32 - `.woostack/config.json` from the shipped non-secret template;33 - local diagnostic report roots for doctor, audit, and QA;34 - worktree/recovery support declared by the canonical worktree contract; and35 - the three managed project OMP role agents by running36 `bash <wi>/scripts/provision-omp-agents.sh <canonical-repository>`. This37 deterministic provisioner updates only `woostack-fast`, `woostack-standard`, and38 `woostack-deep` under `.omp/agents/`, preserves every other agent, ensures exactly one scoped39 `woostack-*.md` rule without overwriting consumer-owned `.omp/agents/.gitignore` lines, and40 never reads model configuration.41 - the managed project OMP session-naming extension, settings entry, and ignore rules by running42 `bash <wi>/scripts/provision-omp-session-name.sh <canonical-repository>`. This43 deterministic provisioner updates only `.omp/extensions/woostack-session-name.ts`,44 `.omp/settings.json`, and `.omp/.gitignore`, preserves other extensions, settings keys, and45 ignore lines, and rejects tracked settings.464. Perform the automatic read-only [Linear setup](#automatic-linear-setup). Its configured,47 preserved, skipped, or setup-blocked outcome is separate from local initialization. When48 `artifacts.provider: "github"` is selected in configuration, perform the selected-provider49 read-only [GitHub discovery](#selected-provider-github-discovery).505. Validate JSON/schema/path permissions, ignore policy, report roots, managed OMP role agents, and51 cross-links. Run the shipped doctor checks.526. Report created, repaired, preserved, skipped, and blocked local paths with exact validation53 results. Report the Linear configured, preserved, skipped, or setup-blocked outcome separately;54 when GitHub was selected, report the GitHub discovery outcome (configured, preserved, skipped,55 or discovery-blocked) separately; provider outcomes never change a successful ordinary56 local-init result.57## Automatic Linear setup5859On every run, discover official host-exposed Linear MCP capability. When it is available, use only60the minimum authenticated read calls needed to resolve and validate the canonical repository61association, one workspace/team, and the native project-status and issue-state names accepted by62the existing config schema. Authenticated read access is sufficient: do not require, probe, or use63provider write or post-mutation read-back capability. Credentials remain in the host's MCP/OAuth64store.6566Preserve every valid existing tracked `.woostack/config.json` value under the67[effective configuration contract](references/artifact-backends.md#effective-repository-configuration-and-precedence).68Semantically add only missing,69validated, non-secret `artifacts.linear` repository/workspace/team/native-name defaults; never replace a70valid value merely because discovery differs. After a local config write, independently reopen and71parse the file, compare the intended fields and preserved siblings, and report the write configured72only when that read-back succeeds.7374This setup is the narrow read-only exception defined by the shared75[artifact contract](references/artifact-backends.md) and76[Linear provider profile](references/artifact-providers/linear.md). It never selects artifact mode,77reads an issue/project, creates or mutates a provider resource, or authorizes later provider access.78If the official MCP is absent, report Linear setup as skipped. If it is unauthenticated,79insufficient, partial, ambiguous, or conflicts with a preserved value, report setup-blocked. In80both cases continue ordinary local initialization and doctor validation. Never hard-code provider81tool names, read credential values, use direct GraphQL/HTTP, or test connectivity with a provider82write.8384## Selected-provider GitHub discovery8586When `artifacts.provider: "github"` is selected in configuration, Init may use the host-authenticated87`gh` CLI only for narrow read-only discovery and validation of missing or unverified non-secret `owner`,88`ownerType`, canonical Git repository identity, and Project Status field/options. Authenticated read-only89access is sufficient: Init never selects persistence, reads development artifact content, probes writes,90tests connectivity with a mutation, or modifies GitHub Projects or repository issues.9192## Optional guarded legacy migration9394Tracked legacy `.woostack/specs/`, `.woostack/plans/`, `.woostack/fixes/`, and overnight records are95ordinary user-owned files. Never migrate or delete them implicitly.9697For `--migrate-legacy`, follow the98[canonical legacy migration contract](references/legacy-migration.md). The route is explicitly99one-way: any unknown or partial outcome preserves every local source, and deletion requires the100contract's fresh terminal proof plus explicit approval.101102## Hard constraints103104- Artifact persistence remains explicit. Automatic Linear setup and selected-provider GitHub discovery105 are read-only, select no artifact, and are never required for successful local initialization or repair.106- No source edit outside `.woostack/` except the three init-managed `.omp/agents/woostack-*.md`107 role definitions and the local managed OMP session-naming assets108 (`.omp/extensions/woostack-session-name.ts`, `.omp/settings.json`, and `.omp/.gitignore`); no109 application scaffold.110- No credential read/write, implicit migration, destructive cleanup, commit, push, PR, or merge.111- Preserve user-owned content and fail closed on symlink/path/collision ambiguity.