lean-spec 0.2.7 → 0.2.9

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.
@@ -2,25 +2,6 @@
2
2
 
3
3
  ## Project: {project_name}
4
4
 
5
- <!-- ═══════════════════════════════════════════════════════════════════════════
6
- 👇 TODO: Fill in your project context below (then delete these comments)
7
- ═══════════════════════════════════════════════════════════════════════════ -->
8
-
9
- ### 📋 Project Context
10
-
11
- **What this project does:**
12
- _TODO: Describe your project in 1-2 sentences_
13
-
14
- **Tech stack:**
15
- _TODO: List main technologies (e.g., Node.js, React, PostgreSQL)_
16
-
17
- **Key objectives:**
18
- _TODO: What are you building toward? (e.g., Launch MVP by Q1)_
19
-
20
- <!-- ═══════════════════════════════════════════════════════════════════════════
21
- 👆 End of TODO section - Delete these comment markers when done
22
- ═══════════════════════════════════════════════════════════════════════════ -->
23
-
24
5
  ## 🚨 CRITICAL: Before ANY Task
25
6
 
26
7
  **STOP and check these first:**
@@ -45,6 +26,8 @@ If you have LeanSpec MCP tools available, **ALWAYS use them**:
45
26
  | View a spec | `view` | Full content with formatting |
46
27
  | Create new spec | `create` | Auto-sequences, proper structure |
47
28
  | Update spec | `update` | Validates transitions, timestamps |
29
+ | Link specs | `link` | Add dependencies (depends_on) |
30
+ | Unlink specs | `unlink` | Remove dependencies |
48
31
  | Check dependencies | `deps` | Visual dependency graph |
49
32
 
50
33
  **Why MCP over CLI?**
@@ -63,6 +46,8 @@ lean-spec list # See all specs
63
46
  lean-spec search "query" # Find relevant specs
64
47
  lean-spec create <name> # Create new spec
65
48
  lean-spec update <spec> --status <status> # Update status
49
+ lean-spec link <spec> --depends-on <other> # Add dependencies
50
+ lean-spec unlink <spec> --depends-on <other> # Remove dependencies
66
51
  lean-spec deps <spec> # Show dependencies
