Skip to content

Commit e7af176

Browse files
committed
docs(openspec): add ExFig Studio GUI app proposal
1 parent 5feec29 commit e7af176

11 files changed

Lines changed: 730 additions & 73 deletions

File tree

.claude/commands/openspec/apply.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,19 @@ ______________________________________________________________________
33
## name: OpenSpec: Apply description: Implement an approved OpenSpec change and keep tasks in sync. category: OpenSpec tags: [openspec, apply]
44

55
<!-- OPENSPEC:START -->
6-
76
**Guardrails**
8-
97
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
108
- Keep changes tightly scoped to the requested outcome.
11-
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you
12-
don't see it) if you need additional OpenSpec conventions or clarifications.
13-
14-
**Steps** Track these steps as TODOs and complete them one by one.
9+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
1510

11+
**Steps**
12+
Track these steps as TODOs and complete them one by one.
1613
1. Read `changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
1714
2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
1815
3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished.
1916
4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.
2017
5. Reference `openspec list` or `openspec show <item>` when additional context is required.
2118

2219
**Reference**
23-
2420
- Use `openspec show <id> --json --deltas-only` if you need additional context from the proposal while implementing.
25-
2621
<!-- OPENSPEC:END -->

.claude/commands/openspec/archive.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,23 @@ ______________________________________________________________________
33
## name: OpenSpec: Archive description: Archive a deployed OpenSpec change and update specs. category: OpenSpec tags: [openspec, archive]
44

55
<!-- OPENSPEC:START -->
6-
76
**Guardrails**
8-
97
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
108
- Keep changes tightly scoped to the requested outcome.
11-
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you
12-
don't see it) if you need additional OpenSpec conventions or clarifications.
9+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
1310

1411
**Steps**
15-
1612
1. Determine the change ID to archive:
17-
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by
18-
slash-command arguments), use that value after trimming whitespace.
19-
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface
20-
likely IDs, share the relevant candidates, and confirm which one the user intends.
21-
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a
22-
confirmed change ID before proceeding.
13+
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.
14+
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.
15+
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.
2316
- If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.
24-
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing,
25-
already archived, or otherwise not ready to archive.
26-
3. Run `openspec archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use
27-
`--skip-specs` only for tooling-only work).
17+
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.
18+
3. Run `openspec archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work).
2819
4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.
2920
5. Validate with `openspec validate --strict` and inspect with `openspec show <id>` if anything looks off.
3021

3122
**Reference**
32-
3323
- Use `openspec list` to confirm change IDs before archiving.
3424
- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off.
35-
3625
<!-- OPENSPEC:END -->

.claude/commands/openspec/proposal.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,24 @@ ______________________________________________________________________
33
## name: OpenSpec: Proposal description: Scaffold a new OpenSpec change and validate strictly. category: OpenSpec tags: [openspec, change]
44

55
<!-- OPENSPEC:START -->
6-
76
**Guardrails**
8-
97
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
108
- Keep changes tightly scoped to the requested outcome.
11-
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you
12-
don't see it) if you need additional OpenSpec conventions or clarifications.
9+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
1310
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
14-
- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and
15-
spec deltas). Implementation happens in the apply stage after approval.
11+
- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and spec deltas). Implementation happens in the apply stage after approval.
1612

1713
**Steps**
18-
19-
1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs
20-
(e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
21-
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under
22-
`openspec/changes/<id>/`.
23-
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas
24-
with clear relationships and sequencing.
25-
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or
26-
demands trade-off discussion before committing to specs.
27-
5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using
28-
`## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference
29-
related capabilities when relevant.
30-
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include
31-
validation (tests, tooling), and highlight dependencies or parallelizable work.
14+
1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
15+
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `openspec/changes/<id>/`.
16+
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.
17+
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.
18+
5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.
19+
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.
3220
7. Validate with `openspec validate <id> --strict` and resolve every issue before sharing the proposal.
3321

3422
**Reference**
35-
36-
- Use `openspec show <id> --json --deltas-only` or `openspec show <spec> --type spec` to inspect details when validation
37-
fails.
23+
- Use `openspec show <id> --json --deltas-only` or `openspec show <spec> --type spec` to inspect details when validation fails.
3824
- Search existing requirements with `rg -n "Requirement:|Scenario:" openspec/specs` before writing new ones.
39-
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation
40-
realities.
41-
25+
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.
4226
<!-- OPENSPEC:END -->

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ Keep this managed block so 'openspec update' can refresh the instructions.
2020

2121
<!-- OPENSPEC:END -->
2222

23+
## Context7 for External Libraries
24+
25+
**Always use Context7 MCP** to look up documentation for external tools and libraries before implementing:
26+
27+
1. `resolve-library-id` — find the library ID
28+
2. `get-library-docs` with `topic` — get relevant docs (use `mode: code` for API, `mode: info` for concepts)
29+
3. Paginate with `page: 2, 3...` if context insufficient
30+
31+
This applies to: Swift packages, CLI tools (mise, hk, swiftlint, etc.), Figma API, and any third-party dependency.
32+
2333
# CLAUDE.md
2434

