@dccxx/auggiegw 1.0.24 → 1.0.26

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 (38) hide show
  1. package/.opencode/command/opsx-apply.md +149 -0
  2. package/.opencode/command/opsx-archive.md +154 -0
  3. package/.opencode/command/opsx-bulk-archive.md +239 -0
  4. package/.opencode/command/opsx-continue.md +111 -0
  5. package/.opencode/command/opsx-explore.md +171 -0
  6. package/.opencode/command/opsx-ff.md +91 -0
  7. package/.opencode/command/opsx-new.md +66 -0
  8. package/.opencode/command/opsx-onboard.md +522 -0
  9. package/.opencode/command/opsx-sync.md +131 -0
  10. package/.opencode/command/opsx-verify.md +161 -0
  11. package/.opencode/skills/openspec-apply-change/SKILL.md +156 -0
  12. package/.opencode/skills/openspec-archive-change/SKILL.md +114 -0
  13. package/.opencode/skills/openspec-bulk-archive-change/SKILL.md +246 -0
  14. package/.opencode/skills/openspec-continue-change/SKILL.md +118 -0
  15. package/.opencode/skills/openspec-explore/SKILL.md +290 -0
  16. package/.opencode/skills/openspec-ff-change/SKILL.md +101 -0
  17. package/.opencode/skills/openspec-new-change/SKILL.md +74 -0
  18. package/.opencode/skills/openspec-onboard/SKILL.md +529 -0
  19. package/.opencode/skills/openspec-sync-specs/SKILL.md +138 -0
  20. package/.opencode/skills/openspec-verify-change/SKILL.md +168 -0
  21. package/dist/cli.js +1187 -65
  22. package/openspec/changes/archive/2026-02-01-add-kit-install-prompts/.openspec.yaml +2 -0
  23. package/openspec/changes/archive/2026-02-01-add-kit-install-prompts/design.md +113 -0
  24. package/openspec/changes/archive/2026-02-01-add-kit-install-prompts/proposal.md +28 -0
  25. package/openspec/changes/archive/2026-02-01-add-kit-install-prompts/specs/kit-command/spec.md +107 -0
  26. package/openspec/changes/archive/2026-02-01-add-kit-install-prompts/specs/kit-install-prompts/spec.md +90 -0
  27. package/openspec/changes/archive/2026-02-01-add-kit-install-prompts/tasks.md +62 -0
  28. package/openspec/changes/archive/2026-02-01-add-opencode-agent-support/.openspec.yaml +2 -0
  29. package/openspec/changes/archive/2026-02-01-add-opencode-agent-support/design.md +131 -0
  30. package/openspec/changes/archive/2026-02-01-add-opencode-agent-support/proposal.md +35 -0
  31. package/openspec/changes/archive/2026-02-01-add-opencode-agent-support/specs/kit-command/spec.md +157 -0
  32. package/openspec/changes/archive/2026-02-01-add-opencode-agent-support/specs/opencode-agent-support/spec.md +65 -0
  33. package/openspec/changes/archive/2026-02-01-add-opencode-agent-support/tasks.md +54 -0
  34. package/openspec/config.yaml +20 -0
  35. package/package.json +2 -1
  36. package/specs/kit-command/spec.md +157 -0
  37. package/specs/kit-install-prompts/spec.md +90 -0
  38. package/specs/opencode-agent-support/spec.md +65 -0
