gemiterm 2.0.0 → 2.1.1
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.
- package/README.md +32 -9
- package/package.json +13 -4
- package/src/cli/command-registry.ts +66 -62
- package/src/cli/commands/continue-command.ts +75 -1
- package/src/cli/commands/install-skills-command.ts +35 -0
- package/src/cli/commands/new-command.ts +62 -0
- package/src/cli/index.ts +19 -44
- package/src/cli/utils/long-arg-guard.ts +28 -0
- package/src/cli/utils/prompt-file.ts +26 -0
- package/src/infrastructure/cli-parser.ts +77 -0
- package/src/infrastructure/io.ts +9 -0
- package/src/services/skills-cli-driver.ts +58 -0
- package/src/services/skills-service.ts +52 -0
- package/.env +0 -2
- package/.github/workflows/manual-release.yml +0 -34
- package/.github/workflows/release.yml +0 -198
- package/.github/workflows/test.yml +0 -29
- package/.opencode/commands/opsx-apply.md +0 -152
- package/.opencode/commands/opsx-archive.md +0 -157
- package/.opencode/commands/opsx-explore.md +0 -169
- package/.opencode/commands/opsx-propose.md +0 -104
- package/.opencode/commands/opsx-sync.md +0 -140
- package/.opencode/commands/search-intelligently.md +0 -9
- package/.opencode/opencode.json +0 -20
- package/.opencode/skills/intellisearch/.version +0 -1
- package/.opencode/skills/intellisearch/SKILL.md +0 -84
- package/.opencode/skills/intellisearch/references/brave-search.md +0 -67
- package/.opencode/skills/intellisearch/references/ddg-search.md +0 -79
- package/.opencode/skills/intellisearch/references/deepwiki-tools.md +0 -246
- package/.opencode/skills/intellisearch/references/examples.md +0 -97
- package/.opencode/skills/intellisearch/references/gh-cli.md +0 -143
- package/.opencode/skills/intellisearch/references/google-search.md +0 -40
- package/.opencode/skills/intellisearch/references/search-workflow.md +0 -143
- package/.opencode/skills/intellisearch/references/workflow.md +0 -115
- package/.opencode/skills/openspec-apply-change/SKILL.md +0 -159
- package/.opencode/skills/openspec-archive-change/SKILL.md +0 -117
- package/.opencode/skills/openspec-explore/SKILL.md +0 -287
- package/.opencode/skills/openspec-propose/SKILL.md +0 -111
- package/.opencode/skills/openspec-sync-specs/SKILL.md +0 -147
- package/.serena/project.yml +0 -133
- package/AGENTS.md +0 -136
- package/CHANGELOG.md +0 -3
- package/bun.lock +0 -105
- package/docs/INSTALL.md +0 -185
- package/docs/PLAYWRIGHT_CLI_API.md +0 -306
- package/docs/python-release-for-reference.md +0 -175
- package/examples/sample_json_export.json +0 -32
- package/examples/sample_markdown_export.md +0 -221
- package/examples/usage_examples.sh +0 -222
- package/install.ps1 +0 -264
- package/install.sh +0 -275
- package/openspec/MAESTRO_MIGRATION.md +0 -180
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +0 -194
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +0 -52
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +0 -133
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +0 -95
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +0 -28
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +0 -22
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +0 -35
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +0 -28
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +0 -323
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +0 -122
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +0 -29
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +0 -172
- package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +0 -241
- package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +0 -41
- package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +0 -205
- package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +0 -97
- package/openspec/changes/commander-cli-parser/.openspec.yaml +0 -2
- package/openspec/changes/commander-cli-parser/design.md +0 -107
- package/openspec/changes/commander-cli-parser/proposal.md +0 -31
- package/openspec/changes/commander-cli-parser/specs/cli/spec.md +0 -48
- package/openspec/changes/commander-cli-parser/tasks.md +0 -33
- package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +0 -2
- package/openspec/changes/cross-platform-build-and-ci/design.md +0 -213
- package/openspec/changes/cross-platform-build-and-ci/proposal.md +0 -50
- package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +0 -335
- package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +0 -95
- package/openspec/changes/cross-platform-build-and-ci/tasks.md +0 -164
- package/openspec/config.yaml +0 -20
- package/openspec/specs/auth/spec.md +0 -394
- package/openspec/specs/cli/spec.md +0 -108
- package/openspec/specs/commands/spec.md +0 -409
- package/openspec/specs/configuration/spec.md +0 -130
- package/openspec/specs/conversations/spec.md +0 -139
- package/openspec/specs/domain-model/spec.md +0 -128
- package/openspec/specs/formatters/spec.md +0 -158
- package/openspec/specs/install-browser/spec.md +0 -146
- package/openspec/specs/interactive-prompt-loop/spec.md +0 -41
- package/openspec/specs/logger/spec.md +0 -71
- package/openspec/specs/mediator/spec.md +0 -72
- package/openspec/specs/multi-profile-conversations/spec.md +0 -145
- package/openspec/specs/path-utils/spec.md +0 -101
- package/openspec/specs/profiles/spec.md +0 -94
- package/openspec/specs/storage/spec.md +0 -198
- package/openspec/specs/testing/spec.md +0 -237
- package/openspec/specs/v2-installer/spec.md +0 -205
- package/openspec/specs/validators/spec.md +0 -65
- package/scripts/build.ts +0 -88
- package/scripts/clean-build.ps1 +0 -4
- package/scripts/clean-build.sh +0 -5
- package/scripts/install-browser.ps1 +0 -5
- package/scripts/install-browser.sh +0 -6
- package/scripts/lint-path-mediation.ps1 +0 -65
- package/scripts/lint-path-mediation.sh +0 -40
- package/tests/cli/auth-command.test.ts +0 -220
- package/tests/cli/command-registry.test.ts +0 -67
- package/tests/cli/continue-command.test.ts +0 -100
- package/tests/cli/delete-command.test.ts +0 -128
- package/tests/cli/export-all-command.test.ts +0 -375
- package/tests/cli/install-browser-command.test.ts +0 -48
- package/tests/cli/list-command.test.ts +0 -179
- package/tests/cli/new-command.test.ts +0 -139
- package/tests/cli/status-command.test.ts +0 -106
- package/tests/core/query-handlers.test.ts +0 -187
- package/tests/fixtures/auth-fixtures.ts +0 -98
- package/tests/fixtures/chat-fixtures.ts +0 -87
- package/tests/infrastructure/cli-table.test.ts +0 -107
- package/tests/infrastructure/formatters.test.ts +0 -202
- package/tests/infrastructure/io.test.ts +0 -197
- package/tests/infrastructure/logger.test.ts +0 -74
- package/tests/infrastructure/storage.test.ts +0 -335
- package/tests/infrastructure/validators.test.ts +0 -67
- package/tests/integration/commands/auth.test.ts +0 -186
- package/tests/integration/commands/continue.test.ts +0 -130
- package/tests/integration/commands/delete.test.ts +0 -140
- package/tests/integration/commands/export.test.ts +0 -266
- package/tests/integration/commands/fetch.test.ts +0 -238
- package/tests/integration/commands/list.test.ts +0 -281
- package/tests/integration/commands/profile.test.ts +0 -258
- package/tests/integration/commands/status.test.ts +0 -223
- package/tests/integration/installer-script-shape.test.ts +0 -67
- package/tests/parity/compare-outputs.ts +0 -359
- package/tests/parity/test-commands-parity.ps1 +0 -82
- package/tests/parity/test-commands-parity.sh +0 -61
- package/tests/services/auth-service.test.ts +0 -315
- package/tests/services/cookie-monitor.test.ts +0 -229
- package/tests/services/cookie-storage-service.test.ts +0 -230
- package/tests/services/gemini-client-wrapper.test.ts +0 -688
- package/tests/services/install-browser-service.test.ts +0 -83
- package/tests/services/playwright-cli-driver.test.ts +0 -468
- package/tests/services/profile-auth-manager.test.ts +0 -334
- package/tests/services/profile-service.test.ts +0 -224
- package/tests/setup.ts +0 -95
- package/tests/smoke/smoke.test.ts +0 -52
- package/tests/unit/config.test.ts +0 -159
- package/tests/unit/errors.test.ts +0 -119
- package/tests/unit/formatters.test.ts +0 -316
- package/tests/unit/mediator.test.ts +0 -152
- package/tests/unit/path-utils.test.ts +0 -289
- package/tsconfig.json +0 -16
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# Search Workflow
|
|
2
|
-
|
|
3
|
-
Tool detection and search strategy for finding GitHub repositories.
|
|
4
|
-
|
|
5
|
-
<critical_rules priority="highest">
|
|
6
|
-
<rule>NEVER use `site:github.com` with search tools - returns full URLs that get misparsed</rule>
|
|
7
|
-
<rule>Only fetch EXTERNAL search engines, NEVER github.com URLs</rule>
|
|
8
|
-
<rule>Cycle through engines on failure: Brave → DuckDuckGo → Google</rule>
|
|
9
|
-
</critical_rules>
|
|
10
|
-
|
|
11
|
-
## Tool Priority
|
|
12
|
-
|
|
13
|
-
```yaml
|
|
14
|
-
detection:
|
|
15
|
-
IF gh auth status succeeds:
|
|
16
|
-
→ Use gh search repos (PREFERRED - direct API)
|
|
17
|
-
ELSE IF search_tool exists:
|
|
18
|
-
→ Use search tool with keywords (NOT site:github.com)
|
|
19
|
-
ELSE IF fetch_tool exists:
|
|
20
|
-
→ Use URI-based search with engine cycling
|
|
21
|
-
ELSE:
|
|
22
|
-
→ Report: "No search capability available"
|
|
23
|
-
→ fallback to internal knowledge
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## GitHub CLI (Preferred)
|
|
27
|
-
|
|
28
|
-
<detection>
|
|
29
|
-
```bash
|
|
30
|
-
gh auth status # Exit 0 = available
|
|
31
|
-
```
|
|
32
|
-
</detection>
|
|
33
|
-
|
|
34
|
-
<search_patterns priority="try_in_order">
|
|
35
|
-
```bash
|
|
36
|
-
# 1. Full query with topics and language
|
|
37
|
-
gh search repos "{query}" --topic={topics} --language={lang} --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
38
|
-
|
|
39
|
-
# 2. Query with language only
|
|
40
|
-
gh search repos "{query}" --language={lang} --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
41
|
-
|
|
42
|
-
# 3. Topic-based search (no query string)
|
|
43
|
-
gh search repos --topic={topics} --language={lang} --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
44
|
-
|
|
45
|
-
# 4. Broader keyword search
|
|
46
|
-
gh search repos "{query}" --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
47
|
-
```
|
|
48
|
-
</search_patterns>
|
|
49
|
-
|
|
50
|
-
<process>
|
|
51
|
-
1. Infer topics from query (framework/library names → topics)
|
|
52
|
-
2. Infer language if mentioned
|
|
53
|
-
3. Sort by stargazersCount, return top 5
|
|
54
|
-
4. Skip to DeepWiki query
|
|
55
|
-
</process>
|
|
56
|
-
|
|
57
|
-
See @gh-cli.md for detailed syntax.
|
|
58
|
-
|
|
59
|
-
## Search Tool (Fallback #1)
|
|
60
|
-
|
|
61
|
-
<constraint>DO NOT use `site:github.com` - it returns full GitHub URLs that get misparsed as repos.</constraint>
|
|
62
|
-
|
|
63
|
-
<query_format>
|
|
64
|
-
```json
|
|
65
|
-
{ "query": "{technology} {feature} {language} library package" }
|
|
66
|
-
```
|
|
67
|
-
</query_format>
|
|
68
|
-
|
|
69
|
-
<example>
|
|
70
|
-
```json
|
|
71
|
-
{ "query": "typescript semver validation library npm package" }
|
|
72
|
-
```
|
|
73
|
-
</example>
|
|
74
|
-
|
|
75
|
-
<result_processing>
|
|
76
|
-
- Look for package names in snippets
|
|
77
|
-
- Find `github.com/owner/repo` references in descriptions
|
|
78
|
-
- Ignore navigation/ads
|
|
79
|
-
</result_processing>
|
|
80
|
-
|
|
81
|
-
## URI-Based Search (Fallback #2)
|
|
82
|
-
|
|
83
|
-
When only fetch tools available, cycle through engines:
|
|
84
|
-
|
|
85
|
-
| Priority | Engine | URL |
|
|
86
|
-
|----------|--------|-----|
|
|
87
|
-
| 1 | Brave | `https://search.brave.com/search?q={terms}` |
|
|
88
|
-
| 2 | DuckDuckGo | `https://duckduckgo.com/?q={terms}` |
|
|
89
|
-
| 3 | Google | `https://www.google.com/search?q={terms}` |
|
|
90
|
-
|
|
91
|
-
<error_handling>
|
|
92
|
-
```yaml
|
|
93
|
-
FOR each engine IN [brave, duckduckgo, google]:
|
|
94
|
-
result = fetch(engine_url)
|
|
95
|
-
IF success AND has_search_results:
|
|
96
|
-
RETURN result
|
|
97
|
-
CONTINUE
|
|
98
|
-
RETURN error: all engines failed
|
|
99
|
-
```
|
|
100
|
-
</error_handling>
|
|
101
|
-
|
|
102
|
-
<failure_causes>
|
|
103
|
-
- JavaScript redirects (Google)
|
|
104
|
-
- Captchas (DuckDuckGo)
|
|
105
|
-
- HTML parsing issues
|
|
106
|
-
</failure_causes>
|
|
107
|
-
|
|
108
|
-
<example>
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"url": "https://search.brave.com/search?q=typescript%20semver%20validation%20library",
|
|
112
|
-
"format": "markdown",
|
|
113
|
-
"timeout": 10
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
</example>
|
|
117
|
-
|
|
118
|
-
## Query Construction
|
|
119
|
-
|
|
120
|
-
<keyword_based>
|
|
121
|
-
```
|
|
122
|
-
{technology} {feature} {language} library package
|
|
123
|
-
```
|
|
124
|
-
</keyword_based>
|
|
125
|
-
|
|
126
|
-
<examples>
|
|
127
|
-
- `react hooks typescript library`
|
|
128
|
-
- `semver validation nodejs package`
|
|
129
|
-
- `graph database python library`
|
|
130
|
-
</examples>
|
|
131
|
-
|
|
132
|
-
<result_extraction>
|
|
133
|
-
- Look for `github.com/owner/repo` in snippet descriptions
|
|
134
|
-
- Find package names that map to known repos
|
|
135
|
-
- Follow links in documentation references
|
|
136
|
-
</result_extraction>
|
|
137
|
-
|
|
138
|
-
## References
|
|
139
|
-
|
|
140
|
-
- @gh-cli.md - GitHub CLI syntax
|
|
141
|
-
- @google-search.md - Google operators
|
|
142
|
-
- @brave-search.md - Brave operators
|
|
143
|
-
- @ddg-search.md - DuckDuckGo operators
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# Search Pipeline & Decision Points
|
|
2
|
-
|
|
3
|
-
Detailed workflow for repository discovery and analysis.
|
|
4
|
-
|
|
5
|
-
<critical_rules priority="highest">
|
|
6
|
-
<rule>NEVER fetch github.com URLs - use DeepWiki instead</rule>
|
|
7
|
-
<rule>Limit to 5-10 repository candidates before filtering</rule>
|
|
8
|
-
<rule>Select only TOP 3 repos for DeepWiki queries</rule>
|
|
9
|
-
<rule>Max 3 repos per DeepWiki call</rule>
|
|
10
|
-
</critical_rules>
|
|
11
|
-
|
|
12
|
-
## Pipeline Phases
|
|
13
|
-
|
|
14
|
-
```yaml
|
|
15
|
-
phases:
|
|
16
|
-
- name: TOOL_DETECTION
|
|
17
|
-
priority: [gh_cli, search_tool, fetch_tool]
|
|
18
|
-
constraint: NEVER fetch github.com URLs
|
|
19
|
-
|
|
20
|
-
- name: REPOSITORY_DISCOVERY
|
|
21
|
-
actions: [execute_search, extract_owner_repo, validate_format]
|
|
22
|
-
constraint: limit 5-10 candidates
|
|
23
|
-
|
|
24
|
-
- name: CANDIDATE_FILTERING
|
|
25
|
-
sort: [stars_DESC, recency, language_match]
|
|
26
|
-
constraint: SELECT_TOP_3
|
|
27
|
-
|
|
28
|
-
- name: DEEPWIKI_QUERY
|
|
29
|
-
strategy: [multi_repo_first, fallback_individual]
|
|
30
|
-
constraint: max 3 repos per call
|
|
31
|
-
|
|
32
|
-
- name: ANSWER_SYNTHESIS
|
|
33
|
-
format: [overview, trade_offs, implementation, links]
|
|
34
|
-
constraint: include_comparison_recommendations
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Decision Matrix
|
|
38
|
-
|
|
39
|
-
| Condition | Action |
|
|
40
|
-
|-----------|--------|
|
|
41
|
-
| `gh` CLI available | Use `gh search repos` with JSON output |
|
|
42
|
-
| No `gh`, search tool exists | Query external search engine |
|
|
43
|
-
| No search tool | Fetch external search engine URL |
|
|
44
|
-
| Multi-repo DeepWiki fails | Query repos individually |
|
|
45
|
-
| All DeepWiki queries fail | Report repos found but not indexed |
|
|
46
|
-
|
|
47
|
-
## Tool Selection Strategy
|
|
48
|
-
|
|
49
|
-
<priority_order>
|
|
50
|
-
1. gh CLI (Preferred) - Direct API access, structured JSON, topic/language filtering
|
|
51
|
-
2. Search Tool (Fallback #1) - Query external engines, NO `site:github.com` operator
|
|
52
|
-
3. Fetch Tool (Fallback #2) - URI-based search with engine cycling
|
|
53
|
-
</priority_order>
|
|
54
|
-
|
|
55
|
-
See @search-workflow.md for detailed tool usage.
|
|
56
|
-
|
|
57
|
-
## Repository Extraction
|
|
58
|
-
|
|
59
|
-
<validation_rules>
|
|
60
|
-
<pattern type="standard">`github\.com/([\w-]+)/([\w.-]+)` → Example: `github.com/npm/node-semver`</pattern>
|
|
61
|
-
<pattern type="pages">`([\w-]+)\.github\.io/([\w.-]+)` → Example: `npm.github.io/semver`</pattern>
|
|
62
|
-
<constraint>Owner: alphanumeric, `-`, `_` only</constraint>
|
|
63
|
-
<constraint>Repo: alphanumeric, `-`, `_`, `.` only</constraint>
|
|
64
|
-
<constraint>Owner NOT in blocked list (see @deepwiki-tools.md)</constraint>
|
|
65
|
-
</validation_rules>
|
|
66
|
-
|
|
67
|
-
## Candidate Filtering
|
|
68
|
-
|
|
69
|
-
Select **top 3 repositories** before DeepWiki query.
|
|
70
|
-
|
|
71
|
-
<prioritization>
|
|
72
|
-
1. Stars - Higher count = community validation
|
|
73
|
-
2. Recency - Recent commits = active maintenance
|
|
74
|
-
3. Language match - Prefer repos matching query language
|
|
75
|
-
</prioritization>
|
|
76
|
-
|
|
77
|
-
**Do not query DeepWiki for repos you won't recommend.**
|
|
78
|
-
|
|
79
|
-
## DeepWiki Query Strategy
|
|
80
|
-
|
|
81
|
-
<query_format>
|
|
82
|
-
<multi_repo>Try first: `repoName=["owner1/repo1", "owner2/repo2"]` (2+ items)</multi_repo>
|
|
83
|
-
<single_repo>Fallback: `repoName="owner/repo"` (string)</single_repo>
|
|
84
|
-
<forbidden>Never: `repoName=["owner/repo"]` (single-item array fails)</forbidden>
|
|
85
|
-
</query_format>
|
|
86
|
-
|
|
87
|
-
<efficiency_rules>
|
|
88
|
-
- Query max 3 repos per request
|
|
89
|
-
- If multi-repo fails, query top candidate only (not all individually)
|
|
90
|
-
</efficiency_rules>
|
|
91
|
-
|
|
92
|
-
See @deepwiki-tools.md for detailed usage.
|
|
93
|
-
|
|
94
|
-
## Answer Synthesis
|
|
95
|
-
|
|
96
|
-
<output_format>
|
|
97
|
-
1. Best options with trade-offs
|
|
98
|
-
2. Specific implementation guidance
|
|
99
|
-
3. Code examples if available
|
|
100
|
-
4. Repository links
|
|
101
|
-
</output_format>
|
|
102
|
-
|
|
103
|
-
**Efficiency:** If you found more than 3 repos, prioritize by: stars > recency > language match. Only include details for your top 3 candidates.
|
|
104
|
-
|
|
105
|
-
## Failure Handling
|
|
106
|
-
|
|
107
|
-
| Failure | Action |
|
|
108
|
-
|---------|--------|
|
|
109
|
-
| gh CLI not available | Fall back to search tool |
|
|
110
|
-
| Search tool not available | Fall back to fetch tool + URI cycling |
|
|
111
|
-
| URI search fails (captcha/redirect) | Try next engine in cycle |
|
|
112
|
-
| All URI searches fail | Report: "Unable to search - no working search method" |
|
|
113
|
-
| DeepWiki multi-repo fails | Query repos individually |
|
|
114
|
-
| DeepWiki single repo fails | Try next repo in list |
|
|
115
|
-
| All DeepWiki queries fail | Report: "Repos found but not indexed by DeepWiki" |
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: openspec-apply-change
|
|
3
|
-
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires openspec CLI.
|
|
6
|
-
metadata:
|
|
7
|
-
author: openspec
|
|
8
|
-
version: "1.0"
|
|
9
|
-
generatedBy: "1.4.1"
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
Implement tasks from an OpenSpec change.
|
|
13
|
-
|
|
14
|
-
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
|
-
|
|
16
|
-
**Steps**
|
|
17
|
-
|
|
18
|
-
1. **Select the change**
|
|
19
|
-
|
|
20
|
-
If a name is provided, use it. Otherwise:
|
|
21
|
-
- Infer from conversation context if the user mentioned a change
|
|
22
|
-
- Auto-select if only one active change exists
|
|
23
|
-
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
|
|
24
|
-
|
|
25
|
-
Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
|
|
26
|
-
|
|
27
|
-
2. **Check status to understand the schema**
|
|
28
|
-
```bash
|
|
29
|
-
openspec status --change "<name>" --json
|
|
30
|
-
```
|
|
31
|
-
Parse the JSON to understand:
|
|
32
|
-
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
33
|
-
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
|
|
34
|
-
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
35
|
-
|
|
36
|
-
3. **Get apply instructions**
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
openspec instructions apply --change "<name>" --json
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
This returns:
|
|
43
|
-
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
|
44
|
-
- Progress (total, complete, remaining)
|
|
45
|
-
- Task list with status
|
|
46
|
-
- Dynamic instruction based on current state
|
|
47
|
-
|
|
48
|
-
**Handle states:**
|
|
49
|
-
- If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
|
|
50
|
-
- If `state: "all_done"`: congratulate, suggest archive
|
|
51
|
-
- Otherwise: proceed to implementation
|
|
52
|
-
|
|
53
|
-
**Workspace guard:** If status JSON reports `actionContext.mode: "workspace-planning"` and `allowedEditRoots` is empty, explain that full workspace apply is not supported in this slice. Treat linked repos and folders as read-only context, ask the user to select an affected area through an explicit implementation workflow, and STOP before editing files.
|
|
54
|
-
|
|
55
|
-
4. **Read context files**
|
|
56
|
-
|
|
57
|
-
Read every file path listed under `contextFiles` from the apply instructions output.
|
|
58
|
-
The files depend on the schema being used:
|
|
59
|
-
- **spec-driven**: proposal, specs, design, tasks
|
|
60
|
-
- Other schemas: follow the contextFiles from CLI output
|
|
61
|
-
|
|
62
|
-
5. **Show current progress**
|
|
63
|
-
|
|
64
|
-
Display:
|
|
65
|
-
- Schema being used
|
|
66
|
-
- Progress: "N/M tasks complete"
|
|
67
|
-
- Remaining tasks overview
|
|
68
|
-
- Dynamic instruction from CLI
|
|
69
|
-
|
|
70
|
-
6. **Implement tasks (loop until done or blocked)**
|
|
71
|
-
|
|
72
|
-
For each pending task:
|
|
73
|
-
- Show which task is being worked on
|
|
74
|
-
- Make the code changes required
|
|
75
|
-
- Keep changes minimal and focused
|
|
76
|
-
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
|
|
77
|
-
- Continue to next task
|
|
78
|
-
|
|
79
|
-
**Pause if:**
|
|
80
|
-
- Task is unclear → ask for clarification
|
|
81
|
-
- Implementation reveals a design issue → suggest updating artifacts
|
|
82
|
-
- Error or blocker encountered → report and wait for guidance
|
|
83
|
-
- User interrupts
|
|
84
|
-
|
|
85
|
-
7. **On completion or pause, show status**
|
|
86
|
-
|
|
87
|
-
Display:
|
|
88
|
-
- Tasks completed this session
|
|
89
|
-
- Overall progress: "N/M tasks complete"
|
|
90
|
-
- If all done: suggest archive
|
|
91
|
-
- If paused: explain why and wait for guidance
|
|
92
|
-
|
|
93
|
-
**Output During Implementation**
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
## Implementing: <change-name> (schema: <schema-name>)
|
|
97
|
-
|
|
98
|
-
Working on task 3/7: <task description>
|
|
99
|
-
[...implementation happening...]
|
|
100
|
-
✓ Task complete
|
|
101
|
-
|
|
102
|
-
Working on task 4/7: <task description>
|
|
103
|
-
[...implementation happening...]
|
|
104
|
-
✓ Task complete
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Output On Completion**
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
## Implementation Complete
|
|
111
|
-
|
|
112
|
-
**Change:** <change-name>
|
|
113
|
-
**Schema:** <schema-name>
|
|
114
|
-
**Progress:** 7/7 tasks complete ✓
|
|
115
|
-
|
|
116
|
-
### Completed This Session
|
|
117
|
-
- [x] Task 1
|
|
118
|
-
- [x] Task 2
|
|
119
|
-
...
|
|
120
|
-
|
|
121
|
-
All tasks complete! Ready to archive this change.
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**Output On Pause (Issue Encountered)**
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
## Implementation Paused
|
|
128
|
-
|
|
129
|
-
**Change:** <change-name>
|
|
130
|
-
**Schema:** <schema-name>
|
|
131
|
-
**Progress:** 4/7 tasks complete
|
|
132
|
-
|
|
133
|
-
### Issue Encountered
|
|
134
|
-
<description of the issue>
|
|
135
|
-
|
|
136
|
-
**Options:**
|
|
137
|
-
1. <option 1>
|
|
138
|
-
2. <option 2>
|
|
139
|
-
3. Other approach
|
|
140
|
-
|
|
141
|
-
What would you like to do?
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**Guardrails**
|
|
145
|
-
- Keep going through tasks until done or blocked
|
|
146
|
-
- Always read context files before starting (from the apply instructions output)
|
|
147
|
-
- If task is ambiguous, pause and ask before implementing
|
|
148
|
-
- If implementation reveals issues, pause and suggest artifact updates
|
|
149
|
-
- Keep code changes minimal and scoped to each task
|
|
150
|
-
- Update task checkbox immediately after completing each task
|
|
151
|
-
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
152
|
-
- Use contextFiles from CLI output, don't assume specific file names
|
|
153
|
-
|
|
154
|
-
**Fluid Workflow Integration**
|
|
155
|
-
|
|
156
|
-
This skill supports the "actions on a change" model:
|
|
157
|
-
|
|
158
|
-
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
159
|
-
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: openspec-archive-change
|
|
3
|
-
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires openspec CLI.
|
|
6
|
-
metadata:
|
|
7
|
-
author: openspec
|
|
8
|
-
version: "1.0"
|
|
9
|
-
generatedBy: "1.4.1"
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
Archive a completed change in the experimental workflow.
|
|
13
|
-
|
|
14
|
-
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
|
-
|
|
16
|
-
**Steps**
|
|
17
|
-
|
|
18
|
-
1. **If no change name provided, prompt for selection**
|
|
19
|
-
|
|
20
|
-
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
21
|
-
|
|
22
|
-
Show only active changes (not already archived).
|
|
23
|
-
Include the schema used for each change if available.
|
|
24
|
-
|
|
25
|
-
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
26
|
-
|
|
27
|
-
2. **Check artifact completion status**
|
|
28
|
-
|
|
29
|
-
Run `openspec status --change "<name>" --json` to check artifact completion.
|
|
30
|
-
|
|
31
|
-
Parse the JSON to understand:
|
|
32
|
-
- `schemaName`: The workflow being used
|
|
33
|
-
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
|
|
34
|
-
- `artifacts`: List of artifacts with their status (`done` or other)
|
|
35
|
-
|
|
36
|
-
If status reports `actionContext.mode: "workspace-planning"`, explain that workspace archive is not supported in this slice and STOP. Do not move workspace changes into repo-local archives or edit linked repos.
|
|
37
|
-
|
|
38
|
-
**If any artifacts are not `done`:**
|
|
39
|
-
- Display warning listing incomplete artifacts
|
|
40
|
-
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
41
|
-
- Proceed if user confirms
|
|
42
|
-
|
|
43
|
-
3. **Check task completion status**
|
|
44
|
-
|
|
45
|
-
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
|
|
46
|
-
|
|
47
|
-
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
|
|
48
|
-
|
|
49
|
-
**If incomplete tasks found:**
|
|
50
|
-
- Display warning showing count of incomplete tasks
|
|
51
|
-
- Use **AskUserQuestion tool** to confirm user wants to proceed
|
|
52
|
-
- Proceed if user confirms
|
|
53
|
-
|
|
54
|
-
**If no tasks file exists:** Proceed without task-related warning.
|
|
55
|
-
|
|
56
|
-
4. **Assess delta spec sync state**
|
|
57
|
-
|
|
58
|
-
Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.
|
|
59
|
-
|
|
60
|
-
**If delta specs exist:**
|
|
61
|
-
- Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
|
|
62
|
-
- Determine what changes would be applied (adds, modifications, removals, renames)
|
|
63
|
-
- Show a combined summary before prompting
|
|
64
|
-
|
|
65
|
-
**Prompt options:**
|
|
66
|
-
- If changes needed: "Sync now (recommended)", "Archive without syncing"
|
|
67
|
-
- If already synced: "Archive now", "Sync anyway", "Cancel"
|
|
68
|
-
|
|
69
|
-
If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
|
|
70
|
-
|
|
71
|
-
5. **Perform the archive**
|
|
72
|
-
|
|
73
|
-
Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
|
|
74
|
-
```bash
|
|
75
|
-
mkdir -p "<planningHome.changesDir>/archive"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
|
79
|
-
|
|
80
|
-
**Check if target already exists:**
|
|
81
|
-
- If yes: Fail with error, suggest renaming existing archive or using different date
|
|
82
|
-
- If no: Move `changeRoot` to the archive directory
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
6. **Display summary**
|
|
89
|
-
|
|
90
|
-
Show archive completion summary including:
|
|
91
|
-
- Change name
|
|
92
|
-
- Schema that was used
|
|
93
|
-
- Archive location
|
|
94
|
-
- Whether specs were synced (if applicable)
|
|
95
|
-
- Note about any warnings (incomplete artifacts/tasks)
|
|
96
|
-
|
|
97
|
-
**Output On Success**
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
## Archive Complete
|
|
101
|
-
|
|
102
|
-
**Change:** <change-name>
|
|
103
|
-
**Schema:** <schema-name>
|
|
104
|
-
**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
|
|
105
|
-
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
|
|
106
|
-
|
|
107
|
-
All artifacts complete. All tasks complete.
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Guardrails**
|
|
111
|
-
- Always prompt for change selection if not provided
|
|
112
|
-
- Use artifact graph (openspec status --json) for completion checking
|
|
113
|
-
- Don't block archive on warnings - just inform and confirm
|
|
114
|
-
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
|
|
115
|
-
- Show clear summary of what happened
|
|
116
|
-
- If sync is requested, use openspec-sync-specs approach (agent-driven)
|
|
117
|
-
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
|