@open-agent-toolkit/cli 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ # AGENTS — {{SITE_NAME}}
2
+
3
+ This file tells agents how to work inside `{{APP_DIR}}`, the documentation app for `{{REPO_NAME}}`. It is not bootstrap documentation. If you're looking for how this app was scaffolded, see `docs/getting-started.md` or the root-level `AGENTS.md` section on documentation.
4
+
5
+ ## Purpose and scope
6
+
7
+ `{{APP_DIR}}` is the documentation surface for `{{REPO_NAME}}`. Humans read the rendered site; agents read the Markdown source and the navigation structure. This file tells agents the conventions that keep both audiences served, and points at the tooling that enforces those conventions. Everything here is about ongoing work inside the docs app — adding, restructuring, auditing, and bulk-editing content.
8
+
9
+ ## When you need to add a new page
10
+
11
+ 1. Create the Markdown file under `docs/` at the directory that best matches the page's topic. Every content directory is an `index.md` map — find the right one before picking a path. **Prefer `.md`** for plain content pages; reach for `.mdx` only when the page actually needs embedded JSX (a custom component, an interactive widget, a specialized layout). Plain `.md` is the default because agents, linters, and grep rules all handle it more reliably than `.mdx`.
12
+ 2. Add frontmatter with at minimum `title:` and `description:`. The title drives nav display and page `<title>`; the description drives search previews, social cards, and sibling summaries. Empty descriptions hurt all three.
13
+ 3. Update the nearest `index.md`'s `## Contents` section to include a link to the new page. Use `.md`-suffixed relative links: `[Title](page.md)` for leaf pages, `[Section](subdir/index.md)` for subdirectories. The `@open-agent-toolkit/docs-transforms` remark-links plugin normalizes these for Fumadocs routing at build time (strips `.md`, collapses `dir/index.md` → `dir`), so the suffixed form renders correctly **and** lets agents follow links to the target file without path inference. The `## Contents` section is the machine-readable local map — anything not listed there is effectively invisible to the navigation tooling.
14
+ 4. If the new page introduces a new subdirectory, create an `index.md` in that subdirectory with its own `## Contents` section. Every content directory must have an `index.md`.
15
+ 5. Run `oat docs nav sync` (or equivalent for this framework) to regenerate any derived navigation artifacts. Derived artifacts never replace the authored `## Contents`; they're generated from it.
16
+
17
+ ## When you need to restructure navigation
18
+
19
+ 1. Make changes in the authored `## Contents` sections of each affected `index.md`. That is the authoritative local map.
20
+ 2. Do **not** hand-edit generated navigation artifacts. The root-level `index.md` (if present for this framework), `mkdocs.yml` `nav:` (for MkDocs), and any other derived nav file is rewritten on every build.
21
+ 3. After editing `## Contents`, run the framework's nav sync command to regenerate derived artifacts.
22
+ 4. If you're moving pages between directories, update both source and destination `index.md` `## Contents` entries in the same commit so the site isn't broken mid-way through history.
23
+ 5. If you're reparenting an entire subtree, consider whether the moved directory's own `index.md` needs a revised "scope" paragraph.
24
+
25
+ ## When you need to audit or bulk-edit docs
26
+
27
+ 1. Use `oat-docs-analyze` to audit the docs surface against the `## Contents` contract and surface gaps, drift, and coverage opportunities. This is read-only; it produces a report artifact under `.oat/repo/analysis/`.
28
+ 2. Review the report with the user. The analyze output is a set of ordered recommendations — apply them selectively, not wholesale.
29
+ 3. Use `oat-docs-apply` to execute approved recommendations. Apply creates a branch, performs the approved changes, runs nav sync, and optionally opens a PR. It will not make unapproved changes or invent new conventions.
30
+ 4. Do not bypass analyze/apply for sweeping content changes. The branch-and-review discipline catches mistakes that would otherwise land silently and accumulate over time.
31
+
32
+ ## When you're unsure where content belongs
33
+
34
+ 1. Start at `docs/index.md` and read its `## Contents` section. That's the top-level map. Follow the link that best matches the topic.
35
+ 2. Repeat at each directory level — every `index.md` has its own `## Contents`. Descend until you find the right scope.
36
+ 3. If none of the existing sections fit, the content probably belongs in a new subdirectory. Create it with an `index.md` (see "When you need to add a new page").
37
+ 4. If in doubt, match existing siblings' style and depth rather than inventing a new pattern. Consistency across neighboring pages matters more than exact placement.
38
+
39
+ ## When you need project-level documentation updates
40
+
41
+ 1. Use the `oat-project-document` skill during OAT project workflows. It reads project artifacts (`discovery.md`, `spec.md`, `design.md`, `plan.md`, `implementation.md`) and proposes evidence-backed doc updates — no speculation, no content that doesn't trace back to the source artifacts.
42
+ 2. The skill generates recommendations; you approve them before they land. Treat it like analyze/apply but scoped to a single project's documentation delta.
43
+ 3. Do not hand-write project-derived docs that bypass this flow. Bypassing means future runs of the skill will re-surface the same content as "missing" because the provenance chain is broken.
44
+
45
+ ## What not to do
46
+
47
+ - **Don't hand-edit generated files.** The root-level `index.md` generated by `{{GENERATE_INDEX_CMD}}` is rewritten on every build. Edits to it are silently clobbered. Edit the authored source (`docs/index.md` and its `## Contents`), not the generated copy.
48
+ - **Don't default to `.mdx` when `.md` would do.** MDX adds JSX-in-Markdown capability (embedded components), which breaks simple link rewrites, confuses agent tooling, and requires imports that plain `.md` doesn't. Reach for `.mdx` only when a page actually needs a component it can't express in plain Markdown.
49
+ - **Don't author `## Contents` links without `.md` extensions.** Extension-less links (`[Title](page)` instead of `[Title](page.md)`) force agents to infer the target file type, break simple grep-based navigation, and diverge from the convention used throughout `{{REPO_NAME}}`. The build pipeline (`@open-agent-toolkit/docs-transforms` remark-links) strips `.md` for Fumadocs routing — so suffixed authored links render correctly and stay agent-friendly.
50
+ - **Don't invent new navigation conventions outside `## Contents`.** A sidebar config in a framework file, a hand-rolled TOC, a separate nav YAML — all of these diverge from the contract and break the tooling. Extend via `## Contents`.
51
+ - **Don't bypass `oat-docs-apply` for bulk content changes.** The analyze/apply flow exists to catch mistakes. Bulk edits done by hand or by a one-off script skip the safety net and often regress something unexpected.
52
+ - **Don't create `overview.md` files.** They're deprecated in favor of `index.md` with a `## Contents` section.
53
+ - **Don't edit the scaffolded `{{SITE_NAME}}` value in isolation.** The site name flows to multiple files (layout branding, metadata, page headings). If you're renaming the docs site, update all locations in the same commit or you'll get inconsistent chrome.
54
+
55
+ ## Reference
56
+
57
+ - `docs/getting-started.md` — first-run setup instructions for contributors joining this docs app.
58
+ - `docs/contributing.md` — authoring conventions (frontmatter requirements, Markdown features like GFM alerts / mermaid / code blocks, nav contract summary).
59
+ - Root `AGENTS.md` `## Documentation` section in `{{REPO_NAME}}` — repo-wide pointer telling any agent "docs live at `{{APP_DIR}}`."
60
+ - `oat-docs-analyze` — read-only audit command.
61
+ - `oat-docs-apply` — apply approved audit recommendations.
62
+ - `oat-project-document` skill — propose evidence-backed doc updates from project artifacts.
63
+ - `{{GENERATE_INDEX_CMD}}` — regenerates the machine-readable root `index.md` from `docs/`. Runs automatically on `predev` / `prebuild`; don't hand-edit its output.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-complete
3
- version: 1.4.1
3
+ version: 1.4.2
4
4
  description: Use when all implementation work is finished and the project is ready to close. Marks the OAT project lifecycle as complete.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -312,13 +312,21 @@ The archive-side effects in this step are CLI-owned. Follow the canonical behavi
