Aryan Mishra commited on
Commit
a6b96c2
·
1 Parent(s): 88567af

feat: initial commit - Multilingual ABSA project setup with 6 phases, 36 requirements

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .claude/AGENTS.md +221 -0
  2. .gitignore +21 -0
  3. .opencode/.gsd-profile +1 -0
  4. .opencode/command/gsd-add-tests.md +41 -0
  5. .opencode/command/gsd-ai-integration-phase.md +36 -0
  6. .opencode/command/gsd-audit-fix.md +33 -0
  7. .opencode/command/gsd-audit-milestone.md +36 -0
  8. .opencode/command/gsd-audit-uat.md +23 -0
  9. .opencode/command/gsd-autonomous.md +50 -0
  10. .opencode/command/gsd-capture.md +61 -0
  11. .opencode/command/gsd-cleanup.md +23 -0
  12. .opencode/command/gsd-code-review.md +58 -0
  13. .opencode/command/gsd-complete-milestone.md +142 -0
  14. .opencode/command/gsd-config.md +55 -0
  15. .opencode/command/gsd-debug.md +51 -0
  16. .opencode/command/gsd-discuss-phase.md +76 -0
  17. .opencode/command/gsd-docs-update.md +48 -0
  18. .opencode/command/gsd-eval-review.md +32 -0
  19. .opencode/command/gsd-execute-phase.md +64 -0
  20. .opencode/command/gsd-explore.md +26 -0
  21. .opencode/command/gsd-extract-learnings.md +22 -0
  22. .opencode/command/gsd-fast.md +30 -0
  23. .opencode/command/gsd-forensics.md +56 -0
  24. .opencode/command/gsd-graphify.md +203 -0
  25. .opencode/command/gsd-health.md +30 -0
  26. .opencode/command/gsd-help.md +27 -0
  27. .opencode/command/gsd-import.md +44 -0
  28. .opencode/command/gsd-inbox.md +38 -0
  29. .opencode/command/gsd-ingest-docs.md +41 -0
  30. .opencode/command/gsd-manager.md +44 -0
  31. .opencode/command/gsd-map-codebase.md +82 -0
  32. .opencode/command/gsd-mempalace-capture.md +70 -0
  33. .opencode/command/gsd-mempalace-recall.md +101 -0
  34. .opencode/command/gsd-milestone-summary.md +50 -0
  35. .opencode/command/gsd-mvp-phase.md +44 -0
  36. .opencode/command/gsd-new-milestone.md +44 -0
  37. .opencode/command/gsd-new-project.md +46 -0
  38. .opencode/command/gsd-ns-context.md +24 -0
  39. .opencode/command/gsd-ns-ideate.md +23 -0
  40. .opencode/command/gsd-ns-manage.md +35 -0
  41. .opencode/command/gsd-ns-project.md +26 -0
  42. .opencode/command/gsd-ns-review.md +28 -0
  43. .opencode/command/gsd-ns-workflow.md +33 -0
  44. .opencode/command/gsd-pause-work.md +42 -0
  45. .opencode/command/gsd-phase.md +55 -0
  46. .opencode/command/gsd-plan-phase.md +62 -0
  47. .opencode/command/gsd-plan-review-convergence.md +59 -0
  48. .opencode/command/gsd-pr-branch.md +25 -0
  49. .opencode/command/gsd-profile-user.md +45 -0
  50. .opencode/command/gsd-progress.md +48 -0
