@open-agent-toolkit/cli 0.0.19 → 0.0.20
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.
- package/assets/docs/cli-utilities/config-and-local-state.md +12 -0
- package/assets/docs/cli-utilities/configuration.md +16 -6
- package/assets/docs/cli-utilities/tool-packs.md +13 -0
- package/assets/docs/workflows/projects/lifecycle.md +2 -2
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-complete/SKILL.md +2 -2
- package/assets/skills/oat-project-document/SKILL.md +46 -29
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +108 -0
- package/dist/commands/init/tools/index.d.ts +1 -0
- package/dist/commands/init/tools/index.d.ts.map +1 -1
- package/dist/commands/init/tools/index.js +8 -1
- package/dist/commands/project/archive/archive-utils.d.ts +5 -0
- package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
- package/dist/commands/project/archive/archive-utils.js +10 -1
- package/dist/commands/project/archive/index.d.ts.map +1 -1
- package/dist/commands/project/archive/index.js +4 -1
- package/dist/commands/tools/remove/index.d.ts.map +1 -1
- package/dist/commands/tools/remove/index.js +25 -0
- package/dist/commands/tools/update/index.d.ts.map +1 -1
- package/dist/commands/tools/update/index.js +28 -2
- package/dist/config/oat-config.d.ts +2 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +20 -0
- package/package.json +1 -1
|
@@ -54,6 +54,18 @@ Archive lifecycle settings live here as shared repo config:
|
|
|
54
54
|
- `archive.s3SyncOnComplete`
|
|
55
55
|
- `archive.summaryExportPath`
|
|
56
56
|
|
|
57
|
+
Tool-pack installation state also lives here as shared repo config:
|
|
58
|
+
|
|
59
|
+
- `tools.core`
|
|
60
|
+
- `tools.docs`
|
|
61
|
+
- `tools.ideas`
|
|
62
|
+
- `tools.project-management`
|
|
63
|
+
- `tools.research`
|
|
64
|
+
- `tools.utility`
|
|
65
|
+
- `tools.workflows`
|
|
66
|
+
|
|
67
|
+
Use `oat config get tools.<pack>` when you need an explicit installed-capability signal for workflows or troubleshooting.
|
|
68
|
+
|
|
57
69
|
When archive settings are configured, completion uploads dated archive snapshots to S3 and exports dated summary snapshots into the configured summary reference directory.
|
|
58
70
|
|
|
59
71
|
Use these reference pages for file ownership and schema details:
|
|
@@ -18,12 +18,12 @@ For the deep file-by-file reference, see:
|
|
|
18
18
|
|
|
19
19
|
## The four config surfaces
|
|
20
20
|
|
|
21
|
-
| Surface | File | Typical contents
|
|
22
|
-
| -------------------- | ------------------------ |
|
|
23
|
-
| Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, and `
|
|
24
|
-
| Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, and repo-local `activeIdea`
|
|
25
|
-
| User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback
|
|
26
|
-
| Provider sync config | `.oat/sync/config.json` | Provider enablement and sync strategy settings
|
|
21
|
+
| Surface | File | Typical contents | Primary CLI surface |
|
|
22
|
+
| -------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
|
23
|
+
| Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, `archive.*`, and `tools.*` | `oat config get/set/list/describe` |
|
|
24
|
+
| Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, and repo-local `activeIdea` | `oat config get/set/list/describe` |
|
|
25
|
+
| User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback | `oat config describe` |
|
|
26
|
+
| Provider sync config | `.oat/sync/config.json` | Provider enablement and sync strategy settings | `oat providers set`, `oat config describe` |
|
|
27
27
|
|
|
28
28
|
The main split is:
|
|
29
29
|
|
|
@@ -64,6 +64,16 @@ Common keys in `.oat/config.json`:
|
|
|
64
64
|
- `archive.s3Uri` — base S3 archive prefix
|
|
65
65
|
- `archive.s3SyncOnComplete` — upload archived projects to S3 during completion
|
|
66
66
|
- `archive.summaryExportPath` — export `summary.md` into a durable tracked directory during completion
|
|
67
|
+
- `tools.<pack>` — whether a bundled tool pack is currently installed in the repo or user scopes after lifecycle reconciliation
|
|
68
|
+
|
|
69
|
+
Tool-pack state example:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
oat config get tools.project-management
|
|
73
|
+
oat config set tools.project-management true
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The `tools.*` keys are primarily maintained by `oat tools install`, `oat tools update`, and `oat tools remove`, but they are intentionally visible through `oat config` so workflows and operators can inspect or override pack-state signals when needed.
|
|
67
77
|
|
|
68
78
|
Archive example:
|
|
69
79
|
|
|
@@ -74,6 +74,7 @@ Key behavior:
|
|
|
74
74
|
- Same pack selection and install flow as `oat init tools`
|
|
75
75
|
- Pack-oriented install subcommands: `core`, `docs`, `ideas`, `workflows`, `utility`, `project-management`, `research`
|
|
76
76
|
- Tracks installed vs bundled skill versions and reports outdated skills
|
|
77
|
+
- Records installed pack state in shared repo config as `tools.<pack>: true` so other OAT workflows can detect installed capabilities without relying on filesystem heuristics
|
|
77
78
|
- Interactive runs can prompt to update selected outdated skills
|
|
78
79
|
- Auto-sync runs automatically after successful install (provider views are updated)
|
|
79
80
|
- Use `--no-sync` to skip auto-sync
|
|
@@ -89,6 +90,7 @@ Key behavior:
|
|
|
89
90
|
- Accepts a tool name, `--pack <pack>`, or `--all` (mutually exclusive)
|
|
90
91
|
- Compares installed versions against bundled versions and copies updated assets
|
|
91
92
|
- For `--pack <pack>` and `--all`, an already-installed pack is reconciled to include newly added bundled skills or agents in that same scope
|
|
93
|
+
- For `--pack <pack>` and `--all`, shared repo config is also reconciled from an installed-pack scan so `tools.*` reflects what is actually available and stale `true` flags are cleared
|
|
92
94
|
- Dry-run mode with `--dry-run`; auto-sync after mutations by default
|
|
93
95
|
- Use `--no-sync` to skip auto-sync
|
|
94
96
|
- Reports tools that are already current, newer than bundled, or not bundled (custom)
|
|
@@ -103,9 +105,20 @@ Key behavior:
|
|
|
103
105
|
|
|
104
106
|
- Accepts a tool name, `--pack <pack>`, or `--all` (mutually exclusive)
|
|
105
107
|
- Removes skill directories and agent `.md` files from canonical locations
|
|
108
|
+
- For `--pack <pack>` and `--all`, shared repo config is rewritten from a post-removal scan so `tools.<pack>` becomes `false` when a pack is no longer installed in any scope
|
|
106
109
|
- Dry-run mode with `--dry-run`; auto-sync after mutations by default
|
|
107
110
|
- Use `--no-sync` to skip auto-sync
|
|
108
111
|
|
|
112
|
+
## Shared config signal: `tools.*`
|
|
113
|
+
|
|
114
|
+
Tool-pack lifecycle commands now persist pack availability in shared repo config under `.oat/config.json`.
|
|
115
|
+
|
|
116
|
+
- `oat tools install <pack>` writes `tools.<pack>: true`
|
|
117
|
+
- `oat tools update --pack <pack>` and `oat tools update --all` rebuild the full `tools` map from installed-pack scans
|
|
118
|
+
- `oat tools remove --pack <pack>` and `oat tools remove --all` rebuild the same map after removals
|
|
119
|
+
|
|
120
|
+
This matters because other workflows can now check `oat config get tools.<pack>` instead of inferring capabilities from directory existence alone. For example, `oat-project-document` checks `tools.project-management` before auto-running repo-reference refresh work.
|
|
121
|
+
|
|
109
122
|
## Core pack
|
|
110
123
|
|
|
111
124
|
The `core` pack contains foundational diagnostic and documentation skills:
|
|
@@ -18,7 +18,7 @@ OAT lifecycle order:
|
|
|
18
18
|
7. Summary (`oat-project-summary`) — generates `summary.md` as institutional memory; `oat-project-pr-final` and `oat-project-complete` auto-refresh it when missing or stale
|
|
19
19
|
8. PR (`oat-project-pr-progress` / `oat-project-pr-final`) — sets `pr_open` status
|
|
20
20
|
9. Revision loop (`oat-project-revise`) — optional; accepts post-PR feedback
|
|
21
|
-
10. Documentation sync (`oat-project-document`) — optional; reads project artifacts to identify docs needing updates
|
|
21
|
+
10. Documentation sync (`oat-project-document`) — optional; reads project artifacts to identify docs needing updates, checks `tools.project-management`, and auto-runs `oat-pjm-update-repo-reference` before scanning docs when the project-management pack is installed
|
|
22
22
|
11. Complete (`oat-project-complete`)
|
|
23
23
|
|
|
24
24
|
**Shortcut:** `oat-project-next` reads project state and invokes the correct next skill automatically — use it instead of remembering which skill comes next. Complements `oat-project-progress` (which is read-only diagnostic).
|
|
@@ -49,7 +49,7 @@ flowchart LR
|
|
|
49
49
|
After implementation and final review pass:
|
|
50
50
|
|
|
51
51
|
1. **Summary** (`oat-project-summary`) — generates `summary.md` as institutional memory from project artifacts; PR-final and completion will auto-refresh it if you have not already run it or if it is stale
|
|
52
|
-
2. **Documentation** (`oat-project-document`) — optional sync of project docs
|
|
52
|
+
2. **Documentation** (`oat-project-document`) — optional sync of project docs; now uses the shared `tools.project-management` config signal to decide whether repo-reference refresh should run before docs analysis
|
|
53
53
|
3. **PR** (`oat-project-pr-final`) — creates PR description (auto-refreshes `summary.md` first when needed, then uses it as source), sets `oat_phase_status: pr_open`, and tracks actual PR existence with `oat_pr_status` / `oat_pr_url`
|
|
54
54
|
4. **Revision loop** (`oat-project-revise`) — accepts post-PR feedback:
|
|
55
55
|
- Inline feedback creates `p-revN` revision phases with `prevN-tNN` task IDs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-complete
|
|
3
|
-
version: 1.3.
|
|
3
|
+
version: 1.3.6
|
|
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
|
|
@@ -343,7 +343,7 @@ echo "Project archived to $ARCHIVE_PATH"
|
|
|
343
343
|
|
|
344
344
|
- Always archive locally first. The local archive is the authoritative completion artifact even when remote sync is also configured.
|
|
345
345
|
- If `archive.summaryExportPath` is configured and `summary.md` exists after archive, copy it to `{repoRoot}/{archive.summaryExportPath}/YYYYMMDD-{PROJECT_NAME}.md`.
|
|
346
|
-
- If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, sync the archived project to `{archive.s3Uri}/{repo-slug}/{PROJECT_NAME}/`.
|
|
346
|
+
- If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, sync the archived project to `{archive.s3Uri}/{repo-slug}/{PROJECT_NAME}/`. The S3 sync excludes process artifacts (`reviews/*`, `pr/*`) — only core deliverables (discovery, spec, design, plan, implementation, summary, state) are uploaded. The CLI enforces this via `S3_ARCHIVE_SYNC_EXCLUDES` in `archive-utils.ts`.
|
|
347
347
|
- If AWS CLI is missing or unusable for that S3 sync, warn and continue. Completion must not fail after the local archive succeeds.
|
|
348
348
|
- If `archive.s3SyncOnComplete` is false or `archive.s3Uri` is unset, skip remote sync without prompting.
|
|
349
349
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-document
|
|
3
|
-
version: 1.0
|
|
3
|
+
version: 1.2.0
|
|
4
4
|
description: Run when implementation is complete and documentation needs updating. Analyzes project artifacts to produce documentation update recommendations, then applies approved changes before project completion.
|
|
5
5
|
argument-hint: '[project-path] [--auto]'
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
user-invocable: true
|
|
8
|
-
allowed-tools: Read, Write, Edit, Bash(git:*), Glob, Grep, AskUserQuestion
|
|
8
|
+
allowed-tools: Read, Write, Edit, Bash(git:*), Glob, Grep, AskUserQuestion, Skill
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Project Documentation Sync
|
|
@@ -140,7 +140,24 @@ Glob: **/docusaurus.config.{js,ts}
|
|
|
140
140
|
|
|
141
141
|
Store resolved values for use in later steps. Do not write auto-detected values to config.
|
|
142
142
|
|
|
143
|
-
### Step 1:
|
|
143
|
+
### Step 1: Check for PJM Infrastructure
|
|
144
|
+
|
|
145
|
+
Check whether the project-management tool pack is installed by reading config:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
PJM_INSTALLED=$(oat config get tools.project-management 2>/dev/null || echo "false")
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**If `PJM_INSTALLED` is `true`:**
|
|
152
|
+
|
|
153
|
+
- Invoke `oat-pjm-update-repo-reference` automatically before proceeding.
|
|
154
|
+
- Do not ask whether to run the repo reference update during project-document.
|
|
155
|
+
- **If invocation succeeds:** Log that repo reference docs were refreshed and continue to Step 2. The reference surfaces will already be current when the documentation scan reads them in Step 4a.4.
|
|
156
|
+
- **If invocation fails:** Warn the user that the repo reference update failed, but continue with the documentation sync — a PJM failure should not block documentation updates.
|
|
157
|
+
|
|
158
|
+
**If `PJM_INSTALLED` is not `true`:** Skip silently and proceed to Step 2.
|
|
159
|
+
|
|
160
|
+
### Step 2: Read Project Artifacts
|
|
144
161
|
|
|
145
162
|
Read all available project artifacts to build an understanding of what was built.
|
|
146
163
|
|
|
@@ -171,14 +188,14 @@ While reading artifacts, collect all source file paths mentioned in:
|
|
|
171
188
|
- Implementation.md `**Files changed:**` entries
|
|
172
189
|
- Design component interfaces and data models
|
|
173
190
|
|
|
174
|
-
These will be verified against actual code in Step
|
|
191
|
+
These will be verified against actual code in Step 3.
|
|
175
192
|
|
|
176
193
|
**Handle missing artifacts gracefully:**
|
|
177
194
|
|
|
178
195
|
- Quick-mode projects may lack spec.md and design.md — extract what's available
|
|
179
196
|
- If only plan.md exists (no implementation.md), the project may not have started implementation yet — still proceed, but note that documentation recommendations will be based on planned work rather than verified implementation
|
|
180
197
|
|
|
181
|
-
### Step
|
|
198
|
+
### Step 3: Verify Against Code
|
|
182
199
|
|
|
183
200
|
Read source files referenced in artifacts to confirm what actually shipped.
|
|
184
201
|
|
|
@@ -201,11 +218,11 @@ Read source files referenced in artifacts to confirm what actually shipped.
|
|
|
201
218
|
- If artifacts reference many files (>20), prioritize: new files first, then modified files with the most changes
|
|
202
219
|
- Read file contents, not just check existence — the skill needs to understand what the code does to make good documentation recommendations
|
|
203
220
|
|
|
204
|
-
### Step
|
|
221
|
+
### Step 4: Discover Documentation Surfaces
|
|
205
222
|
|
|
206
223
|
Scan the repository for all documentation and instruction surfaces.
|
|
207
224
|
|
|
208
|
-
**
|
|
225
|
+
**4a. Documentation surfaces (primary — thorough analysis):**
|
|
209
226
|
|
|
210
227
|
1. **Docs directory** (if `$DOCS_ROOT` is set):
|
|
211
228
|
- Read the docs tooling config (e.g., `$DOCS_CONFIG`) to understand nav structure
|
|
@@ -224,7 +241,7 @@ Scan the repository for all documentation and instruction surfaces.
|
|
|
224
241
|
- Check `.oat/repo/reference/` directory
|
|
225
242
|
- Read: `current-state.md`, `backlog/index.md`, `backlog/completed.md`, `roadmap.md`, `decision-record.md`, and relevant `backlog/items/*.md` files as needed (whichever exist)
|
|
226
243
|
|
|
227
|
-
**
|
|
244
|
+
**4b. Instruction surfaces (secondary — strong signals only):**
|
|
228
245
|
|
|
229
246
|
1. **Root AGENTS.md / CLAUDE.md:**
|
|
230
247
|
- Always check — read current content
|
|
@@ -242,18 +259,18 @@ Scan the repository for all documentation and instruction surfaces.
|
|
|
242
259
|
- Gemini: `.gemini/rules/`
|
|
243
260
|
- Read existing rules files that may need updating
|
|
244
261
|
|
|
245
|
-
**Store surface inventory** for use in Step
|
|
262
|
+
**Store surface inventory** for use in Step 5. For each surface, record:
|
|
246
263
|
|
|
247
264
|
- File path (existing or potential)
|
|
248
265
|
- Surface type (docs | readme | reference | agents | provider-rules)
|
|
249
266
|
- Current content summary (for existing files)
|
|
250
267
|
- Whether it's in a directory affected by the project
|
|
251
268
|
|
|
252
|
-
### Step
|
|
269
|
+
### Step 5: Assess Documentation Delta
|
|
253
270
|
|
|
254
|
-
Compare "what was built" (from Steps
|
|
271
|
+
Compare "what was built" (from Steps 2-3) against "what's documented" (from Step 4) to produce recommendations.
|
|
255
272
|
|
|
256
|
-
**
|
|
273
|
+
**5a. Documentation surface assessment:**
|
|
257
274
|
|
|
258
275
|
For each documentation surface relevant to the project, determine one of:
|
|
259
276
|
|
|
@@ -274,7 +291,7 @@ For each documentation surface relevant to the project, determine one of:
|
|
|
274
291
|
|
|
275
292
|
- **No change:** Surface is already accurate — skip from delta plan.
|
|
276
293
|
|
|
277
|
-
**
|
|
294
|
+
**5b. Instruction surface assessment (strong signals only):**
|
|
278
295
|
|
|
279
296
|
Only recommend instruction changes when there is a clear trigger:
|
|
280
297
|
|
|
@@ -288,7 +305,7 @@ Only recommend instruction changes when there is a clear trigger:
|
|
|
288
305
|
|
|
289
306
|
If no strong signal is present for an instruction surface, skip it.
|
|
290
307
|
|
|
291
|
-
**
|
|
308
|
+
**5c. Per recommendation, capture:**
|
|
292
309
|
|
|
293
310
|
```
|
|
294
311
|
- Target: {file path — existing or proposed}
|
|
@@ -298,11 +315,11 @@ If no strong signal is present for an instruction surface, skip it.
|
|
|
298
315
|
- Content guidance: {specific content to add or outline for new files}
|
|
299
316
|
```
|
|
300
317
|
|
|
301
|
-
### Step
|
|
318
|
+
### Step 6: Present Delta Plan
|
|
302
319
|
|
|
303
320
|
Format and present the recommendations for user approval.
|
|
304
321
|
|
|
305
|
-
**
|
|
322
|
+
**6a. Format output:**
|
|
306
323
|
|
|
307
324
|
```
|
|
308
325
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
@@ -326,13 +343,13 @@ Format and present the recommendations for user approval.
|
|
|
326
343
|
Evidence: {reference}
|
|
327
344
|
```
|
|
328
345
|
|
|
329
|
-
**
|
|
346
|
+
**6b. Handle edge cases:**
|
|
330
347
|
|
|
331
|
-
- If `$AUTO_MODE` is true: skip to Step
|
|
348
|
+
- If `$AUTO_MODE` is true: skip to Step 7 (apply all recommendations)
|
|
332
349
|
- If no recommendations found: report "No documentation updates identified for this project.", set `oat_docs_updated: complete` in state.md, and exit
|
|
333
350
|
- If only instruction recommendations (no docs): still present, but note the documentation-first priority
|
|
334
351
|
|
|
335
|
-
**
|
|
352
|
+
**6c. Interactive approval:**
|
|
336
353
|
|
|
337
354
|
```
|
|
338
355
|
Approve recommendations?
|
|
@@ -345,9 +362,9 @@ Approve recommendations?
|
|
|
345
362
|
- **Individual:** present each recommendation one at a time with approve/reject
|
|
346
363
|
- **Skip:** set `oat_docs_updated: skipped` and `oat_project_state_updated: "{ISO 8601 UTC timestamp}"` in `$PROJECT_PATH/state.md` frontmatter, commit the state change, and exit without applying documentation changes
|
|
347
364
|
|
|
348
|
-
Track which recommendations were approved for Step
|
|
365
|
+
Track which recommendations were approved for Step 7.
|
|
349
366
|
|
|
350
|
-
### Step
|
|
367
|
+
### Step 7: Apply Approved Changes
|
|
351
368
|
|
|
352
369
|
Execute the approved documentation updates.
|
|
353
370
|
|
|
@@ -382,36 +399,36 @@ If `$DOCS_CONFIG` exists and new files were created in the docs directory:
|
|
|
382
399
|
- Track a `$ALL_SUCCEEDED` flag (default: true). If any file write fails, set `$ALL_SUCCEEDED` to false, log the error, and continue with remaining recommendations
|
|
383
400
|
- At the end, report any failures with the specific files that could not be written
|
|
384
401
|
|
|
385
|
-
### Step
|
|
402
|
+
### Step 8: Commit and Update State
|
|
386
403
|
|
|
387
|
-
**
|
|
404
|
+
**8a. Stage and commit documentation changes:**
|
|
388
405
|
|
|
389
406
|
```bash
|
|
390
407
|
git add {list of changed/created documentation files}
|
|
391
408
|
git diff --cached --quiet || git commit -m "docs({project-name}): update documentation from project artifacts"
|
|
392
409
|
```
|
|
393
410
|
|
|
394
|
-
Only stage files that were actually changed or created in Step
|
|
411
|
+
Only stage files that were actually changed or created in Step 7. Do not use `git add -A`.
|
|
395
412
|
|
|
396
|
-
**
|
|
413
|
+
**8b. Update project state:**
|
|
397
414
|
|
|
398
415
|
Update `$PROJECT_PATH/state.md` frontmatter based on apply outcome:
|
|
399
416
|
|
|
400
417
|
- If `$ALL_SUCCEEDED` is true: set `oat_docs_updated: complete` and `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
|
|
401
|
-
- If `$ALL_SUCCEEDED` is false: do **not** set `oat_docs_updated: complete` — leave the field as `null` so the skill can be re-run. Still set `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`. Surface the failures clearly in the summary report (Step
|
|
418
|
+
- If `$ALL_SUCCEEDED` is false: do **not** set `oat_docs_updated: complete` — leave the field as `null` so the skill can be re-run. Still set `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`. Surface the failures clearly in the summary report (Step 8d) so the user knows which updates failed and why.
|
|
402
419
|
|
|
403
420
|
```bash
|
|
404
421
|
git add "$PROJECT_PATH/state.md"
|
|
405
422
|
git diff --cached --quiet || git commit -m "chore({project-name}): mark docs updated"
|
|
406
423
|
```
|
|
407
424
|
|
|
408
|
-
**
|
|
425
|
+
**8c. Handle edge cases:**
|
|
409
426
|
|
|
410
|
-
- If user explicitly skipped (chose [S]kip in Step
|
|
427
|
+
- If user explicitly skipped (chose [S]kip in Step 6): `oat_docs_updated` was already set to `skipped` in Step 6. No further state update needed here.
|
|
411
428
|
- If no recommendations were found: set `oat_docs_updated: complete` (nothing to do is still "done").
|
|
412
429
|
- If `--auto` mode: apply all, commit, set state — no user interaction.
|
|
413
430
|
|
|
414
|
-
**
|
|
431
|
+
**8d. Report summary:**
|
|
415
432
|
|
|
416
433
|
If `$ALL_SUCCEEDED` is true:
|
|
417
434
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAMpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2CpC,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAk3BD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAiET"}
|
|
@@ -18,6 +18,13 @@ const KEY_ORDER = [
|
|
|
18
18
|
'documentation.requireForProjectCompletion',
|
|
19
19
|
'git.defaultBranch',
|
|
20
20
|
'projects.root',
|
|
21
|
+
'tools.core',
|
|
22
|
+
'tools.docs',
|
|
23
|
+
'tools.ideas',
|
|
24
|
+
'tools.project-management',
|
|
25
|
+
'tools.research',
|
|
26
|
+
'tools.utility',
|
|
27
|
+
'tools.workflows',
|
|
21
28
|
'worktrees.root',
|
|
22
29
|
];
|
|
23
30
|
const CONFIG_CATALOG = [
|
|
@@ -142,6 +149,83 @@ const CONFIG_CATALOG = [
|
|
|
142
149
|
owningCommand: 'oat config set archive.summaryExportPath <value>',
|
|
143
150
|
description: 'Repository-relative directory where completion copies project summaries for durable tracked reference.',
|
|
144
151
|
},
|
|
152
|
+
{
|
|
153
|
+
key: 'tools.core',
|
|
154
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
155
|
+
file: '.oat/config.json',
|
|
156
|
+
scope: 'shared repo',
|
|
157
|
+
type: 'boolean',
|
|
158
|
+
defaultValue: 'false',
|
|
159
|
+
mutability: 'read/write',
|
|
160
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
161
|
+
description: 'Whether the core tool pack is installed.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
key: 'tools.docs',
|
|
165
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
166
|
+
file: '.oat/config.json',
|
|
167
|
+
scope: 'shared repo',
|
|
168
|
+
type: 'boolean',
|
|
169
|
+
defaultValue: 'false',
|
|
170
|
+
mutability: 'read/write',
|
|
171
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
172
|
+
description: 'Whether the docs tool pack is installed.',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
key: 'tools.ideas',
|
|
176
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
177
|
+
file: '.oat/config.json',
|
|
178
|
+
scope: 'shared repo',
|
|
179
|
+
type: 'boolean',
|
|
180
|
+
defaultValue: 'false',
|
|
181
|
+
mutability: 'read/write',
|
|
182
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
183
|
+
description: 'Whether the ideas tool pack is installed.',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
key: 'tools.project-management',
|
|
187
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
188
|
+
file: '.oat/config.json',
|
|
189
|
+
scope: 'shared repo',
|
|
190
|
+
type: 'boolean',
|
|
191
|
+
defaultValue: 'false',
|
|
192
|
+
mutability: 'read/write',
|
|
193
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
194
|
+
description: 'Whether the project-management tool pack is installed.',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
key: 'tools.research',
|
|
198
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
199
|
+
file: '.oat/config.json',
|
|
200
|
+
scope: 'shared repo',
|
|
201
|
+
type: 'boolean',
|
|
202
|
+
defaultValue: 'false',
|
|
203
|
+
mutability: 'read/write',
|
|
204
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
205
|
+
description: 'Whether the research tool pack is installed.',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
key: 'tools.utility',
|
|
209
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
210
|
+
file: '.oat/config.json',
|
|
211
|
+
scope: 'shared repo',
|
|
212
|
+
type: 'boolean',
|
|
213
|
+
defaultValue: 'false',
|
|
214
|
+
mutability: 'read/write',
|
|
215
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
216
|
+
description: 'Whether the utility tool pack is installed.',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
key: 'tools.workflows',
|
|
220
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
221
|
+
file: '.oat/config.json',
|
|
222
|
+
scope: 'shared repo',
|
|
223
|
+
type: 'boolean',
|
|
224
|
+
defaultValue: 'false',
|
|
225
|
+
mutability: 'read/write',
|
|
226
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
227
|
+
description: 'Whether the workflows tool pack is installed.',
|
|
228
|
+
},
|
|
145
229
|
{
|
|
146
230
|
key: 'activeProject',
|
|
147
231
|
group: 'Repo Local (.oat/config.local.json)',
|
|
@@ -316,6 +400,16 @@ async function getConfigValue(repoRoot, key, dependencies) {
|
|
|
316
400
|
source: archive ? 'config.json' : 'default',
|
|
317
401
|
};
|
|
318
402
|
}
|
|
403
|
+
if (key.startsWith('tools.')) {
|
|
404
|
+
const config = await dependencies.readOatConfig(repoRoot);
|
|
405
|
+
const packName = key.slice('tools.'.length);
|
|
406
|
+
const tools = config.tools ?? {};
|
|
407
|
+
return {
|
|
408
|
+
key,
|
|
409
|
+
value: String(tools[packName] ?? false),
|
|
410
|
+
source: config.tools ? 'config.json' : 'default',
|
|
411
|
+
};
|
|
412
|
+
}
|
|
319
413
|
if (key === 'git.defaultBranch') {
|
|
320
414
|
const config = await dependencies.readOatConfig(repoRoot);
|
|
321
415
|
return {
|
|
@@ -437,6 +531,20 @@ async function setConfigValue(repoRoot, key, rawValue, dependencies) {
|
|
|
437
531
|
source: 'config.json',
|
|
438
532
|
};
|
|
439
533
|
}
|
|
534
|
+
if (key.startsWith('tools.')) {
|
|
535
|
+
const packName = key.slice('tools.'.length);
|
|
536
|
+
const tools = { ...config.tools };
|
|
537
|
+
tools[packName] = rawValue.trim().toLowerCase() === 'true';
|
|
538
|
+
await dependencies.writeOatConfig(repoRoot, {
|
|
539
|
+
...config,
|
|
540
|
+
tools,
|
|
541
|
+
});
|
|
542
|
+
return {
|
|
543
|
+
key,
|
|
544
|
+
value: String(tools[packName] ?? false),
|
|
545
|
+
source: 'config.json',
|
|
546
|
+
};
|
|
547
|
+
}
|
|
440
548
|
if (key === 'git.defaultBranch') {
|
|
441
549
|
const nextValue = rawValue.trim();
|
|
442
550
|
if (!nextValue) {
|
|
@@ -35,6 +35,7 @@ interface InitToolsDependencies {
|
|
|
35
35
|
action: string;
|
|
36
36
|
}>;
|
|
37
37
|
readOatConfig: (repoRoot: string) => Promise<OatConfig>;
|
|
38
|
+
writeOatConfig: (repoRoot: string, config: OatConfig) => Promise<void>;
|
|
38
39
|
resolveLocalPaths: (config: OatConfig) => string[];
|
|
39
40
|
upsertAgentsMdSection: (repoRoot: string, key: string, body: string) => Promise<UpsertSectionResult>;
|
|
40
41
|
removeAgentsMdSection: (repoRoot: string, key: string) => Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,KAAK,mBAAmB,EAGzB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aAAa,EAAE,GAAG,MAAM,CAuCxE;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,qBAAqB,GAClC,OAAO,CAAC,QAAQ,EAAE,CAAC,CA6PrB;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAErB;AAED,wBAAgB,sBAAsB,CACpC,SAAS,GAAE,OAAO,CAAC,qBAAqB,CAAM,GAC7C,OAAO,CAuBT"}
|
|
@@ -6,7 +6,7 @@ import { addLocalPaths } from '../../local/manage.js';
|
|
|
6
6
|
import { removeAgentsMdSection, upsertAgentsMdSection, } from '../../shared/agents-md.js';
|
|
7
7
|
import { selectManyWithAbort, selectWithAbort, } from '../../shared/shared.prompts.js';
|
|
8
8
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
9
|
-
import { readOatConfig, resolveLocalPaths, } from '../../../config/oat-config.js';
|
|
9
|
+
import { readOatConfig, resolveLocalPaths, writeOatConfig, } from '../../../config/oat-config.js';
|
|
10
10
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
11
11
|
import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
|
|
12
12
|
import { Command } from 'commander';
|
|
@@ -58,6 +58,7 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
58
58
|
addLocalPaths,
|
|
59
59
|
applyGitignore,
|
|
60
60
|
readOatConfig,
|
|
61
|
+
writeOatConfig,
|
|
61
62
|
resolveLocalPaths,
|
|
62
63
|
upsertAgentsMdSection,
|
|
63
64
|
removeAgentsMdSection,
|
|
@@ -346,6 +347,12 @@ export async function runInitTools(context, dependencies) {
|
|
|
346
347
|
if (!context.json && sectionResult.action !== 'no-change') {
|
|
347
348
|
context.logger.info(`AGENTS.md tool packs section ${sectionResult.action}.`);
|
|
348
349
|
}
|
|
350
|
+
const config = await dependencies.readOatConfig(projectRoot);
|
|
351
|
+
const tools = { ...config.tools };
|
|
352
|
+
for (const pack of selectedPacks) {
|
|
353
|
+
tools[pack] = true;
|
|
354
|
+
}
|
|
355
|
+
await dependencies.writeOatConfig(projectRoot, { ...config, tools });
|
|
349
356
|
const hasUserScope = selectedPacks.some((pack) => packScopes[pack] === 'user');
|
|
350
357
|
reportSuccess(context, selectedPacks, hasUserScope ? 'user' : 'project');
|
|
351
358
|
process.exitCode = 0;
|
|
@@ -51,6 +51,11 @@ export interface ArchiveProjectOnCompletionResult {
|
|
|
51
51
|
warnings: string[];
|
|
52
52
|
}
|
|
53
53
|
export declare const ARCHIVE_SNAPSHOT_METADATA_FILENAME = ".oat-archive-source.json";
|
|
54
|
+
/**
|
|
55
|
+
* Directories excluded from S3 archive sync. These contain process artifacts
|
|
56
|
+
* (reviews, PR descriptions) rather than project deliverables.
|
|
57
|
+
*/
|
|
58
|
+
export declare const S3_ARCHIVE_SYNC_EXCLUDES: string[];
|
|
54
59
|
export interface ArchiveSnapshotMetadata {
|
|
55
60
|
projectName: string;
|
|
56
61
|
snapshotName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAChD,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE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AAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,kCAAkC,6BAA6B,CAAC;AAE7E,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AA8BD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAmBD,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CA4BA;AAED,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR;AAqJD,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,EAC1C,YAAY,GAAE,sCAA2C,GACxD,OAAO,CAAC,gCAAgC,CAAC,
|
|
1
|
+
{"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC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AAE,sCAA2C,GACxD,OAAO,CAAC,gCAAgC,CAAC,CAwG3C;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,EACrC,YAAY,GAAE,iCAAsC,GACnD,OAAO,CAAC,2BAA2B,CAAC,CA0CtC"}
|
|
@@ -6,6 +6,11 @@ import { CliError } from '../../../errors/cli-error.js';
|
|
|
6
6
|
import { copyDirectory, copySingleFile, dirExists, ensureDir, fileExists, } from '../../../fs/io.js';
|
|
7
7
|
const execFileAsync = promisify(execFileCallback);
|
|
8
8
|
export const ARCHIVE_SNAPSHOT_METADATA_FILENAME = '.oat-archive-source.json';
|
|
9
|
+
/**
|
|
10
|
+
* Directories excluded from S3 archive sync. These contain process artifacts
|
|
11
|
+
* (reviews, PR descriptions) rather than project deliverables.
|
|
12
|
+
*/
|
|
13
|
+
export const S3_ARCHIVE_SYNC_EXCLUDES = ['reviews/*', 'pr/*'];
|
|
9
14
|
function normalizeS3Uri(s3Uri) {
|
|
10
15
|
return s3Uri.trim().replace(/\/+$/, '');
|
|
11
16
|
}
|
|
@@ -215,7 +220,11 @@ export async function archiveProjectOnCompletion(options, dependencies = {}) {
|
|
|
215
220
|
if (access.ok) {
|
|
216
221
|
s3Path = buildProjectArchiveS3Uri(options.s3Uri, options.repoRoot, snapshotName);
|
|
217
222
|
try {
|
|
218
|
-
|
|
223
|
+
const syncArgs = ['s3', 'sync', archivePath, s3Path];
|
|
224
|
+
for (const pattern of S3_ARCHIVE_SYNC_EXCLUDES) {
|
|
225
|
+
syncArgs.push('--exclude', pattern);
|
|
226
|
+
}
|
|
227
|
+
await execFile('aws', syncArgs, {
|
|
219
228
|
cwd: options.repoRoot,
|
|
220
229
|
env: dependencies.env ?? process.env,
|
|
221
230
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,EAAE,EAAE,MAAM,kBAAkB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YAAY,CAAC;IACvB,eAAe,EAAE,OAAO,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAwLD,wBAAgB,2BAA2B,CACzC,SAAS,GAAE,OAAO,CAAC,iCAAiC,CAAM,GACzD,OAAO,CAuKT"}
|
|
@@ -9,7 +9,7 @@ import { readOatConfig } from '../../../config/oat-config.js';
|
|
|
9
9
|
import { CliError } from '../../../errors/cli-error.js';
|
|
10
10
|
import { resolveProjectRoot } from '../../../fs/paths.js';
|
|
11
11
|
import { Command } from 'commander';
|
|
12
|
-
import { ARCHIVE_SNAPSHOT_METADATA_FILENAME, buildProjectArchiveS3Uri, buildRepoArchiveS3Uri, ensureS3ArchiveAccess, parseArchiveSnapshotName, resolveLocalArchiveProjectPath, } from './archive-utils.js';
|
|
12
|
+
import { ARCHIVE_SNAPSHOT_METADATA_FILENAME, S3_ARCHIVE_SYNC_EXCLUDES, buildProjectArchiveS3Uri, buildRepoArchiveS3Uri, ensureS3ArchiveAccess, parseArchiveSnapshotName, resolveLocalArchiveProjectPath, } from './archive-utils.js';
|
|
13
13
|
const execFileAsync = promisify(execFileCallback);
|
|
14
14
|
function defaultDependencies() {
|
|
15
15
|
return {
|
|
@@ -31,6 +31,9 @@ function resolveLocalArchiveRoot(projectsRoot) {
|
|
|
31
31
|
}
|
|
32
32
|
function buildArchiveSyncArgs(source, target, options) {
|
|
33
33
|
const args = ['s3', 'sync', source, target];
|
|
34
|
+
for (const pattern of S3_ARCHIVE_SYNC_EXCLUDES) {
|
|
35
|
+
args.push('--exclude', pattern);
|
|
36
|
+
}
|
|
34
37
|
if (options.dryRun) {
|
|
35
38
|
args.push('--dryrun');
|
|
36
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/remove/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/remove/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAM1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AA2CxB,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAwGT"}
|
|
@@ -4,6 +4,7 @@ import { buildCommandContext } from '../../../app/command-context.js';
|
|
|
4
4
|
import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
|
|
5
5
|
import { autoSync, } from '../../tools/shared/auto-sync.js';
|
|
6
6
|
import { scanTools } from '../../tools/shared/scan-tools.js';
|
|
7
|
+
import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
|
|
7
8
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
8
9
|
import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
|
|
9
10
|
import { Command } from 'commander';
|
|
@@ -65,6 +66,30 @@ export function createToolsRemoveCommand(dependencies = defaultDependencies, syn
|
|
|
65
66
|
const scopes = resolveConcreteScopes(context.scope);
|
|
66
67
|
const dryRun = opts.dryRun ?? false;
|
|
67
68
|
const result = await removeTools(target, scopes, context.cwd, context.home, dryRun, dependencies);
|
|
69
|
+
if (!dryRun && result.removed.length > 0) {
|
|
70
|
+
const assetsRoot = await dependencies.resolveAssetsRoot();
|
|
71
|
+
const repoRoot = await resolveProjectRoot(context.cwd);
|
|
72
|
+
const config = await readOatConfig(repoRoot);
|
|
73
|
+
const installedPacks = new Set();
|
|
74
|
+
const configScopes = resolveConcreteScopes('all');
|
|
75
|
+
for (const scope of configScopes) {
|
|
76
|
+
const scopeRoot = await dependencies.resolveScopeRoot(scope, context.cwd, context.home);
|
|
77
|
+
const tools = await dependencies.scanTools({
|
|
78
|
+
scope,
|
|
79
|
+
scopeRoot,
|
|
80
|
+
assetsRoot,
|
|
81
|
+
});
|
|
82
|
+
for (const tool of tools) {
|
|
83
|
+
if (tool.pack !== 'custom') {
|
|
84
|
+
installedPacks.add(tool.pack);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
await writeOatConfig(repoRoot, {
|
|
89
|
+
...config,
|
|
90
|
+
tools: Object.fromEntries(VALID_PACKS.map((pack) => [pack, installedPacks.has(pack)])),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
68
93
|
if (result.notInstalled.length > 0) {
|
|
69
94
|
if (context.json) {
|
|
70
95
|
logger.json({ target: describeTarget(target), dryRun, result });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIvE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AAuCxB,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAsIT;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,YAAY,GACnB,OAAO,CAOT;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,OAAO,GACd,MAAM,CAMR"}
|
|
@@ -5,6 +5,7 @@ import { copyDirWithStatus, copyFileWithStatus, } from '../../init/tools/shared/
|
|
|
5
5
|
import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
|
|
6
6
|
import { autoSync, } from '../../tools/shared/auto-sync.js';
|
|
7
7
|
import { scanTools } from '../../tools/shared/scan-tools.js';
|
|
8
|
+
import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
|
|
8
9
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
9
10
|
import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
|
|
10
11
|
import { Command } from 'commander';
|
|
@@ -62,15 +63,40 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
|
|
|
62
63
|
const scopes = resolveConcreteScopes(context.scope);
|
|
63
64
|
const dryRun = opts.dryRun ?? false;
|
|
64
65
|
const result = await updateTools(target, scopes, context.cwd, context.home, dryRun, dependencies);
|
|
66
|
+
const assetsRoot = dryRun ? null : await dependencies.resolveAssetsRoot();
|
|
65
67
|
// Refresh ~/.oat/docs/ when the core pack is explicitly updated or
|
|
66
68
|
// reconciled through --all (D3 requirement).
|
|
67
|
-
if (shouldRefreshCoreDocs(target, result) &&
|
|
68
|
-
const assetsRoot = await dependencies.resolveAssetsRoot();
|
|
69
|
+
if (shouldRefreshCoreDocs(target, result) && assetsRoot) {
|
|
69
70
|
const userRoot = await dependencies.resolveScopeRoot('user', context.cwd, context.home);
|
|
70
71
|
const docsSource = join(assetsRoot, 'docs');
|
|
71
72
|
const docsDestination = join(userRoot, '.oat', 'docs');
|
|
72
73
|
await dependencies.copyDirWithStatus(docsSource, docsDestination, true);
|
|
73
74
|
}
|
|
75
|
+
if (assetsRoot && (target.kind === 'all' || target.kind === 'pack')) {
|
|
76
|
+
const repoRoot = await resolveProjectRoot(context.cwd);
|
|
77
|
+
const config = await readOatConfig(repoRoot);
|
|
78
|
+
const installedPacks = new Set();
|
|
79
|
+
const configScopes = resolveConcreteScopes('all');
|
|
80
|
+
for (const scope of configScopes) {
|
|
81
|
+
const scopeRoot = await dependencies.resolveScopeRoot(scope, context.cwd, context.home);
|
|
82
|
+
const tools = await dependencies.scanTools({
|
|
83
|
+
scope,
|
|
84
|
+
scopeRoot,
|
|
85
|
+
assetsRoot,
|
|
86
|
+
});
|
|
87
|
+
for (const tool of tools) {
|
|
88
|
+
if (tool.pack !== 'custom') {
|
|
89
|
+
installedPacks.add(tool.pack);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Preserve unrelated shared config keys while rebuilding tools state
|
|
94
|
+
// from the repo-wide installed-pack scan.
|
|
95
|
+
await writeOatConfig(repoRoot, {
|
|
96
|
+
...config,
|
|
97
|
+
tools: Object.fromEntries(VALID_PACKS.map((pack) => [pack, installedPacks.has(pack)])),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
74
100
|
if (result.notInstalled.length > 0) {
|
|
75
101
|
if (context.json) {
|
|
76
102
|
logger.json({ target: describeTarget(target), dryRun, result });
|
|
@@ -13,6 +13,7 @@ export interface OatArchiveConfig {
|
|
|
13
13
|
s3SyncOnComplete?: boolean;
|
|
14
14
|
summaryExportPath?: string;
|
|
15
15
|
}
|
|
16
|
+
export type OatToolsConfig = Partial<Record<'core' | 'ideas' | 'docs' | 'workflows' | 'utility' | 'project-management' | 'research', boolean>>;
|
|
16
17
|
export interface OatConfig {
|
|
17
18
|
version: number;
|
|
18
19
|
worktrees?: {
|
|
@@ -23,6 +24,7 @@ export interface OatConfig {
|
|
|
23
24
|
};
|
|
24
25
|
git?: OatGitConfig;
|
|
25
26
|
archive?: OatArchiveConfig;
|
|
27
|
+
tools?: OatToolsConfig;
|
|
26
28
|
documentation?: OatDocumentationConfig;
|
|
27
29
|
localPaths?: string[];
|
|
28
30
|
autoReviewAtCheckpoints?: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AO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,OAAO,CAAC,IAAI,CAAC,CAYf;AAsBD,wBAAsB,cAAc,CAClC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,UAAU,CAAC,CAarB;AAED,wBAAsB,eAAe,CACnC,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA6B5D"}
|
|
@@ -93,6 +93,26 @@ function normalizeOatConfig(parsed) {
|
|
|
93
93
|
next.archive = archive;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
if (isRecord(parsed.tools)) {
|
|
97
|
+
const validPacks = [
|
|
98
|
+
'core',
|
|
99
|
+
'ideas',
|
|
100
|
+
'docs',
|
|
101
|
+
'workflows',
|
|
102
|
+
'utility',
|
|
103
|
+
'project-management',
|
|
104
|
+
'research',
|
|
105
|
+
];
|
|
106
|
+
const tools = {};
|
|
107
|
+
for (const pack of validPacks) {
|
|
108
|
+
if (typeof parsed.tools[pack] === 'boolean') {
|
|
109
|
+
tools[pack] = parsed.tools[pack];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (Object.keys(tools).length > 0) {
|
|
113
|
+
next.tools = tools;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
96
116
|
if (isRecord(parsed.documentation)) {
|
|
97
117
|
const doc = {};
|
|
98
118
|
if (typeof parsed.documentation.root === 'string' &&
|