67
52
  ```
68
53
 
@@ -80,7 +65,7 @@ lean-spec deps <spec> # Show dependencies
80
65
 
81
66
  4. 📊 **Update status to `in-progress`** BEFORE coding
82
67
  5. 📝 **Document decisions** in the spec as you work
83
- 6. 🔗 **Link related specs** if you discover connections
68
+ 6. 🔗 **Link dependencies** if you discover blocking relationships
84
69
 
85
70
  ### After Completing Work
86
71
 
@@ -121,17 +106,17 @@ lean-spec deps <spec> # Show dependencies
121
106
  - Trivial changes
122
107
  - Self-explanatory refactors
123
108
 
124
- ## Spec Relationships
109
+ ## Spec Dependencies
125
110
 
126
- ### `related` - Bidirectional Soft Reference
127
- Informational relationship between specs. Shown from both sides.
128
- **Use when:** Related topics, coordinated but not blocking work.
111
+ ### `depends_on` - Blocking Dependency
112
+ Directional dependency - this spec cannot start until dependencies are complete.
113
+ **Use when:** True blocking dependency, work order matters, one spec builds on another.
129
114
 
130
- ### `depends_on` - Directional Blocking Dependency
131
- Hard dependency - spec cannot start until dependencies complete.
132
- **Use when:** True blocking dependency, work order matters.
115
+ ```bash
116
+ lean-spec link <spec> --depends-on <other-spec>
117
+ ```
133
118
 
134
- **Default:** Use `related`. Reserve `depends_on` for true blockers.
119
+ **Note:** Only use `depends_on` for actual blocking dependencies. Don't link specs just because they're "related" - link them when one truly blocks the other.
135
120
 
136
121
  ## Quality Standards
137
122
 
@@ -22,7 +22,7 @@ Keep it lean, but organized. Use sub-specs to manage complexity without overwhel
22
22
 
23
23
  ## Next Steps
24
24
 
25
- 1. Customize AGENTS.md for your project
26
- 2. Create your first spec: `lean-spec create my-feature`
27
- 3. When a spec grows large, split sections into sub-spec files
25
+ You're ready to go! Ask your AI to create a spec for your next feature.
26
+
27
+ When a spec grows large, consider splitting sections into sub-spec files.
28
28
 
@@ -1,6 +1,6 @@
1
1
  # API Refactor Demo
2
2
 
3
- > **Tutorial**: [Refactoring with Specs](https://leanspec.dev/docs/tutorials/refactoring-specs)
3
+ > **Tutorial**: [Refactoring with Specs](https://lean-spec.dev/docs/tutorials/refactoring-specs)
4
4
 
5
5
  ## Scenario
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Dark Theme Demo
2
2
 
3
- > **Tutorial**: [Adding Dark Theme Support](https://leanspec.dev/docs/tutorials/adding-dark-theme)
3
+ > **Tutorial**: [Adding Dark Theme Support](https://lean-spec.dev/docs/tutorials/adding-dark-theme)
4
4
 
5
5
  ## Scenario
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Dashboard Widgets Demo
2
2
 
3
- > **Tutorial**: [Managing Multiple Features](https://leanspec.dev/docs/tutorials/multiple-features)
3
+ > **Tutorial**: [Managing Multiple Features](https://lean-spec.dev/docs/tutorials/multiple-features)
4
4
 
5
5
  ## Scenario
6
6
 
@@ -2,25 +2,6 @@
2
2
 
3
3
  ## Project: {project_name}
4
4
 
5
- <!-- ═══════════════════════════════════════════════════════════════════════════
6
- 👇 TODO: Fill in your project context below (then delete these comments)
7
- ═══════════════════════════════════════════════════════════════════════════ -->
8
-
9
- ### 📋 Project Context
10
-
11
- **What this project does:**
12
- _TODO: Describe your project in 1-2 sentences_
13
-
14
- **Tech stack:**
15
- _TODO: List main technologies (e.g., Node.js, React, PostgreSQL)_
16
-
17
- **Key objectives:**
18
- _TODO: What are you building toward? (e.g., Launch MVP by Q1)_
19
-
20
- <!-- ═══════════════════════════════════════════════════════════════════════════
21
- 👆 End of TODO section - Delete these comment markers when done
22
- ═══════════════════════════════════════════════════════════════════════════ -->
23
-
24
5
  ## 🚨 CRITICAL: Before ANY Task
25
6
 
26
7
  **STOP and check these first:**
@@ -45,6 +26,8 @@ If you have LeanSpec MCP tools available, **ALWAYS use them**:
45
26
  | View a spec | `view` | Full content with formatting |
46
27
  | Create new spec | `create` | Auto-sequences, proper structure |
47
28
  | Update spec | `update` | Validates transitions, timestamps |
29
+ | Link specs | `link` | Add dependencies (depends_on) |
30
+ | Unlink specs | `unlink` | Remove dependencies |
48
31
  | Check dependencies | `deps` | Visual dependency graph |
49
32
 
50
33
  **Why MCP over CLI?**
@@ -63,6 +46,8 @@ lean-spec list # See all specs
63
46
  lean-spec search "query" # Find relevant specs
64
47
  lean-spec create <name> # Create new spec
65
48
  lean-spec update <spec> --status <status> # Update status
49
+ lean-spec link <spec> --depends-on <other> # Add dependencies
50
+ lean-spec unlink <spec> --depends-on <other> # Remove dependencies
66
51
  lean-spec deps <spec> # Show dependencies
67
52
  ```
68
53
 
@@ -80,7 +65,7 @@ lean-spec deps <spec> # Show dependencies
80
65
 
81
66
  4. 📊 **Update status to `in-progress`** BEFORE coding
82
67
  5. 📝 **Document decisions** in the spec as you work
83
- 6. 🔗 **Link related specs** if you discover connections
68
+ 6. 🔗 **Link dependencies** if you discover blocking relationships
84
69
 
85
70
  ### After Completing Work
86
71
 
@@ -121,17 +106,17 @@ lean-spec deps <spec> # Show dependencies
121
106
  - Trivial changes
122
107
  - Self-explanatory refactors
123
108
 
124
- ## Spec Relationships
109
+ ## Spec Dependencies
125
110
 
126
- ### `related` - Bidirectional Soft Reference
127
- Informational relationship between specs. Shown from both sides.
128
- **Use when:** Related topics, coordinated but not blocking work.
111
+ ### `depends_on` - Blocking Dependency
112
+ Directional dependency - this spec cannot start until dependencies are complete.
113
+ **Use when:** True blocking dependency, work order matters, one spec builds on another.
129
114
 