2535
Agent instructions for ExFig - a CLI tool that exports colors, typography, icons, and images from Figma to iOS, Android,

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ actionlint = "1.7.9" # GitHub Actions linting
3737
git-cliff = "2.10.1" # Changelog generation
3838

3939
# --- Configuration ---
40-
pkl = "0.30.2" # Configuration language (for hk.pkl)
40+
pkl = "0.30.2" # Configuration language (for hk.pkl)
4141
swift = "6.2.3"
4242

4343
# =============================================================================

openspec/AGENTS.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ Instructions for AI coding assistants using OpenSpec for spec-driven development
88
- Decide scope: new capability vs modify existing capability
99
- Pick a unique `change-id`: kebab-case, verb-led (`add-`, `update-`, `remove-`, `refactor-`)
1010
- Scaffold: `proposal.md`, `tasks.md`, `design.md` (only if needed), and delta specs per affected capability
11-
- Write deltas: use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements`; include at least one `#### Scenario:` per
12-
requirement
11+
- Write deltas: use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements`; include at least one `#### Scenario:` per requirement
1312
- Validate: `openspec validate [change-id] --strict` and fix issues
1413
- Request approval: Do not start implementation until proposal is approved
1514

@@ -49,8 +48,7 @@ Skip proposal for:
4948
**Workflow**
5049

5150
1. Review `openspec/project.md`, `openspec list`, and `openspec list --specs` to understand current context.
52-
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas
53-
under `openspec/changes/<id>/`.
51+
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas under `openspec/changes/<id>/`.
5452
3. Draft spec deltas using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement.
5553
4. Run `openspec validate <id> --strict` and resolve any issues before sharing the proposal.
5654

@@ -221,8 +219,7 @@ The system SHALL provide...
221219
**Migration**: [How to handle]
222220
```
223221

224-
If multiple capabilities are affected, create multiple delta files under
225-
`changes/[change-id]/specs/<capability>/spec.md`—one per capability.
222+
If multiple capabilities are affected, create multiple delta files under `changes/[change-id]/specs/<capability>/spec.md`—one per capability.
226223

227224
4. **Create tasks.md:**
228225

@@ -235,7 +232,8 @@ If multiple capabilities are affected, create multiple delta files under
235232
- [ ] 1.4 Write tests
236233
```
237234

238-
5. **Create design.md when needed:** Create `design.md` if any of the following apply; otherwise omit it:
235+
5. **Create design.md when needed:**
236+
Create `design.md` if any of the following apply; otherwise omit it:
239237

240238
- Cross-cutting change (multiple services/modules) or a new architectural pattern
241239
- New external dependency or significant data model changes
@@ -311,17 +309,11 @@ Headers matched with `trim(header)` - whitespace ignored.
311309

312310
#### When to use ADDED vs MODIFIED
313311

314-
- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the
315-
change is orthogonal (e.g., adding "Slash Command Configuration") rather than altering the semantics of an existing
316-
requirement.
317-
- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full,
318-
updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you
319-
provide here; partial deltas will drop previous details.
320-
- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content)
321-
referencing the new name.
312+
- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the change is orthogonal (e.g., adding "Slash Command Configuration") rather than altering the semantics of an existing requirement.
313+
- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full, updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you provide here; partial deltas will drop previous details.
314+
- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.
322315

323-
Common pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at
324-
archive time. If you aren’t explicitly changing the existing requirement, add a new requirement under ADDED instead.
316+
Common pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at archive time. If you aren’t explicitly changing the existing requirement, add a new requirement under ADDED instead.
325317

326318
Authoring a MODIFIED requirement correctly:
327319

@@ -439,7 +431,7 @@ notifications/spec.md
439431

440432
### Simplicity First
441433

442-
- Default to \<100 lines of new code
434+
- Default to <100 lines of new code
443435
- Single-file implementations until proven insufficient
444436
- Avoid frameworks without clear justification
445437
- Choose boring, proven patterns
@@ -473,9 +465,12 @@ Only add complexity with:
473465

474466
## Tool Selection Guide
475467

476-
| Task | Tool | Why | |------|------|-----| | Find files by pattern | Glob | Fast pattern matching | | Search code
477-
content | Grep | Optimized regex search | | Read specific files | Read | Direct file access | | Explore unknown scope |
478-
Task | Multi-step investigation |
468+
| Task | Tool | Why |
469+
| --------------------- | ---- | ------------------------ |
470+
| Find files by pattern | Glob | Fast pattern matching |
471+
| Search code content | Grep | Optimized regex search |
472+
| Read specific files | Read | Direct file access |
473+
| Explore unknown scope | Task | Multi-step investigation |
479474

480475
## Error Recovery
481476

0 commit comments

Comments
 (0)