gsd-antigravity-kit 1.25.2 → 1.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
4
  [![Antigravity Compatible](https://img.shields.io/badge/Antigravity-Compatible-purple.svg?logo=google&logoColor=white)](https://github.com/google-deepmind/antigravity)
5
5
  [![NPM Version](https://img.shields.io/npm/v/gsd-antigravity-kit.svg?logo=npm)](https://www.npmjs.com/package/gsd-antigravity-kit)
6
- [![Release Version](https://img.shields.io/badge/Release-v1.25.2-blue?style=flat-square)](https://github.com/dturkuler/GSD-Antigravity/releases/latest)
6
+ [![Release Version](https://img.shields.io/badge/Release-v1.27.2-blue?style=flat-square)](https://github.com/dturkuler/GSD-Antigravity/releases/latest)
7
7
  [![GSD Version](https://img.shields.io/badge/GSD-v1.27.0-orange?style=flat-square)](https://github.com/glittercowboy/get-shit-done)
8
8
 
9
9
  **GSD-Antigravity Kit** is the official bootstrapping and management utility for the [Get Shit Done (GSD)](https://github.com/glittercowboy/get-shit-done) protocol within the Antigravity AI framework. It serves as a high-performance **Installer** and **Skill Manager** that provision, optimizes, and maintains GSD skills in your AG environment.
@@ -45,6 +45,8 @@ Installation is handled via `npx` to automatically provision your current projec
45
45
  # In your project root:
46
46
  npx gsd-antigravity-kit
47
47
  ```
48
+ > [!NOTE]
49
+ > The installer is now **interactive**. It will check for existing skills, offer to clean up old folders, and let you choose which skills (`gsd` or `gsd-converter`) to install.
48
50
 
49
51
  ### 2️⃣ Initialize the GSD Engine
50
52
  Run the converter script provided by the kit to fetch and package the GSD protocol:
package/bin/install.js CHANGED
@@ -2,37 +2,98 @@
2
2
 
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
+ const readline = require('readline');
5
6
  const { execSync } = require('child_process');
6
7
 
8
+ const rl = readline.createInterface({
9
+ input: process.stdin,
10
+ output: process.stdout
11
+ });
12
+
13
+ const ask = (query) => new Promise((resolve) => rl.question(query, (ans) => resolve(ans.toLowerCase().trim())));
14
+
7
15
  async function install() {
8
16
  const targetDir = process.cwd();
9
- // Location of the .agent folder relative to this script in the package
10
17
  const sourceAgentDir = path.join(__dirname, '..', '.agent');
11
- const targetAgentDir = path.join(targetDir, '.agent');
18
+ const skillsSourceDir = path.join(sourceAgentDir, 'skills');
19
+
20
+ // Skills to check/install
21
+ const skillNames = ['gsd', 'gsd-converter'];
22
+ const targetSkillsDir = path.join(targetDir, '.agent', 'skills');
12
23
 
13
- console.log('🌌 Initializing GSD-Antigravity Skill System...');
24
+ console.log('\n🌌 GSD-Antigravity Skill System Installer\n');
14
25
 
15
26
  try {
16
- // 1. Copy .agent folder
17
- if (fs.existsSync(sourceAgentDir)) {
18
- console.log(`📦 Copying .agent skills to ${targetDir}...`);
27
+ // 1. Check for existing skills
28
+ const existing = [];
29
+ for (const name of skillNames) {
30
+ if (fs.existsSync(path.join(targetSkillsDir, name))) {
31
+ existing.push(name);
32
+ }
33
+ }
19
34
 
20
- // We use a simple recursive copy strategy
21
- copyFolderSync(sourceAgentDir, targetAgentDir);
22
- console.log('✅ .agent folder installed successfully.');
23
- } else {
24
- console.error('❌ Error: Could not find .agent folder in the package.');
25
- process.exit(1);
35
+ if (existing.length > 0) {
36
+ console.log(`⚠️ Detected existing skills in .agent/skills/: ${existing.join(', ')}`);
37
+ const confirmRemove = await ask(`Do you want to REMOVE existing skills and perform a fresh install? (y/n): `);
38
+ if (confirmRemove === 'y') {
39
+ for (const name of existing) {
40
+ const p = path.join(targetSkillsDir, name);
41
+ console.log(` 🗑️ Removing ${name}...`);
42
+ fs.rmSync(p, { recursive: true, force: true });
43
+ }
44
+ } else {
45
+ console.log(' ⏩ Skipping removal. New files will be merged/overwritten.');
46
+ }
47
+ }
48
+
49
+ // 2. Interactive Installation Selection
50
+ const installGsd = await ask(`Install GSD skill? (y/n) [default: y]: `);
51
+ const installConverter = await ask(`Install GSD-Converter skill? (y/n) [default: y]: `);
52
+
53
+ const selection = {
54
+ 'gsd': installGsd !== 'n',
55
+ 'gsd-converter': installConverter !== 'n'
56
+ };
57
+
58
+ // 3. Perform Installation
59
+ if (!fs.existsSync(targetSkillsDir)) {
60
+ fs.mkdirSync(targetSkillsDir, { recursive: true });
61
+ }
62
+
63
+ // Also copy rules if they exist
64
+ const sourceRulesDir = path.join(sourceAgentDir, 'rules');
65
+ const targetRulesDir = path.join(targetDir, '.agent', 'rules');
66
+ if (fs.existsSync(sourceRulesDir)) {
67
+ copyFolderSync(sourceRulesDir, targetRulesDir);
26
68
  }
27
69
 
28
- // 2. Offer to run the converter
29
- console.log('\n✨ GSD-Antigravity is now in your project.');
30
- console.log('To initialize the GSD engine, run:');
31
- console.log(' py .agent/skills/gsd-converter/scripts/convert.py gsd\n');
70
+ let installedCount = 0;
71
+ for (const [name, shouldInstall] of Object.entries(selection)) {
72
+ if (shouldInstall) {
73
+ const src = path.join(skillsSourceDir, name);
74
+ const tgt = path.join(targetSkillsDir, name);
75
+ if (fs.existsSync(src)) {
76
+ console.log(`📦 Installing ${name}...`);
77
+ copyFolderSync(src, tgt);
78
+ installedCount++;
79
+ }
80
+ }
81
+ }
82
+
83
+ if (installedCount > 0) {
84
+ console.log('\n✅ Installation completed successfully.');
85
+ if (selection['gsd-converter']) {
86
+ console.log('\n✨ To initialize the GSD engine, run:');
87
+ console.log(' py .agent/skills/gsd-converter/scripts/convert.py gsd\n');
88
+ }
89
+ } else {
90
+ console.log('\nℹ️ No skills were selected for installation.');
91
+ }
32
92
 
33
93
  } catch (err) {
34
- console.error('❌ Installation failed:', err.message);
35
- process.exit(1);
94
+ console.error('\n❌ Installation failed:', err.message);
95
+ } finally {
96
+ rl.close();
36
97
  }
37
98
  }
38
99
 
@@ -41,11 +102,13 @@ function copyFolderSync(from, to) {
41
102
  fs.mkdirSync(to, { recursive: true });
42
103
  }
43
104
  fs.readdirSync(from).forEach(element => {
44
- const stat = fs.lstatSync(path.join(from, element));
105
+ const srcPath = path.join(from, element);
106
+ const tgtPath = path.join(to, element);
107
+ const stat = fs.lstatSync(srcPath);
45
108
  if (stat.isFile()) {
46
- fs.copyFileSync(path.join(from, element), path.join(to, element));
109
+ fs.copyFileSync(srcPath, tgtPath);
47
110
  } else if (stat.isDirectory()) {
48
- copyFolderSync(path.join(from, element), path.join(to, element));
111
+ copyFolderSync(srcPath, tgtPath);
49
112
  }
50
113
  });
51
114
  }
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "gsd-antigravity-kit",
3
- "version": "1.25.2",
3
+ "version": "1.27.2",
4
4
  "description": "Installer for GSD-Antigravity skills",
5
5
  "main": "index.js",
6
+ "files": [
7
+ "bin/",
8
+ ".agent/"
9
+ ],
6
10
  "bin": {
7
11
  "gsd-antigravity-kit": "bin/install.js"
8
12
  },
package/CHANGELOG.md DELETED
@@ -1,150 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.25.2] - 2026-03-21
9
-
10
- ### Added
11
- - **GSD Sync 1.27.0**: Synchronized with the latest GSD core (v1.27.0), featuring enhanced initialization signatures and improved state tracking.
12
-
13
- ### Fixed
14
- - **Path Resolution**: Patched `gsd-converter` to robustly handle absolute path prefixes (e.g., `C:/projects/...`) during migration, ensuring valid skill-relative references in all command files.
15
- - **Branding Consistency**: Reinforced "Antigravity" rebranding across all migrated GSD references, eliminating legacy `.claude` mentions in command execution contexts.
16
-
17
- ## [1.25.1] - 2026-03-16
18
-
19
- ### Added
20
- - **GSD Sync 1.25.1**: Full synchronization with the latest GSD core, featuring optimized model profiles and enhanced state consistency.
21
- - **Selective Inclusion Engine**: Injected `parseIncludeFlag`, `applyIncludes`, and `buildPhaseBase` into the core CLI, enabling granular context management via the `--include` flag.
22
- - **Artifact Discovery**: Integrated `discoverPhaseArtifacts` for automated detection of hierarchical project files, improving context gathering automation.
23
-
24
- ### Changed
25
- - **Skill Optimization**: Applied advanced refactoring via `gsd-converter`, reducing script overhead through 2-space indentation and condensed headers.
26
- - **Improved Portability**: Enhanced regex-based path mapping for even more robust environment isolation in Antigravity.
27
-
28
- ## [1.24.0] - 2026-03-15
29
-
30
- ### Added
31
- - **Major GSD Sync**: Synchronized with GSD `1.24.0`, bringing full support for the new modular engine and enhanced state management workflows.
32
- - **Improved Phase Operations**: Added native support for `phase insert`, `phase remove`, and `phase-plan-index` through the modular CLI.
33
- - **New Init Workflows**: Expanded `init` command to support `milestone-op`, `phase-op`, and `roadmap-op` for safer state transitions.
34
-
35
- ### Changed
36
- - **Modular DRY Refactoring**: The monolithic `gsd-tools.cjs` has been completely refactored into a DRY architecture. Core logic is now modularized within `bin/lib/*.cjs`, significantly improving maintainability and reducing the primary script overhead.
37
- - **Automated Help Generation**: `gsd-converter` now automatically populates `help-manifest.json` with detailed subcommand metadata, enabling rich interactive help via the `--help` flag.
38
-
39
- ## [1.22.6] - 2026-03-13
40
-
41
- ### Added
42
- - **Help System Integration**: `gsd-converter` now generates a `help-manifest.json` and injects a dynamic help system into `gsd-tools.cjs`. Users can run `node gsd-tools.cjs --help <command>` for detailed subcommand usage.
43
- - **Nyquist Validation**: Retroactive validation is now supported via `gsd:validate-phase`. `nyquist_validation` is now enabled by default in new project templates.
44
-
45
- ### Changed
46
- - **Config Directory Discovery**: Improved robustness of config directory detection (Antigravity/Gemini/OpenCode) across all hooks, now respecting `CLAUDE_CONFIG_DIR`.
47
- - **Semantic Configuration**: Migrated "depth" terminology to "granularity" (coarse/standard/fine) for better alignment with GSD specifications.
48
- - **Git Ignore Handling**: Updated `isGitIgnored` to use `--no-index`, ensuring correct behavior for files tracked before being ignored.
49
-
50
- ### Fixed
51
- - **Windows UTF-8 Stability**: Enforced UTF-8 encoding for Python and Node.js subprocesses on Windows to eliminate character mangling.
52
- - **Multi-word Commit Messages**: Fixed the `commit` command in `gsd-tools.cjs` to correctly capture multi-word messages across different shell environments.
53
- - **Hook Reliability**: Added 3-second stdin timeout guards to `gsd-statusline.js` and `gsd-context-monitor.js` to prevent hanging on Windows/Git Bash.
54
-
55
- ## [1.22.5] - 2026-03-09
56
-
57
- ### Changed
58
- - **Maintenance**: General synchronization and maintenance release.
59
-
60
- ## [1.22.4] - 2026-03-03
61
-
62
- ### Added
63
- - **Resource Migration**: Updated `gsd-converter` to explicitly migrate the `mapping.md` documentation into the target `gsd` skill for better user reference.
64
-
65
- ### Fixed
66
- - **Terminal & Encoding Polish**: Resolved character mangling (`✅`) and output overlap in `gsd-converter` by enforcing UTF-8 and improving stdout flushing.
67
- - **Robust Path Refactoring**: Improved regex-based path refactoring to handle Windows backslashes more safely, preventing potential `undefined` path segments.
68
- - **GSD Skill Update**: Synchronized with GSD 1.22.4, ensuring full Antigravity rebranding and optimization across all migrated files.
69
-
70
- ## [1.22.3] - 2026-03-03
71
-
72
- ### Fixed
73
- - **CLI Path Resolution**: Added explicit warnings across `SKILL.md`, `gsd-tools.md`, and the `gsd-tools.cjs` header that `gsd-tools` is NOT globally installed. AI agents must invoke it as `node .agent/skills/gsd/bin/gsd-tools.cjs <command>` — never as bare `gsd-tools`.
74
- - **Converter Template**: Updated both the converter asset (`gsd-tools.md` template) and the `gsd_skill_template.md` to include the CLI invocation warning, ensuring future conversions also receive the fix.
75
-
76
- ## [1.22.2] - 2026-03-03
77
-
78
- ### Fixed
79
- - **Optimizer Import Bug**: Fixed a bug where the `parseIncludeFlag` import injection in `optimize-gsd-tools.cjs` was incorrectly failing its condition check, resulting in `parseIncludeFlag` not being imported in `gsd-tools.cjs`.
80
-
81
- ## [1.22.1] - 2026-03-03
82
-
83
- ### Changed
84
- - **GSD Skill Update**: Synchronized with GSD 1.22.1, ensuring full Antigravity rebranding and optimization across all migrated files.
85
-
86
- ### Fixed
87
- - **Optimizer Path Bug**: Fixed a critical bug in `gsd-converter's` `convert.py` where it passed the file path of `gsd-tools.cjs` instead of the `bin` directory to the optimizer script, causing directory-level processing to fail.
88
-
89
- ## [1.22.0] - 2026-03-01
90
-
91
- ### Added
92
- - **Smart Inclusion Engine**:
93
- - Injected `parseIncludeFlag()`, `applyIncludes()`, and `buildPhaseBase()` into `gsd-tools.cjs` to support the `--include` flag for granular context management.
94
- - Added `MODEL_PROFILES` for optimized model selection.
95
- - **Artifact Discovery**:
96
- - Automated phase document lookup via `discoverPhaseArtifacts()` in the core engine.
97
-
98
- ### Changed
99
- - **GSD Skill Update**: Synchronized with GSD 1.22.0, ensuring full Antigravity rebranding and optimization across all migrated files.
100
- - **Performance Optimization**:
101
- - Refactored `gsd-tools.cjs` with 2-space indentation and condensed headers, reducing script size by ~25KB.
102
- - Improved regex-based path refactoring for more robust environment isolation.
103
-
104
- ## [1.21.1] - 2026-02-27
105
- ## [1.21.0] - 2026-02-27
106
-
107
- ### Added
108
- - **Dynamic `gsd-tools` Discovery**:
109
- - `gsd-converter` now dynamically parses `gsd-tools.cjs` comments to generate up-to-date Antigravity command documentation.
110
- - Automates the inclusion of new GSD commands without manual script updates.
111
- - **Enhanced Path Refactoring**:
112
- - Implemented robust regex-based path mapping to handle all `.claude` and shell-relative path variants (`@./.claude`, `~/.claude`, etc.).
113
- - Ensures a 100% self-contained skill environment in Antigravity.
114
- - **Automatic Cleanup**:
115
- - The converter now automatically purges legacy `.bak` and temporary files during the migration process.
116
-
117
- ### Changed
118
- - **Release Manager Sync**: Updated the release workflow to enforce GSD synchronization and dynamic help verification before tagging.
119
- - **GSD Skill Architecture**: Refactored the internal skill structure to mirror GSD 1.21.0's modular `hooks/` and `bin/lib/` organization.
120
-
121
- ## [1.0.2] - 2026-02-20
122
-
123
- ### Added
124
- - **`gsd-converter` Automation**:
125
- - Now automatically refactors and enhances `gsd-tools.cjs` during the migration process.
126
- - **`gsd-tools.cjs` Enhancements** (Injected via Converter):
127
- - **Selective Inclusion Engine**: Injected `parseIncludeFlag`, `applyIncludes`, and `buildPhaseBase` to support the new `--include` CLI flag.
128
- - **Contextual Awareness**: Added `discoverPhaseArtifacts` for automated detection of hierarchical project files.
129
- - **Persona-Based Model Profiles**: Implemented `MODEL_PROFILES` mapping to optimize AI model selection.
130
-
131
- ## [1.0.1] - 2026-02-20
132
-
133
- ### Added
134
- - **Core Skill System**: Established the `.agent/skills/` directory structure for modular Antigravity agents.
135
- - **`gsd-converter` Skill**: Implemented a zero-config automation script to migrate legacy GSD installations into the portable Antigravity Skill format.
136
- - **Release Manager Skill**: Orchestrated a multi-phase release workflow for Node.js/NPM, including GitHub CLI (`gh`) integration and NPM publication logic.
137
- - **GH CLI Integration**: Bundled `gh.exe` within the release-manager skill folder for portable environment support.
138
- - **NPX Distribution**: Added `bin/install.js` to enable seamless installation via `npx gsd-antigravity-kit`.
139
- - **Project Structure**: Established standard configurations including `.gitignore`, `package.json`, and initial project documentation.
140
-
141
- ### Changed
142
- - **Rebranding**: Completed full migration from "Claude" to "Antigravity" terminology across all scripts and prompts.
143
- - **Script Optimization**: Refactored core GSD tool scripts to reduce complexity and file size without sacrificing functionality.
144
-
145
- ### Documentation
146
- - Created `README.md` with the new "GSD Cycle" philosophy (Plan, Execute, Verify).
147
- - Initialized `CHANGELOG.md` to track project evolution.
148
- - Created `docs/DEV_KNOWLEDGEBASE.md` for technical Root Cause Analysis (RCA).
149
-
150
- **Git range:** `1a7e252` → `HEAD`
package/CONTRIBUTING.md DELETED
@@ -1,30 +0,0 @@
1
- # Contributing to GSD-Antigravity
2
-
3
- Thank you for your interest in contributing to GSD-Antigravity! We welcome contributions that improve the reliability, efficiency, and extensibility of our GSD system.
4
-
5
- ## 🚀 Getting Started
6
-
7
- 1. **Fork the repository** and create your branch from `main`.
8
- 2. **Follow the Skill Spec**: All changes to skills must adhere to the Antigravity Skill specification found in [.agent/skills/skill-developer/SKILL.md](.agent/skills/skill-developer/SKILL.md).
9
- 3. **Draft your changes**: Whether it's a new command, an agent prompt improvement, or a bug fix in the converter.
10
-
11
- ## 🛠️ Development Guidelines
12
-
13
- - **Maintain Hierarchy**: Ensure any new commands fit into the Plan -> Execute -> Verify workflow.
14
- - **Spec-Driven**: Use the provided templates in `assets/templates` when creating new project artifacts.
15
- - **Rebranding**: If adding new commands, ensure they follow the `gsd:` prefix nomenclature.
16
- - **Testing**: Before submitting a PR, verify your skill by running the `gsd-converter` script to ensure it packages correctly.
17
-
18
- ## 📋 Pull Request Process
19
-
20
- 1. Update the README.md with details of changes to the interface, if applicable.
21
- 2. Ensure any new dependencies are clearly documented.
22
- 3. Your PR will be reviewed by the maintainers for compliance with GSD core principles.
23
-
24
- ## 💬 Community
25
-
26
- Join our Discord or open an issue for architectural discussions before making major changes.
27
-
28
- ---
29
-
30
- *Happy Coding!*
@@ -1,125 +0,0 @@
1
- # Developer Knowledgebase (RCA)
2
-
3
- This document tracks technical Root Cause Analysis (RCA) for bug fixes in the **gsd-antigravity-kit** project. Its purpose is to prevent regression and document technical debt resolutions.
4
-
5
- ---
6
-
7
- ## Technical Analysis History
8
-
9
- ### v1.25.2 (2026-03-21)
10
- * **Context:** `gsd-converter` (`convert.py`) and GSD Skill (v1.27.0)
11
- * **Issue:** Broken path references in migrated GSD commands; legacy branding in execution contexts; and outdated GSD v1.26.0 core.
12
- * **Root Cause Analysis:**
13
- - The GSD installer used absolute paths (e.g., `C:/projects/.../.claude/...`) in its generated command files.
14
- - The `convert.py` regexes (`r'@\.?/?\.claude/...'`) were too strict, only matching relative versions starting with `@.claude` or `@/.claude`.
15
- - When an absolute path was encountered (e.g., `@C:/projects/GSD-Antigravity/.claude/...`), the regex failed to match the `@` at the start of the sequence, but a subsequent less-strict rule matching `\.claude/...` consumed the leading slash of the absolute path, resulting in merged strings like `GSD-Antigravityreferences/...`.
16
- * **How it was fixed:**
17
- - **Robust Regex Pathing**: Updated `convert.py` to use non-greedy wildcards (`r'@.*?\.claude/...'`) to capture any characters (including absolute drive paths) between `@` and `.claude/`. This ensures they are replaced wholesale with skill-relative `@references/...` or `@assets/...` tags.
18
- - **GSD v1.27.0 Sync**: Upgraded the core GSD installation, bringing new `init` workflow signatures (`cmdInitExecutePhase`, `cmdInitPlanPhase`, `cmdInitProgress`) for improved state tracking.
19
- - **Enhanced Branding**: Reinforced the Antigravity rebranding regexes to ensure no `.claude` or `Claude` mentions remain in the final skill artifacts.
20
-
21
- ### v1.25.1 (2026-03-16)
22
- * **Context:** `gsd-tools.cjs` (Selective Inclusion and Artifact Discovery)
23
- * **Issue:** Lack of standardized context slicing and automated artifact traversal in the core GSD engine, leading to inconsistent context gathering across different subagents.
24
- * **Root Cause Analysis:**
25
- - The core engine was missing a unified way to handle partial context loading, forcing agents to either load the entire state or manually parse it.
26
- - Artifact discovery relied on static paths which didn't always account for deeply nested or dynamically named phase directories.
27
- * **How it was fixed:**
28
- - **Smart Inclusions**: Injected `parseIncludeFlag`, `applyIncludes`, and `buildPhaseBase` into `gsd-tools.cjs`. This allows the `--include` flag to dynamically filter state/roadmap data, significantly reducing token overhead for long-running workflows.
29
- - **Automated Discovery**: Integrated `discoverPhaseArtifacts()` to automatically traverse the `.planning/` hierarchy, ensuring that all relevant requirements, plans, and implementation notes are available to the agent without manual specification.
30
- - **Model Profile Injection**: Injected a centralized `MODEL_PROFILES` object to ensure consistent model selection (e.g., using better models for planning and cheaper ones for simple tasks) across the entire GSD toolchain.
31
-
32
- ### v1.24.0 (2026-03-15)
33
- * **Context:** `gsd-tools.cjs` (Engine Modernization)
34
- * **Issue:** Technical debt in the core engine; increasing complexity of the monolithic `gsd-tools.cjs` script; and lack of granular control over phase/milestone state transitions.
35
- * **Root Cause Analysis:**
36
- - The monolithic design of `gsd-tools.cjs` was becoming difficult to audit and extend, leading to duplication of logic across commands.
37
- - Previous `init` workflows were too coarse-grained, making it difficult to perform atomic state updates for complex roadmap changes.
38
- * **How it was fixed:**
39
- - **Modularization (DRY)**: Refactored `gsd-tools.cjs` to delegate all command implementation to a dedicated library in `bin/lib/`. This reduced the main router file size and centralized error handling and state management.
40
- - **Internal Library**: Created specialized modules: `phase.cjs` for roadmap manipulation, `init.cjs` for workflow bootstrapping, and `verify.cjs` for project health checks.
41
- - **Enhanced Init Router**: Added multiple specialized init workflows (`milestone-op`, `phase-op`, `roadmap-op`) to provide agents with precise control over project structure modifications.
42
-
43
- ### v1.22.6 (2026-03-13)
44
- * **Context:** `gsd-tools.cjs` and `gsd-converter`
45
- * **Issue:** Missing detailed CLI help for subcommands; character encoding issues on Windows; hung terminal processes; and deprecated configuration keys.
46
- * **Root Cause Analysis:**
47
- - The `gsd-tools.cjs` lacked an internal help system, relying on external documentation that wasn't always accessible to sub-agents.
48
- - Windows `cp1252` encoding caused mangling of Unicode status markers in Python and Node.js output.
49
- - Synchronous blocking on `stdin` in hooks caused terminal hangs in environments where `stdin` didn't close properly (e.g., Git Bash on Windows).
50
- - Hardcoded GSD home paths didn't account for newer "Antigravity" or "Gemini" branding in local configuration directories.
51
- * **How it was fixed:**
52
- - **Help Manifest**: Implemented a dynamic `help-manifest.json` generation in `convert.py` and a `--help` interceptor in `gsd-tools.cjs`.
53
- - **Encoding Stability**: Enforced UTF-8 for `stdout`/`stderr` in `convert.py` and passed `encoding: 'utf-8'` to `execSync`/`spawn` calls.
54
- - **Timeout Guards**: Added 3-second `setTimeout` exits for `gsd-statusline.js` and `gsd-context-monitor.js` to prevent deadlock if `stdin` stays open.
55
- - **Branding-Neutral Paths**: Refactored config directory lookup to check for `.antigravity`, `.gemini`, and `.opencode`, supporting the `CLAUDE_CONFIG_DIR` environment variable.
56
- - **Semantic Migration**: Automatically migrates the `depth` configuration key to the more descriptive `granularity`.
57
-
58
- ### v1.22.4 (2026-03-03)
59
- * **Context:** `gsd-converter` (`convert.py` and `optimize-gsd-tools.cjs`)
60
- * **Issue:** Terminal output characters mangled (`✅`) and version summary overlapped with optimizer logs.
61
- * **Root Cause Analysis:**
62
- - Windows terminal encoding defaults (CP1252/437) didn't support UTF-8 checkmarks.
63
- - Race condition between `npx` status-line updates (`\r`) and Python `print()` statements.
64
- - Subprocess output from `node` was being captured without explicit encoding, leading to character mapping errors.
65
- * **How it was fixed:**
66
- - **UTF-8 Enforcement**: Added `sys.stdout.reconfigure(encoding='utf-8')` to the converter script.
67
- - **Logging Cleanliness**: Improved subprocess output handling with explicit newlines and `sys.stdout.flush()`.
68
- - **Resource Deployment**: Explicitly configured the converter to migrate `mapping.md` to the target skill.
69
- - **Path Refactoring**: Safely handled Windows backslashes in regex replacements to prevent `undefined` segments.
70
-
71
- ### v1.22.3 (2026-03-03)
72
- * **Context:** GSD Skill CLI invocation across SKILL.md, gsd-tools.md, and gsd-tools.cjs
73
- * **Issue:** AI agents generated bare `gsd-tools scaffold uat --phase 29` instead of `node .agent/skills/gsd/bin/gsd-tools.cjs scaffold uat --phase 29`, resulting in `Command 'gsd-tools' not found`.
74
- * **Root Cause Analysis:**
75
- * `gsd-tools` is not installed globally via `npm link` or as a PATH binary. It only exists as a local `.cjs` script inside the skill's `bin/` directory.
76
- * The usage header in `gsd-tools.cjs` had `Usage: node gsd-tools.cjs` which was ambiguous — AI agents interpreted this as a globally available command.
77
- * No documentation or reference files explicitly warned that `gsd-tools` must be invoked via `node .agent/skills/gsd/bin/gsd-tools.cjs`.
78
- * **How it was fixed:**
79
- * Updated the `gsd-tools.cjs` usage header comment to show the full project-relative path.
80
- * Updated the error message in the fallback `if (!command)` handler.
81
- * Added `CRITICAL` warning blocks to `gsd-tools.md` (both live and converter asset).
82
- * Added Best Practice #5 (`CLI Invocation`) to both `SKILL.md` and `gsd_skill_template.md`.
83
- * Updated the `CONDENSED_HEADER` in `optimize-gsd-tools.cjs` to inject the correct path during future conversions.
84
-
85
- ### v1.22.2 (2026-03-03)
86
- * **Context:** `optimize-gsd-tools.cjs` (GSD Converter Script)
87
- * **Issue:** `parseIncludeFlag` missing in `gsd-tools.cjs` after conversion.
88
- * **Root Cause Analysis:**
89
- * The optimizer script checked `!gsdContent.includes('parseIncludeFlag')` to decide whether to inject the `require` statement.
90
- * Since `parseIncludeFlag` had already been injected earlier in the switch case router, that condition evaluated to false, skipping the import injection.
91
- * **How it was fixed:**
92
- * Changed the checking condition to explicitly examine if `parseIncludeFlag } = require` existed rather than just the generic variable string.
93
- * Also modified the injection method to seamlessly inject into the existing `require('./lib/core.cjs')` instead of clumsily appending a new statement.
94
-
95
- ### v1.22.1 (2026-03-03)
96
- * **Context:** `gsd-converter` (`convert.py`)
97
- * **Issue:** Optimizer script failed with `ENOTDIR` error during post-processing.
98
- * **Root Cause Analysis:**
99
- * The `convert.py` script was passing the absolute path of `gsd-tools.cjs` to the `optimize-gsd-tools.cjs` script.
100
- * The optimizer script expects a directory path (the `bin` directory) as it needs to recurse through `bin/` and `bin/lib/` to format all `.cjs` files.
101
- * **How it was fixed:**
102
- * Modified `convert.py` to resolve the directory name (`os.path.dirname`) of the `gsd_tools_path` before passing it to the optimizer process.
103
- * This ensures the optimizer successfully finds and formats all modular engine components.
104
-
105
- ### v1.22.0 (2026-03-01)
106
- * **Context:** `gsd-tools.cjs` (GSD Core Engine Optimization)
107
- * **Issue:** Token overhead and high script size (~125KB) impacting agent context limits.
108
- * **Root Cause Analysis:**
109
- * Legacy indentation (4 spaces) and large diagnostic headers consumed excessive context space in agent prompts.
110
- * Monolithic inclusion of state and roadmap metadata made context windows unmanageable for long phases.
111
- * **How it was fixed:**
112
- * **Whitespace Optimization**: Refactored the core engine with 2-space indentation and LF line endings during the migration, reducing the file size by approximately 20-25KB.
113
- * **Modular Inclusions**: Injected `applyIncludes` logic to allow subagents to slice the state file (e.g., `--include roadmap` or `--include state`) instead of loading the entire object.
114
- * **Dynamic Command Discovery**: Automated command list generation in `SKILL.md` to ensure documentation matches the actual capabilities of the CLI tools.
115
-
116
- ### v1.21.1 (2026-02-27)
117
- ### v1.0.2 (2026-02-20)
118
- * **Context:** `gsd-tools.cjs` (Core Engine)
119
- * **Issue:** Legacy script was monolithic, lacked contextual flexibility, and had high token overhead for large phases.
120
- * **Root Cause Analysis:** Standard GSD scripts didn't support partial file embedding or hierarchical artifact discovery, forcing agents to either read too much or too little context.
121
- * **How it was fixed:**
122
- * **Automated via `gsd-converter`**: The converter now dynamically injects a modular helper system (`parseIncludeFlag`, `applyIncludes`) into `gsd-tools.cjs`.
123
- * Added regex-based `discoverPhaseArtifacts` to traverse `.planning/` and phase subdirectories automatically.
124
- * Introduced the `--include` flag (e.g., `--include state,roadmap`) to allow sub-agents to request only necessary context, optimizing token usage.
125
- * Injected `MODEL_PROFILES` to centralize model selection logic keyed by GSD role.