ace-idea 0.18.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 (52) hide show
  1. checksums.yaml +7 -0
  2. data/.ace-defaults/idea/config.yml +21 -0
  3. data/.ace-defaults/nav/protocols/wfi-sources/ace-idea.yml +19 -0
  4. data/CHANGELOG.md +387 -0
  5. data/README.md +42 -0
  6. data/Rakefile +13 -0
  7. data/docs/demo/ace-idea-getting-started.gif +0 -0
  8. data/docs/demo/ace-idea-getting-started.tape.yml +44 -0
  9. data/docs/demo/fixtures/README.md +3 -0
  10. data/docs/demo/fixtures/sample.txt +1 -0
  11. data/docs/getting-started.md +102 -0
  12. data/docs/handbook.md +39 -0
  13. data/docs/usage.md +320 -0
  14. data/exe/ace-idea +22 -0
  15. data/handbook/skills/as-idea-capture/SKILL.md +25 -0
  16. data/handbook/skills/as-idea-capture-features/SKILL.md +26 -0
  17. data/handbook/skills/as-idea-review/SKILL.md +26 -0
  18. data/handbook/workflow-instructions/idea/capture-features.wf.md +243 -0
  19. data/handbook/workflow-instructions/idea/capture.wf.md +270 -0
  20. data/handbook/workflow-instructions/idea/prioritize.wf.md +223 -0
  21. data/handbook/workflow-instructions/idea/review.wf.md +93 -0
  22. data/lib/ace/idea/atoms/idea_file_pattern.rb +40 -0
  23. data/lib/ace/idea/atoms/idea_frontmatter_defaults.rb +39 -0
  24. data/lib/ace/idea/atoms/idea_id_formatter.rb +37 -0
  25. data/lib/ace/idea/atoms/idea_validation_rules.rb +89 -0
  26. data/lib/ace/idea/atoms/slug_sanitizer_adapter.rb +6 -0
  27. data/lib/ace/idea/cli/commands/create.rb +98 -0
  28. data/lib/ace/idea/cli/commands/doctor.rb +206 -0
  29. data/lib/ace/idea/cli/commands/list.rb +62 -0
  30. data/lib/ace/idea/cli/commands/show.rb +55 -0
  31. data/lib/ace/idea/cli/commands/status.rb +61 -0
  32. data/lib/ace/idea/cli/commands/update.rb +118 -0
  33. data/lib/ace/idea/cli.rb +75 -0
  34. data/lib/ace/idea/models/idea.rb +39 -0
  35. data/lib/ace/idea/molecules/idea_clipboard_reader.rb +117 -0
  36. data/lib/ace/idea/molecules/idea_config_loader.rb +93 -0
  37. data/lib/ace/idea/molecules/idea_creator.rb +248 -0
  38. data/lib/ace/idea/molecules/idea_display_formatter.rb +165 -0
  39. data/lib/ace/idea/molecules/idea_doctor_fixer.rb +504 -0
  40. data/lib/ace/idea/molecules/idea_doctor_reporter.rb +264 -0
  41. data/lib/ace/idea/molecules/idea_frontmatter_validator.rb +137 -0
  42. data/lib/ace/idea/molecules/idea_llm_enhancer.rb +177 -0
  43. data/lib/ace/idea/molecules/idea_loader.rb +124 -0
  44. data/lib/ace/idea/molecules/idea_mover.rb +78 -0
  45. data/lib/ace/idea/molecules/idea_resolver.rb +57 -0
  46. data/lib/ace/idea/molecules/idea_scanner.rb +56 -0
  47. data/lib/ace/idea/molecules/idea_structure_validator.rb +157 -0
  48. data/lib/ace/idea/organisms/idea_doctor.rb +207 -0
  49. data/lib/ace/idea/organisms/idea_manager.rb +251 -0
  50. data/lib/ace/idea/version.rb +7 -0
  51. data/lib/ace/idea.rb +37 -0
  52. metadata +166 -0
