@polymorphism-tech/morph-spec 6.0.0 → 7.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.
Files changed (114) hide show
  1. package/README.md +367 -366
  2. package/docs/CHEATSHEET.md +3 -3
  3. package/docs/QUICKSTART.md +4 -4
  4. package/framework/CLAUDE.md +13 -0
  5. package/framework/MORPH.md +57 -36
  6. package/framework/agents.json +132 -127
  7. package/framework/commands/morph-apply.md +4 -21
  8. package/framework/commands/morph-archive.md +1 -1
  9. package/framework/commands/morph-proposal.md +2 -0
  10. package/framework/hooks/claude-code/core/enforce-phase-writes.js +1 -1
  11. package/framework/hooks/claude-code/core/protect-spec-files.js +1 -1
  12. package/framework/hooks/claude-code/core/state-sync.js +212 -0
  13. package/framework/hooks/shared/phase-utils.js +5 -4
  14. package/framework/hooks/shared/state-reader.js +1 -1
  15. package/framework/phases.json +1 -1
  16. package/framework/rubrics/backend.json +41 -36
  17. package/framework/rules/ai-agents-standards.md +45 -15
  18. package/framework/rules/morph-workflow.md +15 -34
  19. package/framework/rules/neon-standards.md +25 -26
  20. package/framework/schemas/tasks.schema.json +35 -0
  21. package/framework/skills/core/morph-apply/SKILL.md +154 -0
  22. package/framework/skills/core/morph-brainstorming/SKILL.md +53 -30
  23. package/framework/skills/core/morph-implement/SKILL.md +25 -14
  24. package/framework/skills/core/morph-plan/SKILL.md +91 -23
  25. package/framework/skills/core/morph-proposal/SKILL.md +137 -0
  26. package/framework/skills/core/morph-review/SKILL.md +43 -7
  27. package/framework/skills/core/morph-stack-scan/SKILL.md +40 -1
  28. package/framework/standards/STANDARDS.json +1729 -1134
  29. package/framework/standards/ai-agents/agent-session.md +160 -0
  30. package/framework/standards/ai-agents/batching.md +193 -0
  31. package/framework/standards/ai-agents/context-providers.md +188 -0
  32. package/framework/standards/ai-agents/mcp-server.md +250 -0
  33. package/framework/standards/ai-agents/mcp-tools.md +197 -0
  34. package/framework/standards/ai-agents/middleware-patterns.md +207 -0
  35. package/framework/standards/ai-agents/modalities-image-gen.md +173 -0
  36. package/framework/standards/ai-agents/modalities-speech-to-text.md +171 -0
  37. package/framework/standards/ai-agents/modalities-text-to-speech.md +181 -0
  38. package/framework/standards/ai-agents/modalities-vision.md +201 -0
  39. package/framework/standards/ai-agents/multi-agent-patterns.md +155 -0
  40. package/framework/standards/ai-agents/production.md +114 -258
  41. package/framework/standards/ai-agents/prompts-in-db.md +214 -0
  42. package/framework/standards/ai-agents/providers/model-registry.md +158 -0
  43. package/framework/standards/ai-agents/rag-custom-pgvector.md +243 -0
  44. package/framework/standards/ai-agents/service-tier-flex.md +135 -0
  45. package/framework/standards/ai-agents/setup.md +142 -316
  46. package/framework/standards/ai-agents/structured-output.md +249 -0
  47. package/framework/standards/ai-agents/sweet-spot.md +109 -0
  48. package/framework/standards/ai-agents/workflows.md +114 -284
  49. package/framework/standards/architecture/vertical-slice/vertical-slice.md +433 -429
  50. package/framework/standards/backend/api/validation.md +92 -88
  51. package/framework/standards/backend/database/postgresql/database.md +336 -332
  52. package/framework/standards/backend/database/vector-search-rag.md +599 -541
  53. package/framework/standards/backend/dotnet/fluent-validation-vsa.md +4 -0
  54. package/framework/standards/backend/dotnet/result-pattern.md +4 -0
  55. package/framework/standards/backend/dotnet/scalar-ui.md +176 -172
  56. package/framework/standards/backend/dotnet/scrutor.md +4 -0
  57. package/framework/standards/backend/dotnet/vsa-handler-patterns.md +278 -274
  58. package/framework/standards/backend/integrations/asaas/asaas-api.md +260 -216
  59. package/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +354 -350
  60. package/framework/standards/backend/integrations/neon-auth/neon-auth.md +30 -19
  61. package/framework/standards/backend/integrations/resend/resend-email.md +400 -385
  62. package/framework/standards/data/nosql/cache/redis.md +106 -97
  63. package/framework/standards/data/nosql/cosmos-db.md +127 -118
  64. package/framework/standards/data/vector-search/rag-chunking.md +113 -104
  65. package/framework/standards/frontend/design-system/ai-image-generation.md +4 -0
  66. package/framework/standards/frontend/design-system/animations.md +164 -160
  67. package/framework/standards/frontend/design-system/naming.md +68 -64
  68. package/framework/standards/frontend/gsap/gsap-core.md +14 -8
  69. package/framework/standards/frontend/gsap/gsap-plugins.md +26 -21
  70. package/framework/standards/frontend/gsap/gsap-scrolltrigger.md +9 -7
  71. package/framework/standards/frontend/nextjs/app-router.md +127 -123
  72. package/framework/standards/frontend/nextjs/components.md +136 -132
  73. package/framework/standards/frontend/nextjs/data-fetching.md +130 -126
  74. package/framework/standards/frontend/nextjs/forms.md +134 -128
  75. package/framework/standards/frontend/nextjs/motion-patterns.md +328 -322
  76. package/framework/standards/frontend/nextjs/naming-conventions.md +71 -67
  77. package/framework/standards/frontend/nextjs/nextjs-patterns.md +229 -225
  78. package/framework/standards/frontend/nextjs/project-structure.md +106 -102
  79. package/framework/standards/frontend/nextjs/state-management.md +76 -72
  80. package/framework/standards/frontend/nextjs/testing.md +115 -111
  81. package/framework/standards/infrastructure/docker/easypanel-deploy.md +196 -192
  82. package/framework/standards/infrastructure/neon/neon-pgrag.md +6 -2
  83. package/framework/standards/infrastructure/neon/neon-pgvector.md +4 -0
  84. package/framework/standards/infrastructure/neon/neon-setup.md +5 -1
  85. package/framework/standards/integration/mcp/mcp-tools.md +471 -462
  86. package/framework/templates/REGISTRY.json +1745 -1239
  87. package/framework/templates/code/dotnet/ai-agents/AgentBootstrap.cs.template +39 -0
  88. package/framework/templates/code/dotnet/ai-agents/EmbeddingService.cs.template +68 -0
  89. package/framework/templates/code/dotnet/ai-agents/ModelRegistry.cs.template +117 -0
  90. package/framework/templates/code/dotnet/ai-agents/PromptRepository.cs.template +95 -0
  91. package/framework/templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template +61 -0
  92. package/framework/templates/code/dotnet/ai-agents/VectorSearchTool.cs.template +107 -0
  93. package/framework/templates/code/dotnet/ai-agents/model-registry.json.template +58 -0
  94. package/framework/templates/code/sql/ai-agents/agent-prompts-migration.sql.template +58 -0
  95. package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +91 -0
  96. package/framework/templates/docs/onboarding.md +4 -4
  97. package/framework/templates/tasks.template.json +17 -0
  98. package/package.json +89 -83
  99. package/src/commands/project/init.js +16 -0
  100. package/src/commands/validation/validate-feature.js +1 -1
  101. package/src/core/paths/output-schema.js +6 -6
  102. package/src/core/state/state-manager.js +1 -1
  103. package/src/core/templates/template-registry.js +289 -256
  104. package/src/lib/detectors/design-system-detector.js +1 -1
  105. package/src/lib/generators/context-generator.js +516 -518
  106. package/src/lib/generators/scaffold-generator.js +23 -26
  107. package/src/lib/installers/memory-installer.js +138 -0
  108. package/src/lib/phase-chain/phase-validator.js +4 -4
  109. package/src/lib/risk-detector.js +80 -0
  110. package/src/lib/tasks/tasks-json-parser.js +185 -0
  111. package/src/scripts/setup-infra.js +25 -0
  112. package/src/utils/hooks-installer.js +59 -10
  113. package/framework/standards/infrastructure/neon/neon-semantic-kernel.md +0 -310
  114. package/framework/templates/integrations/semantic-kernel-neon.cs +0 -125
