# ThreadSuite

ThreadSuite bootstraps durable project intelligence for Threadwell.

## Commands

- `/threadsuite` runs the complete default bootstrap.
- `/threadsuite lite` runs a smaller bootstrap.
- `/threadsuite --no-write` previews the complete bootstrap without writing.
- `/threadsuite lite --no-write` previews the lite bootstrap without writing.
- `/threadsuite refresh` refreshes generated runtime metadata and summaries without resetting user-authored decisions.

Bootstrap runs prompt for confirmation before inspecting or writing. The warning explains that ThreadSuite may review many project files and spend more tokens than a normal turn while trying to organize context for faster future retrieval.

## Complete profile

The complete profile is the default. It creates or updates generated Threadwell metadata and preserves user-authored files by default:

- `.threadwell/project-index.json`
- `.threadwell/project-map.json`
- `.threadwell/retrieval-routes.json`
- `.threadwell/risk-register.md`
- `.threadwell/agent-policy.md`
- `.threadwell/continuity/operating-memory.json`
- `.threadwell/continuity/*` scaffold files when missing
- `STATE.md`, `ACTIVE_QUEUE.md`, `AUTONOMOUS_EXECUTION.md`, `CONTEXT.md` when missing
- proposed ADRs through the ADR service
- memory capsules for retrieval
- a lightweight validation plan
- a model self-validation pass over generated intelligence artifacts

The audit artifacts are intended to make future turns faster and safer:

- `project-map.json` identifies components, entrypoints, core files, citations, and confidence.
- `retrieval-routes.json` maps common task intents to the first files and query hints the agent should use before broad exploration.
- `risk-register.md` records cited risks, debt, and open questions.
- `agent-policy.md` records repo-specific safe commands, expensive commands, validation expectations, and conventions.

## Lite profile

Lite is intentionally smaller. It keeps the inventory and core file bootstrap behavior minimal and skips heavy intelligence seeding such as memory capsules and generated ADR candidates.

## Safety model

ThreadSuite is safe by default, not minimal by default:

- bounded inventory only;
- generated/vendor/runtime/build directories are skipped;
- user-authored files are preserved unless reset behavior is explicit;
- inferred facts are labeled as inferred or proposed;
- validation commands are discovered and reported, not executed automatically;
- heavy builds/tests are not run by default;
- retrieval routes and policies are advisory navigation hints, not authority over user instructions.

## Limitations

Generated context can become stale. Rerun `/threadsuite refresh` after significant project changes and review proposed ADRs before accepting them as decisions.