130
- ### `depends_on` - Directional Blocking Dependency
131
- Hard dependency - spec cannot start until dependencies complete.
132
- **Use when:** True blocking dependency, work order matters.
115
+ ```bash
116
+ lean-spec link <spec> --depends-on <other-spec>
117
+ ```
133
118
 
134
- **Default:** Use `related`. Reserve `depends_on` for true blockers.
119
+ **Note:** Only use `depends_on` for actual blocking dependencies. Don't link specs just because they're "related" - link them when one truly blocks the other.
135
120
 
136
121
  ## Quality Standards
137
122
 
@@ -21,6 +21,5 @@ Keep it lean. Write specs for features that need clarity. Skip them for obvious
21
21
 
22
22
  ## Next Steps
23
23
 
24
- 1. Customize AGENTS.md for your project
25
- 2. Create your first spec: `lean-spec create my-feature`
24
+ You're ready to go! Ask your AI to create a spec for your next feature.
26
25
 
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/frontmatter.ts"],"names":[],"mappings":";;;;;;;AAwDO,SAAS,oBAAoB,IAAA,EAAqC;A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Y,CAAC,WAAW,QAAA,CAAS,WAAA,CAAY,QAAQ,CAAA,EAAG;AACvE,MAAA,OAAO,KAAA;AAAA,IACT;AAAA,EACF;AAGA,EAAA,IAAI,OAAO,QAAA,EAAU;AACnB,IAAA,IAAI,WAAA,CAAY,QAAA,KAAa,MAAA,CAAO,QAAA,EAAU;AAC5C,MAAA,OAAO,KAAA;AAAA,IACT;AAAA,EACF;AAGA,EAAA,IAAI,OAAO,YAAA,EAAc;AACvB,IAAA,KAAA,MAAW,CAAC,KAAK,KAAK,CAAA,IAAK,OAAO,OAAA,CAAQ,MAAA,CAAO,YAAY,CAAA,EAAG;AAC9D,MAAA,IAAI,WAAA,CAAY,GAAG,CAAA,KAAM,KAAA,EAAO;AAC9B,QAAA,OAAO,KAAA;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,IAAA;AACT","file":"chunk-LVD7ZAVZ.js","sourcesContent":["import * as fs from 'node:fs/promises';\nimport * as path from 'node:path';\nimport matter from 'gray-matter';\nimport yaml from 'js-yaml';\nimport dayjs from 'dayjs';\nimport type { LeanSpecConfig } from './config.js';\n\n// Valid status values\nexport type SpecStatus = 'planned' | 'in-progress' | 'complete' | 'archived';\n\n// Valid priority values\nexport type SpecPriority = 'low' | 'medium' | 'high' | 'critical';\n\n// Status transition record\nexport interface StatusTransition {\n status: SpecStatus;\n at: string; // ISO 8601 timestamp\n}\n\n// Core frontmatter fields\nexport interface SpecFrontmatter {\n // Required fields\n status: SpecStatus;\n created: string; // YYYY-MM-DD format\n\n // Recommended fields\n tags?: string[];\n priority?: SpecPriority;\n\n // Power user fields\n related?: string[];\n depends_on?: string[];\n updated?: string;\n completed?: string;\n assignee?: string;\n reviewer?: string;\n issue?: string;\n pr?: string;\n epic?: string;\n breaking?: boolean;\n due?: string; // YYYY-MM-DD format\n\n // Timestamp fields (for velocity tracking)\n created_at?: string; // ISO 8601 timestamp\n updated_at?: string; // ISO 8601 timestamp\n completed_at?: string; // ISO 8601 timestamp\n transitions?: StatusTransition[]; // Status change history\n\n // Allow any additional fields (for extensibility)\n [key: string]: unknown;\n}\n\n/**\n * Convert Date objects to YYYY-MM-DD string format\n * (gray-matter auto-parses YYYY-MM-DD strings as Date objects)\n */\nexport function normalizeDateFields(data: Record<string, unknown>): void {\n const dateFields = ['created', 'completed', 'updated', 'due'];\n \n for (const field of dateFields) {\n if (data[field] instanceof Date) {\n data[field] = (data[field] as Date).toISOString().split('T')[0];\n }\n }\n}\n\n/**\n * Enrich frontmatter with timestamps for velocity tracking\n * Auto-generates timestamps when missing and tracks status transitions\n */\nexport function enrichWithTimestamps(\n data: Record<string, unknown>,\n previousData?: Record<string, unknown>\n): void {\n const now = new Date().toISOString();\n\n // Set created_at if missing - always use current timestamp\n // Do NOT infer from created date field since that's just YYYY-MM-DD without time\n if (!data.created_at) {\n data.created_at = now;\n }\n\n // Update updated_at on any change (if previousData exists)\n if (previousData) {\n data.updated_at = now;\n }\n\n // Set completed_at when status changes to complete\n if (\n data.status === 'complete' &&\n previousData?.status !== 'complete' &&\n !data.completed_at\n ) {\n data.completed_at = now;\n // Also set the completed date field\n if (!data.completed) {\n data.completed = new Date().toISOString().split('T')[0];\n }\n }\n\n // Track status transition (optional)\n if (previousData && data.status !== previousData.status) {\n if (!Array.isArray(data.transitions)) {\n data.transitions = [];\n }\n (data.transitions as StatusTransition[]).push({\n status: data.status as SpecStatus,\n at: now,\n });\n }\n}\n\n/**\n * Normalize tags field - parse JSON strings into arrays\n * Handles cases where AI accidentally creates tags as '[\"..\",\"..\"]' strings\n */\nexport function normalizeTagsField(data: Record<string, unknown>): void {\n if (data.tags && typeof data.tags === 'string') {\n try {\n // Try to parse as JSON array\n const parsed = JSON.parse(data.tags as string);\n if (Array.isArray(parsed)) {\n data.tags = parsed;\n }\n } catch {\n // If not valid JSON, treat as comma-separated string\n data.tags = (data.tags as string).split(',').map(t => t.trim());\n }\n }\n}\n\n/**\n * Validate and coerce custom field types\n */\nexport function validateCustomField(\n value: unknown,\n expectedType: 'string' | 'number' | 'boolean' | 'array'\n): { valid: boolean; coerced?: unknown; error?: string } {\n switch (expectedType) {\n case 'string':\n if (typeof value === 'string') {\n return { valid: true, coerced: value };\n }\n // Coerce to string\n return { valid: true, coerced: String(value) };\n \n case 'number':\n if (typeof value === 'number') {\n return { valid: true, coerced: value };\n }\n // Try to coerce to number\n const num = Number(value);\n if (!isNaN(num)) {\n return { valid: true, coerced: num };\n }\n return { valid: false, error: `Cannot convert '${value}' to number` };\n \n case 'boolean':\n if (typeof value === 'boolean') {\n return { valid: true, coerced: value };\n }\n // Coerce string to boolean\n if (value === 'true' || value === 'yes' || value === '1') {\n return { valid: true, coerced: true };\n }\n if (value === 'false' || value === 'no' || value === '0') {\n return { valid: true, coerced: false };\n }\n return { valid: false, error: `Cannot convert '${value}' to boolean` };\n \n case 'array':\n if (Array.isArray(value)) {\n return { valid: true, coerced: value };\n }\n return { valid: false, error: `Expected array but got ${typeof value}` };\n \n default:\n return { valid: false, error: `Unknown type: ${expectedType}` };\n }\n}\n\n/**\n * Validate custom fields according to config\n */\nexport function validateCustomFields(\n frontmatter: Record<string, unknown>,\n config?: LeanSpecConfig\n): Record<string, unknown> {\n if (!config?.frontmatter?.custom) {\n return frontmatter;\n }\n \n const result = { ...frontmatter };\n \n for (const [fieldName, expectedType] of Object.entries(config.frontmatter.custom)) {\n if (fieldName in result) {\n const validation = validateCustomField(result[fieldName], expectedType);\n if (validation.valid) {\n result[fieldName] = validation.coerced;\n } else {\n console.warn(`Warning: Invalid custom field '${fieldName}': ${validation.error}`);\n }\n }\n }\n \n return result;\n}\n\n// Parse frontmatter from a spec file\nexport async function parseFrontmatter(\n filePath: string,\n config?: LeanSpecConfig\n): Promise<SpecFrontmatter | null> {\n try {\n const content = await fs.readFile(filePath, 'utf-8');\n const parsed = matter(content, {\n engines: {\n yaml: (str) => yaml.load(str, { schema: yaml.FAILSAFE_SCHEMA }) as Record<string, unknown>\n }\n });\n\n if (!parsed.data || Object.keys(parsed.data).length === 0) {\n // No frontmatter found, try fallback to inline fields\n return parseFallbackFields(content);\n }\n\n // Validate required fields\n if (!parsed.data.status) {\n console.warn(`Warning: Missing required field 'status' in ${filePath}`);\n return null;\n }\n\n if (!parsed.data.created) {\n console.warn(`Warning: Missing required field 'created' in ${filePath}`);\n return null;\n }\n\n // Validate status enum\n const validStatuses: SpecStatus[] = ['planned', 'in-progress', 'complete', 'archived'];\n if (!validStatuses.includes(parsed.data.status)) {\n console.warn(`Warning: Invalid status '${parsed.data.status}' in ${filePath}. Valid values: ${validStatuses.join(', ')}`);\n }\n\n // Validate priority enum if present\n if (parsed.data.priority) {\n const validPriorities: SpecPriority[] = ['low', 'medium', 'high', 'critical'];\n if (!validPriorities.includes(parsed.data.priority)) {\n console.warn(`Warning: Invalid priority '${parsed.data.priority}' in ${filePath}. Valid values: ${validPriorities.join(', ')}`);\n }\n }\n\n // Normalize tags field (parse JSON strings to arrays)\n normalizeTagsField(parsed.data);\n \n // Warn about unknown fields (informational only)\n const knownFields = [\n 'status', 'created', 'tags', 'priority', 'related', 'depends_on',\n 'updated', 'completed', 'assignee', 'reviewer', 'issue', 'pr', 'epic', 'breaking', 'due',\n 'created_at', 'updated_at', 'completed_at', 'transitions'\n ];\n \n // Add custom fields from config to known fields\n const customFields = config?.frontmatter?.custom ? Object.keys(config.frontmatter.custom) : [];\n const allKnownFields = [...knownFields, ...customFields];\n \n const unknownFields = Object.keys(parsed.data).filter(k => !allKnownFields.includes(k));\n if (unknownFields.length > 0) {\n console.warn(`Info: Unknown fields in ${filePath}: ${unknownFields.join(', ')}`);\n }\n \n // Validate and coerce custom fields\n const validatedData = validateCustomFields(parsed.data, config);\n\n return validatedData as SpecFrontmatter;\n } catch (error) {\n console.error(`Error parsing frontmatter from ${filePath}:`, error);\n return null;\n }\n}\n\n// Fallback: Parse inline fields from older specs\nfunction parseFallbackFields(content: string): SpecFrontmatter | null {\n const statusMatch = content.match(/\\*\\*Status\\*\\*:\\s*(?:📅\\s*)?(\\w+(?:-\\w+)?)/i);\n const createdMatch = content.match(/\\*\\*Created\\*\\*:\\s*(\\d{4}-\\d{2}-\\d{2})/);\n\n if (statusMatch && createdMatch) {\n const status = statusMatch[1].toLowerCase().replace(/\\s+/g, '-') as SpecStatus;\n const created = createdMatch[1];\n\n return {\n status,\n created,\n };\n }\n\n return null;\n}\n\n// Update frontmatter in a spec file\nexport async function updateFrontmatter(\n filePath: string,\n updates: Partial<SpecFrontmatter>\n): Promise<void> {\n const content = await fs.readFile(filePath, 'utf-8');\n const parsed = matter(content, {\n engines: {\n yaml: (str) => yaml.load(str, { schema: yaml.FAILSAFE_SCHEMA }) as Record<string, unknown>\n }\n });\n\n // Store previous data for timestamp enrichment\n const previousData = { ...parsed.data };\n\n // Merge updates with existing data\n const newData = { ...parsed.data, ...updates };\n\n // Ensure date fields remain as strings (gray-matter auto-parses YYYY-MM-DD as Date objects)\n normalizeDateFields(newData);\n\n // Enrich with timestamps\n enrichWithTimestamps(newData, previousData);\n\n // Auto-update timestamps if fields exist (legacy behavior)\n if (updates.status === 'complete' && !newData.completed) {\n newData.completed = dayjs().format('YYYY-MM-DD');\n }\n\n if ('updated' in parsed.data) {\n newData.updated = dayjs().format('YYYY-MM-DD');\n }\n\n // Update visual metadata badges in content\n let updatedContent = parsed.content;\n updatedContent = updateVisualMetadata(updatedContent, newData as SpecFrontmatter);\n\n // Stringify back to file\n const newContent = matter.stringify(updatedContent, newData);\n await fs.writeFile(filePath, newContent, 'utf-8');\n}\n\n// Update visual metadata badges in content\nfunction updateVisualMetadata(content: string, frontmatter: SpecFrontmatter): string {\n const statusEmoji = getStatusEmojiPlain(frontmatter.status);\n const statusLabel = frontmatter.status.charAt(0).toUpperCase() + frontmatter.status.slice(1).replace('-', ' ');\n \n // Parse created date with dayjs - handles all formats consistently\n const created = dayjs(frontmatter.created).format('YYYY-MM-DD');\n \n // Build metadata line\n let metadataLine = `> **Status**: ${statusEmoji} ${statusLabel}`;\n \n if (frontmatter.priority) {\n const priorityLabel = frontmatter.priority.charAt(0).toUpperCase() + frontmatter.priority.slice(1);\n metadataLine += ` · **Priority**: ${priorityLabel}`;\n }\n \n metadataLine += ` · **Created**: ${created}`;\n \n if (frontmatter.tags && frontmatter.tags.length > 0) {\n metadataLine += ` · **Tags**: ${frontmatter.tags.join(', ')}`;\n }\n \n // For enterprise template with assignee/reviewer\n let secondLine = '';\n if (frontmatter.assignee || frontmatter.reviewer) {\n const assignee = frontmatter.assignee || 'TBD';\n const reviewer = frontmatter.reviewer || 'TBD';\n secondLine = `\\n> **Assignee**: ${assignee} · **Reviewer**: ${reviewer}`;\n }\n \n // Replace existing metadata block or add after title\n const metadataPattern = /^>\\s+\\*\\*Status\\*\\*:.*(?:\\n>\\s+\\*\\*Assignee\\*\\*:.*)?/m;\n \n if (metadataPattern.test(content)) {\n // Replace existing metadata\n return content.replace(metadataPattern, metadataLine + secondLine);\n } else {\n // Add after title (# title)\n const titleMatch = content.match(/^#\\s+.+$/m);\n if (titleMatch) {\n const insertPos = titleMatch.index! + titleMatch[0].length;\n return content.slice(0, insertPos) + '\\n\\n' + metadataLine + secondLine + '\\n' + content.slice(insertPos);\n }\n }\n \n return content;\n}\n\nfunction getStatusEmojiPlain(status: string): string {\n switch (status) {\n case 'planned': return '🗓️';\n case 'in-progress': return '⏳';\n case 'complete': return '✅';\n case 'archived': return '📦';\n default: return '📄';\n }\n}\n\n// Get spec file path from spec directory\nexport async function getSpecFile(specDir: string, defaultFile: string = 'README.md'): Promise<string | null> {\n const specFile = path.join(specDir, defaultFile);\n \n try {\n await fs.access(specFile);\n return specFile;\n } catch {\n return null;\n }\n}\n\n// Filter specs by criteria\nexport interface SpecFilterOptions {\n status?: SpecStatus | SpecStatus[];\n tags?: string[];\n priority?: SpecPriority | SpecPriority[];\n assignee?: string;\n customFields?: Record<string, unknown>;\n}\n\nexport function matchesFilter(frontmatter: SpecFrontmatter, filter: SpecFilterOptions): boolean {\n // Status filter\n if (filter.status) {\n const statuses = Array.isArray(filter.status) ? filter.status : [filter.status];\n if (!statuses.includes(frontmatter.status)) {\n return false;\n }\n }\n\n // Tags filter (spec must have ALL specified tags)\n if (filter.tags && filter.tags.length > 0) {\n if (!frontmatter.tags || frontmatter.tags.length === 0) {\n return false;\n }\n const hasAllTags = filter.tags.every(tag => frontmatter.tags!.includes(tag));\n if (!hasAllTags) {\n return false;\n }\n }\n\n // Priority filter\n if (filter.priority) {\n const priorities = Array.isArray(filter.priority) ? filter.priority : [filter.priority];\n if (!frontmatter.priority || !priorities.includes(frontmatter.priority)) {\n return false;\n }\n }\n\n // Assignee filter\n if (filter.assignee) {\n if (frontmatter.assignee !== filter.assignee) {\n return false;\n }\n }\n \n // Custom fields filter\n if (filter.customFields) {\n for (const [key, value] of Object.entries(filter.customFields)) {\n if (frontmatter[key] !== value) {\n return false;\n }\n }\n }\n\n return true;\n}\n"]}