@@ -0,0 +1,157 @@
1
+ ## MODIFIED Requirements
2
+
3
+ ### Requirement: Command Invocation
4
+ WHEN the user runs `auggiegw kit <kit-id>`, THE SYSTEM SHALL prompt the user to select target AI tool (including OpenCode) and installation scope, then fetch the kit from the public API endpoint.
5
+
6
+ #### Scenario: User runs kit command without flags
7
+ - **WHEN** user runs `auggiegw kit <kit-id>` without any flags
8
+ - **THEN** system displays interactive prompt for target selection with options: Claude, Augment, OpenCode, Both
9
+ - **THEN** system displays interactive prompt for scope selection
10
+ - **THEN** system fetches the kit from the public API endpoint
11
+
12
+ #### Scenario: User runs kit command with flags
13
+ - **WHEN** user runs `auggiegw kit <kit-id> --target claude --scope user`
14
+ - **THEN** system skips prompts and uses provided flag values
15
+ - **THEN** system fetches the kit from the public API endpoint
16
+
17
+ #### Scenario: User selects OpenCode target via flag
18
+ - **WHEN** user runs `auggiegw kit <kit-id> --target opencode`
19
+ - **THEN** system skips target prompt and uses OpenCode as target
20
+ - **THEN** system displays interactive prompt for scope selection
21
+ - **THEN** system fetches the kit from the public API endpoint
22
+
23
+ #### Scenario: User selects multiple targets via flag
24
+ - **WHEN** user runs `auggiegw kit <kit-id> --target claude,opencode`
25
+ - **THEN** system parses comma-separated targets
26
+ - **THEN** system installs to both Claude and OpenCode
27
+ - **THEN** system fetches the kit from the public API endpoint
28
+
29
+ #### Scenario: Missing kit-id argument
30
+ - **WHEN** kit-id argument is missing
31
+ - **THEN** system displays "Error: Kit ID is required" and usage message, and exits with code 1
32
+
33
+ ### Requirement: Prompt Installation
34
+ WHEN processing prompts, THE SYSTEM SHALL create the target directories based on user selection (including OpenCode) and save markdown files with YAML frontmatter to the selected locations.
35
+
36
+ #### Scenario: Install prompts to Claude user level
37
+ - **WHEN** user selects target "Claude" and scope "User level"
38
+ - **THEN** system creates directory `~/.claude/commands/` if it does not exist
39
+ - **THEN** for each prompt in the kit, system saves a markdown file to `~/.claude/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
40
+
41
+ #### Scenario: Install prompts to Augment project level
42
+ - **WHEN** user selects target "Augment" and scope "Project level"
43
+ - **THEN** system creates directory `./.augment/commands/` if it does not exist
44
+ - **THEN** for each prompt in the kit, system saves a markdown file to `./.augment/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
45
+
46
+ #### Scenario: Install prompts to OpenCode user level
47
+ - **WHEN** user selects target "OpenCode" and scope "User level"
48
+ - **THEN** system creates directory `~/.config/opencode/commands/` if it does not exist
49
+ - **THEN** for each prompt in the kit, system saves a markdown file to `~/.config/opencode/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
50
+
51
+ #### Scenario: Install prompts to OpenCode project level
52
+ - **WHEN** user selects target "OpenCode" and scope "Project level"
53
+ - **THEN** system creates directory `./.opencode/commands/` if it does not exist
54
+ - **THEN** for each prompt in the kit, system saves a markdown file to `./.opencode/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
55
+
56
+ #### Scenario: Install prompts to both targets at user level
57
+ - **WHEN** user selects target "Both" and scope "User level"
58
+ - **THEN** system creates directories `~/.augment/commands/` and `~/.claude/commands/` if they do not exist
59
+ - **THEN** for each prompt in the kit, system saves markdown files to both `~/.augment/commands/{command}.md` and `~/.claude/commands/{command}.md`
60
+
61
+ #### Scenario: Install prompts to multiple targets including OpenCode
62
+ - **WHEN** user selects targets "Claude" and "OpenCode" via comma-separated flag and scope "User level"
63
+ - **THEN** system creates directories `~/.claude/commands/` and `~/.config/opencode/commands/` if they do not exist
64
+ - **THEN** for each prompt in the kit, system saves markdown files to both directories
65
+
66
+ #### Scenario: Overwrite existing prompt files
67
+ - **WHEN** a prompt file with the same filename already exists
68
+ - **THEN** system overwrites the existing file without confirmation
69
+
70
+ #### Scenario: Prompt file save failure
71
+ - **WHEN** a prompt file fails to save
72
+ - **THEN** system throws an error with message "Failed to save prompt file for command '{command}': {error}"
73
+
74
+ #### Scenario: Partial save failure with multiple targets
75
+ - **WHEN** user selects multiple targets and a prompt file fails to save to one directory
76
+ - **THEN** system still attempts to save to the other directories before throwing an error
77
+
78
+ ### Requirement: Subagent Installation
79
+ WHEN processing subagents, THE SYSTEM SHALL create the target directories based on user selection (including OpenCode) and save markdown files with appropriate YAML frontmatter to the selected locations.
80
+
81
+ #### Scenario: Install subagents to Claude user level
82
+ - **WHEN** user selects target "Claude" and scope "User level"
83
+ - **THEN** system creates directory `~/.claude/agents/` if it does not exist
84
+ - **THEN** for each subagent in the kit, system saves a markdown file to `~/.claude/agents/{name}.md` with YAML frontmatter containing `name`, `description`, `model`, and `color` fields
85
+
86
+ #### Scenario: Install subagents to Augment project level
87
+ - **WHEN** user selects target "Augment" and scope "Project level"
88
+ - **THEN** system creates directory `./.augment/agents/` if it does not exist
89
+ - **THEN** for each subagent in the kit, system saves a markdown file to `./.augment/agents/{name}.md` with YAML frontmatter containing `name`, `description`, `model`, and `color` fields
90
+
91
+ #### Scenario: Install subagents to OpenCode user level
92
+ - **WHEN** user selects target "OpenCode" and scope "User level"
93
+ - **THEN** system creates directory `~/.config/opencode/agents/` if it does not exist
94
+ - **THEN** for each subagent in the kit, system saves a markdown file to `~/.config/opencode/agents/{name}.md` with YAML frontmatter containing `mode: subagent`, `name`, `description`, and `color` fields
95
+ - **THEN** system excludes `model` field from YAML frontmatter
96
+
97
+ #### Scenario: Install subagents to OpenCode project level
98
+ - **WHEN** user selects target "OpenCode" and scope "Project level"
99
+ - **THEN** system creates directory `./.opencode/agents/` if it does not exist
100
+ - **THEN** for each subagent in the kit, system saves a markdown file to `./.opencode/agents/{name}.md` with YAML frontmatter containing `mode: subagent`, `name`, `description`, and `color` fields
101
+ - **THEN** system excludes `model` field from YAML frontmatter
102
+
103
+ #### Scenario: Install subagents to both targets at user level
104
+ - **WHEN** user selects target "Both" and scope "User level"
105
+ - **THEN** system creates directories `~/.augment/agents/` and `~/.claude/agents/` if they do not exist
106
+ - **THEN** for each subagent in the kit, system saves markdown files to both `~/.augment/agents/{name}.md` and `~/.claude/agents/{name}.md`
107
+
108
+ #### Scenario: Install subagents to multiple targets including OpenCode
109
+ - **WHEN** user selects targets "Augment" and "OpenCode" via comma-separated flag and scope "User level"
110
+ - **THEN** system creates directories `~/.augment/agents/` and `~/.config/opencode/agents/` if they do not exist
111
+ - **THEN** for Augment target, system saves with `model` field in YAML frontmatter
112
+ - **THEN** for OpenCode target, system saves with `mode: subagent` field and excludes `model` field
113
+
114
+ #### Scenario: Overwrite existing subagent files
115
+ - **WHEN** a subagent file with the same filename already exists
116
+ - **THEN** system overwrites the existing file without confirmation
117
+
118
+ #### Scenario: Subagent file save failure
119
+ - **WHEN** a subagent file fails to save
120
+ - **THEN** system throws an error with message "Failed to save subagent file for '{name}': {error}"
121
+
122
+ #### Scenario: Partial save failure with multiple targets
123
+ - **WHEN** user selects multiple targets and a subagent file fails to save to one directory
124
+ - **THEN** system still attempts to save to the other directories before throwing an error
125
+
126
+ ### Requirement: User Feedback
127
+ WHILE fetching and installing the kit, THE SYSTEM SHALL display progress information and show detailed success message with exact installation paths (including OpenCode paths).
128
+
129
+ #### Scenario: Display fetching progress
130
+ - **WHEN** fetching the kit
131
+ - **THEN** system displays a spinner with text "Fetching kit {kitId}..."
132
+
133
+ #### Scenario: Display processing progress
134
+ - **WHEN** processing the kit
135
+ - **THEN** system updates the spinner text to "Processing kit \"{name}\"..."
136
+
137
+ #### Scenario: Display saving prompts progress
138
+ - **WHEN** saving prompts
139
+ - **THEN** system updates the spinner text to "Saving {count} prompts..."
140
+
141
+ #### Scenario: Display saving subagents progress
142
+ - **WHEN** saving subagents
143
+ - **THEN** system updates the spinner text to "Saving {count} subagents..."
144
+
145
+ #### Scenario: Display success message with exact paths
146
+ - **WHEN** installation completes successfully
147
+ - **THEN** system displays "Successfully installed kit \"{name}\": {promptsCount} prompts, {subagentsCount} subagents"
148
+ - **THEN** system displays exact installation paths showing where files were saved
149
+
150
+ #### Scenario: Display success message with OpenCode paths
151
+ - **WHEN** installation to OpenCode completes successfully
152
+ - **THEN** system displays OpenCode commands directory path with prompt count
153
+ - **THEN** system displays OpenCode agents directory path with subagent count
154
+
155
+ #### Scenario: Display error message
156
+ - **WHEN** any error occurs during the process
157
+ - **THEN** system displays "Kit fetch failed: {error}" and exits with code 1
@@ -0,0 +1,65 @@
1
+ ## ADDED Requirements
2
+
3
+ ### Requirement: OpenCode Directory Structure
4
+ THE SYSTEM SHALL support OpenCode's directory structure for user-level and project-level installations.
5
+
6
+ #### Scenario: User-level OpenCode installation
7
+ - **WHEN** user selects target "OpenCode" and scope "User level"
8
+ - **THEN** system uses directory `~/.config/opencode/commands/` for prompts
9
+ - **THEN** system uses directory `~/.config/opencode/agents/` for subagents
10
+
11
+ #### Scenario: Project-level OpenCode installation
12
+ - **WHEN** user selects target "OpenCode" and scope "Project level"
13
+ - **THEN** system uses directory `./.opencode/commands/` for prompts
14
+ - **THEN** system uses directory `./.opencode/agents/` for subagents
15
+
16
+ ### Requirement: OpenCode YAML Format for Subagents
17
+ THE SYSTEM SHALL generate OpenCode-compatible YAML frontmatter for subagents with required `mode` field and without `model` field.
18
+
19
+ #### Scenario: Save subagent to OpenCode
20
+ - **WHEN** saving a subagent to OpenCode target
21
+ - **THEN** system generates YAML frontmatter with `mode: subagent` field
22
+ - **THEN** system includes `name`, `description`, and `color` fields
23
+ - **THEN** system excludes `model` field from YAML frontmatter
24
+
25
+ #### Scenario: Save subagent to Claude or Augment
26
+ - **WHEN** saving a subagent to Claude or Augment target
27
+ - **THEN** system generates YAML frontmatter with `name`, `description`, `model`, and `color` fields
28
+ - **THEN** system excludes `mode` field from YAML frontmatter
29
+
30
+ ### Requirement: OpenCode Prompt Format
31
+ THE SYSTEM SHALL use the same YAML frontmatter format for OpenCode prompts as Claude and Augment.
32
+
33
+ #### Scenario: Save prompt to OpenCode
34
+ - **WHEN** saving a prompt to OpenCode target
35
+ - **THEN** system generates YAML frontmatter with `description` and `type: "manual"` fields
36
+ - **THEN** format is identical to Claude and Augment prompt format
37
+
38
+ ### Requirement: OpenCode Path Resolution
39
+ THE SYSTEM SHALL resolve OpenCode installation paths based on user selection of scope.
40
+
41
+ #### Scenario: Resolve OpenCode user-level paths
42
+ - **WHEN** resolving paths for target "OpenCode" and scope "User level"
43
+ - **THEN** system returns commands path `~/.config/opencode/commands/`
44
+ - **THEN** system returns agents path `~/.config/opencode/agents/`
45
+
46
+ #### Scenario: Resolve OpenCode project-level paths
47
+ - **WHEN** resolving paths for target "OpenCode" and scope "Project level"
48
+ - **THEN** system returns commands path `./.opencode/commands/`
49
+ - **THEN** system returns agents path `./.opencode/agents/`
50
+
51
+ ### Requirement: OpenCode Directory Creation
52
+ THE SYSTEM SHALL create OpenCode directories if they do not exist before saving files.
53
+
54
+ #### Scenario: Create missing OpenCode directories
55
+ - **WHEN** OpenCode target directories do not exist
56
+ - **THEN** system creates directories recursively before saving files
57
+ - **THEN** system does not fail if directories already exist
58
+
59
+ ### Requirement: OpenCode Installation Success Feedback
60
+ THE SYSTEM SHALL include OpenCode installation paths in success messages.
61
+
62
+ #### Scenario: Display OpenCode installation paths
63
+ - **WHEN** installation to OpenCode completes successfully
64
+ - **THEN** system displays OpenCode commands directory path with prompt count
65
+ - **THEN** system displays OpenCode agents directory path with subagent count
@@ -0,0 +1,54 @@
1
+ ## 1. Type Definitions
2
+
3
+ - [x] 1.1 Update `AITarget` type to include `'opencode'` option: `type AITarget = 'claude' | 'augment' | 'opencode' | 'both';`
4
+ - [x] 1.2 Update `KitInstallConfig['paths']` interface to include optional `opencode` property with `commands` and `agents` paths
5
+
6
+ ## 2. Path Constants
7
+
8
+ - [x] 2.1 Add `OPENCODE_CONFIG_DIR` constant: `path.join(os.homedir(), '.config', 'opencode')`
9
+ - [x] 2.2 Add `OPENCODE_COMMANDS_DIR` constant: `path.join(OPENCODE_CONFIG_DIR, 'commands')`
10
+ - [x] 2.3 Add `OPENCODE_AGENTS_DIR` constant: `path.join(OPENCODE_CONFIG_DIR, 'agents')`
11
+
12
+ ## 3. Interactive Prompts
13
+
14
+ - [x] 3.1 Update `promptAITarget()` to add 'OpenCode' option to the select menu
15
+ - [x] 3.2 Update scope prompt description in `promptInstallScope()` to mention `.opencode` alongside `.augment` and `.claude`
16
+
17
+ ## 4. Path Resolution
18
+
19
+ - [x] 4.1 Update `resolveInstallPaths()` to handle `target === 'opencode'` case
20
+ - [x] 4.2 Add OpenCode user-level paths: `~/.config/opencode/commands/` and `~/.config/opencode/agents/`
21
+ - [x] 4.3 Add OpenCode project-level paths: `./.opencode/commands/` and `./.opencode/agents/`
22
+ - [x] 4.4 Ensure `resolveInstallPaths()` includes opencode in paths object when target is 'opencode'
23
+
24
+ ## 5. Save Functions
25
+
26
+ - [x] 5.1 Update `saveSubagentToPath()` signature to accept `targetType: 'claude' | 'augment' | 'opencode'` parameter
27
+ - [x] 5.2 Add conditional logic in `saveSubagentToPath()` to check if `targetType === 'opencode'`
28
+ - [x] 5.3 For OpenCode: generate YAML with `mode: subagent` field and exclude `model` field
29
+ - [x] 5.4 For Claude/Augment: keep existing YAML format with `model` field and no `mode` field
30
+ - [x] 5.5 Verify `savePromptToPath()` works for OpenCode without changes (same format as Claude/Augment)
31
+
32
+ ## 6. Kit Installation Handler
33
+
34
+ - [x] 6.1 Update `handleKit()` to pass target type to `saveSubagentToPath()` when saving to augment paths
35
+ - [x] 6.2 Update `handleKit()` to pass target type to `saveSubagentToPath()` when saving to claude paths
36
+ - [x] 6.3 Add logic in `handleKit()` to save prompts to opencode paths if `installConfig.paths.opencode` exists
37
+ - [x] 6.4 Add logic in `handleKit()` to save subagents to opencode paths with `targetType: 'opencode'` if `installConfig.paths.opencode` exists
38
+ - [x] 6.5 Update success message in `handleKit()` to include OpenCode paths when present
39
+
40
+ ## 7. Flag Parsing (Optional Enhancement)
41
+
42
+ - [x] 7.1 Add support for comma-separated targets in `--target` flag (e.g., `--target claude,opencode`)
43
+ - [x] 7.2 Parse comma-separated string into array of targets
44
+ - [x] 7.3 Validate each target value against allowed options
45
+ - [x] 7.4 Update installation logic to handle array of targets
46
+
47
+ ## 8. Testing & Verification
48
+
49
+ - [x] 8.1 Run `bun run lint` to check for code quality issues
50
+ - [x] 8.2 Fix any linting errors manually (no --unsafe flag)
51
+ - [x] 8.3 Run `bun run build` to verify the build succeeds
52
+ - [ ] 8.4 Test interactive mode: `auggiegw kit <test-kit-id>` and select OpenCode target
53
+ - [ ] 8.5 Test flag mode: `auggiegw kit <test-kit-id> --target opencode --scope user`
54
+ - [ ] 8.6 Verify OpenCode directories are created and files have correct YAML format
@@ -0,0 +1,20 @@
1
+ schema: spec-driven
2
+
3
+ # Project context (optional)
4
+ # This is shown to AI when creating artifacts.
5
+ # Add your tech stack, conventions, style guides, domain knowledge, etc.
6
+ # Example:
7
+ # context: |
8
+ # Tech stack: TypeScript, React, Node.js
9
+ # We use conventional commits
10
+ # Domain: e-commerce platform
11
+
12
+ # Per-artifact rules (optional)
13
+ # Add custom rules for specific artifacts.
14
+ # Example:
15
+ # rules:
16
+ # proposal:
17
+ # - Keep proposals under 500 words
18
+ # - Always include a "Non-goals" section
19
+ # tasks:
20
+ # - Break tasks into chunks of max 2 hours
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dccxx/auggiegw",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "A Node.js TypeScript package",
5
5
  "main": "./dist/cli.js",