data/docs/handbook.md ADDED
@@ -0,0 +1,39 @@
1
+ ---
2
+ doc-type: user
3
+ title: ace-idea Handbook Catalog
4
+ purpose: Catalog of ace-idea workflows and skills
5
+ ace-docs:
6
+ last-updated: 2026-03-22
7
+ last-checked: 2026-03-22
8
+ ---
9
+
10
+ # ace-idea Handbook Catalog
11
+
12
+ Reference for package-owned handbook resources in `ace-idea/handbook/`.
13
+
14
+ ## Skills
15
+
16
+ | Skill | What it does |
17
+ |------|---------------|
18
+ | `as-idea-capture` | Capture a development idea into a structured idea file |
19
+ | `as-idea-capture-features` | Document application features from a user perspective |
20
+ | `as-idea-review` | Review idea clarity, scope, and readiness before task creation |
21
+
22
+ ## Workflow Instructions
23
+
24
+ | Protocol Path | Purpose | Invoked by |
25
+ |------|---------|------------|
26
+ | `wfi://idea/capture` | Capture raw ideas from text or clipboard and store them as structured idea files | `as-idea-capture` |
27
+ | `wfi://idea/capture-features` | Document application features from a user perspective | `as-idea-capture-features` |
28
+ | `wfi://idea/review` | Critically review ideas for clarity, impact, and execution readiness | `as-idea-review` |
29
+ | `wfi://idea/prioritize` | Prioritize and align ideas with current project architecture | Direct via `ace-bundle` |
30
+
31
+ ## Agents
32
+
33
+ * None currently shipped in this package.
34
+
35
+ ## Related Docs
36
+
37
+ * [Getting Started](getting-started.md)
38
+ * [CLI Usage Reference](usage.md)
39
+ * Load workflows directly with `ace-bundle wfi://idea/capture`
data/docs/usage.md ADDED
@@ -0,0 +1,320 @@
1
+ ---
2
+ doc-type: user
3
+ title: ace-idea CLI Usage Reference
4
+ purpose: Command reference for ace-idea
5
+ ace-docs:
6
+ last-updated: 2026-03-22
7
+ last-checked: 2026-03-22
8
+ ---
9
+
10
+ # ace-idea CLI Usage Reference
11
+
12
+ Reference for `ace-idea` commands, options, and everyday workflows.
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ gem install ace-idea
18
+ ```
19
+
20
+ ## Command Overview
21
+
22
+ `ace-idea` ships six workflow commands:
23
+
24
+ * `create` captures a new idea from text or clipboard input
25
+ * `show` prints one idea by short or full ID
26
+ * `list` filters ideas by folder, status, tags, or generic field filters
27
+ * `update` edits frontmatter fields and folder placement
28
+ * `doctor` checks idea storage and metadata health
29
+ * `status` shows up-next and recently-done summaries
30
+
31
+ Run `ace-idea --help` for the top-level command list. Use `ace-idea version` when you only need the installed version.
32
+
33
+ ## Quick Start
34
+
35
+ Capture one idea, review it, and move it into your next queue:
36
+
37
+ ```bash
38
+ ace-idea create "Dark mode for night coding" --title "Dark mode"
39
+ ace-idea list
40
+ ace-idea update q7w --move-to next
41
+ ace-idea status
42
+ ```
43
+
44
+ Success looks like a new folder appearing in `.ace-ideas/`, a matching ID in list output, and the idea moving into the
45
+ root-scope `next` queue after the update.
46
+
47
+ ## Common Scenarios
48
+
49
+ ### Scenario 1: Capture from Clipboard and Expand It
50
+
51
+ **Goal:** Turn a copied note into a structured idea file.
52
+
53
+ ```bash
54
+ ace-idea create --clipboard --llm-enhance
55
+ ```
56
+
57
+ **Expected output:**
58
+
59
+ ```text
60
+ Idea created: 8ppq7w Dark mode
61
+ Path: /path/to/project/.ace-ideas/8ppq7w-dark-mode/8ppq7w-dark-mode.idea.s.md
62
+ ```
63
+
64
+ ### Scenario 2: Move an Idea Through GTD-Style Folders
65
+
66
+ **Goal:** Keep active ideas separate from maybe-later work.
67
+
68
+ ```bash
69
+ ace-idea update q7w --move-to next
70
+ ace-idea update q7w --move-to maybe
71
+ ace-idea update q7w --move-to root
72
+ ```
73
+
74
+ **Expected output:**
75
+
76
+ ```text
77
+ Idea updated: 8ppq7w Dark mode -> root
78
+ ```
79
+
80
+ ### Scenario 3: Audit the Idea Store
81
+
82
+ **Goal:** Find broken structure or metadata before ideas drift.
83
+
84
+ ```bash
85
+ ace-idea doctor --auto-fix --dry-run
86
+ ace-idea status --up-next-limit 5
87
+ ```
88
+
89
+ ## Commands
90
+
91
+ ### `ace-idea create [CONTENT]`
92
+
93
+ Create a new idea from direct text or clipboard input.
94
+
95
+ **Syntax:**
96
+
97
+ ```bash
98
+ ace-idea create [CONTENT] [options]
99
+ ```
100
+
101
+ **Options:**
102
+
103
+ * `--title`, `-t` - Explicit title for the new idea
104
+ * `--tags`, `-T` - Comma-separated tags
105
+ * `--move-to`, `-m` - Place the idea in a named folder (e.g. `maybe`, `review`, `archive`) or `next` for root
106
+ * `--clipboard`, `-c` - Read idea content from the system clipboard
107
+ * `--llm-enhance`, `-l` - Expand or refine the captured content with the configured LLM
108
+ * `--dry-run`, `-n` - Preview the capture without writing files
109
+ * `--git-commit`, `--gc` - Commit the created idea automatically
110
+ * `--quiet`, `-q` - Suppress non-essential output
111
+ * `--verbose`, `-v` - Show verbose output
112
+ * `--debug`, `-d` - Show debug output
113
+
114
+ **Examples:**
115
+
116
+ ```bash
117
+ ace-idea create "My idea"
118
+ ace-idea create "Dark mode" --title "Dark mode" --tags ux,design
119
+ ace-idea create --clipboard --llm-enhance --move-to maybe
120
+ ace-idea create "Rough note" --dry-run
121
+ ```
122
+
123
+ ### `ace-idea show REF`
124
+
125
+ Display one idea by full 6-character ID or 3-character shortcut.
126
+
127
+ **Syntax:**
128
+
129
+ ```bash
130
+ ace-idea show REF [options]
131
+ ```
132
+
133
+ **Options:**
134
+
135
+ * `--path` - Print only the file path
136
+ * `--content` - Print the raw markdown content
137
+ * `--quiet`, `-q` - Suppress non-essential output
138
+ * `--verbose`, `-v` - Show verbose output
139
+ * `--debug`, `-d` - Show debug output
140
+
141
+ **Examples:**
142
+
143
+ ```bash
144
+ ace-idea show q7w
145
+ ace-idea show 8ppq7w --path
146
+ ace-idea show q7w --content
147
+ ```
148
+
149
+ ### `ace-idea list`
150
+
151
+ List ideas with folder, status, tag, or generic field filters.
152
+
153
+ **Syntax:**
154
+
155
+ ```bash
156
+ ace-idea list [options]
157
+ ```
158
+
159
+ **Options:**
160
+
161
+ * `--status`, `-s` - Filter by status: `pending`, `in-progress`, `done`, `obsolete`
162
+ * `--tags`, `-T` - Filter by comma-separated tags
163
+ * `--in`, `-i` - Filter by folder: `next`, `all`, `maybe`, `anytime`, `archive`
164
+ * `--root`, `-r` - Override the root path within the ideas tree
165
+ * `--filter`, `-f` - Repeatable `key:value` filter, including `a|b` and negation forms
166
+ * `--quiet`, `-q` - Suppress non-essential output
167
+ * `--verbose`, `-v` - Show verbose output
168
+ * `--debug`, `-d` - Show debug output
169
+
170
+ **Examples:**
171
+
172
+ ```bash
173
+ ace-idea list
174
+ ace-idea list --in maybe
175
+ ace-idea list --status pending --tags ux,design
176
+ ace-idea list --filter status:pending --filter tags:ux|design
177
+ ```
178
+
179
+ ### `ace-idea update REF`
180
+
181
+ Update idea frontmatter and folder placement.
182
+
183
+ **Syntax:**
184
+
185
+ ```bash
186
+ ace-idea update REF [options]
187
+ ```
188
+
189
+ **Options:**
190
+
191
+ * `--set` - Set a scalar field with `key=value`
192
+ * `--add` - Add a value to an array field with `key=value`
193
+ * `--remove` - Remove a value from an array field with `key=value`
194
+ * `--move-to`, `-m` - Move the idea to any named folder (e.g. `archive`, `maybe`, `review`) or `next`/`root` for top-level
195
+ * `--git-commit`, `--gc` - Commit the update automatically
196
+ * `--quiet`, `-q` - Suppress non-essential output
197
+ * `--verbose`, `-v` - Show verbose output
198
+ * `--debug`, `-d` - Show debug output
199
+
200
+ **Examples:**
201
+
202
+ ```bash
203
+ ace-idea update q7w --set status=done
204
+ ace-idea update q7w --set status=in-progress --add tags=research
205
+ ace-idea update q7w --remove tags=research --move-to next
206
+ ace-idea update q7w --move-to archive
207
+ ```
208
+
209
+ ### `ace-idea doctor`
210
+
211
+ Run health checks across the idea store.
212
+
213
+ **Syntax:**
214
+
215
+ ```bash
216
+ ace-idea doctor [options]
217
+ ```
218
+
219
+ **Options:**
220
+
221
+ * `--quiet`, `-q` - Exit silently unless the check fails
222
+ * `--verbose`, `-v` - Show warnings and additional detail
223
+ * `--auto-fix`, `-f` - Apply safe fixes after confirmation
224
+ * `--auto-fix-with-agent` - Apply safe fixes and then launch an agent for the remaining issues
225
+ * `--model` - Provider/model override for agent-assisted fixes
226
+ * `--errors-only` - Hide warnings and show only errors
227
+ * `--no-color` - Disable ANSI colors
228
+ * `--json` - Emit JSON output
229
+ * `--dry-run`, `-n` - Preview fixes without writing changes
230
+ * `--check` - Restrict checks to `frontmatter`, `structure`, or `scope`
231
+
232
+ **Examples:**
233
+
234
+ ```bash
235
+ ace-idea doctor
236
+ ace-idea doctor --auto-fix --dry-run
237
+ ace-idea doctor --check frontmatter --json
238
+ ```
239
+
240
+ ### `ace-idea status`
241
+
242
+ Show a dashboard view of up-next and recently completed ideas.
243
+
244
+ **Syntax:**
245
+
246
+ ```bash
247
+ ace-idea status [options]
248
+ ```
249
+
250
+ **Options:**
251
+
252
+ * `--up-next-limit` - Maximum items to show in the up-next section
253
+ * `--recently-done-limit` - Maximum items to show in the recently-done section
254
+
255
+ **Examples:**
256
+
257
+ ```bash
258
+ ace-idea status
259
+ ace-idea status --up-next-limit 5
260
+ ace-idea status --recently-done-limit 3
261
+ ```
262
+
263
+ **Expected output:**
264
+
265
+ ```text
266
+ Up Next:
267
+ ○ 8ppq7w Dark mode
268
+ ○ 8rrab4 API rate limiting
269
+
270
+ Ideas: ○ 3 | ✓ 2 • 5 total
271
+
272
+ Recently Done:
273
+ ✓ 8nn1k2 Onboarding flow (2d ago)
274
+ ✓ 8mm3j1 Error page redesign (5d ago)
275
+ ```
276
+
277
+ ## Storage Notes
278
+
279
+ By default, ideas are stored in `.ace-ideas/` under the current directory. Each idea gets its own folder and spec file:
280
+
281
+ ```text
282
+ .ace-ideas/
283
+ 8ppq7w-dark-mode/
284
+ 8ppq7w-dark-mode.idea.s.md
285
+ ```
286
+
287
+ Special folders such as `_maybe`, `_anytime`, and `_archive` sit under the same root and are managed through
288
+ `ace-idea update --move-to ...`. The `next` queue is the virtual root-only view, so `ace-idea update --move-to next`
289
+ returns an idea to the root and `ace-idea list --in next` filters for root-scope ideas.
290
+
291
+ ## Troubleshooting
292
+
293
+ ### Problem: `ace-idea create` says no content was provided
294
+
295
+ **Symptom:** You ran `create` with no positional text and no `--clipboard`.
296
+
297
+ **Solution:**
298
+
299
+ ```bash
300
+ ace-idea create "Your idea text here"
301
+ ```
302
+
303
+ ### Problem: Clipboard capture fails
304
+
305
+ **Symptom:** `--clipboard` cannot read copied content on your system.
306
+
307
+ **Solution:** Fall back to direct text input or install the clipboard support expected by your environment.
308
+
309
+ ### Problem: An idea cannot be found by shortcut
310
+
311
+ **Symptom:** `ace-idea show q7w` or `ace-idea update q7w ...` reports that the idea does not exist.
312
+
313
+ **Solution:** Use `ace-idea list --in all` to confirm the idea ID and folder placement, then retry with the full 6-character
314
+ ID if needed.
315
+
316
+ ### Problem: `ace-idea doctor` says the idea directory is missing
317
+
318
+ **Symptom:** The configured ideas root does not exist yet.
319
+
320
+ **Solution:** Create an idea first or set `idea.root_dir` in config before running `doctor`.
data/exe/ace-idea ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative "../lib/ace/idea"
5
+ require_relative "../lib/ace/idea/cli"
6
+
7
+ # No args → show help
8
+ args = ARGV.empty? ? ["--help"] : ARGV
9
+
10
+ # Handle SIGINT with exit code 130
11
+ trap("INT") { exit 130 }
12
+
13
+ # Start ace-support-cli with exception-based exit code handling (per ADR-023)
14
+ begin
15
+ Ace::Idea::IdeaCLI.start(args)
16
+ rescue Ace::Support::Cli::Error => e
17
+ warn e.message
18
+ exit(e.exit_code)
19
+ rescue ArgumentError => e
20
+ warn "Error: #{e.message}"
21
+ exit(1)
22
+ end
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: as-idea-capture
3
+ description: Capture development idea to structured idea file with tags
4
+ # bundle: wfi://idea/capture
5
+ # context: no-fork
6
+ # agent: general-purpose
7
+ user-invocable: true
8
+ allowed-tools:
9
+ - Bash(ace-task:*)
10
+ - Bash(ace-idea:*)
11
+ - Bash(ace-bundle:*)
12
+ - Bash(ace-git-commit:*)
13
+ - Write
14
+ - TodoWrite
15
+ argument-hint: [idea-description]
16
+ last_modified: 2026-01-10
17
+ source: ace-idea
18
+ skill:
19
+ kind: workflow
20
+ execution:
21
+ workflow: wfi://idea/capture
22
+
23
+ ---
24
+
25
+ Load and run `ace-bundle wfi://idea/capture` in the current project, then follow the loaded workflow as the source of truth and execute it end-to-end instead of only summarizing it.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: as-idea-capture-features
3
+ description: Capture Application Features
4
+ # bundle: wfi://idea/capture-features
5
+ # context: no-fork
6
+ # agent: Explore
7
+ user-invocable: true
8
+ allowed-tools:
9
+ - Bash(ace-task:*)
10
+ - Bash(ace-bundle:*)
11
+ - Bash(ace-git-commit:*)
12
+ - Read
13
+ - Write
14
+ - Edit
15
+ - TodoWrite
16
+ argument-hint: [app-path]
17
+ last_modified: 2026-01-10
18
+ source: ace-idea
19
+ skill:
20
+ kind: workflow
21
+ execution:
22
+ workflow: wfi://idea/capture-features
23
+
24
+ ---
25
+
26
+ Load and run `ace-bundle wfi://idea/capture-features` in the current project, then follow the loaded workflow as the source of truth and execute it end-to-end instead of only summarizing it.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: as-idea-review
3
+ description: Critically review ideas for clarity, feasibility, and readiness for task creation
4
+ # bundle: wfi://idea/review
5
+ # context: no-fork
6
+ # agent: general-purpose
7
+ user-invocable: true
8
+ allowed-tools:
9
+ - Bash(ace-idea:*)
10
+ - Bash(ace-task:*)
11
+ - Bash(ace-bundle:*)
12
+ - Read
13
+ - Write
14
+ - Edit
15
+ - MultiEdit
16
+ - TodoWrite
17
+ argument-hint: [idea-id]
18
+ last_modified: 2026-03-12
19
+ source: ace-idea
20
+ skill:
21
+ kind: workflow
22
+ execution:
23
+ workflow: wfi://idea/review
24
+ ---
25
+
26
+ Load and run `ace-bundle wfi://idea/review` in the current project, then follow the loaded workflow as the source of truth and execute it end-to-end instead of only summarizing it.
@@ -0,0 +1,243 @@
1
+ ---
2
+ doc-type: workflow
3
+ title: Capture Application Features
4
+ purpose: Documentation for ace-idea/handbook/workflow-instructions/idea/capture-features.wf.md
5
+ ace-docs:
6
+ last-updated: 2026-03-01
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # Capture Application Features
11
+
12
+ ## Goal
13
+
14
+ Document application features from a user perspective to ensure clarity for developers, product managers, QA engineers, and content editors.
15
+
16
+ ## Prerequisites
17
+
18
+ * Understanding of the application's user interface and functionality
19
+ * Access to the application or its design documentation
20
+ * Knowledge of user interaction patterns and workflows
21
+ * Familiarity with tracking and analytics requirements
22
+
23
+ ## Project Context Loading
24
+
25
+ * Load workflow standards: `ace-nav guide://workflow-instructions-definition`
26
+ * Load template embedding guide: `ace-nav guide://template-embedding`
27
+ * Review existing feature documentation patterns if available
28
+
29
+ ## Process Steps
30
+
31
+ 1. **Identify the Feature or Section:**
32
+ * Name the feature or page section (e.g., Hero Banner, Blog List, User Dashboard)
33
+ * Write a one-line purpose statement describing its value to users
34
+ * Note technical dependencies (CMS fields, APIs, static assets, databases)
35
+
36
+ **Validation:**
37
+ * Feature name is clear and consistent with existing nomenclature
38
+ * Purpose statement answers "what value does this provide to users?"
39
+
40
+ 2. **Document Structure and Components:**
41
+ * List all UI components and subsections within the feature
42
+ * Mark each component as required or optional
43
+ * Include field types, data sources, and display conditions
44
+ * Document responsive behavior across device types
45
+
46
+ **Example Format:**
47
+ ```markdown
48
+ **Components:**
49
+ - Header text (required) - CMS field: `hero_title`
50
+ - Subheading (optional) - CMS field: `hero_subtitle`
51
+ - Background image (required) - Asset: `hero_background`
52
+ - CTA button (optional) - Links to: `cta_url`
53
+ ```
54
+
55
+ 3. **Capture User Interactions:**
56
+ * Document all interactive elements using action → reaction format
57
+ * Include state changes and feedback mechanisms
58
+ * Note any conditional logic or personalization rules
59
+
60
+ **Interaction Pattern:**
61
+ ```markdown
62
+ - Click "Learn More" button → Navigate to detailed page
63
+ - Hover over image → Display caption overlay
64
+ - Submit form → Show success message and redirect
65
+ ```
66
+
67
+ 4. **Define Tracking and Analytics:**
68
+ * Specify all tracking events using consistent naming (snake_case)
69
+ * Include event parameters and data attributes
70
+ * Document when each event fires
71
+
72
+ **Tracking Format:**
73
+ ```markdown
74
+ **Tracking Events:**
75
+ - `hero_cta_clicked` — User clicks main CTA [section_id, cta_text]
76
+ - `blog_article_viewed` — Article enters viewport [article_id, position]
77
+ - `form_submission_started` — User begins form [form_id, source]
78
+ ```
79
+
80
+ 5. **Document States and Variations:**
81
+ * Identify all possible states for the feature
82
+ * Describe expected behavior in each state
83
+ * Include error handling and edge cases
84
+
85
+ **State Documentation:**
86
+ ```markdown
87
+ **States:**
88
+ - Loading: Display skeleton loader with animations
89
+ - Empty: Show helpful message with action suggestions
90
+ - Error: Display error message with retry option
91
+ - Success: Show confirmation with next steps
92
+ ```
93
+
94
+ 6. **Capture Business Rules:**
95
+ * Document any conditional display logic
96
+ * Note permission requirements or user role restrictions
97
+ * Include time-based or geographic variations
98
+
99
+ **Example Rules:**
100
+ ```markdown
101
+ **Display Rules:**
102
+ - Show only to logged-in users with active subscription
103
+ - Display between 9 AM - 5 PM user's local time
104
+ - Hide on mobile devices under 375px width
105
+ ```
106
+
107
+ 7. **Create Feature Documentation:**
108
+ * Use the embedded template structure below
109
+ * Save in appropriate documentation location
110
+ * Include screenshots or mockups if available
111
+ * Cross-reference with technical implementation docs
112
+
113
+ ## Embedded Templates and Examples
114
+
115
+ <templates>
116
+ <template path="feature-documentation-template.md">
117
+ # Feature: [Feature Name]
118
+
119
+ ## Overview
120
+ **Purpose:** [One sentence describing the feature's value to users]
121
+ **Location:** [Where in the application this appears]
122
+ **User Types:** [Which users see/use this feature]
123
+
124
+ ## Structure
125
+
126
+ ### Components
127
+ - **[Component Name]** ([required/optional])
128
+ - Type: [text/image/button/form/etc.]
129
+ - Source: [CMS field/API/static]
130
+ - Description: [What it displays or does]
131
+
132
+ ### Layout
133
+ [Describe the visual arrangement and responsive behavior]
134
+
135
+ ## User Interactions
136
+
137
+ | Action | System Response | Notes |
138
+ |--------|----------------|-------|
139
+ | [User action] | [What happens] | [Additional context] |
140
+
141
+ ## Tracking & Analytics
142
+
143
+ ### Events
144
+ | Event Name | Trigger | Parameters |
145
+ |------------|---------|------------|
146
+ | `[event_name]` | [When it fires] | [Data sent] |
147
+
148
+ ### Metrics
149
+ - [Key metric 1]: [How measured]
150
+ - [Key metric 2]: [How measured]
151
+
152
+ ## States & Variations
153
+
154
+ ### States
155
+ - **Default:** [Normal display state]
156
+ - **Loading:** [What shows while loading]
157
+ - **Empty:** [No data available]
158
+ - **Error:** [Error handling]
159
+
160
+ ### Variations
161
+ - **[Variation name]:** [When shown and differences]
162
+
163
+ ## Business Rules
164
+ - [Rule 1]: [Condition and behavior]
165
+ - [Rule 2]: [Condition and behavior]
166
+
167
+ ## Technical Notes
168
+ - **Dependencies:** [Required services/data]
169
+ - **Performance:** [Loading considerations]
170
+ - **Accessibility:** [WCAG compliance notes]
171
+
172
+ ## Examples
173
+
174
+ ### Scenario 1: [Common Use Case]
175
+ [Step-by-step user journey]
176
+
177
+ ### Scenario 2: [Edge Case]
178
+ [How system handles unusual situation]
179
+
180
+ ## Related Documentation
181
+ - [Link to design specs]
182
+ - [Link to API docs]
183
+ - [Link to implementation guide]
184
+ </template>
185
+
186
+ <template path="quick-feature-capture.md">
187
+ ### Section: [Name]
188
+ **Purpose:** [one sentence describing user value]
189
+
190
+ **Components:**
191
+ - [component 1] (required/optional) - [source/type]
192
+ - [component 2] (required/optional) - [source/type]
193
+
194
+ **User Interactions:**
195
+ - [action] → [reaction]
196
+ - [action] → [reaction]
197
+
198
+ **Tracking Events:**
199
+ - `[event_name]` — [trigger] [parameters]
200
+
201
+ **States:**
202
+ - [state]: [description]
203
+ - [state]: [description]
204
+ </template>
205
+ </templates>
206
+
207
+ ## Success Criteria
208
+
209
+ * Feature documentation captures all user-facing aspects
210
+ * Interactive elements and their behaviors are clearly defined
211
+ * Tracking events follow consistent naming conventions
212
+ * All states and error conditions are documented
213
+ * Business rules and display logic are explicit
214
+ * Documentation is accessible to both technical and non-technical stakeholders
215
+ * Cross-references to implementation details are included
216
+
217
+ ## Error Handling
218
+
219
+ **Missing Information:**
220
+ * **Symptoms:** Unable to determine feature behavior or requirements
221
+ * **Solution:** Interview stakeholders, review designs, or test the live feature
222
+
223
+ **Inconsistent Naming:**
224
+ * **Symptoms:** Same feature called different names in different contexts
225
+ * **Solution:** Establish naming conventions and update all references
226
+
227
+ **Unclear User Value:**
228
+ * **Symptoms:** Cannot articulate why users need this feature
229
+ * **Solution:** Conduct user research or review product requirements
230
+
231
+ ## Usage Example
232
+
233
+ > "Document the blog listing page that shows articles from our CMS, including the hero section, article cards, pagination, and newsletter signup."
234
+
235
+ Following this workflow would produce:
236
+
237
+ 1. Identify each section (hero, article list, pagination, newsletter)
238
+ 2. Document components (titles, images, buttons, forms)
239
+ 3. Map interactions (click to read, page navigation, form submission)
240
+ 4. Define tracking (article_clicked, page_viewed, newsletter_subscribed)
241
+ 5. Document states (loading articles, no results, pagination limits)
242
+ 6. Capture rules (articles per page, sort order, filtering)
243
+ 7. Create comprehensive feature documentation using the template