312
312
 
313
313
  ```bash
314
314
  ARCHIVED_ROOT=".oat/projects/archived"
315
+ ARCHIVE_RELATIVE_PATH=".oat/projects/archived/${PROJECT_NAME}"
315
316
  PRIMARY_REPO_ARCHIVE=""
316
- LOCAL_ARCHIVED_ROOT=".oat/projects/archived"
317
+ ARCHIVE_PATH_IS_GITIGNORED="false"
317
318
  USE_PRIMARY_REPO_ARCHIVE="false"
318
319
 
319
- # Heuristic: if this checkout is a worktree and the primary repo archive parent
320
- # exists, use that durable archive path as the canonical archive destination.
321
- if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
320
+ # First decide whether the archive destination is local-only in this checkout.
321
+ # If the archive path is tracked here, keep the archive on the current worktree
322
+ # and branch so the completion commit and PR carry the archived project.
323
+ if git check-ignore --quiet --no-index "$ARCHIVE_RELATIVE_PATH" 2>/dev/null; then
324
+ ARCHIVE_PATH_IS_GITIGNORED="true"
325
+ fi
326
+
327
+ # Only fall back to the primary checkout when the archive destination is
328
+ # gitignored/local-only in the current worktree.
329
+ if [[ "$ARCHIVE_PATH_IS_GITIGNORED" == "true" ]] && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
322
330
  GIT_COMMON_DIR=$(git rev-parse --git-common-dir 2>/dev/null || true)
323
331
  GIT_DIR=$(git rev-parse --git-dir 2>/dev/null || true)
324
332
  if [[ -n "$GIT_COMMON_DIR" && -n "$GIT_DIR" && "$GIT_COMMON_DIR" != "$GIT_DIR" ]]; then
@@ -328,7 +336,7 @@ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
328
336
  USE_PRIMARY_REPO_ARCHIVE="true"
329
337
  ARCHIVED_ROOT="$PRIMARY_REPO_ARCHIVE"
330
338
  else
331
- echo "Warning: Running in a worktree, but the primary repo archive path is unavailable: $PRIMARY_REPO_ARCHIVE"
339
+ echo "Warning: Running in a worktree with a local-only archive path, but the primary repo archive path is unavailable: $PRIMARY_REPO_ARCHIVE"
332
340
  echo "A worktree-local archive may be deleted when the worktree is removed and is not a durable archive."
333
341
  echo "Require explicit confirmation before proceeding with local-only archive."
334
342
  fi
@@ -336,7 +344,7 @@ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
336
344
  fi
337
345
 
338
346
  if [[ "$USE_PRIMARY_REPO_ARCHIVE" != "true" ]]; then
339
- ARCHIVED_ROOT="$LOCAL_ARCHIVED_ROOT"
347
+ ARCHIVED_ROOT=".oat/projects/archived"
340
348
  fi
341
349
 
342
350
  mkdir -p "$ARCHIVED_ROOT"
@@ -365,6 +373,7 @@ echo "Project archived to $ARCHIVE_PATH"
365
373
  - Ask the user explicitly: "Primary repo archive path is unavailable, so this archive may be lost when the worktree is deleted. Continue with local-only archive anyway?"
366
374
  - If the user declines, skip archiving and continue the completion flow without archive.
367
375
  - Resolve the durable repo root from `git rev-parse --git-common-dir` and `git rev-parse --git-dir`, matching the CLI helper in `packages/cli/src/commands/project/archive/archive-utils.ts`. Do not rely on a `main` checkout or default-branch naming.
376
+ - Apply this guard only when `git check-ignore --quiet --no-index "$ARCHIVE_RELATIVE_PATH"` reports that the archive destination is local-only in the current checkout.
368
377
 
369
378
  **Git handling after archive:**
370
379
 
@@ -378,7 +387,7 @@ This stages the deletions from the shared directory. The archived copy is preser
378
387
 
379
388
  **Worktree archive target (required when available):**
380
389
 
381
- If running from a git worktree, the primary repo archive directory is the canonical/durable archive destination.
390
+ If running from a git worktree, prefer the primary repo archive directory only when the archive destination is local-only/gitignored in the current checkout.
382
391
 
383
392
  Reference path:
384
393
 
@@ -67,5 +67,4 @@ Theme toggle is included in the layout. Mermaid diagrams re-render on mode switc
67
67
 
68
68
  ## Agent guidance
69
69
 
70
- - Treat `index.md` plus its `## Contents` section as the local discovery source of truth.
71
- - Prefer linking to source files and commands explicitly when documenting behavior.
70
+ See `AGENTS.md` in this directory for how agents should work inside this docs app. This `contributing.md` covers human authoring conventions; `AGENTS.md` covers agent runtime discipline (adding pages, restructuring nav, audit/apply, three agent-instruction surfaces). Keeping those concerns separate keeps each file useful to its audience.
@@ -9,7 +9,7 @@ Use this guide to set up your local environment and preview {{SITE_NAME}}.
9
9
 