6
6
  "types": "./dist/cli.d.ts",
@@ -28,6 +28,7 @@
28
28
  "node": ">=18.0.0"
29
29
  },
30
30
  "dependencies": {
31
+ "@clack/prompts": "^1.0.0",
31
32
  "commander": "^14.0.1",
32
33
  "ora": "^5.4.1",
33
34
  "uuid": "^13.0.0"
@@ -0,0 +1,157 @@
1
+ ## MODIFIED Requirements
2
+
3
+ ### Requirement: Command Invocation
4
+ WHEN the user runs `auggiegw kit <kit-id>`, THE SYSTEM SHALL prompt the user to select target AI tool (including OpenCode) and installation scope, then fetch the kit from the public API endpoint.
5
+
6
+ #### Scenario: User runs kit command without flags
7
+ - **WHEN** user runs `auggiegw kit <kit-id>` without any flags
8
+ - **THEN** system displays interactive prompt for target selection with options: Claude, Augment, OpenCode, Both
9
+ - **THEN** system displays interactive prompt for scope selection
10
+ - **THEN** system fetches the kit from the public API endpoint
11
+
12
+ #### Scenario: User runs kit command with flags
13
+ - **WHEN** user runs `auggiegw kit <kit-id> --target claude --scope user`
14
+ - **THEN** system skips prompts and uses provided flag values
15
+ - **THEN** system fetches the kit from the public API endpoint
16
+
17
+ #### Scenario: User selects OpenCode target via flag
18
+ - **WHEN** user runs `auggiegw kit <kit-id> --target opencode`
19
+ - **THEN** system skips target prompt and uses OpenCode as target
20
+ - **THEN** system displays interactive prompt for scope selection
21
+ - **THEN** system fetches the kit from the public API endpoint
22
+
23
+ #### Scenario: User selects multiple targets via flag
24
+ - **WHEN** user runs `auggiegw kit <kit-id> --target claude,opencode`
25
+ - **THEN** system parses comma-separated targets
26
+ - **THEN** system installs to both Claude and OpenCode
27
+ - **THEN** system fetches the kit from the public API endpoint
28
+
29
+ #### Scenario: Missing kit-id argument
30
+ - **WHEN** kit-id argument is missing
31
+ - **THEN** system displays "Error: Kit ID is required" and usage message, and exits with code 1
32
+
33
+ ### Requirement: Prompt Installation
34
+ WHEN processing prompts, THE SYSTEM SHALL create the target directories based on user selection (including OpenCode) and save markdown files with YAML frontmatter to the selected locations.
35
+
36
+ #### Scenario: Install prompts to Claude user level
37
+ - **WHEN** user selects target "Claude" and scope "User level"
38
+ - **THEN** system creates directory `~/.claude/commands/` if it does not exist
39
+ - **THEN** for each prompt in the kit, system saves a markdown file to `~/.claude/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
40
+
41
+ #### Scenario: Install prompts to Augment project level
42
+ - **WHEN** user selects target "Augment" and scope "Project level"
43
+ - **THEN** system creates directory `./.augment/commands/` if it does not exist
44
+ - **THEN** for each prompt in the kit, system saves a markdown file to `./.augment/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
45
+
46
+ #### Scenario: Install prompts to OpenCode user level
47
+ - **WHEN** user selects target "OpenCode" and scope "User level"
48
+ - **THEN** system creates directory `~/.config/opencode/commands/` if it does not exist
49
+ - **THEN** for each prompt in the kit, system saves a markdown file to `~/.config/opencode/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
50
+
51
+ #### Scenario: Install prompts to OpenCode project level
52
+ - **WHEN** user selects target "OpenCode" and scope "Project level"
53
+ - **THEN** system creates directory `./.opencode/commands/` if it does not exist
54
+ - **THEN** for each prompt in the kit, system saves a markdown file to `./.opencode/commands/{command}.md` with YAML frontmatter containing `description` and `type: "manual"` fields
55
+
56
+ #### Scenario: Install prompts to both targets at user level
57
+ - **WHEN** user selects target "Both" and scope "User level"
58
+ - **THEN** system creates directories `~/.augment/commands/` and `~/.claude/commands/` if they do not exist
59
+ - **THEN** for each prompt in the kit, system saves markdown files to both `~/.augment/commands/{command}.md` and `~/.claude/commands/{command}.md`
60
+
61
+ #### Scenario: Install prompts to multiple targets including OpenCode
62
+ - **WHEN** user selects targets "Claude" and "OpenCode" via comma-separated flag and scope "User level"
63
+ - **THEN** system creates directories `~/.claude/commands/` and `~/.config/opencode/commands/` if they do not exist
64
+ - **THEN** for each prompt in the kit, system saves markdown files to both directories
65
+
66
+ #### Scenario: Overwrite existing prompt files
67
+ - **WHEN** a prompt file with the same filename already exists
68
+ - **THEN** system overwrites the existing file without confirmation
69
+
70
+ #### Scenario: Prompt file save failure
71
+ - **WHEN** a prompt file fails to save
72
+ - **THEN** system throws an error with message "Failed to save prompt file for command '{command}': {error}"
73
+
74
+ #### Scenario: Partial save failure with multiple targets
75
+ - **WHEN** user selects multiple targets and a prompt file fails to save to one directory
76
+ - **THEN** system still attempts to save to the other directories before throwing an error
77
+
78
+ ### Requirement: Subagent Installation
79
+ WHEN processing subagents, THE SYSTEM SHALL create the target directories based on user selection (including OpenCode) and save markdown files with appropriate YAML frontmatter to the selected locations.
80
+
81
+ #### Scenario: Install subagents to Claude user level
82
+ - **WHEN** user selects target "Claude" and scope "User level"
83
+ - **THEN** system creates directory `~/.claude/agents/` if it does not exist
84
+ - **THEN** for each subagent in the kit, system saves a markdown file to `~/.claude/agents/{name}.md` with YAML frontmatter containing `name`, `description`, `model`, and `color` fields
85
+
86
+ #### Scenario: Install subagents to Augment project level
87
+ - **WHEN** user selects target "Augment" and scope "Project level"
88
+ - **THEN** system creates directory `./.augment/agents/` if it does not exist
89
+ - **THEN** for each subagent in the kit, system saves a markdown file to `./.augment/agents/{name}.md` with YAML frontmatter containing `name`, `description`, `model`, and `color` fields
90
+
91
+ #### Scenario: Install subagents to OpenCode user level
92
+ - **WHEN** user selects target "OpenCode" and scope "User level"
93
+ - **THEN** system creates directory `~/.config/opencode/agents/` if it does not exist
94
+ - **THEN** for each subagent in the kit, system saves a markdown file to `~/.config/opencode/agents/{name}.md` with YAML frontmatter containing `mode: subagent`, `name`, `description`, and `color` fields
95
+ - **THEN** system excludes `model` field from YAML frontmatter
96
+
97
+ #### Scenario: Install subagents to OpenCode project level
98
+ - **WHEN** user selects target "OpenCode" and scope "Project level"
99
+ - **THEN** system creates directory `./.opencode/agents/` if it does not exist
100
+ - **THEN** for each subagent in the kit, system saves a markdown file to `./.opencode/agents/{name}.md` with YAML frontmatter containing `mode: subagent`, `name`, `description`, and `color` fields
101
+ - **THEN** system excludes `model` field from YAML frontmatter
102
+
103
+ #### Scenario: Install subagents to both targets at user level
104
+ - **WHEN** user selects target "Both" and scope "User level"
105
+ - **THEN** system creates directories `~/.augment/agents/` and `~/.claude/agents/` if they do not exist
106
+ - **THEN** for each subagent in the kit, system saves markdown files to both `~/.augment/agents/{name}.md` and `~/.claude/agents/{name}.md`
107
+
108
+ #### Scenario: Install subagents to multiple targets including OpenCode
109
+ - **WHEN** user selects targets "Augment" and "OpenCode" via comma-separated flag and scope "User level"
110
+ - **THEN** system creates directories `~/.augment/agents/` and `~/.config/opencode/agents/` if they do not exist
111
+ - **THEN** for Augment target, system saves with `model` field in YAML frontmatter
112
+ - **THEN** for OpenCode target, system saves with `mode: subagent` field and excludes `model` field
113
+
114
+ #### Scenario: Overwrite existing subagent files
115
+ - **WHEN** a subagent file with the same filename already exists
116
+ - **THEN** system overwrites the existing file without confirmation
117
+
118
+ #### Scenario: Subagent file save failure
119
+ - **WHEN** a subagent file fails to save
120
+ - **THEN** system throws an error with message "Failed to save subagent file for '{name}': {error}"
121
+
122
+ #### Scenario: Partial save failure with multiple targets
123
+ - **WHEN** user selects multiple targets and a subagent file fails to save to one directory
124
+ - **THEN** system still attempts to save to the other directories before throwing an error
125
+
126
+ ### Requirement: User Feedback
127
+ WHILE fetching and installing the kit, THE SYSTEM SHALL display progress information and show detailed success message with exact installation paths (including OpenCode paths).
128
+
129
+ #### Scenario: Display fetching progress
130
+ - **WHEN** fetching the kit
131
+ - **THEN** system displays a spinner with text "Fetching kit {kitId}..."
132
+
133
+ #### Scenario: Display processing progress
134
+ - **WHEN** processing the kit
135
+ - **THEN** system updates the spinner text to "Processing kit \"{name}\"..."
136
+
137
+ #### Scenario: Display saving prompts progress
138
+ - **WHEN** saving prompts
139
+ - **THEN** system updates the spinner text to "Saving {count} prompts..."
140
+
141
+ #### Scenario: Display saving subagents progress
142
+ - **WHEN** saving subagents
143
+ - **THEN** system updates the spinner text to "Saving {count} subagents..."
144
+
145
+ #### Scenario: Display success message with exact paths
146
+ - **WHEN** installation completes successfully
147
+ - **THEN** system displays "Successfully installed kit \"{name}\": {promptsCount} prompts, {subagentsCount} subagents"
148
+ - **THEN** system displays exact installation paths showing where files were saved
149
+
150
+ #### Scenario: Display success message with OpenCode paths
151
+ - **WHEN** installation to OpenCode completes successfully
152
+ - **THEN** system displays OpenCode commands directory path with prompt count
153
+ - **THEN** system displays OpenCode agents directory path with subagent count
154
+
155
+ #### Scenario: Display error message
156
+ - **WHEN** any error occurs during the process
157
+ - **THEN** system displays "Kit fetch failed: {error}" and exits with code 1
@@ -0,0 +1,90 @@
1
+ ## ADDED Requirements
2
+
3
+ ### Requirement: User can select target AI tool
4
+ The system SHALL prompt the user to select which AI tool to install the kit to: Claude, Augment, or Both.
5
+
6
+ #### Scenario: User selects Claude only
7
+ - **WHEN** user runs `auggiegw kit <kit-id>` without `--target` flag
8
+ - **THEN** system displays interactive prompt with options: Claude, Augment, Both
9
+ - **WHEN** user selects "Claude"
10
+ - **THEN** system installs kit files only to Claude directories
11
+
12
+ #### Scenario: User selects Augment only
13
+ - **WHEN** user runs `auggiegw kit <kit-id>` without `--target` flag
14
+ - **THEN** system displays interactive prompt with options: Claude, Augment, Both
15
+ - **WHEN** user selects "Augment"
16
+ - **THEN** system installs kit files only to Augment directories
17
+
18
+ #### Scenario: User selects Both
19
+ - **WHEN** user runs `auggiegw kit <kit-id>` without `--target` flag
20
+ - **THEN** system displays interactive prompt with options: Claude, Augment, Both
21
+ - **WHEN** user selects "Both"
22
+ - **THEN** system installs kit files to both Claude and Augment directories
23
+
24
+ #### Scenario: User provides target via CLI flag
25
+ - **WHEN** user runs `auggiegw kit <kit-id> --target claude`
26
+ - **THEN** system skips the target prompt and uses "claude" as the target
27
+
28
+ ### Requirement: User can select installation scope
29
+ The system SHALL prompt the user to select the installation scope: User level or Project level.
30
+
31
+ #### Scenario: User selects user level installation
32
+ - **WHEN** user runs `auggiegw kit <kit-id>` without `--scope` flag
33
+ - **THEN** system displays interactive prompt with options: User level, Project level
34
+ - **WHEN** user selects "User level"
35
+ - **THEN** system installs kit files to home directory paths (~/.augment or ~/.claude)
36
+
37
+ #### Scenario: User selects project level installation
38
+ - **WHEN** user runs `auggiegw kit <kit-id>` without `--scope` flag
39
+ - **THEN** system displays interactive prompt with options: User level, Project level
40
+ - **WHEN** user selects "Project level"
41
+ - **THEN** system installs kit files to current working directory paths (./.augment or ./.claude)
42
+
43
+ #### Scenario: User provides scope via CLI flag
44
+ - **WHEN** user runs `auggiegw kit <kit-id> --scope project`
45
+ - **THEN** system skips the scope prompt and uses "project" as the scope
46
+
47
+ ### Requirement: System resolves installation paths based on selections
48
+ The system SHALL resolve the correct installation paths based on the user's target and scope selections.
49
+
50
+ #### Scenario: Claude target with user scope
51
+ - **WHEN** user selects target "Claude" and scope "User level"
52
+ - **THEN** system resolves paths to ~/.claude/commands/ and ~/.claude/agents/
53
+
54
+ #### Scenario: Augment target with project scope
55
+ - **WHEN** user selects target "Augment" and scope "Project level"
56
+ - **THEN** system resolves paths to ./.augment/commands/ and ./.augment/agents/
57
+
58
+ #### Scenario: Both targets with user scope
59
+ - **WHEN** user selects target "Both" and scope "User level"
60
+ - **THEN** system resolves paths to both ~/.augment/ and ~/.claude/ directories
61
+
62
+ #### Scenario: Both targets with project scope
63
+ - **WHEN** user selects target "Both" and scope "Project level"
64
+ - **THEN** system resolves paths to both ./.augment/ and ./.claude/ directories
65
+
66
+ ### Requirement: System creates directories automatically
67
+ The system SHALL automatically create target directories if they do not exist.
68
+
69
+ #### Scenario: Target directory does not exist
70
+ - **WHEN** system attempts to save files to a directory that does not exist
71
+ - **THEN** system creates the directory recursively before saving files
72
+
73
+ #### Scenario: Multiple target directories need creation
74
+ - **WHEN** user selects "Both" targets and directories do not exist
75
+ - **THEN** system creates all required directories for both Claude and Augment
76
+
77
+ ### Requirement: System displays installation paths in success message
78
+ The system SHALL display the exact installation paths in the success message after kit installation completes.
79
+
80
+ #### Scenario: Single target installation
81
+ - **WHEN** kit installation completes successfully with single target
82
+ - **THEN** success message includes exact paths where prompts and subagents were installed
83
+
84
+ #### Scenario: Both targets installation
85
+ - **WHEN** kit installation completes successfully with both targets
86
+ - **THEN** success message includes exact paths for both Claude and Augment installations
87
+
88
+ #### Scenario: Success message shows file counts per location
89
+ - **WHEN** kit installation completes successfully
90
+ - **THEN** success message shows the number of prompts and subagents installed to each location
@@ -0,0 +1,65 @@
1
+ ## ADDED Requirements
2
+
3
+ ### Requirement: OpenCode Directory Structure
4
+ THE SYSTEM SHALL support OpenCode's directory structure for user-level and project-level installations.
5
+
6
+ #### Scenario: User-level OpenCode installation
7
+ - **WHEN** user selects target "OpenCode" and scope "User level"
8
+ - **THEN** system uses directory `~/.config/opencode/commands/` for prompts
9
+ - **THEN** system uses directory `~/.config/opencode/agents/` for subagents
10
+
11
+ #### Scenario: Project-level OpenCode installation
12
+ - **WHEN** user selects target "OpenCode" and scope "Project level"
13
+ - **THEN** system uses directory `./.opencode/commands/` for prompts
14
+ - **THEN** system uses directory `./.opencode/agents/` for subagents
15
+
16
+ ### Requirement: OpenCode YAML Format for Subagents
17
+ THE SYSTEM SHALL generate OpenCode-compatible YAML frontmatter for subagents with required `mode` field and without `model` field.
18
+
19
+ #### Scenario: Save subagent to OpenCode
20
+ - **WHEN** saving a subagent to OpenCode target
21
+ - **THEN** system generates YAML frontmatter with `mode: subagent` field
22
+ - **THEN** system includes `name`, `description`, and `color` fields
23
+ - **THEN** system excludes `model` field from YAML frontmatter
24
+
25
+ #### Scenario: Save subagent to Claude or Augment
26
+ - **WHEN** saving a subagent to Claude or Augment target
27
+ - **THEN** system generates YAML frontmatter with `name`, `description`, `model`, and `color` fields
28
+ - **THEN** system excludes `mode` field from YAML frontmatter
29
+
30
+ ### Requirement: OpenCode Prompt Format
31
+ THE SYSTEM SHALL use the same YAML frontmatter format for OpenCode prompts as Claude and Augment.
32
+
33
+ #### Scenario: Save prompt to OpenCode
34
+ - **WHEN** saving a prompt to OpenCode target
35
+ - **THEN** system generates YAML frontmatter with `description` and `type: "manual"` fields
36
+ - **THEN** format is identical to Claude and Augment prompt format
37
+
38
+ ### Requirement: OpenCode Path Resolution
39
+ THE SYSTEM SHALL resolve OpenCode installation paths based on user selection of scope.
40
+
41
+ #### Scenario: Resolve OpenCode user-level paths
42
+ - **WHEN** resolving paths for target "OpenCode" and scope "User level"
43
+ - **THEN** system returns commands path `~/.config/opencode/commands/`
44
+ - **THEN** system returns agents path `~/.config/opencode/agents/`
45
+
46
+ #### Scenario: Resolve OpenCode project-level paths
47
+ - **WHEN** resolving paths for target "OpenCode" and scope "Project level"
48
+ - **THEN** system returns commands path `./.opencode/commands/`
49
+ - **THEN** system returns agents path `./.opencode/agents/`
50
+
51
+ ### Requirement: OpenCode Directory Creation
52
+ THE SYSTEM SHALL create OpenCode directories if they do not exist before saving files.
53
+
54
+ #### Scenario: Create missing OpenCode directories
55
+ - **WHEN** OpenCode target directories do not exist
56
+ - **THEN** system creates directories recursively before saving files
57
+ - **THEN** system does not fail if directories already exist
58
+
59
+ ### Requirement: OpenCode Installation Success Feedback
60
+ THE SYSTEM SHALL include OpenCode installation paths in success messages.
61
+
62
+ #### Scenario: Display OpenCode installation paths
63
+ - **WHEN** installation to OpenCode completes successfully
64
+ - **THEN** system displays OpenCode commands directory path with prompt count
65
+ - **THEN** system displays OpenCode agents directory path with subagent count