Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .claude/EXFIG.toon
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,25 @@ keyDirectories:
docc: Sources/ExFig/ExFig.docc/
tests: Tests/

configTypes:
IconsConfiguration:
purpose: Enum for backward-compatible icons config parsing
cases: [single(Icons), multiple([IconsEntry])]
platforms: [iOS, Android, Flutter]
properties:
entries: "[IconsEntry] - unified access to all entries"
isMultiple: "Bool - true if array format"
decoding: "Try array first, fallback to single object"
IconsEntry:
purpose: Per-frame icons configuration
requiredFields: [format/output (platform-specific)]
optionalFields: [figmaFrameName]
fallback: "figmaFrameName defaults to common.icons.figmaFrameName or 'Icons'"
IconsLoaderConfig:
purpose: Sendable struct for IconsLoader frame settings
file: Sources/ExFig/Loaders/IconsLoader.swift
factoryMethods: [forIOS, forAndroid, forFlutter, defaultConfig]

keyFiles:
cli: Sources/ExFig/ExFigCommand.swift
config: Sources/ExFig/Input/Params.swift
Expand Down
95 changes: 95 additions & 0 deletions .claude/commands/local-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
description: Run a comprehensive code review of local changes
allowed-tools: Bash(git *), Grep, Glob, Read, TodoWrite, Task(Explore), mcp__context7__resolve-library-id, mcp__context7__get-library-docs, mcp__sosumi__searchAppleDocumentation, mcp__sosumi__fetchAppleDocumentation
argument-hint: '[optional: files/directories to review]'
version: 2.0
---

# Local Development Review

Comprehensive technical code review analyzing ALL commits in feature branch relative to `origin/develop`.

## Review Scope Decision

```toon
scope[3]{condition,action}:
"specific files/directories provided","review only those paths"
"no arguments","review all branch changes vs origin/develop"
"module path provided","review module + check cross-module impacts"
```

## Step 1: Fetch Latest & Identify Changes

```bash
git fetch origin

# Show all commits in feature branch
git log origin/develop..HEAD --oneline

# Show all changed files
git diff origin/develop...HEAD --name-only
```

If specific files/directories provided via arguments:

```bash
git diff origin/develop...HEAD --name-only -- [file-paths]
```

## Step 2: Read Review Guidelines

Read recipe files before flagging issues:

```toon
recipes[6]{category,path}:
"SwiftUI crashes","docs/agents/development/recipes/code-review/swiftui-crash-recipes.md"
"Memory management","docs/agents/development/recipes/code-review/memory-management-recipes.md"
"Security","docs/agents/development/recipes/code-review/security-recipes.md"
"Swift 6 concurrency","docs/agents/development/recipes/code-review/swift6-concurrency-recipes.md"
"Architecture violations","docs/agents/development/recipes/code-review/architecture-violation-recipes.md"
"Output format","docs/agents/development/recipes/code-review/code-review-output-recipes.md"
```

## Step 3: Perform Review

Follow @docs/agents/development/code-review.md methodology:

```toon
methodology[5]{step,action}:
1,"Extract context: iOS version, UI framework, architectural layer"
2,"Pattern match: verify ALL conditions from detection rules"
3,"Assess confidence: >=80% flag, <80% skip"
4,"Verify against recipes: read linked recipe files before flagging"
5,"Prioritize: CRITICAL -> HIGH -> MEDIUM"
```

## Step 4: Generate Output

Output format per @docs/agents/development/recipes/code-review/code-review-output-recipes.md:

```toon
output[3]{section,format,required}:
"Code Review Complete","[one line summary]",true
"Review Findings","[grouped by priority]",true
"No issues","No critical, high, or medium priority issues detected",conditional
```

Priority format: `emoji + description + file:line + fix action`

```toon
priorities[3]{level,emoji,examples}:
CRITICAL,"red circle","crashes, security, memory leaks"
HIGH,"yellow circle","architecture violations, missing error handling"
MEDIUM,"green circle","performance, code quality"
```

## Quality Gate

```toon
checklist[5]{check,required}:
"All changed files reviewed",true
"Recipe files consulted for detected issues",true
"Confidence >= 80% for all flagged issues",true
"Output follows code-review-output-recipes.md format",true
"No false positives from partial pattern matches",true
```
144 changes: 144 additions & 0 deletions .claude/commands/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
---
description: Break down a task into subtasks with dependencies for parallel execution
allowed-tools: Read, Glob, Grep, TodoWrite, Task(Explore), Task(Plan)
argument-hint: <task description>
version: 1.0
---

# Task Planning with Dependencies

**Purpose**: Analyze a task and break it down into subtasks with explicit dependencies, enabling parallel execution
where possible.

## Output Format (TOON-like)

Generate plan in this structured format:

```yaml
command:
name: plan-<task-slug>
purpose: <task description>
version: 1.0

tasks[N]{id,title,description,depends_on,parallel_group,type}:
<id>,<title>,<description>,[deps],[group],[type]
...

execution_order:
phase_1:
parallel: [task_ids that can run in parallel]
phase_2:
sequential: [task_id] # build/test tasks
phase_3:
parallel: [task_ids for fixes if needed]
...

dependency_graph:
<task_id>: [list of task_ids this depends on]
...
```

## Task Types

- `analysis` - Code analysis, research, reading
- `implementation` - Writing new code
- `modification` - Changing existing code
- `build` - Building project/module
- `test` - Running tests
- `fix` - Fixing issues found by build/tests
- `review` - Code review, validation