10
10
  ## Prerequisites
11
11
 
12
- - Node.js 22+
12
+ - Node.js 20+ (or whatever your repo's `.nvmrc` / `package.json` `engines.node` pins — match that)
13
13
  - pnpm 10+ (or npm/yarn)
14
14
 
15
15
  ## Install dependencies
@@ -9,5 +9,5 @@ Use this file as the map to the repository's central documentation site. The sit
9
9
 
10
10
  ## Contents
11
11
 
12
- - [Getting Started](getting-started) - Set up the local docs toolchain and preview the site.
13
- - [Contributing](contributing) - Authoring conventions and navigation rules.
12
+ - [Getting Started](getting-started.md) - Set up the local docs toolchain and preview the site.
13
+ - [Contributing](contributing.md) - Authoring conventions and navigation rules.
@@ -11,7 +11,7 @@ export declare const WORKFLOW_TEMPLATES: readonly ["state.md", "discovery.md", "
11
11
  export declare const WORKFLOW_SCRIPTS: readonly ["generate-oat-state.sh", "generate-thin-index.sh", "resolve-tracking.sh"];
12
12
  export declare const IDEA_SKILLS: readonly ["oat-idea-new", "oat-idea-ideate", "oat-idea-summarize", "oat-idea-scratchpad"];
13
13
  export declare const CORE_SKILLS: readonly ["oat-docs", "oat-doctor"];
14
- export declare const DOCS_SKILLS: readonly ["oat-agent-instructions-analyze", "oat-agent-instructions-apply", "oat-docs-analyze", "oat-docs-apply"];
14
+ export declare const DOCS_SKILLS: readonly ["oat-agent-instructions-analyze", "oat-agent-instructions-apply", "oat-docs-analyze", "oat-docs-apply", "oat-docs-bootstrap"];
15
15
  export declare const DOCS_SCRIPTS: readonly ["resolve-tracking.sh"];
16
16
  export declare const UTILITY_SKILLS: readonly ["create-agnostic-skill", "oat-repo-maintainability-review", "oat-review-provide", "oat-review-receive", "oat-review-receive-remote"];
17
17
  export declare const PROJECT_MANAGEMENT_SKILLS: readonly ["oat-pjm-add-backlog-item", "oat-pjm-update-repo-reference", "oat-pjm-review-backlog"];
@@ -1 +1 @@
1
- {"version":3,"file":"skill-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/skill-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,eAAe,qwBA+BlB,CAAC;AAEX,eAAO,MAAM,eAAe,wDAGlB,CAAC;AAEX,eAAO,MAAM,kBAAkB,6GAQrB,CAAC;AAEX,eAAO,MAAM,gBAAgB,qFAInB,CAAC;AAIX,eAAO,MAAM,WAAW,2FAKd,CAAC;AAIX,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAI/D,eAAO,MAAM,WAAW,mHAKd,CAAC;AAEX,eAAO,MAAM,YAAY,kCAAmC,CAAC;AAI7D,eAAO,MAAM,cAAc,gJAMjB,CAAC;AAIX,eAAO,MAAM,yBAAyB,kGAI5B,CAAC;AAEX,eAAO,MAAM,4BAA4B,4CAG/B,CAAC;AAEX,eAAO,MAAM,0BAA0B,aAAc,CAAC;AAItD,eAAO,MAAM,eAAe,2EAMlB,CAAC;AAEX,eAAO,MAAM,eAAe,qCAAsC,CAAC"}
1
+ {"version":3,"file":"skill-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/skill-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,eAAe,qwBA+BlB,CAAC;AAEX,eAAO,MAAM,eAAe,wDAGlB,CAAC;AAEX,eAAO,MAAM,kBAAkB,6GAQrB,CAAC;AAEX,eAAO,MAAM,gBAAgB,qFAInB,CAAC;AAIX,eAAO,MAAM,WAAW,2FAKd,CAAC;AAIX,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAI/D,eAAO,MAAM,WAAW,yIAMd,CAAC;AAEX,eAAO,MAAM,YAAY,kCAAmC,CAAC;AAI7D,eAAO,MAAM,cAAc,gJAMjB,CAAC;AAIX,eAAO,MAAM,yBAAyB,kGAI5B,CAAC;AAEX,eAAO,MAAM,4BAA4B,4CAG/B,CAAC;AAEX,eAAO,MAAM,0BAA0B,aAAc,CAAC;AAItD,eAAO,MAAM,eAAe,2EAMlB,CAAC;AAEX,eAAO,MAAM,eAAe,qCAAsC,CAAC"}
@@ -71,6 +71,7 @@ export const DOCS_SKILLS = [
71
71
  'oat-agent-instructions-apply',
72
72
  'oat-docs-analyze',
73
73
  'oat-docs-apply',
74
+ 'oat-docs-bootstrap',
74
75
  ];
75
76
  export const DOCS_SCRIPTS = ['resolve-tracking.sh'];
76
77
  // ── Utility pack ───────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-agent-toolkit/cli",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "private": false,
5
5
  "description": "Open Agent Toolkit CLI",
6
6
  "homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
@@ -33,7 +33,7 @@
33
33
  "ora": "^9.0.0",
34
34
  "yaml": "2.8.2",
35
35
  "zod": "^3.25.76",
36
- "@open-agent-toolkit/control-plane": "0.0.37"
36
+ "@open-agent-toolkit/control-plane": "0.0.39"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.10.0",