@polymorphism-tech/morph-spec 9.5.0 → 9.7.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.
Files changed (80) hide show
  1. package/README.md +2 -2
  2. package/bin/morph-spec.js +13 -5
  3. package/claude-plugin.json +1 -1
  4. package/docs/CHEATSHEET.md +1 -1
  5. package/docs/QUICKSTART.md +1 -1
  6. package/framework/agents.json +3 -3
  7. package/framework/docs/CLI.md +43 -11
  8. package/framework/evals/review-checklist.md +2 -2
  9. package/framework/hooks/claude-code/__pycache__/statusline.cpython-313.pyc +0 -0
  10. package/framework/hooks/claude-code/core/README.md +4 -0
  11. package/framework/hooks/claude-code/core/heavy-gate.js +5 -3
  12. package/framework/hooks/claude-code/core/test-budget.js +89 -0
  13. package/framework/hooks/claude-code/statusline.sh +11 -11
  14. package/framework/hooks/shared/e2e-check.js +0 -0
  15. package/framework/hooks/shared/feature-locator.js +7 -5
  16. package/framework/hooks/shared/heavy-command.js +72 -1
  17. package/framework/hooks/shared/heavy-config.js +28 -1
  18. package/framework/hooks/shared/heavy-slots.js +41 -5
  19. package/framework/hooks/shared/host-services.js +433 -0
  20. package/framework/schemas/config.schema.json +65 -2
  21. package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
  22. package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +1 -1
  23. package/framework/skills/core/morph-apply/SKILL.md +1 -1
  24. package/framework/skills/core/morph-hotfix/SKILL.md +1 -1
  25. package/framework/skills/core/morph-machine/SKILL.md +1 -1
  26. package/framework/skills/core/morph-media/SKILL.md +1 -1
  27. package/framework/skills/core/morph-plan/SKILL.md +3 -3
  28. package/framework/skills/core/morph-review/SKILL.md +3 -2
  29. package/framework/skills/core/morph-standards/SKILL.md +1 -1
  30. package/framework/skills/core/morph-uiux/SKILL.md +1 -1
  31. package/framework/standards/STANDARDS.json +2 -1
  32. package/framework/standards/infrastructure/docker/local-compose-isolation.md +15 -1
  33. package/framework/templates/IDE-SNIPPETS.md +262 -262
  34. package/framework/templates/code/dotnet/abstractions/api-endpoint.cs +7 -7
  35. package/framework/templates/code/dotnet/feature/request.cs.hbs +4 -4
  36. package/framework/templates/code/dotnet/feature/response.cs.hbs +4 -4
  37. package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +91 -91
  38. package/framework/templates/frontend/nextjs/client-component.tsx.hbs +26 -26
  39. package/framework/templates/frontend/nextjs/tsconfig.json.hbs +26 -26
  40. package/framework/templates/infrastructure/docker/Dockerfile.template +58 -58
  41. package/framework/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -38
  42. package/framework/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -48
  43. package/framework/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +45 -45
  44. package/framework/templates/infrastructure/github/actions/health-check/action.yml.hbs +27 -27
  45. package/framework/templates/infrastructure/github/workflows/docker-build-push.yml.hbs +59 -59
  46. package/framework/templates/infrastructure/github/workflows/dotnet-build.yml.hbs +39 -39
  47. package/framework/templates/state.template.json +17 -17
  48. package/framework/templates/ui/design-system.css +226 -226
  49. package/package.json +1 -1
  50. package/src/commands/e2e/e2e.js +50 -24
  51. package/src/commands/observability/cost.js +12 -0
  52. package/src/commands/project/env.js +3 -3
  53. package/src/commands/project/heavy.js +10 -3
  54. package/src/commands/project/worktree.js +9 -4
  55. package/src/commands/state/advance.js +3 -0
  56. package/src/commands/state/create.js +3 -3
  57. package/src/commands/state/delete.js +1 -1
  58. package/src/commands/state/finish.js +20 -4
  59. package/src/commands/validation/mutate.js +2 -2
  60. package/src/commands/validation/plan-check.js +1 -0
  61. package/src/commands/validation/verify.js +3 -0
  62. package/src/dashboard/app/main.jsx +13 -13
  63. package/src/dashboard/vite.config.js +24 -24
  64. package/src/lib/e2e/compose-env.js +26 -3
  65. package/src/lib/e2e/stack-teardown.js +19 -4
  66. package/src/lib/heavy/gate.js +23 -4
  67. package/src/lib/heavy/live-stacks.js +64 -0
  68. package/src/lib/review-reports.js +21 -10
  69. package/src/lib/risk-detector.js +9 -1
  70. package/src/lib/tasks/test-runner.js +3 -0
  71. package/src/lib/telemetry/metrics.js +47 -3
  72. package/src/lib/validators/packages/package-validator.js +2 -2
  73. package/src/lib/worktree/docker-audit.js +7 -3
  74. package/src/lib/worktree/env-allocator.js +27 -5
  75. package/src/lib/worktree/ignored-triage.js +8 -0
  76. package/src/utils/agents-installer.js +4 -1
  77. package/src/utils/file-copier.js +26 -4
  78. package/src/utils/hooks-installer.js +4 -4
  79. package/framework/templates/.idea/morph-templates.xml +0 -92
  80. package/framework/templates/.vscode/morph-templates.code-snippets +0 -186