## Dependency Rules

### Critical Rules for Parallel Execution

1. **Independent tasks** (no shared files/modules) can run in parallel
2. **Build tasks** MUST wait for ALL parallel implementation tasks to complete
3. **Test tasks** MUST wait for build to succeed
4. **Fix tasks** MUST wait for test results
5. **Tasks modifying same file** MUST be sequential

### Dependency Detection

- Same file modification → sequential
- Same module modification → sequential (unless different files)
- Different modules → parallel possible
- Build depends on → all implementation tasks
- Test depends on → successful build
- Fix depends on → test results

## Instructions

1. **Analyze the task**:

- Read relevant code files mentioned in task
- Identify affected modules/files
- Detect potential conflicts

2. **Break down into subtasks**:

- Create atomic, independent subtasks where possible
- Identify dependencies between subtasks
- Group parallelizable tasks

3. **Generate execution plan**:

- Phase 1: Parallel analysis/implementation tasks
- Phase 2: Build (waits for Phase 1)
- Phase 3: Tests (waits for Phase 2)
- Phase 4: Fixes if needed (based on Phase 3 results)
- Phase 5: Final build/test validation

4. **Output the plan** in TOON format above

## Example Output

```yaml
command:
name: plan-add-analytics-tracking
purpose: Add analytics tracking to user profile module
version: 1.0

tasks[6]{id,title,description,depends_on,parallel_group,type}:
T1,Create analytics service,Implement AnalyticsService protocol,[],G1,implementation
T2,Add tracking to ProfileView,Integrate analytics calls,[],G1,implementation
T3,Add tracking to SettingsView,Integrate analytics calls,[],G1,implementation
T4,Build module,Build UserProfile module,[T1,T2,T3],G2,build
T5,Run tests,Execute unit tests,[T4],G3,test
T6,Fix issues,Address any test failures,[T5],G4,fix

execution_order:
phase_1:
parallel: [T1, T2, T3] # Can run simultaneously - different files
phase_2:
sequential: [T4] # Build waits for all implementations
phase_3:
sequential: [T5] # Tests wait for build
phase_4:
conditional: [T6] # Only if tests fail

dependency_graph:
T1: []
T2: []
T3: []
T4: [T1, T2, T3]
T5: [T4]
T6: [T5]

notes:
- T1, T2, T3 modify different files, safe to parallelize
- T4 must wait for ALL implementations before building
- T6 is conditional - only execute if T5 finds failures
```

## Validation Checklist

Before finalizing plan, verify:

- [ ] No circular dependencies
- [ ] Build tasks depend on ALL related implementations
- [ ] Test tasks depend on successful build
- [ ] Fix tasks depend on test results
- [ ] Parallel tasks don't modify same files
- [ ] All task IDs are unique
- [ ] dependency_graph matches depends_on fields
87 changes: 87 additions & 0 deletions .claude/commands/pr-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
description: Generate PR summary from branch changes for GitHub
allowed-tools: Bash(git *), Bash(pbcopy), Read, Glob, Grep, Write
version: 2.0
---

# PR Summary Generator

Generate a concise PR summary in English based on branch changes, copy to clipboard.

## Step 1: Gather Context

```bash
git branch --show-current
git fetch origin
git log origin/develop..HEAD --oneline
git diff origin/develop...HEAD --stat
```

## Step 2: Extract Task ID

Extract from branch name using pattern `[A-Z]+-[0-9]+`:

```toon
patterns[4]{branch_example,extracted_id}:
"feature/PL-19452-description","PL-19452"
"fix/COUR-8147-bug","COUR-8147"
"hotfix/PAX-123-critical","PAX-123"
"feature/some-description","[manual input required]"
```

## Step 3: Generate Summary

Write to `/tmp/pr-summary.md`:

```toon
template{section,format}:
Title: "imperative mood, max 50 chars (Add/Fix/Update/Remove)"
Task ID: "[{ID}](https://indriver.atlassian.net/browse/{ID})"
Description: "1-2 sentences: what changed and why"
Changes: "- bullet list of changes"
```

Template:

```markdown
## Title
<imperative mood, max 50 chars>

## Task ID
[{TASK_ID}](https://indriver.atlassian.net/browse/{TASK_ID})

## Description
<1-2 sentences>

- <change 1>
- <change 2>
```

## Step 4: Copy to Clipboard

```bash
cat /tmp/pr-summary.md | pbcopy
```

Inform user: "Copied to clipboard!"

## Output Format

```toon
sections[4]{name,format,required}:
Title,"imperative mood max 50 chars",true
"Task ID","markdown link to Jira",true
Description,"1-2 sentences explaining what/why",true
Changes,"bullet list of specific changes",true
```

## Quality Gate

```toon
checklist[5]{check,required}:
"Title in imperative mood (not past tense)",true
"Task ID extracted and formatted as link",true
"English only, formal tone",true
"Summary written to /tmp/pr-summary.md",true
"Result copied to clipboard via pbcopy",true
```
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ excluded:
- Packages
- Sources/ExFig/Resources/iOSConfig.swift
- Sources/ExFig/Resources/androidConfig.swift
- Sources/ExFig/Resources/flutterConfig.swift
- Tests/XcodeExportTests/XcodeIconsExporterTests.swift

disabled_rules:
Expand Down
Loading
Loading