@ulysses-ai/create-workspace 0.16.0-beta.1 → 0.18.0-beta.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 +5 -5
- package/lib/init.mjs +19 -0
- package/package.json +1 -1
- package/template/.claude/hooks/_utils.mjs +1 -1
- package/template/.claude/hooks/repo-write-detection.mjs +161 -64
- package/template/.claude/hooks/session-end.mjs +68 -2
- package/template/.claude/hooks/session-start.mjs +35 -1
- package/template/.claude/hooks/subagent-start.mjs +89 -22
- package/template/.claude/lib/session-frontmatter.mjs +28 -0
- package/template/.claude/rules/coherent-revisions.md +1 -1
- package/template/.claude/rules/config-review.md.skip +29 -0
- package/template/.claude/rules/forge-operations.md +51 -0
- package/template/.claude/rules/git-conventions.md +16 -11
- package/template/.claude/rules/goal-driven-work.md +8 -403
- package/template/.claude/rules/honest-pushback.md +37 -37
- package/template/.claude/rules/memory-guidance.md +43 -90
- package/template/.claude/rules/superpowers-workflow.md.skip +1 -1
- package/template/.claude/rules/work-item-tracking.md +30 -72
- package/template/.claude/rules/workspace-structure.md +49 -69
- package/template/.claude/scripts/build-workspace-context.mjs +61 -16
- package/template/.claude/scripts/chat-record.mjs +282 -0
- package/template/.claude/scripts/cleanup-work-session.mjs +363 -36
- package/template/.claude/scripts/context-footprint.mjs +282 -0
- package/template/.claude/scripts/forges/github.mjs +255 -0
- package/template/.claude/scripts/forges/gitlab.mjs +20 -0
- package/template/.claude/scripts/forges/interface.mjs +125 -0
- package/template/.claude/scripts/generate-claude-local.mjs +21 -2
- package/template/.claude/scripts/migrate-sessions.mjs +1571 -0
- package/template/.claude/scripts/migrate-to-workspace-context.mjs +7 -2
- package/template/.claude/scripts/task-worktree.mjs +525 -0
- package/template/.claude/scripts/workspace-diagnostics.mjs +654 -0
- package/template/.claude/settings.json +5 -13
- package/template/.claude/skills/braindump/SKILL.md +11 -4
- package/template/.claude/skills/build-docs-site/SKILL.md +5 -5
- package/template/.claude/skills/build-docs-site/templates/spec.md.tmpl +1 -1
- package/template/.claude/skills/complete-work/SKILL.md +255 -215
- package/template/.claude/skills/context-placement/SKILL.md +199 -0
- package/template/.claude/skills/goal-driven-work/SKILL.md +459 -0
- package/template/.claude/skills/handoff/SKILL.md +11 -4
- package/template/.claude/skills/maintenance/SKILL.md +39 -6
- package/template/.claude/skills/migrate-sessions/SKILL.md +70 -0
- package/template/.claude/skills/pause-work/SKILL.md +33 -8
- package/template/.claude/skills/release/SKILL.md +44 -108
- package/template/.claude/skills/start-work/SKILL.md +89 -7
- package/template/.claude/skills/workspace-init/SKILL.md +34 -0
- package/template/.claude/skills/workspace-update/SKILL.md +4 -0
- package/template/.claudeignore +3 -0
- package/template/CLAUDE.md.tmpl +20 -2
- package/template/CODEBASE.md.tmpl +13 -0
- package/template/_gitignore +9 -0
- package/template/repo-claude.md.tmpl +10 -0
- package/template/workspace.json.tmpl +5 -3
- package/template/.claude/hooks/worktree-create.mjs +0 -53
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import { readFileSync, writeFileSync, existsSync, realpathSync } from 'node:fs';
|
|
21
21
|
import { join, resolve } from 'node:path';
|
|
22
|
+
import { spawnSync } from 'node:child_process';
|
|
22
23
|
import { fileURLToPath } from 'node:url';
|
|
23
24
|
|
|
24
25
|
function isMainModule(metaUrl) {
|
|
@@ -85,11 +86,29 @@ function generateClaudeLocal(root, { force = false } = {}) {
|
|
|
85
86
|
return { path: target, status: existsSync(target) ? 'written' : 'written' };
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
// The per-user index CLAUDE.local.md imports is generated, not tracked
|
|
90
|
+
// (gh:132) — so on a fresh clone it does not exist yet, and writing an
|
|
91
|
+
// importer for a missing file leaves a dangling @-import. Regenerate the
|
|
92
|
+
// workspace-context artifacts here, where the importer is created, rather
|
|
93
|
+
// than leaving the gap for /workspace-init to remember.
|
|
94
|
+
function ensurePerUserIndex(root) {
|
|
95
|
+
const builder = join(root, '.claude', 'scripts', 'build-workspace-context.mjs');
|
|
96
|
+
if (!existsSync(builder)) return { regenerated: false, reason: 'builder not present' };
|
|
97
|
+
const r = spawnSync(process.execPath, [builder, '--write', '--root', root], {
|
|
98
|
+
encoding: 'utf-8',
|
|
99
|
+
});
|
|
100
|
+
if (r.status !== 0) {
|
|
101
|
+
return { regenerated: false, reason: (r.stderr || '').trim() || `exit ${r.status}` };
|
|
102
|
+
}
|
|
103
|
+
return { regenerated: true };
|
|
104
|
+
}
|
|
105
|
+
|
|
88
106
|
function main() {
|
|
89
107
|
const args = parseArgs(process.argv);
|
|
90
108
|
const root = resolve(args.root);
|
|
91
109
|
const result = generateClaudeLocal(root, { force: args.force });
|
|
92
|
-
|
|
110
|
+
const index = ensurePerUserIndex(root);
|
|
111
|
+
process.stdout.write(JSON.stringify({ ...result, index }) + '\n');
|
|
93
112
|
}
|
|
94
113
|
|
|
95
114
|
if (isMainModule(import.meta.url)) {
|
|
@@ -101,4 +120,4 @@ if (isMainModule(import.meta.url)) {
|
|
|
101
120
|
}
|
|
102
121
|
}
|
|
103
122
|
|
|
104
|
-
export { readWorkspaceUser, renderClaudeLocal, generateClaudeLocal };
|
|
123
|
+
export { readWorkspaceUser, renderClaudeLocal, generateClaudeLocal, ensurePerUserIndex };
|