Workspace context

Workspace context

AIWG uses `WORKSPACE.md` as the canonical, provider-neutral project context. Put concise project conventions and links in its marked Project Context section. Keep detailed policies, runbooks, hooks, and quickrefs in linked files. Do not place credential values in context files.

The load order is:

1. provider/system/organization instructions; 2. root `WORKSPACE.md`; 3. generated `AIWG.md` discovery and routing; 4. linked or provider-native subtree files within their declared scope.

`aiwg init`, `aiwg new`, `aiwg use`, `aiwg refresh`, and `aiwg regenerate` maintain the graph through one implementation. `aiwg doctor` reports missing links, loops, duplicate or conflicting directives, possible credentials, registration errors, and managed-bootstrap drift.

Existing projects

Legacy `CLAUDE.md`, `AGENTS.md`, `WARP.md`, `.hermes.md`, and Copilot layouts remain supported. Migration is explicit:

aiwg workspace-context audit
aiwg workspace-context migrate --dry-run
aiwg workspace-context migrate --apply
aiwg workspace-context rollback [transaction-id]

Audit reports exact duplicates separately from ambiguous positive/negative conflicts and identifies root versus nested scope. Apply refuses possible credential values and unresolved conflicts by default. Provider-only material moves to `.aiwg/context/providers/` with source path and checksum attribution. Transactions and recoverable preimages live under `.aiwg/context-migrations/`. Reapplying a completed migration is a no-op.

Provider loading contract

SurfaceMechanismResult
Claude Codenative `@WORKSPACE.md`, then `@AIWG.md`supported
Codex`AGENTS.md` explicit read directive; native root-to-CWD hierarchy remainssupported
GitHub Copilot CLInative `@` imports in repository instructionssupported
Cursorexplicit directive in `AGENTS.md`; provider rules retain native scopesupported
Factoryexplicit directive in hierarchical `AGENTS.md`supported
OpenCode`opencode.json` `instructions` registrationsupported
Warpexplicit directive in `WARP.md`/`AGENTS.md`; nested rules retainedsupported
Windsurf / Devin surfacesexplicit `AGENTS.md` direction; native `.windsurf`/`.devin` rules retaineddegraded pending a verified include primitive
Hermes`.hermes.md`/`AGENTS.md` direction plus on-demand AIWG MCP readingdegraded
OpenHumanhost-dependent `AGENTS.md` directiondegraded
OpenClawno verified project-local startup loaderdegraded, no automatic claim

The authoritative dated details and source URLs live in the provider definition registry. A plain Markdown link is never presented as automatic loading.