opencastle 1.0.0 → 1.1.0
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/README.md +8 -3
- package/dist/cli/adapters/claude-code.d.ts +8 -4
- package/dist/cli/adapters/claude-code.d.ts.map +1 -1
- package/dist/cli/adapters/claude-code.js +13 -7
- package/dist/cli/adapters/claude-code.js.map +1 -1
- package/dist/cli/adapters/single-file-base.d.ts +8 -1
- package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
- package/dist/cli/adapters/single-file-base.js +13 -3
- package/dist/cli/adapters/single-file-base.js.map +1 -1
- package/dist/cli/adapters/vscode.d.ts +11 -1
- package/dist/cli/adapters/vscode.d.ts.map +1 -1
- package/dist/cli/adapters/vscode.js +48 -8
- package/dist/cli/adapters/vscode.js.map +1 -1
- package/dist/cli/command-namespace.d.ts +91 -0
- package/dist/cli/command-namespace.d.ts.map +1 -0
- package/dist/cli/command-namespace.js +218 -0
- package/dist/cli/command-namespace.js.map +1 -0
- package/dist/cli/command-namespace.test.d.ts +2 -0
- package/dist/cli/command-namespace.test.d.ts.map +1 -0
- package/dist/cli/command-namespace.test.js +356 -0
- package/dist/cli/command-namespace.test.js.map +1 -0
- package/dist/cli/copy.d.ts +1 -1
- package/dist/cli/copy.d.ts.map +1 -1
- package/dist/cli/copy.js +3 -2
- package/dist/cli/copy.js.map +1 -1
- package/dist/cli/doctor.test.js +2 -2
- package/dist/cli/doctor.test.js.map +1 -1
- package/dist/cli/explain.d.ts.map +1 -1
- package/dist/cli/explain.js +13 -1
- package/dist/cli/explain.js.map +1 -1
- package/dist/cli/github-report.js +1 -1
- package/dist/cli/github-report.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +40 -6
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/init.test.js +9 -4
- package/dist/cli/init.test.js.map +1 -1
- package/dist/cli/managed-paths.d.ts +18 -1
- package/dist/cli/managed-paths.d.ts.map +1 -1
- package/dist/cli/managed-paths.js +72 -2
- package/dist/cli/managed-paths.js.map +1 -1
- package/dist/cli/manifest.d.ts.map +1 -1
- package/dist/cli/manifest.js +2 -0
- package/dist/cli/manifest.js.map +1 -1
- package/dist/cli/remove.d.ts.map +1 -1
- package/dist/cli/remove.js +22 -4
- package/dist/cli/remove.js.map +1 -1
- package/dist/cli/sync-check.d.ts.map +1 -1
- package/dist/cli/sync-check.js +22 -4
- package/dist/cli/sync-check.js.map +1 -1
- package/dist/cli/types.d.ts +32 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/types.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +14 -0
- package/dist/cli/update.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/adapters/claude-code.ts +13 -7
- package/src/cli/adapters/single-file-base.ts +22 -4
- package/src/cli/adapters/vscode.ts +51 -10
- package/src/cli/command-namespace.test.ts +417 -0
- package/src/cli/command-namespace.ts +222 -0
- package/src/cli/copy.ts +6 -2
- package/src/cli/doctor.test.ts +2 -2
- package/src/cli/explain.ts +13 -1
- package/src/cli/github-report.ts +1 -1
- package/src/cli/init.test.ts +9 -4
- package/src/cli/init.ts +43 -7
- package/src/cli/managed-paths.ts +73 -3
- package/src/cli/manifest.ts +2 -0
- package/src/cli/remove.ts +20 -4
- package/src/cli/sync-check.ts +19 -3
- package/src/cli/types.ts +32 -0
- package/src/cli/update.ts +12 -0
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +4 -4
package/src/cli/types.ts
CHANGED
|
@@ -110,6 +110,8 @@ export interface CopyResults {
|
|
|
110
110
|
export interface CopyDirOptions {
|
|
111
111
|
overwrite?: boolean;
|
|
112
112
|
filter?: (_name: string, _srcPath: string) => boolean;
|
|
113
|
+
/** The name a file is installed under, given its source name. Directories keep theirs. */
|
|
114
|
+
rename?: (_name: string) => string;
|
|
113
115
|
transform?: (
|
|
114
116
|
_content: string,
|
|
115
117
|
_srcPath: string
|
|
@@ -157,6 +159,13 @@ export interface Manifest {
|
|
|
157
159
|
* "unknown", which is treated as "not ours to delete".
|
|
158
160
|
*/
|
|
159
161
|
createdConfigs?: string[];
|
|
162
|
+
/**
|
|
163
|
+
* The namespace this install's commands are compiled under — `oc`. Absent on
|
|
164
|
+
* a project a release before the namespace compiled, which is how `sync`
|
|
165
|
+
* knows to look for the un-namespaced commands it left (`/bug-fix` beside
|
|
166
|
+
* `/oc:bug-fix`), and how it knows to stop looking afterwards.
|
|
167
|
+
*/
|
|
168
|
+
commandNamespace?: string;
|
|
160
169
|
stack?: StackConfig;
|
|
161
170
|
repoInfo?: RepoInfo;
|
|
162
171
|
}
|
|
@@ -212,6 +221,29 @@ export interface IdeAdapter {
|
|
|
212
221
|
): Promise<CopyResults>;
|
|
213
222
|
getManagedPaths(): ManagedPaths;
|
|
214
223
|
getDoctorChecks(): DoctorCheck[];
|
|
224
|
+
/**
|
|
225
|
+
* Files an earlier release wrote under a name this one no longer uses —
|
|
226
|
+
* `/bug-fix` before it became `/oc:bug-fix` — present on disk now, relative to
|
|
227
|
+
* the project root with forward slashes. `sync` removes them, `sync --check`
|
|
228
|
+
* reports them, `remove` takes them with the rest, and `init` reads them as a
|
|
229
|
+
* previous installation. Absent when a target has never renamed its output.
|
|
230
|
+
*/
|
|
231
|
+
getLegacyOutputs?(_projectRoot: string): string[];
|
|
232
|
+
/**
|
|
233
|
+
* Framework directories this target shares with the user — `.github/prompts/`,
|
|
234
|
+
* which VS Code reads only at its top, so OpenCastle's `oc.` files and a
|
|
235
|
+
* person's own sit side by side. `remove` and a dropped target's cleanup take
|
|
236
|
+
* only what `ownsFile` claims there; every other framework directory is
|
|
237
|
+
* removed whole.
|
|
238
|
+
*/
|
|
239
|
+
getSharedDirs?(): string[];
|
|
240
|
+
/**
|
|
241
|
+
* Whether a file under one of this target's framework directories is one it
|
|
242
|
+
* wrote. Sweeps and drift leave a file that answers no alone. Absent means
|
|
243
|
+
* every file there is the target's. `_rel` is relative to the project root,
|
|
244
|
+
* with forward slashes.
|
|
245
|
+
*/
|
|
246
|
+
ownsFile?(_rel: string, _projectRoot: string): boolean;
|
|
215
247
|
}
|
|
216
248
|
|
|
217
249
|
/** Select prompt option. */
|
package/src/cli/update.ts
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
} from './layers.js'
|
|
32
32
|
import { buildLock, writeLock, LOCK_REL, priorTeam } from './lock.js'
|
|
33
33
|
import { parseVersion, compareVersions } from './version-range.js'
|
|
34
|
+
import { COMMAND_NAMESPACE } from './command-namespace.js'
|
|
34
35
|
|
|
35
36
|
/** Print what is wrong with the team's sources, and that nothing was written. */
|
|
36
37
|
function reportTeamIssues(resolved: ResolvedSources): void {
|
|
@@ -458,6 +459,14 @@ export default async function update({
|
|
|
458
459
|
for (const p of preview.framework) {
|
|
459
460
|
console.log(` ${c.yellow('↻')} ${p}`)
|
|
460
461
|
}
|
|
462
|
+
// Named here because they are deleted, not updated: commands an earlier
|
|
463
|
+
// release wrote before the `oc:` namespace.
|
|
464
|
+
const legacy: string[] = []
|
|
465
|
+
for (const ide of ides) legacy.push(...((await IDE_ADAPTERS[ide]()).getLegacyOutputs?.(projectRoot) ?? []))
|
|
466
|
+
if (legacy.length > 0) {
|
|
467
|
+
console.log(`\n ${c.dim('[dry-run]')} Files from before the oc: namespace that would be removed:\n`)
|
|
468
|
+
for (const p of legacy) console.log(` ${c.red('-')} ${p}`)
|
|
469
|
+
}
|
|
461
470
|
if (preview.merged.length > 0) {
|
|
462
471
|
console.log(`\n ${c.dim('[dry-run]')} Files where only the managed block changes:\n`)
|
|
463
472
|
for (const p of preview.merged) {
|
|
@@ -651,6 +660,9 @@ export default async function update({
|
|
|
651
660
|
manifest.version = pkg.version
|
|
652
661
|
manifest.ides = ides
|
|
653
662
|
manifest.managedPaths = allManagedPaths
|
|
663
|
+
// After the compile above, which has removed any un-namespaced commands an
|
|
664
|
+
// earlier release left: from here on the old names are free again.
|
|
665
|
+
manifest.commandNamespace = COMMAND_NAMESPACE
|
|
654
666
|
manifest.stack = newStack
|
|
655
667
|
manifest.repoInfo = mergeStackIntoRepoInfo(repoInfo, newStack)
|
|
656
668
|
if (manifestMeaning(manifest as unknown as Record<string, unknown>) !== before) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "e0fa8b55",
|
|
3
3
|
"configHash": "30f8ea04",
|
|
4
|
-
"lockfileHash": "
|
|
5
|
-
"browserHash": "
|
|
4
|
+
"lockfileHash": "fef2b8d5",
|
|
5
|
+
"browserHash": "5d80b0d7",
|
|
6
6
|
"optimized": {
|
|
7
7
|
"astro > cssesc": {
|
|
8
8
|
"src": "../../../../../node_modules/cssesc/cssesc.js",
|
|
9
9
|
"file": "astro___cssesc.js",
|
|
10
|
-
"fileHash": "
|
|
10
|
+
"fileHash": "03500902",
|
|
11
11
|
"needsInterop": true
|
|
12
12
|
},
|
|
13
13
|
"astro > aria-query": {
|
|
14
14
|
"src": "../../../../../node_modules/aria-query/lib/index.js",
|
|
15
15
|
"file": "astro___aria-query.js",
|
|
16
|
-
"fileHash": "
|
|
16
|
+
"fileHash": "06610c08",
|
|
17
17
|
"needsInterop": true
|
|
18
18
|
},
|
|
19
19
|
"astro > axobject-query": {
|
|
20
20
|
"src": "../../../../../node_modules/axobject-query/lib/index.js",
|
|
21
21
|
"file": "astro___axobject-query.js",
|
|
22
|
-
"fileHash": "
|
|
22
|
+
"fileHash": "58969224",
|
|
23
23
|
"needsInterop": true
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -262,10 +262,10 @@ After your summary, suggest next steps:
|
|
|
262
262
|
Now that your `.opencastle/` configuration is complete, here's what you can do:
|
|
263
263
|
|
|
264
264
|
1. **Review remaining TODOs** — Scan `.opencastle/` for any remaining `<!-- TODO: verify -->` comments and fill in missing values (e.g., tracker team IDs that require API access)
|
|
265
|
-
2. **Implement a feature** — Use the **"Implement Feature"** prompt to have the Team Lead orchestrate a full feature build with task tracking, delegation, and verification
|
|
266
|
-
3. **Fix a bug** — Use the **"Bug Fix"** prompt for structured triage, root cause analysis, and fix with tracker tracking
|
|
267
|
-
4. **Brainstorm first** — Not sure how to approach something? Use the **"Brainstorm"** prompt to explore requirements and trade-offs before committing to a plan
|
|
268
|
-
5. **Generate a convoy spec** — Use the **"Generate Convoy"** prompt to create a `.convoy.yml` spec for autonomous convoy execution with `npx opencastle convoy run --file <spec>` CLI command.
|
|
265
|
+
2. **Implement a feature** — Use the **"Implement Feature"** prompt (`/oc:implement-feature` in Claude Code and Copilot) to have the Team Lead orchestrate a full feature build with task tracking, delegation, and verification
|
|
266
|
+
3. **Fix a bug** — Use the **"Bug Fix"** prompt (`/oc:bug-fix`) for structured triage, root cause analysis, and fix with tracker tracking
|
|
267
|
+
4. **Brainstorm first** — Not sure how to approach something? Use the **"Brainstorm"** prompt (`/oc:brainstorm`) to explore requirements and trade-offs before committing to a plan
|
|
268
|
+
5. **Generate a convoy spec** — Use the **"Generate Convoy"** prompt (`/oc:generate-convoy`) to create a `.convoy.yml` spec for autonomous convoy execution with `npx opencastle convoy run --file <spec>` CLI command.
|
|
269
269
|
|
|
270
270
|
## Guidelines
|
|
271
271
|
|