@polymorphism-tech/morph-spec 4.3.2 → 4.3.3
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/package.json +1 -1
- package/src/commands/project/init.js +14 -4
- package/src/commands/project/update.js +7 -3
- package/stacks/blazor-azure/.morph/.morphversion +3 -3
- package/stacks/blazor-azure/.morph/config/config.json +1 -1
- package/stacks/nextjs-supabase/.morph/.morphversion +3 -3
- package/stacks/nextjs-supabase/.morph/config/agents.json +345 -948
- package/stacks/nextjs-supabase/.morph/config/config.json +1 -1
- package/stacks/blazor-azure/.morph/archive/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/config/config.template.json +0 -122
- package/stacks/blazor-azure/.morph/features/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/hooks/pre-commit/tests-csharp.sh +0 -61
- package/stacks/blazor-azure/.morph/project.md +0 -160
- package/stacks/blazor-azure/.morph/schemas/agent.schema.json +0 -296
- package/stacks/blazor-azure/.morph/schemas/tasks.schema.json +0 -220
- package/stacks/blazor-azure/.morph/specs/.gitkeep +0 -20
- package/stacks/blazor-azure/.morph/state.json +0 -18
- package/stacks/blazor-azure/.morph/test-infra/example.bicep +0 -59
- package/stacks/nextjs-supabase/.morph/config/config.template.json +0 -92
- package/stacks/nextjs-supabase/.morph/hooks/pre-commit/tests-typescript.sh +0 -61
- package/stacks/nextjs-supabase/.morph/project.md +0 -168
package/package.json
CHANGED
|
@@ -112,8 +112,10 @@ Run \`morph-spec detect\` to analyze your project.
|
|
|
112
112
|
const contentDir = getContentDir();
|
|
113
113
|
const templatesSrc = join(contentDir, '.morph', 'templates');
|
|
114
114
|
const templatesDest = join(morphPath, 'templates');
|
|
115
|
+
let templatesCopied = false;
|
|
115
116
|
if (await pathExists(templatesSrc)) {
|
|
116
117
|
await copyDirectory(templatesSrc, templatesDest);
|
|
118
|
+
templatesCopied = true;
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
// 6. Copy standards from content (stack-specific)
|
|
@@ -134,9 +136,9 @@ Run \`morph-spec detect\` to analyze your project.
|
|
|
134
136
|
logger.dim(' ✓ Copied framework standards: core/, backend/, frontend/, infrastructure/');
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
// 7. Copy agents.json
|
|
139
|
+
// 7. Copy agents.json (sourced from framework root .morph/config/ — canonical single source of truth)
|
|
138
140
|
spinner.text = 'Copying agents configuration...';
|
|
139
|
-
const agentsSrc = join(
|
|
141
|
+
const agentsSrc = join(import.meta.dirname, '..', '..', '..', '.morph', 'config', 'agents.json');
|
|
140
142
|
const agentsDest = join(configDir, 'agents.json');
|
|
141
143
|
if (await pathExists(agentsSrc)) {
|
|
142
144
|
await copyFile(agentsSrc, agentsDest);
|
|
@@ -163,6 +165,7 @@ Run \`morph-spec detect\` to analyze your project.
|
|
|
163
165
|
|
|
164
166
|
let symlinkCount = 0;
|
|
165
167
|
let copyCount = 0;
|
|
168
|
+
let commandsCopied = false;
|
|
166
169
|
|
|
167
170
|
if (await pathExists(claudeSrc)) {
|
|
168
171
|
// Copy commands directory (slash commands)
|
|
@@ -170,6 +173,9 @@ Run \`morph-spec detect\` to analyze your project.
|
|
|
170
173
|
const commandsDest = join(claudeDest, 'commands');
|
|
171
174
|
if (await pathExists(commandsSrc)) {
|
|
172
175
|
await copyDirectory(commandsSrc, commandsDest);
|
|
176
|
+
commandsCopied = true;
|
|
177
|
+
} else {
|
|
178
|
+
logger.warn(' ⚠ .claude/commands/ source missing — commands not installed');
|
|
173
179
|
}
|
|
174
180
|
|
|
175
181
|
// Create directory links for skill categories (or copy if linking fails)
|
|
@@ -254,9 +260,13 @@ Run \`morph-spec detect\` to analyze your project.
|
|
|
254
260
|
logger.dim(` ✓ CLAUDE.md`);
|
|
255
261
|
logger.dim(` ✓ .morph/config/ (config.json, agents.json, azure-pricing.json)`);
|
|
256
262
|
logger.dim(` ✓ .morph/standards/ (coding.md, architecture.md, azure.md, ...)`);
|
|
257
|
-
|
|
263
|
+
if (templatesCopied) {
|
|
264
|
+
logger.dim(` ✓ .morph/templates/ (Bicep, integrations, saas, ...)`);
|
|
265
|
+
}
|
|
258
266
|
logger.dim(` ✓ .morph/project/ (context, standards, outputs)`);
|
|
259
|
-
|
|
267
|
+
if (commandsCopied) {
|
|
268
|
+
logger.dim(` ✓ .claude/commands/ (slash commands)`);
|
|
269
|
+
}
|
|
260
270
|
logger.dim(` ✓ .claude/settings.local.json (agent-teams hooks)`);
|
|
261
271
|
|
|
262
272
|
if (symlinkCount > 0) {
|
|
@@ -112,9 +112,9 @@ export async function updateCommand(options) {
|
|
|
112
112
|
await copyDirectory(standardsSrc, standardsDest);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
// Update agents.json
|
|
115
|
+
// Update agents.json (sourced from framework root .morph/config/ — canonical single source of truth)
|
|
116
116
|
updateSpinner.text = 'Updating agents configuration...';
|
|
117
|
-
const agentsSrc = join(
|
|
117
|
+
const agentsSrc = join(__dirname, '..', '..', '..', '.morph', 'config', 'agents.json');
|
|
118
118
|
const agentsDest = join(morphPath, 'config', 'agents.json');
|
|
119
119
|
if (await pathExists(agentsSrc)) {
|
|
120
120
|
await copyDirectory(agentsSrc, agentsDest);
|
|
@@ -125,12 +125,14 @@ export async function updateCommand(options) {
|
|
|
125
125
|
updateSpinner.text = 'Updating Claude commands and skills...';
|
|
126
126
|
const claudeSrc = join(__dirname, '..', '..', '..', '.claude');
|
|
127
127
|
const claudeDest = join(targetPath, '.claude');
|
|
128
|
+
let claudeUpdated = false;
|
|
128
129
|
if (await pathExists(claudeSrc)) {
|
|
129
130
|
// Copy commands (always copy, these are small)
|
|
130
131
|
const commandsSrc = join(claudeSrc, 'commands');
|
|
131
132
|
const commandsDest = join(claudeDest, 'commands');
|
|
132
133
|
if (await pathExists(commandsSrc)) {
|
|
133
134
|
await copyDirectory(commandsSrc, commandsDest);
|
|
135
|
+
claudeUpdated = true;
|
|
134
136
|
|
|
135
137
|
// Clean up stale command files moved to skills/workflows/ in v2.4+
|
|
136
138
|
const staleCommands = [
|
|
@@ -143,6 +145,8 @@ export async function updateCommand(options) {
|
|
|
143
145
|
await fs.remove(stalePath);
|
|
144
146
|
}
|
|
145
147
|
}
|
|
148
|
+
} else {
|
|
149
|
+
logger.warn(' ⚠ .claude/commands/ source missing — commands not updated');
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
// Update skills using directory links per category
|
|
@@ -200,7 +204,7 @@ export async function updateCommand(options) {
|
|
|
200
204
|
if (updateTemplates) logger.dim(' ✓ .morph/templates/');
|
|
201
205
|
if (updateStandards) logger.dim(' ✓ .morph/standards/');
|
|
202
206
|
logger.dim(' ✓ .morph/config/agents.json');
|
|
203
|
-
logger.dim(' ✓ .claude/commands/ and .claude/skills/');
|
|
207
|
+
if (claudeUpdated) logger.dim(' ✓ .claude/commands/ and .claude/skills/');
|
|
204
208
|
logger.dim(' ✓ .claude/settings.local.json (agent-teams hooks)');
|
|
205
209
|
logger.dim(' ✓ CLAUDE.md');
|
|
206
210
|
logger.blank();
|