@@ -0,0 +1,91 @@
1
+ -- TEMPLATE: pgvector-embeddings-migration.sql
2
+ -- PURPOSE: Creates the kb_embeddings table for custom RAG — chunk storage with pgvector.
3
+ -- READS STANDARD: ai-agents-rag-custom-pgvector
4
+ -- PLACEHOLDERS:
5
+ -- {{SCHEMA}} — target schema (default: public)
6
+ -- LAST-VERIFIED: 2026-05-19
7
+ --
8
+ -- PREREQUISITES:
9
+ -- - pgvector extension enabled in Neon (see infrastructure-neon-pgvector).
10
+ -- - NpgsqlDataSourceBuilder.UseVector() called in the project's DB setup.
11
+ --
12
+ -- DIMENSION NOTE:
13
+ -- embedding vector(1536) matches text-embedding-3-small (default 1536 dimensions).
14
+ -- If the project uses a different embedding model, adjust the dimension to match.
15
+ -- NEVER mix embedding models on a single column — vectors live in different spaces.
16
+
17
+ -- ============================================================
18
+ -- 1. EXTENSION
19
+ -- ============================================================
20
+
21
+ CREATE EXTENSION IF NOT EXISTS vector;
22
+
23
+ -- ============================================================
24
+ -- 2. TABLE
25
+ -- ============================================================
26
+
27
+ CREATE TABLE {{SCHEMA}}.kb_embeddings (
28
+ id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
29
+ tenant_id uuid NOT NULL,
30
+ source text NOT NULL, -- document identifier or source URL
31
+ chunk_index int NOT NULL, -- position of this chunk within the source document
32
+ content text NOT NULL, -- chunk text returned to the agent as context
33
+ embedding vector(1536) NOT NULL, -- vector dimension must match embedding model
34
+ metadata jsonb NOT NULL DEFAULT '{}',
35
+ created_at timestamptz NOT NULL DEFAULT now()
36
+ );
37
+
38
+ COMMENT ON TABLE {{SCHEMA}}.kb_embeddings IS 'RAG knowledge base — chunk text and pgvector embeddings for semantic search.';
39
+ COMMENT ON COLUMN {{SCHEMA}}.kb_embeddings.tenant_id IS 'Tenant partition. Every query MUST filter on this column. Never query across tenants.';
40
+ COMMENT ON COLUMN {{SCHEMA}}.kb_embeddings.source IS 'Document identifier or URL. Used for citation and re-indexing detection.';
41
+ COMMENT ON COLUMN {{SCHEMA}}.kb_embeddings.chunk_index IS 'Zero-based position of this chunk within the source document.';
42
+ COMMENT ON COLUMN {{SCHEMA}}.kb_embeddings.content IS 'Chunk text returned to the agent. Plain text, no markup.';
43
+ COMMENT ON COLUMN {{SCHEMA}}.kb_embeddings.embedding IS 'Float vector. Dimension MUST match the embedding model declared in model-registry.json.';
44
+ COMMENT ON COLUMN {{SCHEMA}}.kb_embeddings.metadata IS 'Arbitrary JSON metadata (section headers, page numbers, doc type, etc.). Used for filtering.';
45
+
46
+ -- ============================================================
47
+ -- 3. INDEXES
48
+ -- ============================================================
49
+
50
+ -- HNSW index for cosine similarity — production-grade recall, no training data required.
51
+ -- vector_cosine_ops: use <=> operator (cosine distance, ascending = most similar first).
52
+ -- m=16, ef_construction=64 are pgvector defaults. Tune per infrastructure-neon-pgvector §HNSW Parameters.
53
+ CREATE INDEX ix_kb_embeddings_hnsw
54
+ ON {{SCHEMA}}.kb_embeddings
55
+ USING hnsw (embedding vector_cosine_ops)
56
+ WITH (m = 16, ef_construction = 64);
57
+
58
+ -- Index for the mandatory tenant_id filter (applied in every search query).
59
+ CREATE INDEX ix_kb_embeddings_tenant
60
+ ON {{SCHEMA}}.kb_embeddings (tenant_id);
61
+
62
+ -- Composite index for source-level operations (re-indexing, deletion by document).
63
+ CREATE INDEX ix_kb_embeddings_source
64
+ ON {{SCHEMA}}.kb_embeddings (tenant_id, source);
65
+
66
+ -- ============================================================
67
+ -- 4. ROW-LEVEL SECURITY (multi-tenant)
68
+ -- ============================================================
69
+
70
+ -- RLS enforces tenant isolation at the database level as a second line of defence.
71
+ -- The application already filters on tenant_id in every query; RLS is the backstop.
72
+ --
73
+ -- See templates/code/sql/postgresql-rls-policy.sql for the policy pattern that
74
+ -- binds app.current_tenant_id (a session-level setting) to the RLS policy.
75
+ --
76
+ -- Uncomment and adapt once RLS is wired in the project:
77
+ --
78
+ -- ALTER TABLE {{SCHEMA}}.kb_embeddings ENABLE ROW LEVEL SECURITY;
79
+ --
80
+ -- CREATE POLICY kb_embeddings_tenant_isolation
81
+ -- ON {{SCHEMA}}.kb_embeddings
82
+ -- USING (tenant_id = current_setting('app.current_tenant_id')::uuid);
83
+
84
+ -- ============================================================
85
+ -- ROLLBACK
86
+ -- ============================================================
87
+
88
+ -- DROP INDEX IF EXISTS {{SCHEMA}}.ix_kb_embeddings_hnsw;
89
+ -- DROP INDEX IF EXISTS {{SCHEMA}}.ix_kb_embeddings_tenant;
90
+ -- DROP INDEX IF EXISTS {{SCHEMA}}.ix_kb_embeddings_source;
91
+ -- DROP TABLE IF EXISTS {{SCHEMA}}.kb_embeddings CASCADE;
@@ -94,10 +94,10 @@ morph-spec doctor
94
94
  │ ├── context/ # Project context & overrides