@@ -1,45 +1,45 @@
1
- name: 'Build & Push Docker Image'
2
- description: 'Build multi-stage Docker image and push to registry'
3
- inputs:
4
- registry:
5
- description: 'Docker registry URL'
6
- required: true
7
- image-name:
8
- description: 'Docker image name'
9
- required: true
10
- dockerfile-path:
11
- description: 'Path to Dockerfile'
12
- required: false
13
- default: 'Dockerfile'
14
- build-context:
15
- description: 'Docker build context'
16
- required: false
17
- default: '.'
18
- outputs:
19
- image-tag:
20
- description: 'Full image tag with registry'
21
- value: ${{{{ steps.build.outputs.tags }}}}
22
-
23
- runs:
24
- using: 'composite'
25
- steps:
26
- - name: Set up Docker Buildx
27
- uses: docker/setup-buildx-action@v3
28
-
29
- - name: Login to Registry
30
- uses: docker/login-action@v3
31
- with:
32
- registry: ${{{{ inputs.registry }}}}
33
- username: ${{{{ secrets.REGISTRY_USERNAME }}}}
34
- password: ${{{{ secrets.REGISTRY_PASSWORD }}}}
35
-
36
- - name: Build and push
37
- id: build
38
- uses: docker/build-push-action@v5
39
- with:
40
- context: ${{{{ inputs.build-context }}}}
41
- file: ${{{{ inputs.dockerfile-path }}}}
42
- push: true
43
- tags: ${{{{ inputs.registry }}}}/${{{{ inputs.image-name }}}}:${{{{ github.sha }}}}
44
- cache-from: type=gha
45
- cache-to: type=gha,mode=max
1
+ name: 'Build & Push Docker Image'
2
+ description: 'Build multi-stage Docker image and push to registry'
3
+ inputs:
4
+ registry:
5
+ description: 'Docker registry URL'
6
+ required: true
7
+ image-name:
8
+ description: 'Docker image name'
9
+ required: true
10
+ dockerfile-path:
11
+ description: 'Path to Dockerfile'
12
+ required: false
13
+ default: 'Dockerfile'
14
+ build-context:
15
+ description: 'Docker build context'
16
+ required: false
17
+ default: '.'
18
+ outputs:
19
+ image-tag:
20
+ description: 'Full image tag with registry'
21
+ value: ${{{{ steps.build.outputs.tags }}}}
22
+
23
+ runs:
24
+ using: 'composite'
25
+ steps:
26
+ - name: Set up Docker Buildx
27
+ uses: docker/setup-buildx-action@v3
28
+
29
+ - name: Login to Registry
30
+ uses: docker/login-action@v3
31
+ with:
32
+ registry: ${{{{ inputs.registry }}}}
33
+ username: ${{{{ secrets.REGISTRY_USERNAME }}}}
34
+ password: ${{{{ secrets.REGISTRY_PASSWORD }}}}
35
+
36
+ - name: Build and push
37
+ id: build
38
+ uses: docker/build-push-action@v5
39
+ with:
40
+ context: ${{{{ inputs.build-context }}}}
41
+ file: ${{{{ inputs.dockerfile-path }}}}
42
+ push: true
43
+ tags: ${{{{ inputs.registry }}}}/${{{{ inputs.image-name }}}}:${{{{ github.sha }}}}
44
+ cache-from: type=gha
45
+ cache-to: type=gha,mode=max
@@ -1,27 +1,27 @@
1
- name: 'Health Check'
2
- description: 'Poll health endpoint until ready'
3
- inputs:
4
- url:
5
- description: 'Health check URL'
6
- required: true
7
- timeout:
8
- description: 'Timeout in seconds'
9
- required: false
10
- default: '300'
11
- interval:
12
- description: 'Polling interval in seconds'
13
- required: false
14
- default: '5'
15
-
16
- runs:
17
- using: 'composite'
18
- steps:
19
- - name: Wait for health
20
- shell: bash
21
- run: |
22
- RETRIES=$(($${{{{ inputs.timeout }}}} / ${{{{ inputs.interval }}}}))
23
- curl --retry $RETRIES \
24
- --retry-delay ${{{{ inputs.interval }}}} \
25
- --retry-connrefused \
26
- --fail \
27
- ${{{{ inputs.url }}}}
1
+ name: 'Health Check'
2
+ description: 'Poll health endpoint until ready'
3
+ inputs:
4
+ url:
5
+ description: 'Health check URL'
6
+ required: true
7
+ timeout:
8
+ description: 'Timeout in seconds'
9
+ required: false
10
+ default: '300'
11
+ interval:
12
+ description: 'Polling interval in seconds'
13
+ required: false
14
+ default: '5'
15
+
16
+ runs:
17
+ using: 'composite'
18
+ steps:
19
+ - name: Wait for health
20
+ shell: bash
21
+ run: |
22
+ RETRIES=$(($${{{{ inputs.timeout }}}} / ${{{{ inputs.interval }}}}))
23
+ curl --retry $RETRIES \
24
+ --retry-delay ${{{{ inputs.interval }}}} \
25
+ --retry-connrefused \
26
+ --fail \
27
+ ${{{{ inputs.url }}}}
@@ -1,59 +1,59 @@
1
- name: Build & Push Docker Image
2
-
3
- on:
4
- workflow_call:
5
- inputs:
6
- registry:
7
- required: true
8
- type: string
9
- image-name:
10
- required: true
11
- type: string
12
- dockerfile-path:
13
- required: false
14
- type: string
15
- default: 'Dockerfile'
16
- build-context:
17
- required: false
18
- type: string
19
- default: '.'
20
- outputs:
21
- image-tag:
22
- value: ${{{{ jobs.docker.outputs.tag }}}}
23
-
24
- jobs:
25
- docker:
26
- runs-on: ubuntu-latest
27
- outputs:
28
- tag: ${{{{ steps.meta.outputs.tags }}}}
29
- steps:
30
- - uses: actions/checkout@v4
31
-
32
- - name: Set up Docker Buildx
33
- uses: docker/setup-buildx-action@v3
34
-
35
- - name: Login to Registry
36
- uses: docker/login-action@v3
37
- with:
38
- registry: ${{{{ inputs.registry }}}}
39
- username: ${{{{ secrets.REGISTRY_USERNAME }}}}
40
- password: ${{{{ secrets.REGISTRY_PASSWORD }}}}
41
-
42
- - name: Docker metadata
43
- id: meta
44
- uses: docker/metadata-action@v5
45
- with:
46
- images: ${{{{ inputs.registry }}}}/${{{{ inputs.image-name }}}}
47
- tags: |
48
- type=ref,event=branch
49
- type=sha,prefix=${{{{ inputs.image-name }}}}-
50
-
51
- - name: Build and push
52
- uses: docker/build-push-action@v5
53
- with:
54
- context: ${{{{ inputs.build-context }}}}
55
- file: ${{{{ inputs.dockerfile-path }}}}
56
- push: true
57
- tags: ${{{{ steps.meta.outputs.tags }}}}
58
- cache-from: type=gha
59
- cache-to: type=gha,mode=max
1
+ name: Build & Push Docker Image
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ registry:
7
+ required: true
8
+ type: string
9
+ image-name:
10
+ required: true
11
+ type: string
12
+ dockerfile-path:
13
+ required: false
14
+ type: string
15
+ default: 'Dockerfile'
16
+ build-context:
17
+ required: false
18
+ type: string
19
+ default: '.'
20
+ outputs:
21
+ image-tag:
22
+ value: ${{{{ jobs.docker.outputs.tag }}}}
23
+
24
+ jobs:
25
+ docker:
26
+ runs-on: ubuntu-latest
27
+ outputs:
28
+ tag: ${{{{ steps.meta.outputs.tags }}}}
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+
32
+ - name: Set up Docker Buildx
33
+ uses: docker/setup-buildx-action@v3
34
+
35
+ - name: Login to Registry
36
+ uses: docker/login-action@v3
37
+ with:
38
+ registry: ${{{{ inputs.registry }}}}
39
+ username: ${{{{ secrets.REGISTRY_USERNAME }}}}
40
+ password: ${{{{ secrets.REGISTRY_PASSWORD }}}}
41
+
42
+ - name: Docker metadata
43
+ id: meta
44
+ uses: docker/metadata-action@v5
45
+ with:
46
+ images: ${{{{ inputs.registry }}}}/${{{{ inputs.image-name }}}}
47
+ tags: |
48
+ type=ref,event=branch
49
+ type=sha,prefix=${{{{ inputs.image-name }}}}-
50
+
51
+ - name: Build and push
52
+ uses: docker/build-push-action@v5
53
+ with:
54
+ context: ${{{{ inputs.build-context }}}}
55
+ file: ${{{{ inputs.dockerfile-path }}}}
56
+ push: true
57
+ tags: ${{{{ steps.meta.outputs.tags }}}}
58
+ cache-from: type=gha
59
+ cache-to: type=gha,mode=max
@@ -1,39 +1,39 @@
1
- name: Build .NET Application
2
-
3
- on:
4
- workflow_call:
5
- inputs:
6
- dotnet-version:
7
- required: false
8
- type: string
9
- default: '{{DOTNET_VERSION}}'
10
- build-configuration:
11
- required: false
12
- type: string
13
- default: 'Release'
14
- run-tests:
15
- required: false
16
- type: boolean
17
- default: true
18
-
19
- jobs:
20
- build:
21
- runs-on: ubuntu-latest
22
- steps:
23
- - uses: actions/checkout@v4
24
-
25
- - name: Setup .NET
26
- uses: actions/setup-dotnet@v4
27
- with:
28
- dotnet-version: ${{{{ inputs.dotnet-version }}}}
29
-
30
- - name: Restore dependencies
31
- run: dotnet restore
32
-
33
- - name: Build
34
- run: dotnet build --configuration ${{{{ inputs.build-configuration }}}} --no-restore
35
-
36
- {{#if run-tests}}
37
- - name: Test
38
- run: dotnet test --configuration ${{{{ inputs.build-configuration }}}} --no-build --verbosity normal
39
- {{/if}}
1
+ name: Build .NET Application
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ dotnet-version:
7
+ required: false
8
+ type: string
9
+ default: '{{DOTNET_VERSION}}'
10
+ build-configuration:
11
+ required: false
12
+ type: string
13
+ default: 'Release'
14
+ run-tests:
15
+ required: false
16
+ type: boolean
17
+ default: true
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Setup .NET
26
+ uses: actions/setup-dotnet@v4
27
+ with:
28
+ dotnet-version: ${{{{ inputs.dotnet-version }}}}
29
+
30
+ - name: Restore dependencies
31
+ run: dotnet restore
32
+
33
+ - name: Build
34
+ run: dotnet build --configuration ${{{{ inputs.build-configuration }}}} --no-restore
35
+
36
+ {{#if run-tests}}
37
+ - name: Test
38
+ run: dotnet test --configuration ${{{{ inputs.build-configuration }}}} --no-build --verbosity normal
39
+ {{/if}}
@@ -1,17 +1,17 @@
1
- {
2
- "version": "3.0.0",
3
- "project": {
4
- "name": "{{PROJECT_NAME}}",
5
- "type": "{{PROJECT_TYPE}}",
6
- "createdAt": "{{TIMESTAMP}}",
7
- "updatedAt": "{{TIMESTAMP}}"
8
- },
9
- "features": {},
10
- "threads": {},
11
- "metadata": {
12
- "totalFeatures": 0,
13
- "completedFeatures": 0,
14
- "totalTimeSpent": 0,
15
- "lastUpdated": "{{TIMESTAMP}}"
16
- }
17
- }
1
+ {
2
+ "version": "3.0.0",
3
+ "project": {
4
+ "name": "{{PROJECT_NAME}}",
5
+ "type": "{{PROJECT_TYPE}}",
6
+ "createdAt": "{{TIMESTAMP}}",
7
+ "updatedAt": "{{TIMESTAMP}}"
8
+ },
9
+ "features": {},
10
+ "threads": {},
11
+ "metadata": {
12
+ "totalFeatures": 0,
13
+ "completedFeatures": 0,
14
+ "totalTimeSpent": 0,
15
+ "lastUpdated": "{{TIMESTAMP}}"
16
+ }
17
+ }