@polymorphism-tech/morph-spec 11.5.0 → 11.5.1

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  > Harness para o Claude Code escrever código bem: plano com cenários, prova de que o teste morde, revisão em contexto novo e um resultado que um orquestrador lê.
4
4
 
5
5
  **Package:** `@polymorphism-tech/morph-spec`
6
- **Version:** 11.5.0
6
+ **Version:** 11.5.1
7
7
  **Requires:** Node.js 22+, Claude Code
8
8
 
9
9
  ---
package/bin/morph-spec.js CHANGED
@@ -254,4 +254,12 @@ program.hook('preAction', async (_, action) => {
254
254
  installRefusalLine(action.parent?.name() && action.parent !== program ? `${action.parent.name()} ${action.name()}` : action.name());
255
255
  });
256
256
 
257
+ const requested = process.argv[2];
258
+ if (requested && !requested.startsWith('-') && requested !== 'help'
259
+ && !program.commands.some((c) => c.name() === requested || c.aliases().includes(requested))) {
260
+ const { staleProjectHint } = await import('../src/utils/version-checker.js');
261
+ const hint = await staleProjectHint(process.cwd());
262
+ if (hint) console.error(chalk.yellow(hint));
263
+ }
264
+
257
265
  await program.parseAsync();
@@ -1,4 +1,4 @@
1
- # Cheatsheet — morph-spec v11.5.0
1
+ # Cheatsheet — morph-spec v11.5.1
2
2
 
3
3
  ## Arquivos de uma feature (`.morph/features/<slug-do-branch>/`)
4
4
 
@@ -1,4 +1,4 @@
1
- # Quickstart — morph-spec v11.5.0
1
+ # Quickstart — morph-spec v11.5.1
2
2
 
3
3
  ## 1. Instalar
4
4
 
@@ -4,7 +4,7 @@ description: Guia a criação de uma landing page nova ponta-a-ponta a partir do
4
4
  version: core
5
5
  when_to_use: Use quando for iniciar um novo projeto de LP com o template Umbraco genérico
6
6
  user-invocable: true
7
- cliVersion: "11.5.0"
7
+ cliVersion: "11.5.1"
8
8
  stacks:
9
9
  - umbraco
10
10
  ---
@@ -4,7 +4,7 @@ description: Migra uma landing page existente (React/Vite, Next.js estático ou
4
4
  version: core
5
5
  when_to_use: Use quando o usuário pedir "use /migrate-lp-to-umbraco {projeto}" ou descrever a necessidade de migrar uma LP para Umbraco
6
6
  user-invocable: true
7
- cliVersion: "11.5.0"
7
+ cliVersion: "11.5.1"
8
8
  stacks:
9
9
  - umbraco
10
10
  ---
@@ -4,7 +4,7 @@ description: Implementa o plano de uma feature morph-spec nesta sessão — prov
4
4
  version: core
5
5
  when_to_use: Use com o plano validado pelo plan-check ("/morph-apply", "implementar a feature", "implementa o plano"), inclusive disparado por um orquestrador depois da morph-plan
6
6
  user-invocable: true
7
- cliVersion: "11.5.0"
7
+ cliVersion: "11.5.1"
8
8
  ---
9
9
 
10
10
  # morph-apply
@@ -4,7 +4,7 @@ description: Transforma uma issue ou um pedido no plano da feature — confronta
4
4
  version: core
5
5
  when_to_use: Use quando uma feature, bug ou chore começar ("/morph-plan", "/morph-plan <link da issue>", "vamos planejar X"), inclusive disparado por um orquestrador a partir de uma issue com a label agente
6
6
  user-invocable: true
7
- cliVersion: "11.5.0"
7
+ cliVersion: "11.5.1"
8
8
  ---
9
9
 
10
10
  # morph-plan
@@ -4,7 +4,7 @@ description: Conduz o desenho de telas de uma feature com plano validado — ren
4
4
  version: core
5
5
  when_to_use: Use quando a feature cria ou altera UI e há uma pessoa para escolher as telas, depois do plan-check e antes de /morph-apply. Em modo autônomo não roda — escolher tela é decisão humana.
6
6
  user-invocable: true
7
- cliVersion: "11.5.0"
7
+ cliVersion: "11.5.1"
8
8
  stacks:
9
9
  - nextjs
10
10
  - react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymorphism-tech/morph-spec",
3
- "version": "11.5.0",
3
+ "version": "11.5.1",
4
4
  "description": "MORPH-SPEC: NLH (Natural Language Harness) for spec-driven development with Claude Code",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -112,6 +112,15 @@ export async function checkCLIOutdated() {
112
112
  return { isOutdated, current, latest };
113
113
  }
114
114
 
115
+ /** For an unknown command: a project installed by an older CLI describes commands this one removed. */
116
+ export async function staleProjectHint(projectPath, cliVersion = getInstalledCLIVersion()) {
117
+ const installed = (await getProjectMorphVersion(projectPath))?.morphVersion;
118
+ if (typeof installed !== 'string' || compareVersions(installed, cliVersion) >= 0) return null;
119
+ const update = majorJump(installed, cliVersion).refuse ? 'morph-spec update --force' : 'morph-spec update';
120
+ return `O harness deste projeto é da v${installed} e a CLI é a v${cliVersion}: as skills e a carta instaladas `
121
+ + `citam comandos que esta CLI não tem. Rode \`${update}\` (\`--dry-run\` antes mostra o efeito).`;
122
+ }
123
+
115
124
  export async function checkProjectOutdated(projectPath) {
116
125
  const cliVersion = getInstalledCLIVersion();
117
126
  const projectVersion = await getProjectMorphVersion(projectPath);