95
95
  │ └── features/{feature}/ # Feature outputs
96
96
  │ ├── 0-proposal/
97
- │ ├── 1-ui/
98
- │ ├── 2-design/
99
- │ ├── 4-tasks/
100
- │ └── 5-implement/
97
+ │ ├── 1-design/ # optional (UI-heavy features)
98
+ │ ├── 2-plan/
99
+ │ ├── 3-implement/
100
+ │ └── 4-review/
101
101
  └── .claude/
102
102
  ├── commands/ # Slash commands
103
103
  ├── skills/ # Workflow skills
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": "1.0",
3
+ "feature": "{{featureName}}",
4
+ "tasks": [
5
+ {
6
+ "id": "T1",
7
+ "title": "Example task title",
8
+ "description": "What this task accomplishes and why",
9
+ "dependencies": [],
10
+ "effort": "M",
11
+ "doneCriteria": "Verifiable acceptance condition stated in one sentence",
12
+ "status": "pending",
13
+ "outputs": [],
14
+ "group": "backend"
15
+ }
16
+ ]
17
+ }
package/package.json CHANGED
@@ -1,83 +1,89 @@
1
- {
2
- "name": "@polymorphism-tech/morph-spec",
3
- "version": "6.0.0",
4
- "description": "MORPH-SPEC: NLH (Natural Language Harness) for spec-driven development with Claude Code",
5
- "keywords": [
6
- "claude-code",
7
- "claude",
8
- "ai-coding",
9
- "ai-first",
10
- "spec-driven",
11
- "nlh",
12
- "natural-language-harness",
13
- "autonomy",
14
- "dotnet",
15
- "dotnet10",
16
- "nextjs",
17
- "vsa",
18
- "vertical-slice",
19
- "framework",
20
- "morph",
21
- "polymorphism"
22
- ],
23
- "main": "src/index.js",
24
- "bin": {
25
- "morph-spec": "bin/morph-spec.js"
26
- },
27
- "files": [
28
- "bin/",
29
- "src/",
30
- "framework/",
31
- "claude-plugin.json",
32
- "docs/QUICKSTART.md",
33
- "docs/CHEATSHEET.md",
34
- "README.md",
35
- "LICENSE",
36
- "CLAUDE.md"
37
- ],
38
- "type": "module",
39
- "engines": {
40
- "node": ">=18.0.0"
41
- },
42
- "scripts": {
43
- "start": "node bin/morph-spec.js",
44
- "generate": "node scripts/generate-refs.js",
45
- "test": "node --test --test-concurrency=1",
46
- "test:coverage": "c8 --reporter=text --reporter=html --reporter=lcov node --test --test-concurrency=1",
47
- "test:coverage:summary": "c8 --reporter=text-summary node --test --test-concurrency=1",
48
- "docs": "jsdoc -c jsdoc.json",
49
- "docs:watch": "jsdoc -c jsdoc.json --watch",
50
- "docs:serve": "npx http-server docs/api -p 8080 -o",
51
- "release": "node scripts/release.js",
52
- "postinstall": "node src/scripts/global-install.js"
53
- },
54
- "dependencies": {
55
- "chalk": "^5.3.0",
56
- "commander": "^12.0.0",
57
- "fs-extra": "^11.2.0",
58
- "glob": "^13.0.6",
59
- "handlebars": "^4.7.8",
60
- "inquirer": "^9.2.0",
61
- "minimatch": "^9.0.5",
62
- "ora": "^8.0.0"
63
- },
64
- "repository": {
65
- "type": "git",
66
- "url": "git+https://github.com/lucasPolymorphism/morph-spec-framework.git"
67
- },
68
- "author": "Polymorphism Tech <contact@polymorphism.com.br>",
69
- "license": "SEE LICENSE IN LICENSE",
70
- "homepage": "https://polymorphism.com.br/morph-spec",
71
- "bugs": {
72
- "email": "support@polymorphism.com.br"
73
- },
74
- "private": false,
75
- "publishConfig": {
76
- "access": "public"
77
- },
78
- "devDependencies": {
79
- "c8": "^11.0.0",
80
- "docdash": "^2.0.2",
81
- "jsdoc": "^4.0.5"
82
- }
83
- }
1
+ {
2
+ "name": "@polymorphism-tech/morph-spec",
3
+ "version": "7.1.0",
4
+ "description": "MORPH-SPEC: NLH (Natural Language Harness) for spec-driven development with Claude Code",
5
+ "keywords": [
6
+ "claude-code",
7
+ "claude",
8
+ "ai-coding",
9
+ "ai-first",
10
+ "spec-driven",
11
+ "nlh",
12
+ "natural-language-harness",
13
+ "autonomy",
14
+ "dotnet",
15
+ "dotnet10",
16
+ "nextjs",
17
+ "vsa",
18
+ "vertical-slice",
19
+ "framework",
20
+ "morph",
21
+ "polymorphism"
22
+ ],
23
+ "main": "src/index.js",
24
+ "bin": {
25
+ "morph-spec": "bin/morph-spec.js"
26
+ },
27
+ "files": [
28
+ "bin/",
29
+ "src/",
30
+ "framework/",
31
+ "claude-plugin.json",
32
+ "docs/QUICKSTART.md",
33
+ "docs/CHEATSHEET.md",
34
+ "README.md",
35
+ "LICENSE",
36
+ "CLAUDE.md"
37
+ ],
38
+ "type": "module",
39
+ "engines": {
40
+ "node": ">=22.0.0"
41
+ },
42
+ "scripts": {
43
+ "start": "node bin/morph-spec.js",
44
+ "generate": "node scripts/generate-refs.js",
45
+ "generate:check": "node scripts/generate-refs.js --check",
46
+ "generate-standards": "node scripts/generate-standards-registry.js",
47
+ "generate-standards:check": "node scripts/generate-standards-registry.js --check",
48
+ "validate": "node scripts/validate-framework.js",
49
+ "freshness": "node scripts/check-freshness.js",
50
+ "verify": "npm run generate:check && npm run generate-standards:check && npm run validate && npm run freshness && npm test",
51
+ "test": "node scripts/run-tests.mjs",
52
+ "test:coverage": "c8 --reporter=text --reporter=html --reporter=lcov node scripts/run-tests.mjs",
53
+ "test:coverage:summary": "c8 --reporter=text-summary node scripts/run-tests.mjs",
54
+ "docs": "jsdoc -c jsdoc.json",
55
+ "docs:watch": "jsdoc -c jsdoc.json --watch",
56
+ "docs:serve": "npx http-server docs/api -p 8080 -o",
57
+ "release": "node scripts/release.js",
58
+ "postinstall": "node src/scripts/global-install.js"
59
+ },
60
+ "dependencies": {
61
+ "chalk": "^5.3.0",
62
+ "commander": "^12.0.0",
63
+ "fs-extra": "^11.2.0",
64
+ "glob": "^13.0.6",
65
+ "handlebars": "^4.7.8",
66
+ "inquirer": "^9.2.0",
67
+ "minimatch": "^9.0.5",
68
+ "ora": "^8.0.0"
69
+ },
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "git+https://github.com/lucasPolymorphism/morph-spec-framework.git"
73
+ },
74
+ "author": "Polymorphism Tech <contact@polymorphism.com.br>",
75
+ "license": "SEE LICENSE IN LICENSE",
76
+ "homepage": "https://polymorphism.com.br/morph-spec",
77
+ "bugs": {
78
+ "email": "support@polymorphism.com.br"
79
+ },
80
+ "private": false,
81
+ "publishConfig": {
82
+ "access": "public"
83
+ },
84
+ "devDependencies": {
85
+ "c8": "^11.0.0",
86
+ "docdash": "^2.0.2",
87
+ "jsdoc": "^4.0.5"
88
+ }
89
+ }
@@ -483,6 +483,19 @@ export async function initCommand(options) {
483
483
 
484
484
  logger.blank();
485
485
 
486
+ // Populate Claude Code persistent memory so future sessions enter contextualized
487
+ try {
488
+ const { installProjectMemory } = await import('../../lib/installers/memory-installer.js');
489
+ const memResult = await installProjectMemory(targetPath, {
490
+ projectName: config.project?.name ?? targetPath.split(/[\\/]/).pop(),
491
+ frameworkVersion: config.frameworkVersion ?? cliVersion,
492
+ stack: config.project?.stack,
493
+ });
494
+ logger.dim(` ✓ Claude Code memory populated (${memResult.projectMemoryPath})`);
495
+ } catch (err) {
496
+ logger.dim(` ⚠ Memory install skipped: ${err.message}`);
497
+ }
498
+
486
499
  // Suggest tutorial for first-time users
487
500
  if (integrationsCreated) {
488
501
  logger.blank();
@@ -490,6 +503,9 @@ export async function initCommand(options) {
490
503
  }
491
504
 
492
505
  logger.blank();
506
+ logger.warn('IMPORTANT: Restart your Claude Code session for morph-* skills to be available.');
507
+ logger.dim('Skills installed in .claude/skills/ are only registered at session start.');
508
+ logger.blank();
493
509
 
494
510
  } catch (error) {
495
511
  spinner.fail('Installation failed');
@@ -69,7 +69,7 @@ const PHASE_OUTPUTS = {
69
69
  */
70
70
  const PHASE_FOLDERS = {
71
71
  proposal: '0-proposal',
72
- uiux: '1-ui',
72
+ uiux: '1-design',
73
73
  plan: '2-plan',
74
74
  implement: '3-implement',
75
75
  review: '4-review',
@@ -27,16 +27,16 @@ export const OUTPUT_SCHEMA = {
27
27
  stackScan: { filename: 'stack-scan.md', phaseDir: '0-proposal', phase: 'proposal', protected: false },
28
28
  migrationPlan: { filename: 'migration-plan.md', phaseDir: '0-proposal', phase: 'proposal', protected: false },
29
29
 
30
- // 1-ui/ (optional)
31
- uiDesignSystem: { filename: 'design-system.md', phaseDir: '1-ui', phase: 'uiux', protected: true, approvalGate: 'uiux' },
32
- uiMockups: { filename: 'mockups.md', phaseDir: '1-ui', phase: 'uiux', protected: true, approvalGate: 'uiux' },
33
- uiComponents: { filename: 'components.md', phaseDir: '1-ui', phase: 'uiux', protected: true, approvalGate: 'uiux' },
34
- uiFlows: { filename: 'flows.md', phaseDir: '1-ui', phase: 'uiux', protected: true, approvalGate: 'uiux' },
30
+ // 1-design/ (optional)
31
+ uiDesignSystem: { filename: 'design-system.md', phaseDir: '1-design', phase: 'uiux', protected: true, approvalGate: 'uiux' },
32
+ uiMockups: { filename: 'mockups.md', phaseDir: '1-design', phase: 'uiux', protected: true, approvalGate: 'uiux' },
33
+ uiComponents: { filename: 'components.md', phaseDir: '1-design', phase: 'uiux', protected: true, approvalGate: 'uiux' },
34
+ uiFlows: { filename: 'flows.md', phaseDir: '1-design', phase: 'uiux', protected: true, approvalGate: 'uiux' },
35
35
 
36
36
  // 2-plan/
37
37
  spec: { filename: 'spec.md', phaseDir: '2-plan', phase: 'plan', protected: true, approvalGate: 'plan' },
38
38
  mandate: { filename: 'mandate.md', phaseDir: '2-plan', phase: 'plan', protected: true, approvalGate: 'plan' },
39
- tasks: { filename: 'tasks.md', phaseDir: '2-plan', phase: 'plan', protected: true, approvalGate: 'plan' },
39
+ tasks: { filename: 'tasks.json', phaseDir: '2-plan', phase: 'plan', protected: true, approvalGate: 'plan' },
40
40
  decisions: { filename: 'decisions.md', phaseDir: '2-plan', phase: 'plan', protected: false },
41
41
 
42
42
  // 3-implement/
@@ -34,7 +34,7 @@ export function derivePhase(featurePath) {
34
34
  ['4-review', 'review'],
35
35
  ['3-implement', 'implement'],
36
36
  ['2-plan', 'plan'],
37
- ['1-ui', 'uiux'],
37
+ ['1-design', 'uiux'],
38
38
  ['0-proposal', 'proposal'],
39
39
  ];
40
40
  for (const [folder, phase] of phaseMap) {