CLIScaffold Model
Scaffold Pack
Capability bundle selected by repo detection and operator confirmation
A scaffold pack bundles skills, prompt surfaces, lint metadata, hooks, rules, and required tools for a repo capability.
Pack Types
- Mandatory default packs cover debugging, docs ingest, misc agent interaction, planning, quality, research, requirements, security, subagents, and verification.
- Language packs come from language-specific package or source-file signals. The TypeScript pack also carries the
typegraph-runtimeitem, which gives Codex TypeScript semantic reads. - Framework and data packs layer on detected libraries such as Effect, React, Next.js, TanStack Query, Drizzle, or Better Auth.
- Surface packs represent broader work areas:
frontendfor React or Next.js,backendfor Better Auth, Drizzle, Elysia, or tRPC, or forapi,backend,server, orservice-named workspaces.
hi init detection proposes Packs; the operator confirms them, and settings packs is the only selection. pack-core is always installed. A detected Pack that is not selected is information, never drift.
Mandatory default packs distribute the Harness phase wrappers by default: requirements-phase, delivery-phase, review-phase, debugging-phase, docs-ingest-phase, resolve-debt-phase, and goalify.
Framework packs can own curated opensrc example repository context as maintained pack knowledge.
Invariants
- Repo-aware setup resolves packs, not raw skill choices.
- A Pack selects Registry Items through registry dependencies.
- A Pack rule is a Built Artifact in
.agents/rules/packs/<id>.md. HI owns that folder:hi updatewrites each Pack rule again and removes a Pack rule that no selected Pack Builds. Project rules live in other folders,.agents/rules/<scope>/, andpacksis never a project rule scope. The project-owned.agents/rules/index.mdlists both; the agent handoff gives each Pack rule row: id, scoperepository, path trigger none (import-based), task trigger, and the file relative to.agents/rules/. - A skill no Registry Item provides is a Project Skill under
.agents/skills/<id>; the installer never removes, compares, or overwrites it. - When a Registry Item later provides a Project Skill's id, the Baseline skill wins and the Project Skill is renamed
[DEPRECATED] <id>and reported; semantic overlap belongs to model-guidedhi report. - Surface packs stay scoped to workspaces where the surface applies: a workspace prompt spec lists
frontendorbackendonly when that workspace shows the surface's signals.backendis listed directly only for a backend-named workspace; a technology-only match shows its skills as Candidate skills that the authoring agent accepts or omits.hi initproposals use the same signals repository-wide. - Each Pack publishes its catalog
promptSurfacesin Pack meta. A workspace prompt spec lists only the detected, language, and surface packs that match the workspace. The docs prompt spec lists only packs whose surfaces includedocs-prompt-spec(todaydocs). Default-pack skills stay reachable from the root spec, which lists every installed pack, and the shared spec, which lists the default packs. - The docs prompt spec exists only with the docs pack selected and a
docs/directory that git does not ignore (Recorded ShapedocsRoot). - Drizzle detection provides data-layer guidance and does not imply Effect guidance unless Effect is detected independently.
- Phase wrapper skills are distributed by default but stay global orchestration entrypoints. Scoped
AGENTS.mdSkill | Exact triggertables contain selected non-phase scoped skills, not phase wrappers. - Each generated docs/workspace prompt spec requires every non-phase skill it lists exactly once in a
Skill | Exact triggertable, plus each candidate skill the follow-up agent accepts. Each row points to the installedSKILL.md; the agent deletes every other row. - Scoped prompt guidance is structure-first and grounded in current Code Evidence. Conditional detail moves into task-triggered ordinary Markdown references authored with the prompt, not into deeper prompt scopes.
- Every scoped prompt visibly links
opensrc/README.mdand reads it when work depends on third-party library behavior. Root/shared guidance and existing project-authored nested prompts remain preserved. - The
miscpack contributeswait-whatonly to shared.agentsscope; application workspaces do not inherit it. - The docs pack contributes
writing-for-agents;hi initandhi updatehandoffs activate it before a follow-up agent authors prompt specs, handoffs, scopedAGENTS.md, or subagent instructions.