.claude/AGENTS.md ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- GSD:project-start source:PROJECT.md -->
2
+
3
+ ## Project
4
+
5
+ **Multilingual ABSA**
6
+
7
+ Aspect-based sentiment analysis (ABSA) system that extracts aspect terms and classifies their sentiment from multilingual product reviews. Supports English, Hindi, and Hinglish (code-mixed) — fine-tuned on XLM-RoBERTa with an ONNX-exported inference pipeline, served via FastAPI with a React dashboard.
8
+
9
+ **Core Value:** Accurately extract aspect terms and their sentiment from product reviews across English, Hindi, and Hinglish — enabling brands to understand what customers feel about specific product features in the languages their users actually write in.
10
+
11
+ ### Constraints
12
+
13
+ - **Model**: XLM-RoBERTa base (primary), IndicBERT for Hindi-focused runs
14
+ - **Export**: ONNX required before any model reaches the API
15
+ - **Metric**: Macro-F1 is the evaluation standard (not accuracy)
16
+ - **Stack**: FastAPI + Celery + Redis + PostgreSQL backend; React + Vite + Recharts frontend
17
+
18
+ <!-- GSD:project-end -->
19
+
20
+ <!-- GSD:stack-start source:research/STACK.md -->
21
+
22
+ ## Technology Stack
23
+
24
+ ## Recommended Stack
25
+
26
+ ### Core Technologies
27
+
28
+ | Technology | Version | Purpose | Why Recommended |
29
+ |------------|---------|---------|-----------------|
30
+ | Python | 3.11+ | Runtime language | ONNX Runtime 1.27+ drops Python 3.10 support; PyTorch 2.12+ requires 3.10+. 3.11 is the safe floor for all dependencies. |
31
+ | HuggingFace Transformers | 5.12.x | Model loading, tokenization, training loop | The de facto standard. Provides `XLMRobertaForTokenClassification` and `AutoTokenizer` out of the box. v5.x is a major rearchitecture — test thoroughly before upgrading from 4.x. |
32
+ | PyTorch | 2.12.x | Deep learning framework | Required by Transformers. v2.12 is latest stable (June 2026). Ships CUDA 13.0 by default. Use `--index-url https://download.pytorch.org/whl/cu126` if on older drivers. |
33
+ | XLM-RoBERTa | base (0.3B params) | Multilingual encoder | Pre-trained on 100 languages including Hindi. Strong cross-lingual zero-shot transfer. No `lang` tensor needed — auto-detects language. `FacebookAI/xlm-roberta-base` scores 16M+ downloads/month. Use `xlm-roberta-large` (0.55B) only if Macro-F1 on Hindi/Hinglish is >3 points below English after tuning base. |
34
+ | HuggingFace PEFT | 0.19.x | Parameter-efficient fine-tuning (LoRA) | LoRA is the standard for efficient encoder fine-tuning. v0.19 adds GraLoRA and QALoRA. For XLM-RoBERTa base (0.3B), full fine-tuning is feasible on consumer GPUs — **do not default to LoRA for this model size**. Use PEFT only if you need to fine-tune xlm-roberta-large on a single 24GB GPU. |
35
+ | Optimum | 1.26.x / latest | ONNX export bridge | Required for ONNX export. `optimum-cli export onnx` handles the conversion with architecture-specific configuration objects. |
36
+ | optimum-onnx | 0.1.x | ONNX export + runtime | **Split from Optimum in late 2025.** Contains the actual ONNX export logic and `ORTModelForXXX` classes. Must install separately. |
37
+ | ONNX Runtime | 1.27.x | Production inference engine | Runs the exported ONNX model in the API. No PyTorch dependency in production. v1.27 (June 2026) requires Python 3.11+, ONNX 1.21. |
38
+ | seqeval | 1.2.2 | Sequence labeling evaluation | The standard for BIO-tagging evaluation (precision, recall, F1 per entity type). Last updated 2020 but stable — no better alternative exists. |
39
+ | scikit-learn | 1.9.x | Metrics (Macro-F1, classification_report) | `sklearn.metrics` for overall metrics. v1.9 (June 2026) adds narwhals and GPU support for some estimators. |
40
+
41
+ ### Model Variants
42
+
43
+ | Model | Params | Best For | When to Use |
44
+ |-------|--------|----------|-------------|
45
+ | `FacebookAI/xlm-roberta-base` | 0.3B | Primary model for all 3 languages | Default choice. Good cross-lingual transfer. Fine-tunes on 16GB GPU. |
46
+ | `FacebookAI/xlm-roberta-large` | 0.55B | Higher accuracy target | Only if base underperforms on Hindi/Hinglish by >3 Macro-F1 points. Needs 24GB+ GPU or PEFT. |
47
+ | `ai4bharat/IndicBERT-v3-1B` | 1B | Hindi-focused runs | **Game-changer (Jan 2026):** Bidirectional Gemma-3 based encoder trained on 23 Indic languages + English. Trained with curriculum learning to prevent catastrophic forgetting. Likely beats XLM-R on Hindi/Hinglish specifically. |
48
+ | `ai4bharat/IndicBERT-v3-4B` | 4B | Max Hindi accuracy | 4B params — requires PEFT (LoRA). Overkill unless Hindi metrics are the primary concern. |
49
+ | `ai4bharat/indic-bert` | ~100M | (AVOID) | Original ALBERT-based IndicBERT. Too small, outdated architecture. **Do not use.** |
50
+
51
+ ### Supporting Libraries
52
+
53
+ | Library | Version | Purpose | When to Use |
54
+ |---------|---------|---------|-------------|
55
+ | datasets | 3.x | Data loading, preprocessing, train/test split | Use for loading SemEval 2014, M-ABSA, and custom datasets. Built-in caching and mapping functions. |
56
+ | tokenizers | 0.21.x | Fast tokenization | Backs Transformers' `AutoTokenizer`. Needed only if customizing tokenizer for Hinglish. |
57
+ | dhvani | 0.2.x | Hinglish phonetic normalization | **Primary tool for code-mixed Hinglish preprocessing.** Normalizes Romanized Hindi spelling variants ("bahut"/"bohot"/"boht" → canonical) using IPA as bridge. 1M+ lexicon, <1ms per word. Pure lookup + rules — no GPU needed. +1.2% Macro-F1 observed on Hindi sentiment. |
58
+ | akshar-32k | — | Custom BPE tokenizer for Hinglish | HuggingFace tokenizer trained on 40M tokens of Romanized Hinglish. Use **only if** XLM-RoBERTa's SentencePiece tokenizer fragments Hinglish words badly. Caveat: still struggles with spelling variation — pair with dhvani. |
59
+ | accelerate | 1.x | Training utilities | Required by Transformers `Trainer`. Handles device placement, mixed precision, gradient accumulation. |
60
+ | bitsandbytes | 0.45.x | 4-bit quantization for QLoRA | Only needed if you insist on QLoRA for xlm-roberta-large. **Not recommended** — XLM-R base fine-tunes fine on 16GB without quantization. |
61
+ | wandb | 0.19.x | Experiment logging (alternative to MLflow) | Use **only** if you prefer cloud logging over MLflow's self-hosted tracking. Both can coexist. |
62
+ | pydantic | 2.x | API schema validation | Already in project spec. Required for FastAPI request/response models. |
63
+ | celery | 5.4.x | Async task queue | For long-running inference jobs. Paired with Redis as broker. |
64
+ | redis | 5.x | Celery broker + cache | Required. Use `redis-py` (Python client). |
65
+ | psycopg2-binary | 2.9.x | PostgreSQL driver | Required by project spec. |
66
+ | sqlalchemy | 2.x | ORM for PostgreSQL | Required by project spec. |
67
+
68
+ ### Development & MLOps Tools
69
+
70
+ | Tool | Version | Purpose | Notes |
71
+ |------|---------|---------|-------|
72
+ | MLflow | 3.14.x | Experiment tracking, model registry, metrics logging | Latest (June 2026). v3.x focus is LLM observability but experiment tracking works identically. Log params, metrics, artifacts per training run. **Pin to `mlflow-skinny==3.14.0` for minimal dependencies** on the training side. Use full MLflow for the tracking server. |
73
+ | DVC | 3.67.x | Data and model version control | DVC tracks dataset versions and model files outside Git. v3.67.1 latest (Mar 2026). Use `dvc init` at project root, `dvc add data/` to track datasets. |
74
+ | Evidently AI | 0.7.x | Model monitoring, data drift detection | v0.7.21 latest (Mar 2026). Use for **data quality monitoring** after deployment — detecting distribution shifts in review text. Not needed during training. |
75
+ | Prometheus + Grafana | — | API metrics, request monitoring | Standard for FastAPI production monitoring. Not research-critical — standard setup. |
76
+ | Docker | 27.x | Containerization | Required for reproducible deployments. |
77
+
78
+ ### Frontend Stack
79
+
80
+ | Technology | Version | Purpose | Why |
81
+ |------------|---------|---------|-----|
82
+ | React | 19.x | UI framework | Standard choice. v19 stable. |
83
+ | Vite | 6.x | Build tool | Faster than CRA. Standard for new React projects. |
84
+ | Recharts | 2.x | Charting library | Built on D3. Good for confusion matrices, F1 trends, sentiment distributions. |
85
+ | TailwindCSS | 4.x | Utility CSS | v4 uses CSS-first config (no tailwind.config.js needed). Faster build times. |
86
+
87
+ ## Installation
88
+
89
+ # Core ML stack
90
+
91
+ # Hinglish preprocessing
92
+
93
+ # MLOps
94
+
95
+ # API
96
+
97
+ # Dev
98
+
99
+ # Frontend
100
+
101
+ ## Alternatives Considered
102
+
103
+ | Recommended | Alternative | When to Use Alternative |
104
+ |-------------|-------------|-------------------------|
105
+ | XLM-RoBERTa base | mBERT (BERT-base-multilingual-cased) | mBERT is smaller (0.18B vs 0.3B). Use **only** if inference latency is critical and you can accept 2-5 point F1 drop. XLM-RoBERTa is stronger on code-mixed and low-resource languages. |
106
+ | XLM-RoBERTa base | IndicBERT-v3-1B | Use IndicBERT-v3-1B when you pivot to Hindi/Hinglish-only evaluation. Its curriculum training (English → Indic) prevents catastrophic forgetting better than XLM-R's generic multilingual pretraining. |
107
+ | LoRA for large models | QLoRA (4-bit) | QLoRA only needed for xlm-roberta-large on a 16GB GPU. For base models, full fine-tuning is simpler and more accurate. |
108
+ | optimum-onnx export | torch.onnx.export (manual) | Manual `torch.onnx.export` gives finer control over dynamic axes and opset version. Use **only** if optimum's config doesn't support XLM-RoBERTa's architecture (unlikely — it's well-supported). |
109
+ | seqeval | evaluate (HuggingFace) | HuggingFace's `evaluate` library wraps seqeval. Use `evaluate` if you want a unified metrics API. Either works — seqeval is the underlying engine. |
110
+ | MLflow | wandb | MLflow is self-hosted (data stays private), wandb is SaaS with a free tier. Use wandb if you prefer cloud dashboards. This project spec already requires MLflow. |
111
+ | DVC | Git LFS | DVC is more flexible (any cloud storage as remote) and integrates with ML pipelines. Git LFS is simpler but doesn't handle dataset versioning workflows as well. |
112
+
113
+ ## What NOT to Use
114
+
115
+ | Avoid | Why | Use Instead |
116
+ |-------|-----|-------------|
117
+ | Original `ai4bharat/indic-bert` | ALBERT-based, ~100M params, outdated (2020). Significantly weaker than XLM-R or IndicBERT-v3. | `ai4bharat/IndicBERT-v3-1B` or `FacebookAI/xlm-roberta-base` |
118
+ | `ai4bharat/IndicBERTv2-*` | ALBERT-based, still inferior to XLM-R. v2 (2023) is better than v1 but v3 (Jan 2026) is a completely new architecture (Gemma-3). | `ai4bharat/IndicBERT-v3-1B` |
119
+ | Older `optimum` ONNX path (optimum<1.15) | ONNX export was split to `optimum-onnx` in late 2025. Early 2025 versions may have path resolution bugs. | `optimum-onnx>=0.1.0` |
120
+ | `bert-base-multilingual-cased` (mBERT) | Weaker cross-lingual transfer than XLM-RoBERTa. Trained on Wikipedia only (vs CommonCrawl for XLM-R). | `FacebookAI/xlm-roberta-base` |
121
+ | PyABSA as a dependency | PyABSA is a full framework that abstracts away the training loop. This project is building from scratch for learning + custom ONNX export. Using PyABSA would hide the architecture decisions. | Build custom pipeline: Transformers `Trainer` + custom model class |
122
+ | IndicTrans2 for Hinglish → Hindi | Translating Hinglish to Hindi removes the code-mixed signal. Romanized Hindi + English mixed text is the actual distribution. Translating loses information. | `dhvani` normalization (keeps English, normalizes Romanized Hindi spellings) |
123
+ | SentencePiece from scratch for Hinglish | XLM-RoBERTa's tokenizer already handles multilingual text adequately. Training a custom SentencePiece is expensive and rarely improves F1 by >1 point. | `dhvani` normalization + XLM-RoBERTa tokenizer. Only reach for `akshar-32k` if word fragmentation is severe. |
124
+
125
+ ## ABSA Architecture Choices
126
+
127
+ ### Stage 1: Aspect Term Extraction
128
+
129
+ - **Approach:** Token classification with BIO tagging (B-Aspect, I-Aspect, O)
130
+ - **Model head:** `XLMRobertaForTokenClassification` with 3 output labels
131
+ - **Context:** Standard approach in all cross-lingual ABSA literature (2025 survey: Smíd et al.)
132
+
133
+ ### Stage 2: Aspect Sentiment Classification
134
+
135
+ - **Approach:** Extract each aspect span's pooled embedding → classify into {Positive, Negative, Neutral, Conflict}
136
+ - **Model head:** Linear classifier on top of pooled aspect span representations
137
+ - **Alternative (merged):** Single token classification head with merged labels (e.g., `B-ASP-Positive`, `I-ASP-Negative`, `O`) as demonstrated by `yangheng/deberta-v3-base-end2end-absa`
138
+ - **Recommendation for this project:** Use **separate heads on a shared encoder** for Stage 1 and Stage 2, compiled into a single ONNX graph. This allows different optimization for each task while sharing the multilingual encoder. The merged-label approach is simpler but couples the two tasks rigidly.
139
+
140
+ ### ONNX Export Strategy
141
+
142
+ ## Hinglish Preprocessing Pipeline
143
+
144
+ - XLM-RoBERTa's SentencePiece tokenizer was trained on clean text. Hinglish has extreme spelling variation ("kaise" / "kese" / "kayse").
145
+ - dhvani normalizes all Romanized Hindi variants to a canonical IPA-based form **without** transliterating to Devanagari — preserving the Roman-script input that the model was fine-tuned on.
146
+ - English words pass through untouched.
147
+ - <1ms per word — negligible latency cost.
148
+ - Add `akshar-32k` tokenizer as a pre-tokenization step. But benchmark first — it may not improve F1 over using XLM-R's tokenizer directly after dhvani normalization.
149
+
150
+ ## Version Compatibility
151
+
152
+ | Package | Compatible With | Notes |
153
+ |---------|-----------------|-------|
154
+ | transformers 5.x | PyTorch 2.10+ | v5.x is a major restructure. `Trainer`, `AutoModel`, and pipeline APIs are backward-compatible but some internals changed. Pin carefully. |
155
+ | optimum-onnx 0.1.x | optimum 1.26+, transformers 5.x | Split from optimum. Must install both. |
156
+ | onnxruntime 1.27.x | Python 3.11+ | Python 3.10 wheels no longer published. |
157
+ | PEFT 0.19.x | transformers 5.x, accelerate 1.x | Check `get_peft_model` compatibility with XLMRobertaForTokenClassification. |
158
+ | dhvani 0.2.x | Python 3.10+ | No external model dependencies. Pure Python. |
159
+ | MLflow 3.14.x | Python 3.10+ | `mlflow-skinny` for minimal deps, `mlflow[extras]` for full. |
160
+ | DVC 3.67.x | Python 3.10+ | Works with any Git remote. |
161
+
162
+ ## Sources
163
+
164
+ - HuggingFace Transformers docs (v5.12.1) — XLM-RoBERTa model card, export guide, token classification tutorial — HIGH confidence
165
+ - `huggingface.co/facebookai/xlm-roberta-base` — 16M+ monthly downloads, confirmed active — HIGH confidence
166
+ - `huggingface.co/ai4bharat/IndicBERT-v3-4B` — IndicBERT v3 model card, curriculum training strategy — HIGH confidence
167
+ - PEFT GitHub releases (v0.19.0, 2026-04-14) — feature list, LoRA/QLoRA/GraLoRA support — HIGH confidence
168
+ - optimum-onnx GitHub (v0.1.0, 2025-12-23) — split from optimum, export CLI — HIGH confidence
169
+ - onnxruntime PyPI (v1.27.0, 2026-06-15) — version history, Python requirement — HIGH confidence
170
+ - seqeval PyPI (v1.2.2, latest) — stable, last updated 2020 — MEDIUM confidence (no updates needed but inactive)
171
+ - dhvani PyPI + GitHub — Hinglish normalization documentation — HIGH confidence
172
+ - akshar-32k HuggingFace — custom Hinglish BPE tokenizer — MEDIUM confidence (niche, unproven at scale)
173
+ - Cross-lingual ABSA survey (Smíd et al., 2025) — token-classification paradigm for ATE, pipeline for compound tasks — HIGH confidence
174
+ - M-ABSA dataset paper (Wu et al., EMNLP 2025) — multilingual ABSA benchmark, 21 languages — HIGH confidence
175
+ - LACA: Cross-lingual ABSA with LLM augmentation (Šmíd et al., ACL 2025) — state-of-the-art cross-lingual methods — HIGH confidence
176
+
177
+ <!-- GSD:stack-end -->
178
+
179
+ <!-- GSD:conventions-start source:CONVENTIONS.md -->
180
+
181
+ ## Conventions
182
+
183
+ Conventions not yet established. Will populate as patterns emerge during development.
184
+ <!-- GSD:conventions-end -->
185
+
186
+ <!-- GSD:architecture-start source:ARCHITECTURE.md -->
187
+
188
+ ## Architecture
189
+
190
+ Architecture not yet mapped. Follow existing patterns found in the codebase.
191
+ <!-- GSD:architecture-end -->
192
+
193
+ <!-- GSD:skills-start source:skills/ -->
194
+
195
+ ## Project Skills
196
+
197
+ No project skills found. Add skills to any of: `.claude/skills/`, `.agents/skills/`, `.cursor/skills/`, `.github/skills/`, or `.codex/skills/` with a `SKILL.md` index file.
198
+ <!-- GSD:skills-end -->
199
+
200
+ <!-- GSD:workflow-start source:GSD defaults -->
201
+
202
+ ## GSD Workflow Enforcement
203
+
204
+ Before using Edit, Write, or other file-changing tools, start work through a GSD command so planning artifacts and execution context stay in sync.
205
+
206
+ Use these entry points:
207
+
208
+ - `/gsd-quick` for small fixes, doc updates, and ad-hoc tasks
209
+ - `/gsd-debug` for investigation and bug fixing
210
+ - `/gsd-execute-phase` for planned phase work
211
+
212
+ Do not make direct repo edits outside a GSD workflow unless the user explicitly asks to bypass it.
213
+ <!-- GSD:workflow-end -->
214
+
215
+ <!-- GSD:profile-start -->
216
+
217
+ ## Developer Profile
218
+
219
+ > Profile not yet configured. Run `/gsd-profile-user` to generate your developer profile.
220
+ > This section is managed by `generate-claude-profile` -- do not edit manually.
221
+ <!-- GSD:profile-end -->
.gitignore ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ node_modules/
2
+ .env*
3
+ *.log
4
+ .DS_Store
5
+ opencode.exe
6
+
7
+ # Opencode/GSD files to exclude
8
+ .opencode/*
9
+ !.opencode/package.json
10
+ !.opencode/package-lock.json
11
+ !.opencode/.gsd-profile
12
+ !.opencode/skills
13
+ !.opencode/skills/**
14
+ !.opencode/scripts
15
+ !.opencode/scripts/**
16
+ !.opencode/hooks
17
+ !.opencode/hooks/**
18
+ !.opencode/command
19
+ !.opencode/command/**
20
+ !.opencode/gsd-core
21
+ !.opencode/gsd-core/**
.opencode/.gsd-profile ADDED
@@ -0,0 +1 @@
 
 
1
+ full
.opencode/command/gsd-add-tests.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Generate tests for a completed phase based on UAT criteria and implementation
3
+ argument-hint: "<phase> [additional instructions]"
4
+ argument-instructions: |
5
+ Parse the argument as a phase number (integer, decimal, or letter-suffix), plus optional free-text instructions.
6
+ Example: /gsd-add-tests 12
7
+ Example: /gsd-add-tests 12 focus on edge cases in the pricing module
8
+ requires: [phase]
9
+ tools:
10
+ read: true
11
+ write: true
12
+ edit: true
13
+ bash: true
14
+ glob: true
15
+ grep: true
16
+ agent: true
17
+ question: true
18
+ ---
19
+ <objective>
20
+ Generate unit and E2E tests for a completed phase, using its SUMMARY.md, CONTEXT.md, and VERIFICATION.md as specifications.
21
+
22
+ Analyzes implementation files, classifies them into TDD (unit), E2E (browser), or Skip categories, presents a test plan for user approval, then generates tests following RED-GREEN conventions.
23
+
24
+ Output: Test files committed with message `test(phase-{N}): add unit and E2E tests from add-tests command`
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/add-tests.md
29
+ </execution_context>
30
+
31
+ <context>
32
+ Phase: $ARGUMENTS
33
+
34
+ @.planning/STATE.md
35
+ @.planning/ROADMAP.md
36
+ </context>
37
+
38
+ <process>
39
+ Execute end-to-end.
40
+ Preserve all workflow gates (classification approval, test plan approval, RED-GREEN verification, gap reporting).
41
+ </process>
.opencode/command/gsd-ai-integration-phase.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Generate an AI-SPEC.md design contract for phases that involve building AI systems.
3
+ argument-hint: "[phase number]"
4
+ requires: [phase]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ agent: true
12
+ webfetch: true
13
+ websearch: true
14
+ question: true
15
+ mcp__context7__*: true
16
+ ---
17
+ <objective>
18
+ Create an AI design contract (AI-SPEC.md) for a phase involving AI system development.
19
+ Orchestrates gsd-framework-selector → gsd-ai-researcher → gsd-domain-researcher → gsd-eval-planner.
20
+ Flow: Select Framework → Research Docs → Research Domain → Design Eval Strategy → Done
21
+ </objective>
22
+
23
+ <execution_context>
24
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/ai-integration-phase.md
25
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ai-frameworks.md
26
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ai-evals.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ Phase number: $ARGUMENTS — optional, auto-detects next unplanned phase if omitted.
31
+ </context>
32
+
33
+ <process>
34
+ Execute end-to-end.
35
+ Preserve all workflow gates.
36
+ </process>
.opencode/command/gsd-audit-fix.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ type: prompt
3
+ description: Autonomous audit-to-fix pipeline — find issues, classify, fix, test, commit
4
+ argument-hint: "--source <audit-uat> [--severity <medium|high|all>] [--max N] [--dry-run]"
5
+ requires: [audit-uat]
6
+ tools:
7
+ read: true
8
+ write: true
9
+ edit: true
10
+ bash: true
11
+ grep: true
12
+ glob: true
13
+ agent: true
14
+ question: true
15
+ ---
16
+ <objective>
17
+ Run an audit, classify findings as auto-fixable vs manual-only, then autonomously fix
18
+ auto-fixable issues with test verification and atomic commits.
19
+
20
+ Flags:
21
+ - `--max N` — maximum findings to fix (default: 5)
22
+ - `--severity high|medium|all` — minimum severity to process (default: medium)
23
+ - `--dry-run` — classify findings without fixing (shows classification table)
24
+ - `--source <audit>` — which audit to run (default: audit-uat)
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/audit-fix.md
29
+ </execution_context>
30
+
31
+ <process>
32
+ Execute end-to-end.
33
+ </process>
.opencode/command/gsd-audit-milestone.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Audit milestone completion against original intent before archiving
3
+ argument-hint: "[version]"
4
+ requires: [execute-phase]
5
+ tools:
6
+ read: true
7
+ glob: true
8
+ grep: true
9
+ bash: true
10
+ agent: true
11
+ write: true
12
+ ---
13
+ <objective>
14
+ Verify milestone achieved its definition of done. Check requirements coverage, cross-phase integration, and end-to-end flows.
15
+
16
+ **This command IS the orchestrator.** Reads existing VERIFICATION.md files (phases already verified during execute-phase), aggregates tech debt and deferred gaps, then spawns integration checker for cross-phase wiring.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/audit-milestone.md
21
+ </execution_context>
22
+
23
+ <context>
24
+ Version: $ARGUMENTS (optional — defaults to current milestone)
25
+
26
+ Core planning files are resolved in-workflow (`init milestone-op`) and loaded only as needed.
27
+
28
+ **Completed Work:**
29
+ Glob: .planning/phases/*/*-SUMMARY.md
30
+ Glob: .planning/phases/*/*-VERIFICATION.md
31
+ </context>
32
+
33
+ <process>
34
+ Execute end-to-end.
35
+ Preserve all workflow gates (scope determination, verification reading, integration check, requirements coverage, routing).
36
+ </process>
.opencode/command/gsd-audit-uat.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Cross-phase audit of all outstanding UAT and verification items
3
+ tools:
4
+ read: true
5
+ glob: true
6
+ grep: true
7
+ bash: true
8
+ ---
9
+ <objective>
10
+ Scan all phases for pending, skipped, blocked, and human_needed UAT items. Cross-reference against codebase to detect stale documentation. Produce prioritized human test plan.
11
+ </objective>
12
+
13
+ <execution_context>
14
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/audit-uat.md
15
+ </execution_context>
16
+
17
+ <context>
18
+ Core planning files are loaded in-workflow via CLI.
19
+
20
+ **Scope:**
21
+ Glob: .planning/phases/*/*-UAT.md
22
+ Glob: .planning/phases/*/*-VERIFICATION.md
23
+ </context>
.opencode/command/gsd-autonomous.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Run all remaining phases autonomously — discuss→plan→execute per phase
3
+ argument-hint: "[--from N] [--to N] [--only N] [--interactive] [--converge]"
4
+ effort: max
5
+ requires: [cleanup, phase, progress]
6
+ tools:
7
+ read: true
8
+ write: true
9
+ bash: true
10
+ glob: true
11
+ grep: true
12
+ question: true
13
+ agent: true
14
+ ---
15
+ <objective>
16
+ Execute all remaining milestone phases autonomously. For each phase: discuss → plan → execute. Pauses only for user decisions (grey area acceptance, blockers, validation requests).
17
+
18
+ Uses ROADMAP.md phase discovery and Skill() flat invocations for each phase command. After all phases complete: milestone audit → complete → cleanup.
19
+
20
+ **Creates/Updates:**
21
+ - `.planning/STATE.md` — updated after each phase
22
+ - `.planning/ROADMAP.md` — progress updated after each phase
23
+ - Phase artifacts — CONTEXT.md, PLANs, SUMMARYs per phase
24
+
25
+ **After:** Milestone is complete and cleaned up.
26
+ </objective>
27
+
28
+ <execution_context>
29
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/autonomous.md
30
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
31
+ </execution_context>
32
+
33
+ <context>
34
+ Optional flags:
35
+ - `--from N` — start from phase N instead of the first incomplete phase.
36
+ - `--to N` — stop after phase N completes (halt instead of advancing to next phase).
37
+ - `--only N` — execute only phase N (single-phase mode).
38
+ - `--interactive` — run discuss inline with questions (not auto-answered), then dispatch plan→execute as background agents. Keeps the main context lean while preserving user input on decisions.
39
+ - `--converge` — run each phase's planning step through `gsd-plan-review-convergence` instead of plain `gsd-plan-phase`. Requires `workflow.plan_review_convergence=true`.
40
+ - `--cross-ai` — compatibility alias for `--converge`.
41
+
42
+ When `--converge` or `--cross-ai` is set, reviewer selector flags supported by `gsd-plan-review-convergence` may be passed through: `--codex`, `--gemini`, `--claude`, `--opencode`, `--ollama`, `--lm-studio`, `--llama-cpp`, `--all`, and `--max-cycles N`.
43
+
44
+ Project context, phase list, and state are resolved inside the workflow using init commands (`gsd-tools query init.milestone-op`, `gsd-tools query roadmap.analyze`). No upfront context loading needed.
45
+ </context>
46
+
47
+ <process>
48
+ Execute end-to-end.
49
+ Preserve all workflow gates (phase discovery, per-phase execution, blocker handling, progress display).
50
+ </process>
.opencode/command/gsd-capture.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Capture ideas, tasks, notes, and seeds to their destination
3
+ argument-hint: "[--note | --backlog | --seed | --list] [text]"
4
+ tools:
5
+ read: true
6
+ write: true
7
+ edit: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ question: true
12
+ ---
13
+
14
+ <objective>
15
+ Capture ideas, tasks, notes, and seeds to their appropriate destination in the GSD system.
16
+
17
+ Mode routing:
18
+ - **default** (no flag): Capture as a structured todo for later work → add-todo workflow
19
+ - **--note**: Zero-friction idea capture (append/list/promote) → note workflow
20
+ - **--backlog**: Add an idea to the backlog parking lot (999.x numbering) → add-backlog workflow
21
+ - **--seed**: Capture a forward-looking idea with trigger conditions → plant-seed workflow
22
+ - **--list**: List pending todos and select one to work on → check-todos workflow
23
+ </objective>
24
+
25
+ <routing>
26
+
27
+ | Flag | Destination | Workflow |
28
+ |------|-------------|----------|
29
+ | (none) | Structured todo in .planning/todos/ | add-todo |
30
+ | --note | Timestamped note file, list, or promote | note |
31
+ | --backlog | ROADMAP.md backlog section (999.x) | add-backlog |
32
+ | --seed | .planning/seeds/SEED-NNN-slug.md | plant-seed |
33
+ | --list | Interactive todo browser + action router | check-todos |
34
+
35
+ </routing>
36
+
37
+ <execution_context>
38
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/add-todo.md
39
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/note.md
40
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/add-backlog.md
41
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/plant-seed.md
42
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/check-todos.md
43
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
44
+ </execution_context>
45
+
46
+ <context>
47
+ Arguments: $ARGUMENTS
48
+
49
+ Parse the first token of $ARGUMENTS:
50
+ - If it is `--note`: strip the flag, pass remainder to note workflow
51
+ - If it is `--backlog`: strip the flag, pass remainder to add-backlog workflow
52
+ - If it is `--seed`: strip the flag, pass remainder to plant-seed workflow
53
+ - If it is `--list`: pass remainder (optional area filter) to check-todos workflow
54
+ - Otherwise: pass all of $ARGUMENTS to add-todo workflow
55
+ </context>
56
+
57
+ <process>
58
+ 1. Parse the leading flag (if any) from $ARGUMENTS.
59
+ 2. Load and execute the appropriate workflow end-to-end based on the routing table above.
60
+ 3. Preserve all workflow gates from the target workflow (directory structure, duplicate detection, commits, etc.).
61
+ </process>
.opencode/command/gsd-cleanup.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Archive accumulated phase directories from completed milestones
3
+ requires: [phase]
4
+ tools:
5
+ read: true
6
+ write: true
7
+ bash: true
8
+ question: true
9
+ ---
10
+ <objective>
11
+ Archive phase directories from completed milestones into `.planning/milestones/v{X.Y}-phases/`.
12
+
13
+ Use when `.planning/phases/` has accumulated directories from past milestones.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/cleanup.md
18
+ </execution_context>
19
+
20
+ <process>
21
+ Execute end-to-end.
22
+ Identify completed milestones, show a dry-run summary, and archive on confirmation.
23
+ </process>
.opencode/command/gsd-code-review.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Review source files changed during a phase for bugs, security issues, and code quality problems
3
+ argument-hint: "<phase-number> [--depth=quick|standard|deep] [--files file1,file2,...] [--fix [--all] [--auto]]"
4
+ requires: [config, import, phase, quick, review]
5
+ tools:
6
+ read: true
7
+ bash: true
8
+ glob: true
9
+ grep: true
10
+ write: true
11
+ agent: true
12
+ ---
13
+ <objective>
14
+ Review source files changed during a phase for bugs, security vulnerabilities, and code quality problems.
15
+
16
+ Spawns the gsd-code-reviewer agent to analyze code at the specified depth level. Produces REVIEW.md artifact in the phase directory with severity-classified findings.
17
+
18
+ Arguments:
19
+ - Phase number (required) — which phase's changes to review (e.g., "2" or "02")
20
+ - `--depth=quick|standard|deep` (optional) — review depth level, overrides workflow.code_review_depth config
21
+ - quick: Pattern-matching only (~2 min)
22
+ - standard: Per-file analysis with language-specific checks (~5-15 min, default)
23
+ - deep: Cross-file analysis including import graphs and call chains (~15-30 min)
24
+ - `--files file1,file2,...` (optional) — explicit comma-separated file list, skips SUMMARY/git scoping (highest precedence for scoping)
25
+ - `--fix` (optional) — after review completes (or if REVIEW.md already exists), auto-apply fixes found. Spawns gsd-code-fixer agent. Accepts sub-flags:
26
+ - `--all` — include Info findings in fix scope (default: Critical + Warning only)
27
+ - `--auto` — enable fix + re-review iteration loop, capped at 3 iterations
28
+
29
+ Output: {padded_phase}-REVIEW.md in phase directory + inline summary of findings
30
+ </objective>
31
+
32
+ <execution_context>
33
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/code-review.md
34
+ </execution_context>
35
+
36
+ <context>
37
+ Phase: $ARGUMENTS (first positional argument is phase number)
38
+
39
+ Optional flags parsed from $ARGUMENTS:
40
+ - `--depth=VALUE` — Depth override (quick|standard|deep). If provided, overrides workflow.code_review_depth config.
41
+ - `--files=file1,file2,...` — Explicit file list override. Has highest precedence for file scoping per D-08. When provided, workflow skips SUMMARY.md extraction and git diff fallback entirely.
42
+
43
+ Context files (AGENTS.md, SUMMARY.md, phase state) are resolved inside the workflow via `gsd-tools query init.phase-op` and delegated to agent via `<files_to_read>` blocks.
44
+ </context>
45
+
46
+ <process>
47
+ This command is a thin dispatch layer. It parses arguments and delegates to the workflow.
48
+
49
+ Execute end-to-end.
50
+
51
+ The workflow (not this command) enforces these gates:
52
+ - Phase validation (before config gate)
53
+ - Config gate check (workflow.code_review)
54
+ - File scoping (--files override > SUMMARY.md > git diff fallback)
55
+ - Empty scope check (skip if no files)
56
+ - Agent spawning (gsd-code-reviewer)
57
+ - Result presentation (inline summary + next steps)
58
+ </process>
.opencode/command/gsd-complete-milestone.md ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ type: prompt
3
+ description: Archive completed milestone and prepare for next version
4
+ argument-hint: <version>
5
+ requires: [audit-milestone, discuss-phase, execute-phase, new-milestone, phase, plan-phase, stats, update]
6
+ tools:
7
+ read: true
8
+ write: true
9
+ bash: true
10
+ ---
11
+
12
+ <objective>
13
+ Mark milestone {{version}} complete, archive to milestones/, and update ROADMAP.md and REQUIREMENTS.md.
14
+
15
+ Purpose: Create historical record of shipped version, archive milestone artifacts (roadmap + requirements), and prepare for next milestone.
16
+ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tagged.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ **Load these files NOW (before proceeding):**
21
+
22
+ - @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/complete-milestone.md (main workflow)
23
+ - @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/templates/milestone-archive.md (archive template)
24
+ </execution_context>
25
+
26
+ <context>
27
+ **Project files:**
28
+ - `.planning/ROADMAP.md`
29
+ - `.planning/REQUIREMENTS.md`
30
+ - `.planning/STATE.md`
31
+ - `.planning/PROJECT.md`
32
+
33
+ **User input:**
34
+
35
+ - Version: {{version}} (e.g., "1.0", "1.1", "2.0")
36
+ </context>
37
+
38
+ <process>
39
+
40
+ **Follow complete-milestone.md workflow:**
41
+
42
+ 0. **Check for audit:**
43
+
44
+ - Look for `.planning/v{{version}}-MILESTONE-AUDIT.md`
45
+ - If missing or stale: recommend `/gsd-audit-milestone` first
46
+ - If audit status is `gaps_found`: recommend closing the gaps inline
47
+ (the audit output already enumerates them — insert closure phases
48
+ via `/gsd-phase --insert <N>` plus the standard
49
+ discuss/plan/execute chain) before proceeding.
50
+ - If audit status is `passed`: proceed to step 1
51
+
52
+ ```markdown
53
+ ## Pre-flight Check
54
+
55
+ {If no v{{version}}-MILESTONE-AUDIT.md:}
56
+ ⚠ No milestone audit found. Run `/gsd-audit-milestone` first to verify
57
+ requirements coverage, cross-phase integration, and E2E flows.
58
+
59
+ {If audit has gaps:}
60
+ ⚠ Milestone audit found gaps. The audit output already enumerates the
61
+ unsatisfied requirements, cross-phase issues, and broken flows — insert
62
+ a closure phase per gap with `/gsd-phase --insert <N>` and run the
63
+ standard `/gsd-discuss-phase` → `/gsd-plan-phase` → `/gsd-execute-phase`
64
+ chain. Or proceed anyway to accept the gaps as tech debt.
65
+
66
+ {If audit passed:}
67
+ ✓ Milestone audit passed. Proceeding with completion.
68
+ ```
69
+
70
+ 1. **Verify readiness:**
71
+
72
+ - Check all phases in milestone have completed plans (SUMMARY.md exists)
73
+ - Present milestone scope and stats
74
+ - Wait for confirmation
75
+
76
+ 2. **Gather stats:**
77
+
78
+ - Count phases, plans, tasks
79
+ - Calculate git range, file changes, LOC
80
+ - Extract timeline from git log
81
+ - Present summary, confirm
82
+
83
+ 3. **Extract accomplishments:**
84
+
85
+ - Read all phase SUMMARY.md files in milestone range
86
+ - Extract 4-6 key accomplishments
87
+ - Present for approval
88
+
89
+ 4. **Archive milestone:**
90
+
91
+ - Create `.planning/milestones/v{{version}}-ROADMAP.md`
92
+ - Extract full phase details from ROADMAP.md
93
+ - Fill milestone-archive.md template
94
+ - Update ROADMAP.md to one-line summary with link
95
+
96
+ 5. **Archive requirements:**
97
+
98
+ - Create `.planning/milestones/v{{version}}-REQUIREMENTS.md`
99
+ - Mark all v1 requirements as complete (checkboxes checked)
100
+ - Note requirement outcomes (validated, adjusted, dropped)
101
+ - Delete `.planning/REQUIREMENTS.md` (fresh one created for next milestone)
102
+
103
+ 6. **Update PROJECT.md:**
104
+
105
+ - Add "Current State" section with shipped version
106
+ - Add "Next Milestone Goals" section
107
+ - Archive previous content in `<details>` (if v1.1+)
108
+
109
+ 7. **Commit and tag:**
110
+
111
+ - Stage: MILESTONES.md, PROJECT.md, ROADMAP.md, STATE.md, archive files
112
+ - Commit: `chore: archive v{{version}} milestone`
113
+ - Tag: `git tag -a v{{version}} -m "[milestone summary]"`
114
+ - Ask about pushing tag
115
+
116
+ 8. **Offer next steps:**
117
+ - `/gsd-new-milestone` — start next milestone (questioning → research → requirements → roadmap)
118
+
119
+ </process>
120
+
121
+ <success_criteria>
122
+
123
+ - Milestone archived to `.planning/milestones/v{{version}}-ROADMAP.md`
124
+ - Requirements archived to `.planning/milestones/v{{version}}-REQUIREMENTS.md`
125
+ - `.planning/REQUIREMENTS.md` deleted (fresh for next milestone)
126
+ - ROADMAP.md collapsed to one-line entry
127
+ - PROJECT.md updated with current state
128
+ - Git tag v{{version}} created (if `git.create_tag` enabled)
129
+ - Commit successful
130
+ - User knows next steps (including need for fresh requirements)
131
+ </success_criteria>
132
+
133
+ <critical_rules>
134
+
135
+ - **Load workflow first:** Read complete-milestone.md before executing
136
+ - **Verify completion:** All phases must have SUMMARY.md files
137
+ - **User confirmation:** Wait for approval at verification gates
138
+ - **Archive before deleting:** Always create archive files before updating/deleting originals
139
+ - **One-line summary:** Collapsed milestone in ROADMAP.md should be single line with link
140
+ - **Context efficiency:** Archive keeps ROADMAP.md and REQUIREMENTS.md constant size per milestone
141
+ - **Fresh requirements:** Next milestone starts with `/gsd-new-milestone` which includes requirements definition
142
+ </critical_rules>
.opencode/command/gsd-config.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Configure GSD settings — workflow toggles, advanced knobs, integrations, and model profile
3
+ argument-hint: "[--advanced | --integrations | --profile <name>]"
4
+ requires: [code-review, review, settings]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ question: true
10
+ ---
11
+
12
+ <objective>
13
+ Configure GSD settings interactively with a single consolidated command.
14
+
15
+ Mode routing:
16
+ - **default** (no flag): Common-case toggles (model, research, plan_check, verifier, branching) → settings workflow
17
+ - **--advanced**: Power-user knobs (planning tuning, timeouts, branch templates, cross-AI execution) → settings-advanced workflow
18
+ - **--integrations**: Third-party API keys, code-review CLI routing, agent-skill injection → settings-integrations workflow
19
+ - **--profile <name>**: Switch model profile (quality|balanced|budget|inherit) → set-profile (inline)
20
+ </objective>
21
+
22
+ <routing>
23
+
24
+ | Flag | Action | Workflow |
25
+ |------|--------|----------|
26
+ | (none) | Interactive 5-question common-case config prompt | settings |
27
+ | --advanced | Power-user knobs: planning, execution, discussion, cross-AI, git, runtime | settings-advanced |
28
+ | --integrations | API keys (Brave/Firecrawl/Exa), review CLI routing, agent skills | settings-integrations |
29
+ | --profile &lt;name&gt; | Switch model profile without interactive prompt | gsd-tools query config-set-model-profile |
30
+
31
+ </routing>
32
+
33
+ <execution_context>
34
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/settings.md
35
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/settings-advanced.md
36
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/settings-integrations.md
37
+ </execution_context>
38
+
39
+ <context>
40
+ Arguments: $ARGUMENTS
41
+
42
+ Parse the first token of $ARGUMENTS:
43
+ - If it is `--advanced`: strip the flag, execute settings-advanced workflow
44
+ - If it is `--integrations`: strip the flag, execute settings-integrations workflow
45
+ - If it starts with `--profile`: extract the profile name (remainder after `--profile`), then:
46
+ 1. Verify `gsd-tools` is on PATH via `command -v gsd-tools`; if absent, emit the install hint `Install GSD via 'npm i -g @opengsd/gsd-core'` and stop.
47
+ 2. Run: `gsd-tools query config-set-model-profile <profile-name> --raw` and display the output verbatim.
48
+ - Otherwise: execute settings workflow (no argument needed)
49
+ </context>
50
+
51
+ <process>
52
+ 1. Parse the leading flag (if any) from $ARGUMENTS.
53
+ 2. Load and execute the appropriate workflow end-to-end, or run the inline SDK command for --profile.
54
+ 3. Preserve all workflow gates from the target workflow.
55
+ </process>
.opencode/command/gsd-debug.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Systematic debugging with persistent state across context resets
3
+ argument-hint: "[list | status <slug> | continue <slug> | --diagnose] [issue description]"
4
+ tools:
5
+ read: true
6
+ write: true
7
+ bash: true
8
+ agent: true
9
+ question: true
10
+ ---
11
+
12
+ <objective>
13
+ Debug issues using scientific method with subagent isolation.
14
+
15
+ **Orchestrator role:** Gather symptoms, spawn gsd-debugger agent, handle checkpoints, spawn continuations.
16
+
17
+ **Flags:**
18
+ - `--diagnose` — Diagnose only. Returns a Root Cause Report without applying a fix.
19
+
20
+ **Subcommands:** `list` · `status <slug>` · `continue <slug>`
21
+ </objective>
22
+
23
+ <available_agent_types>
24
+ Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
25
+ - gsd-debug-session-manager — manages debug checkpoint/continuation loop in isolated context
26
+ - gsd-debugger — investigates bugs using scientific method
27
+ </available_agent_types>
28
+
29
+ <execution_context>
30
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/debug.md
31
+ </execution_context>
32
+
33
+ <context>
34
+ User's input: $ARGUMENTS
35
+
36
+ Parse subcommands and flags from $ARGUMENTS BEFORE the active-session check:
37
+ - If $ARGUMENTS starts with "list": SUBCMD=list, no further args
38
+ - If $ARGUMENTS starts with "status ": SUBCMD=status, SLUG=remainder (trim whitespace)
39
+ - If $ARGUMENTS starts with "continue ": SUBCMD=continue, SLUG=remainder (trim whitespace)
40
+ - If $ARGUMENTS contains `--diagnose`: SUBCMD=debug, diagnose_only=true, strip `--diagnose` from description
41
+ - Otherwise: SUBCMD=debug, diagnose_only=false
42
+
43
+ Check for active sessions (used for non-list/status/continue flows):
44
+ ```bash
45
+ ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
46
+ ```
47
+ </context>
48
+
49
+ <process>
50
+ Execute end-to-end.
51
+ </process>
.opencode/command/gsd-discuss-phase.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Gather phase context through adaptive questioning before planning.
3
+ argument-hint: "<phase> [--all] [--auto] [--chain] [--batch] [--analyze] [--text] [--power] [--assumptions]"
4
+ requires: [config, phase]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ question: true
12
+ agent: true
13
+ mcp__context7__resolve-library-id: true
14
+ mcp__context7__query-docs: true
15
+ ---
16
+
17
+ <objective>
18
+ Extract implementation decisions that downstream agents need — researcher and planner will use CONTEXT.md to know what to investigate and what choices are locked.
19
+
20
+ **How it works:**
21
+ 1. Load prior context (PROJECT.md, REQUIREMENTS.md, STATE.md, prior CONTEXT.md files)
22
+ 2. Scout codebase for reusable assets and patterns
23
+ 3. Analyze phase — skip gray areas already decided in prior phases
24
+ 4. Present remaining gray areas — user selects which to discuss
25
+ 5. Deep-dive each selected area until satisfied
26
+ 6. Create CONTEXT.md with decisions that guide research and planning
27
+
28
+ **Output:** `{phase_num}-CONTEXT.md` — decisions clear enough that downstream agents can act without asking the user again
29
+ </objective>
30
+
31
+ <execution_context>
32
+ Workflow files are loaded on-demand in the <process> section below — not upfront.
33
+ Do not pre-load any workflow files before reading the mode routing instructions.
34
+ </execution_context>
35
+
36
+ <runtime_note>
37
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
38
+ </runtime_note>
39
+
40
+ <context>
41
+ Phase number: $ARGUMENTS (required)
42
+
43
+ Context files are resolved in-workflow using `init phase-op` and roadmap/state tool calls.
44
+ </context>
45
+
46
+ <process>
47
+ **Mode routing:**
48
+ ```bash
49
+ _GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi
50
+ DISCUSS_MODE=$(gsd_run query config-get workflow.discuss_mode 2>/dev/null || echo "discuss")
51
+ ```
52
+
53
+ If `--assumptions` is in $ARGUMENTS:
54
+ Read and execute `/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/list-phase-assumptions.md` end-to-end.
55
+ Stop here.
56
+
57
+ Otherwise, if `DISCUSS_MODE` is `"assumptions"`:
58
+ Read and execute `/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/discuss-phase-assumptions.md` end-to-end.
59
+
60
+ Otherwise (`"discuss"` / unset / any other value):
61
+ Read and execute `/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/discuss-phase.md` end-to-end.
62
+
63
+ **MANDATORY:** Read the appropriate workflow file BEFORE taking any action. The objective and success_criteria sections in this command file are summaries — the workflow file contains the complete step-by-step process with all required behaviors, config checks, and interaction patterns. Do not improvise from the summary.
64
+
65
+ **Lazy loading:** `templates/context.md` is loaded inside the `write_context` step of the active workflow. `discuss-phase-power.md` is loaded inside `discuss-phase.md` when `--power` is detected. Do not load either here.
66
+ </process>
67
+
68
+ <success_criteria>
69
+ - Prior context loaded and applied (no re-asking decided questions)
70
+ - Gray areas identified through intelligent analysis
71
+ - User chose which areas to discuss
72
+ - Each selected area explored until satisfied
73
+ - Scope creep redirected to deferred ideas
74
+ - CONTEXT.md captures decisions, not vague vision
75
+ - User knows next steps
76
+ </success_criteria>
.opencode/command/gsd-docs-update.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Generate or update project documentation verified against the codebase
3
+ argument-hint: "[--force] [--verify-only]"
4
+ requires: [update]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ edit: true
9
+ bash: true
10
+ glob: true
11
+ grep: true
12
+ agent: true
13
+ question: true
14
+ ---
15
+ <objective>
16
+ Generate and update up to 9 documentation files for the current project. Each doc type is written by a gsd-doc-writer subagent that explores the codebase directly — no hallucinated paths, phantom endpoints, or stale signatures.
17
+
18
+ Flag handling rule:
19
+ - The optional flags documented below are available behaviors, not implied active behaviors
20
+ - A flag is active only when its literal token appears in `$ARGUMENTS`
21
+ - If a documented flag is absent from `$ARGUMENTS`, treat it as inactive
22
+ - `--force`: skip preservation prompts, regenerate all docs regardless of existing content or GSD markers
23
+ - `--verify-only`: check existing docs for accuracy against codebase, no generation (full verification requires Phase 4 verifier)
24
+ - If `--force` and `--verify-only` both appear in `$ARGUMENTS`, `--force` takes precedence
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/docs-update.md
29
+ </execution_context>
30
+
31
+ <context>
32
+ Arguments: $ARGUMENTS
33
+
34
+ **Available optional flags (documentation only — not automatically active):**
35
+ - `--force` — Regenerate all docs. Overwrites hand-written and GSD docs alike. No preservation prompts.
36
+ - `--verify-only` — Check existing docs for accuracy against the codebase. No files are written. Reports VERIFY marker count. Full codebase fact-checking requires the gsd-doc-verifier agent (Phase 4).
37
+
38
+ **Active flags must be derived from `$ARGUMENTS`:**
39
+ - `--force` is active only if the literal `--force` token is present in `$ARGUMENTS`
40
+ - `--verify-only` is active only if the literal `--verify-only` token is present in `$ARGUMENTS`
41
+ - If neither token appears, run the standard full-phase generation flow
42
+ - Do not infer that a flag is active just because it is documented in this prompt
43
+ </context>
44
+
45
+ <process>
46
+ Execute end-to-end.
47
+ Preserve all workflow gates (preservation_check, flag handling, wave execution, monorepo dispatch, commit, reporting).
48
+ </process>
.opencode/command/gsd-eval-review.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Audit an executed AI phase's evaluation coverage and produce an EVAL-REVIEW.md remediation plan.
3
+ argument-hint: "[phase number]"
4
+ requires: [phase]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ agent: true
12
+ question: true
13
+ ---
14
+ <objective>
15
+ Conduct a retroactive evaluation coverage audit of a completed AI phase.
16
+ Checks whether the evaluation strategy from AI-SPEC.md was implemented.
17
+ Produces EVAL-REVIEW.md with score, verdict, gaps, and remediation plan.
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/eval-review.md
22
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ai-evals.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ Phase: $ARGUMENTS — optional, defaults to last completed phase.
27
+ </context>
28
+
29
+ <process>
30
+ Execute end-to-end.
31
+ Preserve all workflow gates.
32
+ </process>
.opencode/command/gsd-execute-phase.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Execute all plans in a phase with wave-based parallelization
3
+ argument-hint: "<phase-number> [--wave N] [--gaps-only] [--interactive] [--tdd]"
4
+ effort: max
5
+ requires: [phase, verify-work]
6
+ tools:
7
+ read: true
8
+ write: true
9
+ edit: true
10
+ glob: true
11
+ grep: true
12
+ bash: true
13
+ agent: true
14
+ todowrite: true
15
+ question: true
16
+ ---
17
+ <objective>
18
+ Execute all plans in a phase using wave-based parallel execution.
19
+
20
+ Orchestrator stays lean: discover plans, analyze dependencies, group into waves, spawn subagents, collect results. Each subagent loads the full execute-plan context and handles its own plan.
21
+
22
+ Optional wave filter:
23
+ - `--wave N` executes only Wave `N` for pacing, quota management, or staged rollout
24
+ - phase verification/completion still only happens when no incomplete plans remain after the selected wave finishes
25
+
26
+ Flag handling rule:
27
+ - The optional flags documented below are available behaviors, not implied active behaviors
28
+ - A flag is active only when its literal token appears in `$ARGUMENTS`
29
+ - If a documented flag is absent from `$ARGUMENTS`, treat it as inactive
30
+
31
+ Context budget: ~15% orchestrator, 100% fresh per subagent.
32
+ </objective>
33
+
34
+ <execution_context>
35
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/execute-phase.md
36
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
37
+ </execution_context>
38
+
39
+ <runtime_note>
40
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
41
+ </runtime_note>
42
+
43
+ <context>
44
+ Phase: $ARGUMENTS
45
+
46
+ **Available optional flags (documentation only — not automatically active):**
47
+ - `--wave N` — Execute only Wave `N` in the phase. Use when you want to pace execution or stay inside usage limits.
48
+ - `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
49
+ - `--interactive` — Execute plans sequentially inline (no subagents) with user checkpoints between tasks. Lower token usage, pair-programming style. Best for small phases, bug fixes, and verification gaps.
50
+
51
+ **Active flags must be derived from `$ARGUMENTS`:**
52
+ - `--wave N` is active only if the literal `--wave` token is present in `$ARGUMENTS`
53
+ - `--gaps-only` is active only if the literal `--gaps-only` token is present in `$ARGUMENTS`
54
+ - `--interactive` is active only if the literal `--interactive` token is present in `$ARGUMENTS`
55
+ - If none of these tokens appear, run the standard full-phase execution flow with no flag-specific filtering
56
+ - Do not infer that a flag is active just because it is documented in this prompt
57
+
58
+ Context files are resolved inside the workflow via `gsd-tools query init.execute-phase` and per-subagent `<files_to_read>` blocks.
59
+ </context>
60
+
61
+ <process>
62
+ Execute end-to-end.
63
+ Preserve all workflow gates (wave execution, checkpoint handling, verification, state updates, routing).
64
+ </process>
.opencode/command/gsd-explore.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Socratic ideation and idea routing — think through ideas before committing to plans
3
+ tools:
4
+ read: true
5
+ write: true
6
+ bash: true
7
+ grep: true
8
+ glob: true
9
+ agent: true
10
+ question: true
11
+ ---
12
+ <objective>
13
+ Open-ended Socratic ideation session. Guides the developer through exploring an idea via
14
+ probing questions, optionally spawns research, then routes outputs to the appropriate GSD
15
+ artifacts (notes, todos, seeds, research questions, requirements, or new phases).
16
+
17
+ Accepts an optional topic argument: `/gsd-explore authentication strategy`
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/explore.md
22
+ </execution_context>
23
+
24
+ <process>
25
+ Execute end-to-end.
26
+ </process>
.opencode/command/gsd-extract-learnings.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Extract decisions, lessons, patterns, and surprises from completed phase artifacts
3
+ argument-hint: <phase-number>
4
+ type: prompt
5
+ requires: [phase]
6
+ tools:
7
+ read: true
8
+ write: true
9
+ bash: true
10
+ grep: true
11
+ glob: true
12
+ agent: true
13
+ ---
14
+ <objective>
15
+ Extract structured learnings from completed phase artifacts (PLAN.md, SUMMARY.md, VERIFICATION.md, UAT.md, STATE.md) into a LEARNINGS.md file that captures decisions, lessons learned, patterns discovered, and surprises encountered.
16
+ </objective>
17
+
18
+ <execution_context>
19
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/extract-learnings.md
20
+ </execution_context>
21
+
22
+ Execute the extract-learnings workflow from @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/extract-learnings.md end-to-end.
.opencode/command/gsd-fast.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Execute a trivial task inline — no subagents, no planning overhead
3
+ argument-hint: "[task description]"
4
+ requires: [config, quick]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ edit: true
9
+ bash: true
10
+ grep: true
11
+ glob: true
12
+ ---
13
+
14
+ <objective>
15
+ Execute a trivial task directly in the current context without spawning subagents
16
+ or generating PLAN.md files. For tasks too small to justify planning overhead:
17
+ typo fixes, config changes, small refactors, forgotten commits, simple additions.
18
+
19
+ This is NOT a replacement for /gsd-quick — use /gsd-quick for anything that
20
+ needs research, multi-step planning, or verification. /gsd-fast is for tasks
21
+ you could describe in one sentence and execute in under 2 minutes.
22
+ </objective>
23
+
24
+ <execution_context>
25
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/fast.md
26
+ </execution_context>
27
+
28
+ <process>
29
+ Execute end-to-end.
30
+ </process>
.opencode/command/gsd-forensics.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ type: prompt
3
+ description: Post-mortem investigation for failed GSD workflows — diagnoses what went wrong.
4
+ argument-hint: "[problem description]"
5
+ requires: [phase, progress, update]
6
+ tools:
7
+ read: true
8
+ write: true
9
+ bash: true
10
+ grep: true
11
+ glob: true
12
+ ---
13
+
14
+ <objective>
15
+ Investigate what went wrong during a GSD workflow execution. Analyzes git history, `.planning/` artifacts, and file system state to detect anomalies and generate a structured diagnostic report.
16
+
17
+ Purpose: Diagnose failed or stuck workflows so the user can understand root cause and take corrective action.
18
+ Output: Forensic report saved to `.planning/forensics/`, presented inline, with optional issue creation.
19
+ </objective>
20
+
21
+ <execution_context>
22
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/forensics.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ **Data sources:**
27
+ - `git log` (recent commits, patterns, time gaps)
28
+ - `git status` / `git diff` (uncommitted work, conflicts)
29
+ - `.planning/STATE.md` (current position, session history)
30
+ - `.planning/ROADMAP.md` (phase scope and progress)
31
+ - `.planning/phases/*/` (PLAN.md, SUMMARY.md, VERIFICATION.md, CONTEXT.md)
32
+ - `.planning/reports/SESSION_REPORT.md` (last session outcomes)
33
+
34
+ **User input:**
35
+ - Problem description: $ARGUMENTS (optional — will ask if not provided)
36
+ </context>
37
+
38
+ <process>
39
+ Execute end-to-end.
40
+ </process>
41
+
42
+ <success_criteria>
43
+ - Evidence gathered from all available data sources
44
+ - At least 4 anomaly types checked (stuck loop, missing artifacts, abandoned work, crash/interruption)
45
+ - Structured forensic report written to `.planning/forensics/report-{timestamp}.md`
46
+ - Report presented inline with findings, anomalies, and recommendations
47
+ - Interactive investigation offered for deeper analysis
48
+ - GitHub issue creation offered if actionable findings exist
49
+ </success_criteria>
50
+
51
+ <critical_rules>
52
+ - **Read-only investigation:** Do not modify project source files during forensics. Only write the forensic report and update STATE.md session tracking.
53
+ - **Redact sensitive data:** Strip absolute paths, API keys, tokens from reports and issues.
54
+ - **Ground findings in evidence:** Every anomaly must cite specific commits, files, or state data.
55
+ - **No speculation without evidence:** If data is insufficient, say so — do not fabricate root causes.
56
+ </critical_rules>
.opencode/command/gsd-graphify.md ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "Build, query, and inspect the project knowledge graph in .planning/graphs/"
3
+ argument-hint: "[build|query <term>|status|diff]"
4
+ requires: [config, fast, phase, update]
5
+ tools:
6
+ read: true
7
+ bash: true
8
+ ---
9
+
10
+ **STOP -- DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's command system. Using the Read tool on this file wastes tokens. Begin executing Step 0 immediately.**
11
+
12
+ **CJS-only (graphify):** `graphify` subcommands are not registered on `gsd-tools query`. Use the `gsd_run` launcher shim (defined in each bash block below) or invoke the binary directly: `node <runtime-home>/gsd-core/bin/gsd-tools.cjs graphify …` where `<runtime-home>` is your runtime's config directory (e.g. `~/.config/opencode`, `~/.hermes`, `~/.cursor`). See `docs/CLI-TOOLS.md` for details. Other tooling may still use `gsd-tools query` where a handler exists.
13
+
14
+ ## Step 0 -- Banner
15
+
16
+ **Before ANY tool calls**, display this banner:
17
+
18
+ ```
19
+ GSD > GRAPHIFY
20
+ ```
21
+
22
+ Then proceed to Step 1.
23
+
24
+ ## Step 1 -- Config Gate
25
+
26
+ Check if graphify is enabled by reading `.planning/config.json` directly using the Read tool.
27
+
28
+ **DO NOT use the gsd-tools config get-value command** -- it hard-exits on missing keys.
29
+
30
+ 1. Read `.planning/config.json` using the Read tool
31
+ 2. If the file does not exist: display the disabled message below and **STOP**
32
+ 3. Parse the JSON content. Check if `config.graphify && config.graphify.enabled === true`
33
+ 4. If `graphify.enabled` is NOT explicitly `true`: display the disabled message below and **STOP**
34
+ 5. If `graphify.enabled` is `true`: proceed to Step 2
35
+
36
+ **Disabled message:**
37
+
38
+ ```
39
+ GSD > GRAPHIFY
40
+
41
+ Knowledge graph is disabled. To activate:
42
+
43
+ node <runtime-home>/gsd-core/bin/gsd-tools.cjs config-set graphify.enabled true
44
+
45
+ Then run /gsd-graphify build to create the initial graph.
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Step 2 -- Parse Argument
51
+
52
+ Parse `$ARGUMENTS` to determine the operation mode:
53
+
54
+ | Argument | Action |
55
+ |----------|--------|
56
+ | `build` | Run inline build (Step 3) |
57
+ | `query <term>` | Run inline query (Step 2a) |
58
+ | `status` | Run inline status check (Step 2b) |
59
+ | `diff` | Run inline diff check (Step 2c) |
60
+ | No argument or unknown | Show usage message |
61
+
62
+ **Usage message** (shown when no argument or unrecognized argument):
63
+
64
+ ```
65
+ GSD > GRAPHIFY
66
+
67
+ Usage: /gsd-graphify <mode>
68
+
69
+ Modes:
70
+ build Build or rebuild the knowledge graph
71
+ query <term> Search the graph for a term
72
+ status Show graph freshness and statistics
73
+ diff Show changes since last build
74
+ ```
75
+
76
+ ### Step 2a -- Query
77
+
78
+ Run:
79
+
80
+ ```bash
81
+ _GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi
82
+ gsd_run graphify query <term>
83
+ ```
84
+
85
+ Parse the JSON output and display results:
86
+ - If the output contains `"disabled": true`, display the disabled message from Step 1 and **STOP**
87
+ - If the output contains `"error"` field, display the error message and **STOP**
88
+ - If no nodes found, display: `No graph matches for '<term>'. Try /gsd-graphify build to create or rebuild the graph.`
89
+ - Otherwise, display matched nodes grouped by type, with edge relationships and confidence tiers (EXTRACTED/INFERRED/AMBIGUOUS)
90
+
91
+ **STOP** after displaying results. Do not spawn an agent.
92
+
93
+ ### Step 2b -- Status
94
+
95
+ Run:
96
+
97
+ ```bash
98
+ _GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi
99
+ gsd_run graphify status
100
+ ```
101
+
102
+ Parse the JSON output and display:
103
+ - If `exists: false`, display the message field
104
+ - Otherwise show last build time, node/edge/hyperedge counts, and STALE or FRESH indicator
105
+ - If `built_at_commit` is non-null, also display a `Source commit:` line:
106
+ - `commit_stale === false` (rebuilt at HEAD): `Source commit: <built_at_commit> (current)`
107
+ - `commit_stale === true` (graph behind HEAD): `Source commit: <built_at_commit> (<commits_behind> commits behind HEAD)`
108
+ - `commit_stale === null` (unreachable commit / no git): `Source commit: <built_at_commit> (freshness unknown)`
109
+ - If `built_at_commit` is null (pre-graphify-v0.7 graph), omit the source-commit line entirely — do not render "Source commit: unknown"
110
+
111
+ The mtime-based STALE/FRESH flag and the commit-based `commit_stale` measure
112
+ different things and can disagree (e.g., a CI-built graph rebuilt minutes ago
113
+ against an old checkout reads as FRESH on mtime but `commit_stale: true`).
114
+ Surface both so the agent can choose.
115
+
116
+ **STOP** after displaying status. Do not spawn an agent.
117
+
118
+ ### Step 2c -- Diff
119
+
120
+ Run:
121
+
122
+ ```bash
123
+ _GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi
124
+ gsd_run graphify diff
125
+ ```
126
+
127
+ Parse the JSON output and display:
128
+ - If `no_baseline: true`, display the message field
129
+ - Otherwise show node and edge change counts (added/removed/changed)
130
+
131
+ If no snapshot exists, suggest running `build` twice (first to create, second to generate a diff baseline).
132
+
133
+ **STOP** after displaying diff. Do not spawn an agent.
134
+
135
+ ---
136
+
137
+ ## Step 3 -- Build (Inline)
138
+
139
+ Run the pre-flight check first:
140
+
141
+ ```bash
142
+ _GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi
143
+ gsd_run graphify build
144
+ ```
145
+
146
+ Parse the JSON output:
147
+ - If `disabled: true`: display the disabled message from Step 1 and **STOP**
148
+ - If `error`: display the error message and **STOP**
149
+ - If `action: "spawn_agent"`: pre-flight passed -- proceed with the inline build below
150
+
151
+ (The `spawn_agent` action name is historical. The skill now performs the build inline because graphify v0.7+ split the build into a fast AST-extraction phase and a separate clustering + report-write phase. Sub-agent isolation kept the cached extraction phase alive but SIGTERM'd the post-extraction phase when the agent exited, leaving the cache populated but no `graph.json` artifacts written. The CLI still emits the `spawn_agent` signal so external callers and tests keep working.)
152
+
153
+ Display:
154
+
155
+ ```text
156
+ GSD > Building knowledge graph...
157
+ ```
158
+
159
+ Run the build, copy artifacts, write the diff snapshot, and report the summary in a single foreground Bash call so the whole pipeline survives to completion. Use a `timeout` of `600000` ms (10 minutes), which covers the `graphify.build_timeout` ceiling (default 300 s) with margin:
160
+
161
+ ```bash
162
+ _GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi
163
+ graphify update . \
164
+ && cp graphify-out/graph.json .planning/graphs/graph.json \
165
+ && { [ -f graphify-out/graph.html ] && cp graphify-out/graph.html .planning/graphs/graph.html || true; } \
166
+ && cp graphify-out/GRAPH_REPORT.md .planning/graphs/GRAPH_REPORT.md \
167
+ && gsd_run graphify build snapshot \
168
+ && gsd_run graphify status
169
+ ```
170
+
171
+ Do NOT pass `run_in_background: true`. Typical builds complete in 15-60 seconds and the entire chain must run foreground.
172
+
173
+ If the chain fails (non-zero exit):
174
+ - Display: `## GRAPHIFY BUILD FAILED` followed by the captured stderr
175
+ - Do NOT delete `.planning/graphs/` -- the prior valid graph remains available
176
+ - **STOP**
177
+
178
+ If the chain succeeds:
179
+ - Parse the trailing `graphify status` JSON
180
+ - Display: `## GRAPHIFY BUILD COMPLETE` with the node, edge, and hyperedge counts
181
+
182
+ ---
183
+
184
+ ## MVP-Mode Node Rendering
185
+
186
+ **MVP-mode rendering.** When a phase has `**Mode:** mvp` in ROADMAP.md (resolved via `gsd-tools query roadmap.get-phase --pick mode`), render its graph node with two distinct visual signals:
187
+
188
+ 1. **Distinct fill color.** Use `#22c55e` (green) for MVP-mode phase nodes. Standard phases keep the default fill color. Two-channel signaling (color + label) handles color-blind and grayscale renders.
189
+ 2. **`MVP` label suffix.** Append ` (MVP)` to the node's label text. Example: a phase originally labeled `Phase 1: User Auth` renders as `Phase 1: User Auth (MVP)`.
190
+
191
+ Both signals fire together — never just one. Per PRD Q5 decision, the goal is unambiguous visual distinction in any render context.
192
+
193
+ When the phase mode is null/absent, render with the standard color and label — no behavioral change for non-MVP phases.
194
+
195
+ ---
196
+
197
+ ## Anti-Patterns
198
+
199
+ 1. DO NOT spawn an agent for any operation -- build, query, status, and diff all run inline. Sub-agent isolation terminates background bash when the agent exits, which previously truncated graphify builds mid-write and left only the cache populated (#3166).
200
+ 2. DO NOT pass `run_in_background: true` for the build chain -- the operation is fast and must complete in the foreground.
201
+ 3. DO NOT modify graph files directly -- always go through `graphify update .` and the snapshot CLI.
202
+ 4. DO NOT skip the config gate check.
203
+ 5. DO NOT use `gsd-tools config get-value` for the config gate -- it exits on missing keys.
.opencode/command/gsd-health.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Diagnose planning directory health and optionally repair issues
3
+ argument-hint: "[--repair] [--context]"
4
+ requires: [thread]
5
+ tools:
6
+ read: true
7
+ bash: true
8
+ write: true
9
+ question: true
10
+ ---
11
+ <objective>
12
+ Validate `.planning/` directory integrity and report actionable issues. Checks for missing files, invalid configurations, inconsistent state, and orphaned plans.
13
+
14
+ `--context` runs an orthogonal check: the running session's context utilization. The workflow asks for the model's tokensUsed + contextWindow, calls `gsd-tools query validate.context`, and renders one of three states:
15
+
16
+ | Utilization | State | Action |
17
+ |-------------|----------|-------------------------------------------------------|
18
+ | < 60% | healthy | no action — context is comfortable |
19
+ | 60% – 70% | warning | recommend `/gsd-thread` to start fresh |
20
+ | ≥ 70% | critical | reasoning quality may degrade past the fracture point |
21
+ </objective>
22
+
23
+ <execution_context>
24
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/health.md
25
+ </execution_context>
26
+
27
+ <process>
28
+ Execute end-to-end.
29
+ Parse `--repair` and `--context` flags from arguments and pass to workflow.
30
+ </process>
.opencode/command/gsd-help.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Show available GSD commands and usage guide
3
+ argument-hint: "[--brief | --full | <topic> | --brief <topic>]"
4
+ tools:
5
+ read: true
6
+ ---
7
+ <objective>
8
+ Display GSD help at the tier the user asked for: brief (one-line refresher), default (one-page tour), full (complete reference), a single topic section, or a compact scoped lookup of one topic (`--brief <topic>`: signature + one-line summary).
9
+
10
+ Output ONLY the reference content of the chosen tier. Do NOT add:
11
+ - Project-specific analysis
12
+ - Git status or file context
13
+ - Next-step suggestions
14
+ - Any commentary beyond the reference
15
+ </objective>
16
+
17
+ <execution_context>
18
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/help.md
19
+ </execution_context>
20
+
21
+ <context>
22
+ Arguments: $ARGUMENTS
23
+ </context>
24
+
25
+ <process>
26
+ Follow /Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/help.md with $ARGUMENTS.
27
+ </process>
.opencode/command/gsd-import.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Ingest external plans with conflict detection against project decisions before writing anything.
3
+ argument-hint: "--from <filepath> | --from-gsd2"
4
+ tools:
5
+ read: true
6
+ write: true
7
+ edit: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ question: true
12
+ agent: true
13
+ ---
14
+
15
+ <objective>
16
+ Import external plan files into the GSD planning system with conflict detection against PROJECT.md decisions.
17
+
18
+ - **--from**: Import an external plan file, detect conflicts, write as GSD PLAN.md, validate via gsd-plan-checker.
19
+ - **--from-gsd2**: Reverse-migrate a GSD-2 project (`.gsd/` directory) back to GSD v1 (`.planning/`) format. Runs `gsd-tools.cjs from-gsd2`. Pass `--path <dir>` to migrate a project at a different path.
20
+ </objective>
21
+
22
+ <execution_context>
23
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/import.md
24
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
25
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/gate-prompts.md
26
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/doc-conflict-engine.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ $ARGUMENTS
31
+ </context>
32
+
33
+ <process>
34
+ If `--from-gsd2` is in $ARGUMENTS:
35
+ Run the reverse-migration (append `--path <dir>` if provided):
36
+ ```bash
37
+ _GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi
38
+ gsd_run from-gsd2
39
+ ```
40
+ Present the migration result to the user.
41
+ Stop here (do not run the standard import workflow).
42
+
43
+ Otherwise, execute the import workflow end-to-end.
44
+ </process>
.opencode/command/gsd-inbox.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Triage and review open GitHub issues and PRs against project templates and contribution guidelines.
3
+ argument-hint: "[--issues] [--prs] [--label] [--close-incomplete] [--repo owner/repo]"
4
+ requires: [review]
5
+ tools:
6
+ read: true
7
+ bash: true
8
+ write: true
9
+ grep: true
10
+ glob: true
11
+ question: true
12
+ ---
13
+ <objective>
14
+ One-command triage of the project's GitHub inbox. Fetches all open issues and PRs,
15
+ reviews each against the corresponding template requirements (feature, enhancement,
16
+ bug, chore, fix PR, enhancement PR, feature PR), reports completeness and compliance,
17
+ and optionally applies labels or closes non-compliant submissions.
18
+
19
+ **Flow:** Detect repo → Fetch open issues + PRs → Classify each by type → Review against template → Report findings → Optionally act (label, comment, close)
20
+ </objective>
21
+
22
+ <execution_context>
23
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/inbox.md
24
+ </execution_context>
25
+
26
+ <context>
27
+ **Flags:**
28
+ - `--issues` — Review only issues (skip PRs)
29
+ - `--prs` — Review only PRs (skip issues)
30
+ - `--label` — Auto-apply recommended labels after review
31
+ - `--close-incomplete` — Close issues/PRs that fail template compliance (with comment explaining why)
32
+ - `--repo owner/repo` — Override auto-detected repository (defaults to current git remote)
33
+ </context>
34
+
35
+ <process>
36
+ Execute end-to-end.
37
+ Parse flags from arguments and pass to workflow.
38
+ </process>
.opencode/command/gsd-ingest-docs.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Bootstrap or merge a .planning/ setup from existing ADRs, PRDs, SPECs, and docs in a repo.
3
+ argument-hint: "[path] [--mode new|merge] [--manifest <file>] [--resolve auto|interactive]"
4
+ tools:
5
+ read: true
6
+ write: true
7
+ edit: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ question: true
12
+ agent: true
13
+ ---
14
+
15
+ <objective>
16
+ Build the full `.planning/` setup (or merge into an existing one) from multiple pre-existing planning documents — ADRs, PRDs, SPECs, DOCs — in one pass.
17
+
18
+ - **Net-new bootstrap** (`--mode new`, default when `.planning/` is absent): produces PROJECT.md + REQUIREMENTS.md + ROADMAP.md + STATE.md from synthesized doc content, delegating final generation to `gsd-roadmapper`.
19
+ - **Merge into existing** (`--mode merge`, default when `.planning/` is present): appends phases and requirements derived from the ingested docs; hard-blocks any contradiction with existing locked decisions.
20
+
21
+ Auto-synthesizes most conflicts using the precedence rule `ADR > SPEC > PRD > DOC` (overridable via manifest). Surfaces unresolved cases in `.planning/INGEST-CONFLICTS.md` with three buckets: auto-resolved, competing-variants, unresolved-blockers. The BLOCKER gate from the shared conflict engine prevents any destination file from being written when unresolved contradictions exist.
22
+
23
+ **Inputs:** directory-convention discovery (`docs/adr/`, `docs/prd/`, `docs/specs/`, `docs/rfc/`, root-level `{ADR,PRD,SPEC,RFC}-*.md`), or an explicit `--manifest <file>` YAML listing `{path, type, precedence?}` per doc.
24
+
25
+ **v1 constraints:** hard cap of 50 docs per invocation; `--resolve interactive` is reserved for a future release.
26
+ </objective>
27
+
28
+ <execution_context>
29
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/ingest-docs.md
30
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
31
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/gate-prompts.md
32
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/doc-conflict-engine.md
33
+ </execution_context>
34
+
35
+ <context>
36
+ $ARGUMENTS
37
+ </context>
38
+
39
+ <process>
40
+ Execute the ingest-docs workflow end-to-end. Preserve all approval gates (discovery, conflict report, routing) and the BLOCKER safety rule.
41
+ </process>
.opencode/command/gsd-manager.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Interactive command center for managing multiple phases from one terminal
3
+ argument-hint: "[--analyze-deps]"
4
+ requires: [phase]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ question: true
12
+ skill: true
13
+ agent: true
14
+ ---
15
+ <objective>
16
+ Single-terminal command center for managing a milestone. Shows a dashboard of all phases with visual status indicators, recommends optimal next actions, and dispatches work — discuss runs inline, plan/execute run as background agents.
17
+
18
+ Designed for power users who want to parallelize work across phases from one terminal: discuss a phase while another plans or executes in the background.
19
+
20
+ **Creates/Updates:**
21
+ - No files created directly — dispatches to existing GSD commands via Skill() and background Task agents.
22
+ - Reads `.planning/STATE.md`, `.planning/ROADMAP.md`, phase directories for status.
23
+
24
+ **After:** User exits when done managing, or all phases complete and milestone lifecycle is suggested.
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/manager.md
29
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
30
+ </execution_context>
31
+
32
+ <context>
33
+ No arguments required. Requires an active milestone with ROADMAP.md and STATE.md.
34
+
35
+ Project context, phase list, dependencies, and recommendations are resolved inside the workflow using `gsd-tools query init.manager`. No upfront context loading needed.
36
+ </context>
37
+
38
+ <process>
39
+ If `--analyze-deps` is in $ARGUMENTS:
40
+ Read and execute `/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/analyze-dependencies.md` end-to-end.
41
+
42
+ Execute end-to-end.
43
+ Maintain the dashboard refresh loop until the user exits or all phases complete.
44
+ </process>
.opencode/command/gsd-map-codebase.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Analyze codebase with parallel mapper agents to produce .planning/codebase/ documents
3
+ argument-hint: "[--fast [--focus tech|arch|quality|concerns]] [--query <term>|status|diff|refresh] [area]"
4
+ requires: [config, new-project, plan-phase]
5
+ tools:
6
+ read: true
7
+ bash: true
8
+ glob: true
9
+ grep: true
10
+ write: true
11
+ agent: true
12
+ ---
13
+
14
+ <objective>
15
+ Analyze existing codebase using parallel gsd-codebase-mapper agents to produce structured codebase documents.
16
+
17
+ Each mapper agent explores a focus area and **writes documents directly** to `.planning/codebase/`. The orchestrator only receives confirmations, keeping context usage minimal.
18
+
19
+ Output: .planning/codebase/ folder with 7 structured documents about the codebase state.
20
+ </objective>
21
+
22
+ <execution_context>
23
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/map-codebase.md
24
+ </execution_context>
25
+
26
+ <flags>
27
+ - **--fast**: Lightweight scan mode — spawns one mapper agent instead of four. Accepts an optional `--focus` value: `tech`, `arch`, `quality`, `concerns`, or `tech+arch` (default). Faster and lower-context than the full map.
28
+ - **--query**: Codebase intelligence query mode. Sub-commands: `query <term>`, `status`, `diff`, `refresh`. Requires intel to be enabled in config (`intel.enabled: true`). Runs inline for query/status/diff; spawns an agent for refresh.
29
+ - **(no flag)**: Full parallel map — spawns 4 mapper agents to produce all 7 codebase documents.
30
+ </flags>
31
+
32
+ <context>
33
+ Arguments: $ARGUMENTS
34
+
35
+ Parse the first token of $ARGUMENTS:
36
+ - If it is `--fast`: strip the flag, run the scan workflow (passing remaining args including optional --focus).
37
+ - If it is `--query`: strip the flag, run the intel workflow (passing remaining args as the subcommand).
38
+ - Otherwise: pass all of $ARGUMENTS as focus area to the map-codebase workflow.
39
+
40
+ **Load project state if exists:**
41
+ Check for .planning/STATE.md - loads context if project already initialized
42
+
43
+ **This command can run:**
44
+ - Before /gsd-new-project (brownfield codebases) - creates codebase map first
45
+ - After /gsd-new-project (greenfield codebases) - updates codebase map as code evolves
46
+ - Anytime to refresh codebase understanding
47
+ </context>
48
+
49
+ <when_to_use>
50
+ **Use map-codebase for:**
51
+ - Brownfield projects before initialization (understand existing code first)
52
+ - Refreshing codebase map after significant changes
53
+ - Onboarding to an unfamiliar codebase
54
+ - Before major refactoring (understand current state)
55
+ - When STATE.md references outdated codebase info
56
+
57
+ **Skip map-codebase for:**
58
+ - Greenfield projects with no code yet (nothing to map)
59
+ - Trivial codebases (<5 files)
60
+ </when_to_use>
61
+
62
+ <process>
63
+ 1. Check if .planning/codebase/ already exists (offer to refresh or skip)
64
+ 2. Create .planning/codebase/ directory structure
65
+ 3. Spawn 4 parallel gsd-codebase-mapper agents:
66
+ - Agent 1: tech focus → writes STACK.md, INTEGRATIONS.md
67
+ - Agent 2: arch focus → writes ARCHITECTURE.md, STRUCTURE.md
68
+ - Agent 3: quality focus → writes CONVENTIONS.md, TESTING.md
69
+ - Agent 4: concerns focus → writes CONCERNS.md
70
+ 4. Wait for agents to complete, collect confirmations (NOT document contents)
71
+ 5. Verify all 7 documents exist with line counts
72
+ 6. Commit codebase map
73
+ 7. Offer next steps (typically: /gsd-new-project or /gsd-plan-phase)
74
+ </process>
75
+
76
+ <success_criteria>
77
+ - [ ] .planning/codebase/ directory created
78
+ - [ ] All 7 codebase documents written by mapper agents
79
+ - [ ] Documents follow template structure
80
+ - [ ] Parallel agents completed without errors
81
+ - [ ] User knows next steps
82
+ </success_criteria>
.opencode/command/gsd-mempalace-capture.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "File a phase artifact into MemPalace; mirror decision facts into its temporal KG"
3
+ argument-hint: "[CONTEXT.md|PLAN.md|SUMMARY.md]"
4
+ requires: [config]
5
+ tools:
6
+ read: true
7
+ bash: true
8
+ ---
9
+
10
+ **STOP -- DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by the command system. Using the Read tool on this file wastes tokens. Begin executing Step 0 immediately.**
11
+
12
+ ## Step 0 -- Banner
13
+
14
+ **Before ANY tool calls**, display this banner:
15
+
16
+ ```
17
+ GSD > MEMPALACE CAPTURE
18
+ ```
19
+
20
+ Then proceed to Step 1.
21
+
22
+ ## Step 1 -- Config Gate
23
+
24
+ Check whether the MemPalace capability is enabled by reading `.planning/config.json` directly with the Read tool.
25
+
26
+ 1. Read `.planning/config.json` with the Read tool.
27
+ 2. If the file does not exist, or `config.mempalace` is absent, or `config.mempalace.enabled !== true`, or `config.mempalace.capture_artifacts !== true`: display the disabled message and **STOP**.
28
+ 3. Otherwise proceed to Step 2.
29
+
30
+ **Disabled message:**
31
+
32
+ ```
33
+ GSD > MEMPALACE CAPTURE
34
+
35
+ MemPalace capture is disabled (mempalace.enabled / mempalace.capture_artifacts).
36
+ Nothing was filed; the loop proceeds normally.
37
+ ```
38
+
39
+ This step is `onError: skip` at `discuss:post` / `plan:post` / `verify:post` -- capture never fails a phase.
40
+
41
+ ## Step 2 -- Resolve target
42
+
43
+ 1. **Artifact.** Take the artifact from `$ARGUMENTS`. If absent, infer from the loop point: `discuss:post` → `CONTEXT.md`, `plan:post` → `PLAN.md`, `verify:post` → `SUMMARY.md`.
44
+ 2. **Room.** Map artifact → room:
45
+ - `CONTEXT.md` → `decisions`
46
+ - `PLAN.md` → `planning`
47
+ - `SUMMARY.md` → `milestones`
48
+ (Confirmed problem→fix pairs go to `problems` — see the `capture-problems` fragment used at `execute:wave:post`.)
49
+ 3. **Wing.** `config.mempalace.wing` if non-empty, else `config.project_code`, else the repo directory name.
50
+ 4. **Mode / transport.** Read `config.mempalace.memory_mode`. Prefer MCP (`mempalace_*`) when your MemPalace MCP server is registered and your runtime permits those tools; otherwise use the `mempalace` CLI (covered by this skill's `Bash` allow-tool), as in `mempalace-recall`.
51
+
52
+ ## Step 3 -- File verbatim (idempotent)
53
+
54
+ On any error or timeout, stop and let the phase continue -- capture is best-effort.
55
+
56
+ 1. **Dedup first.** Interactive: `mempalace_check_duplicate` on the artifact's deterministic drawer id. Headless: rely on `mempalace mine`'s content-hash idempotency.
57
+ 2. **Add the drawer (verbatim).** File the exact artifact text into `room: <room>` of `wing: <wing>` with provenance (`source_file`, phase id). Interactive: `mempalace_add_drawer`. Headless: `mempalace mine <path> --wing <wing> --room <room>`.
58
+ 3. **Mirror KG facts** when `config.mempalace.mirror_kg` is true: extract decision/delivery facts and `mempalace_kg_add` them with `valid_from` = the phase date (e.g. `(<project>, decided, <decision>)` from CONTEXT; `(<phase>, delivered, <capability>)` from SUMMARY). Only `augment` is currently wired, so these are an *additive* mirror of `.planning/graphs/`. (`kg_backend`/`replace` are forward-declared and behave as `augment` today.)
59
+ 4. Re-running a phase MUST NOT create duplicate drawers (deterministic ids + `check_duplicate`).
60
+
61
+ ## Step 4 -- Report
62
+
63
+ Print a one-line summary: `Filed <artifact> → <wing>/<room> (<n> KG facts)` or `MemPalace unavailable — capture skipped`.
64
+
65
+ ## Anti-Patterns
66
+
67
+ 1. DO NOT let any MemPalace error fail the step -- capture is `onError: skip`.
68
+ 2. DO NOT write lossy summaries -- store the verbatim artifact text (AAAK compression is a separate, optional index).
69
+ 3. DO NOT prune or delete drawers here -- pruning (`sync --apply`) is the curator agent's job at `ship:post`, wing-scoped only.
70
+ 4. DO NOT skip the config gate or the dedup check.
.opencode/command/gsd-mempalace-recall.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "Recall decisions, patterns, and surprises from MemPalace before planning"
3
+ argument-hint: "[phase-slug]"
4
+ requires: [config]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ ---
10
+
11
+ **STOP -- DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by the command system. Using the Read tool on this file wastes tokens. Begin executing Step 0 immediately.**
12
+
13
+ ## Step 0 -- Banner
14
+
15
+ **Before ANY tool calls**, display this banner:
16
+
17
+ ```
18
+ GSD > MEMPALACE RECALL
19
+ ```
20
+
21
+ Then proceed to Step 1.
22
+
23
+ ## Step 1 -- Config Gate
24
+
25
+ Check whether the MemPalace capability is enabled by reading `.planning/config.json` directly with the Read tool.
26
+
27
+ **DO NOT use `gsd-tools config get-value`** -- it hard-exits on missing keys.
28
+
29
+ 1. Read `.planning/config.json` with the Read tool.
30
+ 2. If the file does not exist: write the "unavailable" stub (Step 4) and **STOP**.
31
+ 3. Parse the JSON. Proceed to Step 2 only if `config.mempalace && config.mempalace.enabled === true` **and** `config.mempalace.recall_on_plan !== false`. Otherwise display the disabled message and **STOP** (`recall_on_plan: false` turns plan-time recall off while leaving the rest of the capability enabled).
32
+
33
+ **Disabled message:**
34
+
35
+ ```
36
+ GSD > MEMPALACE RECALL
37
+
38
+ MemPalace memory is disabled. To activate:
39
+
40
+ node <runtime-home>/gsd-core/bin/gsd-tools.cjs config-set mempalace.enabled true
41
+
42
+ Recall is opt-in; the loop proceeds normally without it.
43
+ ```
44
+
45
+ This step is `onError: skip` at `plan:pre` -- recall never blocks planning.
46
+
47
+ ## Step 2 -- Resolve wing, mode, and transport
48
+
49
+ 1. **Wing.** Use `config.mempalace.wing` if non-empty; otherwise derive from `config.project_code`; otherwise fall back to the repository directory name.
50
+ 2. **Mode.** Read `config.mempalace.memory_mode` (`augment` | `kg_backend` | `replace`, default `augment`). Only `augment` is wired today, so recall always treats the palace as additive; `kg_backend`/`replace` are forward-declared and behave as `augment`.
51
+ 3. **Transport.** Prefer the **MCP tools** (`mempalace_*`) in interactive runs *when your MemPalace MCP server is registered and your runtime permits those tools*. Otherwise — headless/cron/autonomous runs, or runtimes that don't grant the MemPalace MCP tools — use the **CLI** (`mempalace wake-up`, `mempalace search`), which this skill's `Bash` allow-tool always covers. If neither is reachable, go to Step 4.
52
+ 4. **Topic.** Read the phase `CONTEXT.md` (the consumed artifact). Derive a short search query from its title, goal, and key decisions.
53
+
54
+ ## Step 3 -- Retrieve (read-only)
55
+
56
+ All calls in this step are side-effect-free. On any error or timeout, stop retrieving and write whatever was gathered (or the stub) -- never raise.
57
+
58
+ 1. **Wake up** (cheap, ~600--900 tokens):
59
+ - Interactive: read the wing identity/summary, then `mempalace_search`.
60
+ - Headless: `mempalace wake-up --wing <wing>`.
61
+ 2. **Targeted search:**
62
+ - Interactive: `mempalace_search(query=<topic>, wing=<wing>)`.
63
+ - Headless: `mempalace search "<topic>" --wing <wing>`.
64
+ 3. **Knowledge-graph facts** (when `config.mempalace.mirror_kg` is true): `mempalace_kg_query` / `mempalace_kg_timeline` for decisions relevant to the topic and their validity windows. Only `augment` is currently wired, so the palace KG *supplements* GSD's native `.planning/graphs/` — do not treat it as the sole source. (`kg_backend`/`replace` are forward-declared and behave as `augment` today.)
65
+ 4. **Dedup** the returned drawers/facts; keep the top results.
66
+
67
+ ## Step 4 -- Write MEMORY-RECALL.md
68
+
69
+ Write `MEMORY-RECALL.md` in the current phase directory. The planner consumes it.
70
+
71
+ When recall succeeded, structure it as:
72
+
73
+ ```markdown
74
+ # Memory Recall (MemPalace)
75
+
76
+ _Wing: <wing> · Mode: <mode> · Transport: <mcp|cli>_
77
+
78
+ ## Prior decisions
79
+ - <decision> — <provenance: drawer id / kg fact, valid_from>
80
+
81
+ ## Patterns
82
+ - <pattern> — <provenance>
83
+
84
+ ## Surprises / gotchas
85
+ - <surprise> — <provenance>
86
+ ```
87
+
88
+ When MemPalace is unreachable, write the stub and continue:
89
+
90
+ ```markdown
91
+ # Memory Recall (MemPalace)
92
+
93
+ _MemPalace unavailable at recall time — proceeding without recalled memory._
94
+ ```
95
+
96
+ ## Anti-Patterns
97
+
98
+ 1. DO NOT let any MemPalace error fail the step -- recall is `onError: skip`.
99
+ 2. DO NOT write to the palace from this skill -- recall is read-only; capture is a separate skill.
100
+ 3. DO NOT paste raw search output into the file -- distil to decisions/patterns/surprises with provenance.
101
+ 4. DO NOT skip the config gate.
.opencode/command/gsd-milestone-summary.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ type: prompt
3
+ description: Generate a comprehensive project summary from milestone artifacts for team onboarding and review
4
+ argument-hint: "[version]"
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ grep: true
10
+ glob: true
11
+ ---
12
+
13
+ <objective>
14
+ Generate a structured milestone summary for team onboarding and project review. Reads completed milestone artifacts (ROADMAP, REQUIREMENTS, CONTEXT, SUMMARY, VERIFICATION files) and produces a human-friendly overview of what was built, how, and why.
15
+
16
+ Purpose: Enable new team members to understand a completed project by reading one document and asking follow-up questions.
17
+ Output: MILESTONE_SUMMARY written to `.planning/reports/`, presented inline, optional interactive Q&A.
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/milestone-summary.md
22
+ </execution_context>
23
+
24
+ <context>
25
+ **Project files:**
26
+ - `.planning/ROADMAP.md`
27
+ - `.planning/PROJECT.md`
28
+ - `.planning/STATE.md`
29
+ - `.planning/RETROSPECTIVE.md`
30
+ - `.planning/milestones/v{version}-ROADMAP.md` (if archived)
31
+ - `.planning/milestones/v{version}-REQUIREMENTS.md` (if archived)
32
+ - `.planning/phases/*-*/` (SUMMARY.md, VERIFICATION.md, CONTEXT.md, RESEARCH.md)
33
+
34
+ **User input:**
35
+ - Version: $ARGUMENTS (optional — defaults to current/latest milestone)
36
+ </context>
37
+
38
+ <process>
39
+ Execute end-to-end.
40
+ </process>
41
+
42
+ <success_criteria>
43
+ - Milestone version resolved (from args, STATE.md, or archive scan)
44
+ - All available artifacts read (ROADMAP, REQUIREMENTS, CONTEXT, SUMMARY, VERIFICATION, RESEARCH, RETROSPECTIVE)
45
+ - Summary document written to `.planning/reports/MILESTONE_SUMMARY-v{version}.md`
46
+ - All 7 sections generated (Overview, Architecture, Phases, Decisions, Requirements, Tech Debt, Getting Started)
47
+ - Summary presented inline to user
48
+ - Interactive Q&A offered
49
+ - STATE.md updated
50
+ </success_criteria>
.opencode/command/gsd-mvp-phase.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Plan a phase as a vertical MVP slice — user story, SPIDR splitting, then plan-phase
3
+ argument-hint: "<phase-number>"
4
+ requires: [new-project, phase, plan-phase]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ agent: true
12
+ question: true
13
+ ---
14
+ <objective>
15
+ Guide the user through MVP-mode planning for a phase. The command:
16
+
17
+ 1. Prompts for an "As a / I want to / So that" user story (three structured questions)
18
+ 2. Runs SPIDR splitting check — if the story is too large, walks through Spike/Paths/Interfaces/Data/Rules and offers to split into multiple phases
19
+ 3. Writes `**Mode:** mvp` and the reformatted `**Goal:**` to the phase's ROADMAP.md section
20
+ 4. Delegates to `/gsd plan-phase <N>` which auto-detects MVP mode via the roadmap field
21
+
22
+ Phase 1 of the vertical-mvp-slice PRD shipped the planner-side machinery; this command is the user entry point for it.
23
+ </objective>
24
+
25
+ <execution_context>
26
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/mvp-phase.md
27
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/spidr-splitting.md
28
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/user-story-template.md
29
+ </execution_context>
30
+
31
+ <runtime_note>
32
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. Equivalent API.
33
+ </runtime_note>
34
+
35
+ <context>
36
+ Phase number: $ARGUMENTS (required — integer or decimal like `2.1`)
37
+
38
+ The phase must already exist in ROADMAP.md (created via `/gsd new-project`, `/gsd add-phase`, or `/gsd insert-phase`). This command does not create new phases — it converts an existing phase to MVP mode.
39
+ </context>
40
+
41
+ <process>
42
+ Execute the mvp-phase workflow from @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/mvp-phase.md end-to-end.
43
+ Preserve all gates: phase existence, status guard (refuse in_progress/completed), user-story format validation, SPIDR splitting check, ROADMAP write confirmation, plan-phase delegation.
44
+ </process>
.opencode/command/gsd-new-milestone.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Start a new milestone cycle — update PROJECT.md and route to requirements
3
+ argument-hint: "[milestone name, e.g., 'v1.1 Notifications']"
4
+ requires: [new-project, phase, plan-phase]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ agent: true
10
+ question: true
11
+ ---
12
+ <objective>
13
+ Start a new milestone: questioning → research (optional) → requirements → roadmap.
14
+
15
+ Brownfield equivalent of new-project. Project exists, PROJECT.md has history. Gathers "what's next", updates PROJECT.md, then runs requirements → roadmap cycle.
16
+
17
+ **Creates/Updates:**
18
+ - `.planning/PROJECT.md` — updated with new milestone goals
19
+ - `.planning/research/` — domain research (optional, NEW features only)
20
+ - `.planning/REQUIREMENTS.md` — scoped requirements for this milestone
21
+ - `.planning/ROADMAP.md` — phase structure (continues numbering)
22
+ - `.planning/STATE.md` — reset for new milestone
23
+
24
+ **After:** `/gsd-plan-phase [N]` to start execution.
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/new-milestone.md
29
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/questioning.md
30
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
31
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/templates/project.md
32
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/templates/requirements.md
33
+ </execution_context>
34
+
35
+ <context>
36
+ Milestone name: $ARGUMENTS (optional - will prompt if not provided)
37
+
38
+ Project and milestone context files are resolved inside the workflow (`init new-milestone`) and delegated via `<files_to_read>` blocks where subagents are used.
39
+ </context>
40
+
41
+ <process>
42
+ Execute end-to-end.
43
+ Preserve all workflow gates (validation, questioning, research, requirements, roadmap approval, commits).
44
+ </process>
.opencode/command/gsd-new-project.md ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Initialize a new project with deep context gathering and PROJECT.md
3
+ argument-hint: "[--auto]"
4
+ requires: [config, phase, plan-phase]
5
+ tools:
6
+ read: true
7
+ bash: true
8
+ write: true
9
+ agent: true
10
+ question: true
11
+ ---
12
+ <runtime_note>
13
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
14
+ </runtime_note>
15
+
16
+ <context>
17
+ **Flags:**
18
+ - `--auto` — Automatic mode. After config questions, runs research → requirements → roadmap without further interaction. Expects idea document via @ reference.
19
+ </context>
20
+
21
+ <objective>
22
+ Initialize a new project through unified flow: questioning → research (optional) → requirements → roadmap.
23
+
24
+ **Creates:**
25
+ - `.planning/PROJECT.md` — project context
26
+ - `.planning/config.json` — workflow preferences
27
+ - `.planning/research/` — domain research (optional)
28
+ - `.planning/REQUIREMENTS.md` — scoped requirements
29
+ - `.planning/ROADMAP.md` — phase structure
30
+ - `.planning/STATE.md` — project memory
31
+
32
+ **After this command:** Run `/gsd-plan-phase 1` to start execution.
33
+ </objective>
34
+
35
+ <execution_context>
36
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/new-project.md
37
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/questioning.md
38
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
39
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/templates/project.md
40
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/templates/requirements.md
41
+ </execution_context>
42
+
43
+ <process>
44
+ Execute end-to-end.
45
+ Preserve all workflow gates (validation, approvals, commits, routing).
46
+ </process>
.opencode/command/gsd-ns-context.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "codebase intel | map graphify docs learnings mempalace"
3
+ argument-hint: ""
4
+ requires: [map-codebase, graphify, docs-update, extract-learnings, mempalace-recall, mempalace-capture]
5
+ tools:
6
+ read: true
7
+ skill: true
8
+ ---
9
+
10
+ Route to the appropriate codebase-intelligence skill based on the user's intent.
11
+ `gsd-scan` and `gsd-intel` were folded into `gsd-map-codebase` flags by #2790.
12
+
13
+ | User wants | Invoke |
14
+ |---|---|
15
+ | Map the full codebase structure | gsd-map-codebase |
16
+ | Quick lightweight codebase scan | gsd-map-codebase --fast |
17
+ | Query mapped intelligence files | gsd-map-codebase --query |
18
+ | Generate a knowledge graph | gsd-graphify |
19
+ | Update project documentation | gsd-docs-update |
20
+ | Extract learnings from a completed phase | gsd-extract-learnings |
21
+ | Recall prior decisions and patterns before planning | gsd-mempalace-recall |
22
+ | File a phase artifact into MemPalace | gsd-mempalace-capture |
23
+
24
+ Invoke the matched skill directly using the Skill tool.
.opencode/command/gsd-ns-ideate.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "exploration capture | explore sketch spike spec capture"
3
+ argument-hint: ""
4
+ requires: [capture, explore, sketch, spike, spec-phase]
5
+ tools:
6
+ read: true
7
+ skill: true
8
+ ---
9
+
10
+ Route to the appropriate exploration / capture skill based on the user's intent.
11
+ `gsd-note`, `gsd-add-todo`, `gsd-add-backlog`, and `gsd-plant-seed` were folded
12
+ into `gsd-capture` (with `--note`, default, `--backlog`, `--seed` modes) by
13
+ #2790. The capture target lists pending todos via `--list`.
14
+
15
+ | User wants | Invoke |
16
+ |---|---|
17
+ | Explore an idea or opportunity | gsd-explore |
18
+ | Sketch out a rough design or plan | gsd-sketch |
19
+ | Time-boxed technical spike | gsd-spike |
20
+ | Write a spec for a phase | gsd-spec-phase |
21
+ | Capture a thought (todo / note / backlog / seed) | gsd-capture |
22
+
23
+ Invoke the matched skill directly using the Skill tool.
.opencode/command/gsd-ns-manage.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "config workspace | workstreams thread update ship inbox"
3
+ argument-hint: ""
4
+ requires: [config, workspace, workstreams, thread, pause-work, resume-work, update, ship, inbox, pr-branch, undo, cleanup, health, manager, settings, stats, surface, help]
5
+ tools:
6
+ read: true
7
+ skill: true
8
+ ---
9
+
10
+ Route to the appropriate management skill based on the user's intent.
11
+ `gsd-config` (settings + advanced + integrations + profile) and `gsd-workspace`
12
+ (new + list + remove) are post-#2790 consolidated entries.
13
+
14
+ | User wants | Invoke |
15
+ |---|---|
16
+ | Configure GSD settings (basic / advanced / integrations / profile) | gsd-config |
17
+ | Manage workspaces (create / list / remove) | gsd-workspace |
18
+ | Manage parallel workstreams | gsd-workstreams |
19
+ | Continue work in a fresh context thread | gsd-thread |
20
+ | Pause current work | gsd-pause-work |
21
+ | Resume paused work | gsd-resume-work |
22
+ | Update the GSD installation | gsd-update |
23
+ | Ship completed work | gsd-ship |
24
+ | Process inbox items | gsd-inbox |
25
+ | Create a clean PR branch | gsd-pr-branch |
26
+ | Undo the last GSD action | gsd-undo |
27
+ | Archive accumulated phase directories | gsd-cleanup |
28
+ | Diagnose planning directory health | gsd-health |
29
+ | Open the interactive command center | gsd-manager |
30
+ | Configure workflow toggles and model profile | gsd-settings |
31
+ | Show project statistics | gsd-stats |
32
+ | Toggle which skills are surfaced | gsd-surface |
33
+ | Show the GSD command guide | gsd-help |
34
+
35
+ Invoke the matched skill directly using the Skill tool.
.opencode/command/gsd-ns-project.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "project lifecycle | milestones audits summary"
3
+ argument-hint: ""
4
+ requires: [new-project, new-milestone, complete-milestone, audit-milestone, milestone-summary, import, ingest-docs, profile-user, review-backlog]
5
+ tools:
6
+ read: true
7
+ skill: true
8
+ ---
9
+
10
+ Route to the appropriate project / milestone skill based on the user's intent.
11
+ `gsd-plan-milestone-gaps` was deleted by #2790 — gap planning now happens
12
+ inline as part of `gsd-audit-milestone`'s output.
13
+
14
+ | User wants | Invoke |
15
+ |---|---|
16
+ | Start a new project | gsd-new-project |
17
+ | Create a new milestone | gsd-new-milestone |
18
+ | Complete the current milestone | gsd-complete-milestone |
19
+ | Audit a milestone for issues | gsd-audit-milestone |
20
+ | Summarize milestone status | gsd-milestone-summary |
21
+ | Import an external plan | gsd-import |
22
+ | Bootstrap planning from existing docs | gsd-ingest-docs |
23
+ | Generate a developer profile | gsd-profile-user |
24
+ | Review and promote backlog items | gsd-review-backlog |
25
+
26
+ Invoke the matched skill directly using the Skill tool.
.opencode/command/gsd-ns-review.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "quality gates | code review debug audit security eval ui"
3
+ argument-hint: ""
4
+ requires: [code-review, audit-uat, secure-phase, eval-review, ui-review, validate-phase, debug, forensics, audit-fix, review, ui-phase]
5
+ tools:
6
+ read: true
7
+ skill: true
8
+ ---
9
+
10
+ Route to the appropriate quality / review skill based on the user's intent.
11
+ `gsd-code-review-fix` was absorbed by `gsd-code-review --fix` in #2790.
12
+
13
+ | User wants | Invoke |
14
+ |---|---|
15
+ | Review code for quality and correctness | gsd-code-review |
16
+ | Auto-fix code review findings | gsd-code-review --fix |
17
+ | Audit UAT / acceptance testing | gsd-audit-uat |
18
+ | Security review of a phase | gsd-secure-phase |
19
+ | Evaluate AI response quality | gsd-eval-review |
20
+ | Review UI for design and accessibility | gsd-ui-review |
21
+ | Validate phase outputs | gsd-validate-phase |
22
+ | Debug a failing feature or error | gsd-debug |
23
+ | Forensic investigation of a broken system | gsd-forensics |
24
+ | Autonomous audit-to-fix pipeline | gsd-audit-fix |
25
+ | Cross-AI peer review of plans | gsd-review |
26
+ | Generate a UI design contract | gsd-ui-phase |
27
+
28
+ Invoke the matched skill directly using the Skill tool.
.opencode/command/gsd-ns-workflow.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "workflow | discuss plan execute verify phase progress"
3
+ argument-hint: ""
4
+ requires: [discuss-phase, spec-phase, plan-phase, execute-phase, verify-work, phase, progress, ultraplan-phase, plan-review-convergence, add-tests, ai-integration-phase, autonomous, fast, mvp-phase, quick]
5
+ tools:
6
+ read: true
7
+ skill: true
8
+ ---
9
+
10
+ Route to the appropriate phase-pipeline skill based on the user's intent.
11
+ Sub-skill names below are post-#2790 consolidated targets — `gsd-phase`
12
+ absorbs the former add/insert/remove/edit-phase commands and `gsd-progress`
13
+ absorbs the former next/do commands.
14
+
15
+ | User wants | Invoke |
16
+ |---|---|
17
+ | Gather context before planning | gsd-discuss-phase |
18
+ | Clarify what a phase delivers | gsd-spec-phase |
19
+ | Create a PLAN.md | gsd-plan-phase |
20
+ | Execute plans in a phase | gsd-execute-phase |
21
+ | Verify built features through UAT | gsd-verify-work |
22
+ | Add / insert / remove / edit a phase | gsd-phase |
23
+ | Advance to the next logical step | gsd-progress |
24
+ | Offload planning to the ultraplan cloud | gsd-ultraplan-phase |
25
+ | Cross-AI plan review convergence loop | gsd-plan-review-convergence |
26
+ | Generate tests for a completed phase | gsd-add-tests |
27
+ | Design an AI-integration phase | gsd-ai-integration-phase |
28
+ | Run all remaining phases autonomously | gsd-autonomous |
29
+ | Execute a trivial task inline | gsd-fast |
30
+ | Plan a phase as a vertical MVP slice | gsd-mvp-phase |
31
+ | Execute a quick task with GSD guarantees | gsd-quick |
32
+
33
+ Invoke the matched skill directly using the Skill tool.
.opencode/command/gsd-pause-work.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Create context handoff when pausing work mid-phase
3
+ argument-hint: "[--report]"
4
+ requires: [phase, progress]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ ---
10
+
11
+ <objective>
12
+ Create `.continue-here.md` handoff file to preserve complete work state across sessions.
13
+
14
+ Routes to the pause-work workflow which handles:
15
+ - Current phase detection from recent files
16
+ - Complete state gathering (position, completed work, remaining work, decisions, blockers)
17
+ - Handoff file creation with all context sections
18
+ - Git commit as WIP
19
+ - Resume instructions
20
+ </objective>
21
+
22
+ <execution_context>
23
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/pause-work.md
24
+ </execution_context>
25
+
26
+ <context>
27
+ State and phase progress are gathered in-workflow with targeted reads.
28
+ </context>
29
+
30
+ <process>
31
+ If `--report` is in $ARGUMENTS:
32
+ Read and execute `/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/session-report.md` end-to-end.
33
+
34
+ **Follow the pause-work workflow**.
35
+
36
+ The workflow handles all logic including:
37
+ 1. Phase directory detection
38
+ 2. State gathering with user clarifications
39
+ 3. Handoff file writing with timestamp
40
+ 4. Git commit
41
+ 5. Confirmation with resume instructions
42
+ </process>
.opencode/command/gsd-phase.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: CRUD for phases in ROADMAP.md — add, insert, remove, or edit phases
3
+ argument-hint: "[--insert | --remove | --edit] <phase-name-or-number>"
4
+ tools:
5
+ read: true
6
+ write: true
7
+ bash: true
8
+ glob: true
9
+ ---
10
+
11
+ <objective>
12
+ Manage phases in ROADMAP.md with a single consolidated command.
13
+
14
+ Mode routing:
15
+ - **default** (no flag): Add a new integer phase to the end of the current milestone → add-phase workflow
16
+ - **--insert**: Insert urgent work as a decimal phase (e.g., 72.1) between existing phases → insert-phase workflow
17
+ - **--remove**: Remove a future phase and renumber subsequent phases → remove-phase workflow
18
+ - **--edit**: Edit any field of an existing phase in place → edit-phase workflow
19
+ </objective>
20
+
21
+ <routing>
22
+
23
+ | Flag | Action | Workflow |
24
+ |------|--------|----------|
25
+ | (none) | Add new integer phase at end of milestone | add-phase |
26
+ | --insert | Insert decimal phase (e.g., 72.1) after specified phase | insert-phase |
27
+ | --remove | Remove future phase, renumber subsequent | remove-phase |
28
+ | --edit | Edit fields of existing phase in place | edit-phase |
29
+
30
+ </routing>
31
+
32
+ <execution_context>
33
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/add-phase.md
34
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/insert-phase.md
35
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/remove-phase.md
36
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/edit-phase.md
37
+ </execution_context>
38
+
39
+ <context>
40
+ Arguments: $ARGUMENTS
41
+
42
+ Parse the first token of $ARGUMENTS:
43
+ - If it is `--insert`: strip the flag, pass remainder (format: <after-phase-number> <description>) to insert-phase workflow
44
+ - If it is `--remove`: strip the flag, pass remainder (phase number) to remove-phase workflow
45
+ - If it is `--edit`: strip the flag, pass remainder (phase-number [--force]) to edit-phase workflow
46
+ - Otherwise: pass all of $ARGUMENTS (phase description) to add-phase workflow
47
+
48
+ Roadmap and state are resolved in-workflow via `init phase-op` and targeted reads.
49
+ </context>
50
+
51
+ <process>
52
+ 1. Parse the leading flag (if any) from $ARGUMENTS.
53
+ 2. Load and execute the appropriate workflow end-to-end based on the routing table above.
54
+ 3. Preserve all validation gates from the target workflow.
55
+ </process>
.opencode/command/gsd-plan-phase.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Create detailed phase plan (PLAN.md) with verification loop
3
+ argument-hint: "[phase] [--auto] [--research] [--skip-research] [--research-phase <N>] [--view] [--gaps] [--skip-verify] [--prd <file>] [--ingest <path-or-glob>] [--ingest-format <auto|nygard|madr|narrative>] [--reviews] [--text] [--tdd] [--mvp]"
4
+ effort: max
5
+ requires: [discuss-phase, phase, review, update]
6
+ tools:
7
+ read: true
8
+ write: true
9
+ bash: true
10
+ glob: true
11
+ grep: true
12
+ agent: true
13
+ question: true
14
+ webfetch: true
15
+ mcp__context7__*: true
16
+ ---
17
+ <objective>
18
+ Create executable phase prompts (PLAN.md files) for a roadmap phase with integrated research and verification.
19
+
20
+ **Default flow:** Research (if needed) → Plan → Verify → Done
21
+
22
+ **Research-only mode (`--research-phase <N>`):** Spawn `gsd-phase-researcher` for phase `N`, write `RESEARCH.md`, then exit before the planner runs. Useful for cross-phase research, doc review before committing to a planning approach, and correction-without-replanning loops where iterating on research alone is dramatically cheaper than re-spawning the planner. Replaces the deleted research-phase command (#3042).
23
+
24
+ **Research-only modifiers:**
25
+ - **No flag** — when `RESEARCH.md` already exists, auto-uses it: emits a one-line notice and exits cleanly, no prompt.
26
+ - **`--research`** — force-refresh: re-spawn the researcher unconditionally, no prompt. Bypasses the existing-RESEARCH.md auto-use path.
27
+ - **`--view`** — view-only: print existing `RESEARCH.md` to stdout. Does not spawn the researcher. Cheapest mode for the correction-without-replanning loop. If no `RESEARCH.md` exists yet, errors with a hint to drop `--view`.
28
+
29
+ **Orchestrator role:** Parse arguments, validate phase, research domain (unless skipped), spawn gsd-planner, verify with gsd-plan-checker, iterate until pass or max iterations, present results.
30
+ </objective>
31
+
32
+ <execution_context>
33
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/plan-phase.md
34
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
35
+ </execution_context>
36
+
37
+ <runtime_note>
38
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API. Do not skip questioning steps because `question` appears unavailable; use `vscode_askquestions` instead.
39
+ </runtime_note>
40
+
41
+ <context>
42
+ Phase number: $ARGUMENTS (optional — auto-detects next unplanned phase if omitted)
43
+
44
+ **Flags:**
45
+ - `--research` — Force re-research even if RESEARCH.md exists
46
+ - `--skip-research` — Skip research, go straight to planning
47
+ - `--gaps` — Gap closure mode (reads VERIFICATION.md, skips research)
48
+ - `--skip-verify` — Skip verification loop
49
+ - `--prd <file>` — Use a PRD/acceptance criteria file instead of discuss-phase. Parses requirements into CONTEXT.md automatically. Skips discuss-phase entirely.
50
+ - `--ingest <path-or-glob>` — Use one or more ADR files instead of discuss-phase. Parses locked decisions + scope fences into CONTEXT.md automatically. Skips discuss-phase entirely.
51
+ - `--ingest-format <auto|nygard|madr|narrative>` — Optional ADR parser format override (`auto` default).
52
+ - `--reviews` — Replan incorporating cross-AI review feedback from REVIEWS.md (produced by `/gsd-review`)
53
+ - `--text` — Use plain-text numbered lists instead of TUI menus (required for `/rc` remote sessions)
54
+ - `--mvp` — Vertical MVP mode. Planner organizes tasks as feature slices (UI→API→DB) instead of horizontal layers. On Phase 1 of a new project, also emits `SKELETON.md` (Walking Skeleton). Can be persisted on a phase via `**Mode:** mvp` in ROADMAP.md.
55
+
56
+ Normalize phase input in step 2 before any directory lookups.
57
+ </context>
58
+
59
+ <process>
60
+ Execute end-to-end.
61
+ Preserve all workflow gates (validation, research, planning, verification loop, routing).
62
+ </process>
.opencode/command/gsd-plan-review-convergence.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: "Cross-AI plan convergence - replan until review concerns are resolved."
3
+ argument-hint: "<phase> [--codex] [--gemini] [--claude] [--opencode] [--ollama] [--lm-studio] [--llama-cpp] [--text] [--ws <name>] [--all] [--max-cycles N]"
4
+ requires: [phase, review]
5
+ tools:
6
+ read: true
7
+ write: true
8
+ bash: true
9
+ glob: true
10
+ grep: true
11
+ agent: true
12
+ skill: true
13
+ question: true
14
+ ---
15
+
16
+ <objective>
17
+ Cross-AI plan convergence loop — an outer revision gate around gsd-review and gsd-planner.
18
+ Repeatedly: review plans with external AI CLIs → if HIGH or actionable non-HIGH concerns remain → replan with --reviews feedback → re-review. Stops when no unresolved HIGH concerns or actionable MEDIUM/LOW findings remain outside PLAN.md, or when max cycles is reached.
19
+
20
+ **Flow:** Skill("gsd-plan-phase") → Agent→Skill("gsd-review") → check unresolved HIGH + actionable non-HIGH → Skill("gsd-plan-phase --reviews") → Agent→Skill("gsd-review") → ... → Converge or escalate
21
+
22
+ Replaces gsd-plan-phase's internal gsd-plan-checker with external AI reviewers (codex, gemini, etc.). Plan-phase runs **inline** (bare Skill at depth 0) so it can spawn gsd-planner/gsd-plan-checker at depth 1. Review runs inside an isolated Agent (gsd-review is a Bash leaf — no sub-agents needed). Orchestrator only does loop control.
23
+
24
+ **Orchestrator role:** Parse arguments, validate phase, run plan-phase inline (Skill at depth 0), spawn an Agent for gsd-review, check unresolved HIGH and actionable non-HIGH counts, stall detection, escalation gate.
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/plan-review-convergence.md
29
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/revision-loop.md
30
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/gates.md
31
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/agent-contracts.md
32
+ </execution_context>
33
+
34
+ <runtime_note>
35
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API. Do not skip questioning steps because `question` appears unavailable; use `vscode_askquestions` instead.
36
+ </runtime_note>
37
+
38
+ <context>
39
+ Phase number: extracted from $ARGUMENTS (required)
40
+
41
+ **Flags:**
42
+ - `--codex` — Use Codex CLI as reviewer (default if no reviewer specified)
43
+ - `--gemini` — Use Gemini CLI as reviewer
44
+ - `--claude` — Use the agent CLI as reviewer (separate session)
45
+ - `--opencode` — Use OpenCode as reviewer
46
+ - `--ollama` — Use local Ollama server as reviewer (OpenAI-compatible, default host `http://localhost:11434`; configure model via `review.models.ollama`)
47
+ - `--lm-studio` — Use local LM Studio server as reviewer (OpenAI-compatible, default host `http://localhost:1234`; configure model via `review.models.lm_studio`)
48
+ - `--llama-cpp` — Use local llama.cpp server as reviewer (OpenAI-compatible, default host `http://localhost:8080`; configure model via `review.models.llama_cpp`)
49
+ - `--all` — Use all available CLIs and running local model servers
50
+ - `--max-cycles N` — Maximum replan→review cycles (default: 3)
51
+
52
+ **Feature gate:** This command requires `workflow.plan_review_convergence=true`. Enable with:
53
+ `gsd config-set workflow.plan_review_convergence true`
54
+ </context>
55
+
56
+ <process>
57
+ Execute end-to-end.
58
+ Preserve all workflow gates (pre-flight, revision loop, stall detection, escalation).
59
+ </process>
.opencode/command/gsd-pr-branch.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Create a clean PR branch by filtering out .planning/ commits — ready for code review
3
+ argument-hint: "[target branch, default: main]"
4
+ requires: [review]
5
+ tools:
6
+ bash: true
7
+ read: true
8
+ question: true
9
+ ---
10
+
11
+ <objective>
12
+ Create a clean branch suitable for pull requests by filtering out .planning/ commits
13
+ from the current branch. Reviewers see only code changes, not GSD planning artifacts.
14
+
15
+ This solves the problem of PR diffs being cluttered with PLAN.md, SUMMARY.md, STATE.md
16
+ changes that are irrelevant to code review.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/pr-branch.md
21
+ </execution_context>
22
+
23
+ <process>
24
+ Execute end-to-end.
25
+ </process>
.opencode/command/gsd-profile-user.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Generate developer behavioral profile and create Claude-discoverable artifacts
3
+ argument-hint: "[--questionnaire] [--refresh]"
4
+ tools:
5
+ read: true
6
+ write: true
7
+ bash: true
8
+ glob: true
9
+ grep: true
10
+ question: true
11
+ agent: true
12
+ ---
13
+
14
+ <objective>
15
+ Generate a developer behavioral profile from session analysis (or questionnaire) and produce artifacts (USER-PROFILE.md, `gsd-dev-preferences` skill config, AGENTS.md section) that personalize the agent's responses.
16
+
17
+ Routes to the profile-user workflow which orchestrates the full flow: consent gate, session analysis or questionnaire fallback, profile generation, result display, and artifact selection.
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/profile-user.md
22
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ Flags from $ARGUMENTS:
27
+ - `--questionnaire` -- Skip session analysis entirely, use questionnaire-only path
28
+ - `--refresh` -- Rebuild profile even when one exists, backup old profile, show dimension diff
29
+ </context>
30
+
31
+ <process>
32
+ Execute the profile-user workflow end-to-end.
33
+
34
+ The workflow handles all logic including:
35
+ 1. Initialization and existing profile detection
36
+ 2. Consent gate before session analysis
37
+ 3. Session scanning and data sufficiency checks
38
+ 4. Session analysis (profiler agent) or questionnaire fallback
39
+ 5. Cross-project split resolution
40
+ 6. Profile writing to USER-PROFILE.md
41
+ 7. Result display with report card and highlights
42
+ 8. Artifact selection (dev-preferences, AGENTS.md sections)
43
+ 9. Sequential artifact generation
44
+ 10. Summary with refresh diff (if applicable)
45
+ </process>
.opencode/command/gsd-progress.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: Check progress, advance workflow, or dispatch freeform intent — the unified GSD situational command
3
+ argument-hint: "[--forensic | --next [--auto] [--converge] | --do \"task description\"]"
4
+ effort: low
5
+ requires: [phase]
6
+ tools:
7
+ read: true
8
+ bash: true
9
+ grep: true
10
+ glob: true
11
+ skill: true
12
+ question: true
13
+ ---
14
+ <objective>
15
+ Check project progress, summarize recent work and what's ahead, then intelligently route to the next action.
16
+
17
+ Three modes:
18
+ - **default**: Show progress report + intelligently route to the next action (execute or plan). Provides situational awareness before continuing work.
19
+ - **--next**: Automatically advance to the next logical step without manual route selection. Reads STATE.md, ROADMAP.md, and phase directories. Supports `--force` to bypass safety gates.
20
+ - **--do "task description"**: Analyze freeform natural language and dispatch to the most appropriate GSD command. Never does the work itself — matches intent, confirms, hands off.
21
+ - **--forensic**: Append a 6-check integrity audit after the standard progress report.
22
+ </objective>
23
+
24
+ <flags>
25
+ - **--next**: Detect current project state and automatically invoke the next logical GSD workflow step. Scans all prior phases for incomplete work before routing. `--next --force` bypasses safety gates.
26
+ - **--next --auto**: Like `--next`, but after the determined step completes, automatically re-invokes `/gsd-progress --next --auto` to continue chaining steps until completion or a blocking decision. Enables hands-free plan→execute→verify→complete progression.
27
+ - **--next --converge**: When the next action is planning (Route 3), route it through the plan-review **convergence** loop instead of the standard planner. Requires `workflow.plan_review_convergence=true` (enable with `gsd config-set workflow.plan_review_convergence true`). `--cross-ai` is an alias. Reviewer flags (`--codex`, `--gemini`, `--claude`, `--opencode`, `--ollama`, `--lm-studio`, `--llama-cpp`, `--all`) and `--max-cycles N` are forwarded to the convergence loop.
28
+ - **--do "..."**: Smart dispatcher — match freeform intent to the best GSD command using routing rules, confirm the match, then hand off.
29
+ - **--forensic**: Run 6-check integrity audit after the standard progress report.
30
+ - **(no flag)**: Standard progress check + intelligent routing (Routes A through F).
31
+ </flags>
32
+
33
+ <execution_context>
34
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/progress.md
35
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/next.md
36
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/workflows/do.md
37
+ @/Users/theogengineer/Projects/Multilingual-Absa/.opencode/gsd-core/references/ui-brand.md
38
+ </execution_context>
39
+
40
+ <process>
41
+ Arguments provided: "$ARGUMENTS"
42
+ Parse the first token from the provided arguments:
43
+ - If it is `--next`: strip the flag, execute the next workflow (passing remaining args e.g. --force, --auto).
44
+ - If it is `--do`: strip the flag, pass remainder as freeform intent to the do workflow.
45
+ - Otherwise: execute the progress workflow end-to-end (pass --forensic through if present).
46
+
47
+ Preserve all routing logic from the target workflow.
48
+ </process>