gemstack-ai 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/rules/01-gemstack-core.md +51 -0
- package/.agents/rules/02-gemstack-constitution.md +44 -0
- package/.agents/rules/03-gemstack-security.md +49 -0
- package/.agents/rules/04-gemstack-infrastructure.md +28 -0
- package/.agents/skills/gemstack-cso/SKILL.md +50 -0
- package/.agents/skills/gemstack-dashboard/SKILL.md +31 -0
- package/.agents/skills/gemstack-guard/SKILL.md +19 -0
- package/.agents/skills/gemstack-handoff/SKILL.md +21 -0
- package/.agents/skills/gemstack-heal/SKILL.md +19 -0
- package/.agents/skills/gemstack-investigate/SKILL.md +25 -0
- package/.agents/skills/gemstack-learn/SKILL.md +18 -0
- package/.agents/skills/gemstack-office-hours/SKILL.md +18 -0
- package/.agents/skills/gemstack-plan/SKILL.md +20 -0
- package/.agents/skills/gemstack-qa/SKILL.md +17 -0
- package/.agents/skills/gemstack-qa-visual/SKILL.md +17 -0
- package/.agents/skills/gemstack-resume/SKILL.md +18 -0
- package/.agents/skills/gemstack-review/SKILL.md +18 -0
- package/.agents/skills/gemstack-sandbox/SKILL.md +19 -0
- package/.agents/skills/gemstack-ship/SKILL.md +19 -0
- package/.agents/skills/gemstack-spec/SKILL.md +24 -0
- package/.agents/skills/gemstack-swarm/SKILL.md +18 -0
- package/.agents/skills/gemstack-tasks/SKILL.md +18 -0
- package/.gemstack/learnings.md +8 -0
- package/.gemstack/state.json +11 -0
- package/.gitattributes +19 -0
- package/.github/workflows/main-ci.yml +32 -0
- package/.github/workflows/pr-ci.yml +31 -0
- package/.github/workflows/publish.yml +52 -0
- package/.github/workflows/release-readiness.yml +43 -0
- package/CHANGELOG.md +35 -0
- package/CODE_OF_CONDUCT.md +49 -0
- package/CONTRIBUTING.md +62 -0
- package/LICENSE +21 -0
- package/MANUAL.md +99 -0
- package/README.md +130 -0
- package/RELEASE_NOTES.md +149 -0
- package/bin/gemstack +31 -0
- package/bin/gemstack-doctor +16 -0
- package/bin/gemstack-doctor.ps1 +38 -0
- package/bin/gemstack.ps1 +49 -0
- package/docs/antigravity.md +6 -0
- package/docs/handoff.md +9 -0
- package/docs/qa/latest-qa.md +25 -0
- package/docs/qa-browser.md +7 -0
- package/docs/quickstart.md +21 -0
- package/docs/release.md +29 -0
- package/docs/reviews/latest-review.md +24 -0
- package/docs/security/latest-security-audit.md +35 -0
- package/docs/security.md +17 -0
- package/docs/skills.md +17 -0
- package/docs/spec-driven-development.md +10 -0
- package/gemstack-ai-1.0.1.tgz +0 -0
- package/handoff.md +45 -0
- package/handoff_archive.md +61 -0
- package/package.json +25 -0
- package/scripts/ci/check-frontmatter.js +54 -0
- package/scripts/ci/check-mojibake.js +44 -0
- package/scripts/ci/check-package-contents.js +32 -0
- package/scripts/ci/check-template-clean.js +46 -0
- package/scripts/ci/smoke-cli.js +30 -0
- package/specs/004-release-automation/plan.md +52 -0
- package/specs/004-release-automation/spec.md +49 -0
- package/specs/004-release-automation/tasks.md +25 -0
- package/specs/005-the-wow-update/plan.md +29 -0
- package/specs/005-the-wow-update/spec.md +32 -0
- package/specs/005-the-wow-update/tasks.md +16 -0
- package/specs/README.md +12 -0
- package/specs/current/plan.md +83 -0
- package/specs/current/spec.md +57 -0
- package/specs/current/tasks.md +98 -0
- package/specs/templates/plan.md +38 -0
- package/specs/templates/spec.md +35 -0
- package/specs/templates/tasks.md +21 -0
- package/specs/v0.2-cli-distribution/plan.md +112 -0
- package/specs/v0.2-cli-distribution/spec.md +27 -0
- package/specs/v0.2-cli-distribution/tasks.md +115 -0
- package/specs/v0.3-ci-cd/plan.md +83 -0
- package/specs/v0.3-ci-cd/spec.md +57 -0
- package/specs/v0.3-ci-cd/tasks.md +98 -0
- package/src/cli.js +64 -0
- package/src/commands/doctor.js +50 -0
- package/src/commands/hooks.js +67 -0
- package/src/commands/init.js +90 -0
- package/src/commands/install.js +72 -0
- package/src/commands/list.js +20 -0
- package/src/commands/show.js +18 -0
- package/src/commands/update.js +88 -0
- package/src/lib/backup.js +29 -0
- package/src/lib/filesystem-safe.js +22 -0
- package/src/lib/gitignore.js +19 -0
- package/src/lib/logger.js +6 -0
- package/src/lib/manifest.js +25 -0
- package/src/lib/parser.js +27 -0
- package/src/mcp-server.js +101 -0
- package/template/.agents/rules/01-gemstack-core.md +51 -0
- package/template/.agents/rules/02-gemstack-constitution.md +44 -0
- package/template/.agents/rules/03-gemstack-security.md +49 -0
- package/template/.agents/rules/04-gemstack-infrastructure.md +28 -0
- package/template/.agents/skills/gemstack-cso/SKILL.md +50 -0
- package/template/.agents/skills/gemstack-dashboard/SKILL.md +31 -0
- package/template/.agents/skills/gemstack-guard/SKILL.md +19 -0
- package/template/.agents/skills/gemstack-handoff/SKILL.md +21 -0
- package/template/.agents/skills/gemstack-heal/SKILL.md +19 -0
- package/template/.agents/skills/gemstack-investigate/SKILL.md +25 -0
- package/template/.agents/skills/gemstack-learn/SKILL.md +18 -0
- package/template/.agents/skills/gemstack-office-hours/SKILL.md +18 -0
- package/template/.agents/skills/gemstack-plan/SKILL.md +20 -0
- package/template/.agents/skills/gemstack-qa/SKILL.md +17 -0
- package/template/.agents/skills/gemstack-qa-visual/SKILL.md +17 -0
- package/template/.agents/skills/gemstack-resume/SKILL.md +18 -0
- package/template/.agents/skills/gemstack-review/SKILL.md +18 -0
- package/template/.agents/skills/gemstack-sandbox/SKILL.md +19 -0
- package/template/.agents/skills/gemstack-ship/SKILL.md +19 -0
- package/template/.agents/skills/gemstack-spec/SKILL.md +24 -0
- package/template/.agents/skills/gemstack-swarm/SKILL.md +18 -0
- package/template/.agents/skills/gemstack-tasks/SKILL.md +18 -0
- package/template/.gemstack/learnings.md +3 -0
- package/template/.gemstack/state.json +4 -0
- package/template/docs/antigravity.md +6 -0
- package/template/docs/handoff.md +9 -0
- package/template/docs/qa/latest-qa.md +25 -0
- package/template/docs/qa-browser.md +7 -0
- package/template/docs/quickstart.md +21 -0
- package/template/docs/release.md +10 -0
- package/template/docs/reviews/latest-review.md +19 -0
- package/template/docs/security/latest-security-audit.md +37 -0
- package/template/docs/security.md +17 -0
- package/template/docs/skills.md +17 -0
- package/template/docs/spec-driven-development.md +10 -0
- package/template/handoff.md +11 -0
- package/template/handoff_archive.md +3 -0
- package/template/specs/current/plan.md +5 -0
- package/template/specs/current/spec.md +7 -0
- package/template/specs/current/tasks.md +3 -0
- package/template/specs/templates/plan.md +38 -0
- package/template/specs/templates/spec.md +35 -0
- package/template/specs/templates/tasks.md +21 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Main CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
name: Full CI
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
15
|
+
node-version: [18.x, 20.x]
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
- name: Setup Node.js
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: ${{ matrix.node-version }}
|
|
23
|
+
- name: Install Dependencies
|
|
24
|
+
run: npm install
|
|
25
|
+
- name: Run Native Tests
|
|
26
|
+
run: npm test
|
|
27
|
+
- name: Run CI Suite
|
|
28
|
+
run: npm run ci:all
|
|
29
|
+
- name: Run Demo Smoke
|
|
30
|
+
run: npm run ci:demo
|
|
31
|
+
- name: Validate Package Build
|
|
32
|
+
run: npm run pack:dry
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: PR CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
name: Quick CI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
node-version: [18.x, 20.x]
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout repository
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
- name: Setup Node.js
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: ${{ matrix.node-version }}
|
|
22
|
+
- name: Install Dependencies
|
|
23
|
+
run: npm install
|
|
24
|
+
- name: Run Native Tests
|
|
25
|
+
run: npm test
|
|
26
|
+
- name: Run CI Suite
|
|
27
|
+
run: npm run ci:all
|
|
28
|
+
- name: Run Demo Smoke
|
|
29
|
+
run: npm run ci:demo
|
|
30
|
+
- name: Validate Package Build
|
|
31
|
+
run: npm run pack:dry
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Publish Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write # Requerido para crear GitHub Releases
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
name: Publish to NPM and GitHub Releases
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: '20'
|
|
24
|
+
registry-url: 'https://registry.npmjs.org'
|
|
25
|
+
|
|
26
|
+
- name: Install Dependencies
|
|
27
|
+
run: npm ci || npm install
|
|
28
|
+
|
|
29
|
+
- name: Security Gate - Run CI All
|
|
30
|
+
run: npm run ci:all
|
|
31
|
+
|
|
32
|
+
- name: Pack Package
|
|
33
|
+
run: npm pack
|
|
34
|
+
id: pack
|
|
35
|
+
|
|
36
|
+
- name: Publish to NPM
|
|
37
|
+
run: npm publish --access public
|
|
38
|
+
env:
|
|
39
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
40
|
+
|
|
41
|
+
- name: Create GitHub Release
|
|
42
|
+
env:
|
|
43
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
+
run: |
|
|
45
|
+
# Obtener el nombre del archivo tarball generado por npm pack
|
|
46
|
+
TARBALL=$(ls gemstack-*.tgz)
|
|
47
|
+
|
|
48
|
+
# Crear el Release oficial de GitHub usando el CLI nativo 'gh'
|
|
49
|
+
gh release create ${{ github.ref_name }} \
|
|
50
|
+
--title "Release ${{ github.ref_name }}" \
|
|
51
|
+
--notes-file RELEASE_NOTES.md \
|
|
52
|
+
$TARBALL
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Release Readiness
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
validate-and-pack:
|
|
8
|
+
name: Validate and Pack
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Checkout repository
|
|
12
|
+
uses: actions/checkout@v4
|
|
13
|
+
- name: Setup Node.js
|
|
14
|
+
uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: 20.x
|
|
17
|
+
- name: Install Dependencies
|
|
18
|
+
run: npm install
|
|
19
|
+
- name: Run Native Tests
|
|
20
|
+
run: npm test
|
|
21
|
+
- name: Run CI Suite
|
|
22
|
+
run: npm run ci:all
|
|
23
|
+
- name: Run Demo Smoke
|
|
24
|
+
run: npm run ci:demo
|
|
25
|
+
- name: Pack NPM Tarball
|
|
26
|
+
run: npm pack
|
|
27
|
+
- name: Test Tarball in Dummy Project
|
|
28
|
+
run: |
|
|
29
|
+
mkdir ../gemstack-dummy
|
|
30
|
+
cd ../gemstack-dummy
|
|
31
|
+
npm init -y
|
|
32
|
+
npm install ../Gemstack/gemstack-*.tgz
|
|
33
|
+
npx gemstack --help
|
|
34
|
+
npx gemstack init --dry-run
|
|
35
|
+
npx gemstack init --yes
|
|
36
|
+
npx gemstack doctor
|
|
37
|
+
npx gemstack update --dry-run
|
|
38
|
+
- name: Upload NPM Tarball
|
|
39
|
+
uses: actions/upload-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: gemstack-npm-tarball
|
|
42
|
+
path: gemstack-*.tgz
|
|
43
|
+
if-no-files-found: error
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [v0.3.0] - 2026-08-19
|
|
6
|
+
### Added
|
|
7
|
+
- GitHub Actions CI/CD workflows (`pr-ci.yml`, `main-ci.yml`, `release-readiness.yml`).
|
|
8
|
+
- Zero-dependency Node.js CI scripts under `scripts/ci/` (`check-frontmatter.js`, `check-template-clean.js`, `check-mojibake.js`, `check-package-contents.js`, `smoke-cli.js`).
|
|
9
|
+
- Strict repository hygiene validation ensuring `template/` cleanliness before any release.
|
|
10
|
+
- Tarball artifact generation workflow for manual validation.
|
|
11
|
+
- SecureDocs smoke testing embedded in CI (`ci:demo`).
|
|
12
|
+
- `.gitattributes` to enforce consistent EOL globally.
|
|
13
|
+
- README CI badge.
|
|
14
|
+
- Added package artifact validation ensuring no publish secrets.
|
|
15
|
+
- explicitly prevented any npm publish automation for safety.
|
|
16
|
+
|
|
17
|
+
## [Unreleased]
|
|
18
|
+
### Added
|
|
19
|
+
- Zero-dependency Node.js CLI (`src/cli.js`) to install and update Gemstack via `npx gemstack init` or `gemstack update`.
|
|
20
|
+
- `template/` directory structure separating core framework from source code.
|
|
21
|
+
- Idempotent updates with mandatory `.gemstack/backups` via `src/lib/backup.js`.
|
|
22
|
+
- Manifest tracking (`.gemstack/manifest.json`) using crypto checksums.
|
|
23
|
+
- `gemstack doctor`, `list`, and `show` ported to cross-platform JS.
|
|
24
|
+
- Native unit tests via `node:test`.
|
|
25
|
+
|
|
26
|
+
## [v0.1.0] - 2026-08-19
|
|
27
|
+
### Added
|
|
28
|
+
- framework Gemstack base (local-first, agent-centric).
|
|
29
|
+
- Antigravity-native `.agents/rules` and `.agents/skills` structure.
|
|
30
|
+
- Spec-Driven Development workflow templates (`specs/current`).
|
|
31
|
+
- Handoff and resume memory system (`handoff.md`).
|
|
32
|
+
- Security/CSO checklist and workflows.
|
|
33
|
+
- SecureDocs demo app (`demo-app/`) to test methodologies.
|
|
34
|
+
- Anti-IDOR smoke tests via `npm run smoke`.
|
|
35
|
+
- PowerShell encoding fix and robust cross-platform CLI helpers (`bin/gemstack`, `bin/gemstack.ps1`).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
49
|
+
an individual is officially representing the community in public spaces.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Contributing to Gemstack
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to Gemstack! Gemstack is an open-source, local-first framework designed to supercharge AI coding agents with Spec-Driven Development (SDD) and military-grade security out of the box.
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
By participating in this project, you agree to abide by our [Code of Conduct](./CODE_OF_CONDUCT.md).
|
|
7
|
+
|
|
8
|
+
## How Can I Contribute?
|
|
9
|
+
|
|
10
|
+
### Reporting Bugs
|
|
11
|
+
If you find a bug, please create an issue on GitHub with:
|
|
12
|
+
- The OS and Node.js version.
|
|
13
|
+
- The AI Agent you are using (e.g., Antigravity, Claude, Cursor).
|
|
14
|
+
- Steps to reproduce the behavior.
|
|
15
|
+
- Expected behavior vs actual behavior.
|
|
16
|
+
|
|
17
|
+
### Suggesting Enhancements
|
|
18
|
+
We love new skills and rules! If you have an idea for a new agentic capability (like our `/qa-visual` or `/swarm`), open a discussion or issue describing:
|
|
19
|
+
- The problem it solves.
|
|
20
|
+
- The proposed `SKILL.md` or `RULE.md` format.
|
|
21
|
+
|
|
22
|
+
### Pull Requests
|
|
23
|
+
1. Fork the repo and create your branch from `main`.
|
|
24
|
+
2. If you've added code that should be tested, add tests.
|
|
25
|
+
3. If you've changed the agent skills in `template/`, make sure you run `npm run ci:all` to verify that `gemstack update` logic remains intact.
|
|
26
|
+
4. Ensure the test suite passes (`npm test`).
|
|
27
|
+
5. Issue that pull request!
|
|
28
|
+
|
|
29
|
+
## Local Development Setup
|
|
30
|
+
|
|
31
|
+
1. **Clone the repository:**
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://github.com/rtorrescodes/Gemstack.git
|
|
34
|
+
cd Gemstack
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. **Install dependencies:**
|
|
38
|
+
Gemstack is zero-dependencies for the end-user, but we use native Node `test` runner and some standard scripts for development.
|
|
39
|
+
```bash
|
|
40
|
+
npm install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Testing CLI changes locally:**
|
|
44
|
+
Link the package globally to test it on your system:
|
|
45
|
+
```bash
|
|
46
|
+
npm link
|
|
47
|
+
```
|
|
48
|
+
Now you can run `gemstack init` in any dummy directory to test scaffolding.
|
|
49
|
+
|
|
50
|
+
4. **Running the CI suite:**
|
|
51
|
+
Before committing, always run:
|
|
52
|
+
```bash
|
|
53
|
+
npm run ci:all
|
|
54
|
+
```
|
|
55
|
+
This will run our full suite of syntax checks, mojibake prevention, frontmatter validation, and CLI smoke tests.
|
|
56
|
+
|
|
57
|
+
## Architecture Guidelines
|
|
58
|
+
- **Zero-Dependency Core**: The end-user's `template/` output must never require `package.json` dependencies unless explicitly requested by the user.
|
|
59
|
+
- **Language Agnostic**: Agent skills must work regardless of whether the user writes in Python, Node, Go, or Rust.
|
|
60
|
+
- **Security First**: Any new feature must respect the `03-gemstack-security.md` rules.
|
|
61
|
+
|
|
62
|
+
Welcome to the team!
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gemstack Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/MANUAL.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# 📖 Manual Oficial de Gemstack (La Guía Definitiva)
|
|
2
|
+
|
|
3
|
+
¡Bienvenido a **Gemstack**! Si estás leyendo esto, probablemente sientes curiosidad sobre cómo programar mejor con Inteligencia Artificial. Este manual está diseñado para explicarte qué es este proyecto, por qué existe y cómo usarlo paso a paso, de manera sencilla.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. ¿Qué es Gemstack?
|
|
8
|
+
|
|
9
|
+
Hoy en día, herramientas como Copilot, Cursor, o Antigravity son increíbles escribiendo código, pero **tienen un problema**: son caóticas. Si les pides un sistema complejo, a menudo olvidan requerimientos, introducen vulnerabilidades de seguridad y pierden el hilo del proyecto.
|
|
10
|
+
|
|
11
|
+
**Gemstack NO es un framework de código** (no compite con React, Django o Laravel).
|
|
12
|
+
Gemstack es un **"Sistema Operativo para Inteligencias Artificiales"**.
|
|
13
|
+
|
|
14
|
+
Es una herramienta de cero dependencias (funciona en cualquier lenguaje y computadora) que inyecta un "cerebro", disciplina y reglas militares en tu repositorio. Cuando instalas Gemstack, obligas a la IA a dejar de improvisar y comenzar a trabajar como un Ingeniero Senior de Software bajo procesos estrictos.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 2. Instalación: Tu Primer Paso
|
|
19
|
+
|
|
20
|
+
No necesitas instalar librerías pesadas. En cualquier proyecto (sea nuevo o uno que ya lleve meses de desarrollo), abre tu terminal y ejecuta:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx gemstack init
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**¿Qué hace esto?**
|
|
27
|
+
No tocará tu código fuente. Creará silenciosamente carpetas ocultas (`.agents/`, `specs/`, `docs/`) que contienen las reglas, habilidades y flujos de trabajo que la IA debe leer antes de ayudarte a programar. ¡Y listo! Tu proyecto ahora tiene un "cerebro" estructurado.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 3. El Flujo de Trabajo (Spec-Driven Development)
|
|
32
|
+
|
|
33
|
+
Para usar Gemstack, no programas directamente. Escribes **especificaciones** en tu chat de IA y dejas que los agentes sigan un proceso ordenado. Así es como se construye una funcionalidad:
|
|
34
|
+
|
|
35
|
+
### Paso A: Ideación (`/spec`)
|
|
36
|
+
Abre tu chat con la IA (Cursor, Antigravity, Claude) y dile:
|
|
37
|
+
> *"Quiero crear un sistema de login. Ejecuta `/spec`"*
|
|
38
|
+
|
|
39
|
+
El agente **Product Manager** analizará tu idea, te hará preguntas clave y escribirá un documento Markdown (`specs/current/spec.md`) detallando exactamente cómo debe funcionar, sin escribir ni una línea de código aún.
|
|
40
|
+
|
|
41
|
+
### Paso B: Planificación (`/plan`)
|
|
42
|
+
Una vez que apruebes el Spec, dile a la IA:
|
|
43
|
+
> *"Perfecto, ejecuta `/plan`"*
|
|
44
|
+
|
|
45
|
+
El agente **Arquitecto** leerá el Spec y decidirá qué archivos hay que crear, qué base de datos usar y cómo estructurarlo técnicamente (`specs/current/plan.md`).
|
|
46
|
+
|
|
47
|
+
### Paso C: Ejecución (`/tasks`)
|
|
48
|
+
Dile a la IA:
|
|
49
|
+
> *"Haz el desglose, `/tasks`"*
|
|
50
|
+
|
|
51
|
+
Se generará una lista de tareas (`[ ]`, `[/]`, `[x]`). Ahora simplemente dile a la IA: *"Empieza a ejecutar la tarea 1"*. La IA escribirá el código de forma ordenada y controlada.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. Los Súper Poderes de Gemstack
|
|
56
|
+
|
|
57
|
+
Gemstack viene con funcionalidades avanzadas (Skills) que puedes invocar como comandos en tu chat:
|
|
58
|
+
|
|
59
|
+
### 🛡️ Seguridad Militar (`/cso`)
|
|
60
|
+
Dile a la IA: *"Ejecuta `/cso`"*. El Chief Security Officer auditará tu código. Gemstack tiene leyes estrictas implantadas en su núcleo (AppSec Nivel 2 y DevOps). Si tienes una contraseña expuesta, o tu base de datos es vulnerable a un ataque de fuerza bruta, el agente detendrá todo y te obligará a parcharlo.
|
|
61
|
+
|
|
62
|
+
### 🪝 Prevención Activa (Git Hooks)
|
|
63
|
+
Gemstack se asegura de que tú, como humano, tampoco cometas errores. Al hacer `npx gemstack init`, se instala un guardián invisible. Si intentas hacer un `git commit` y por error incluiste una llave de Amazon Web Services (AWS) o un archivo `.env`, Gemstack bloqueará el commit en tu terminal y te regañará.
|
|
64
|
+
|
|
65
|
+
### 📊 Dashboard Interactivo (`/dashboard`)
|
|
66
|
+
¿Perdido en el código? Dile a tu chat de IA (si usas Antigravity):
|
|
67
|
+
> *"Ejecuta `/dashboard`"*
|
|
68
|
+
|
|
69
|
+
La IA leerá tu lista de tareas y generará una interfaz gráfica incrustada en tu chat mostrándote una barra de progreso, el estado de tu seguridad y las tareas pendientes.
|
|
70
|
+
|
|
71
|
+
### 🔌 Instalación de Skills Externos
|
|
72
|
+
Gemstack es extensible. Si alguien en internet creó un súper agente especialista en Python, puedes descargarlo a tu proyecto directamente desde la terminal:
|
|
73
|
+
```bash
|
|
74
|
+
npx gemstack install https://raw.githubusercontent.com/usuario/repo/main/SKILL.md
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 🤖 Servidor MCP (Para IAs Externas)
|
|
78
|
+
Si usas Claude Desktop u otro cliente que soporte **Model Context Protocol (MCP)**, puedes configurar Gemstack como una de sus herramientas nativas. Simplemente configura el servidor ejecutando en tu cliente: `npx gemstack mcp`. La IA podrá "llamar" a Gemstack directamente por debajo de la mesa para preguntarle cuáles son tus tareas actuales y reglas de seguridad sin que tengas que decirle nada.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 5. Terminando tu Día (`/handoff`)
|
|
83
|
+
|
|
84
|
+
Cuando termines de trabajar, dile a la IA:
|
|
85
|
+
> *"He terminado por hoy. Ejecuta `/handoff`"*
|
|
86
|
+
|
|
87
|
+
La IA escribirá un archivo `handoff.md` resumiendo exactamente en qué te quedaste, qué bugs hay pendientes y qué debes hacer mañana.
|
|
88
|
+
|
|
89
|
+
Al día siguiente (o si otro desarrollador toma tu proyecto), el primer mensaje al chat debe ser:
|
|
90
|
+
> *"Hola, soy nuevo aquí. Ejecuta `/resume`"*
|
|
91
|
+
|
|
92
|
+
La IA leerá el Handoff y te pondrá al día instantáneamente.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Resumen Final
|
|
97
|
+
Gemstack te convierte en un Director de Orquesta. En lugar de pelear con el código línea por línea, tú diriges a los agentes (Product Manager, CSO, QA) utilizando comandos simples (`/spec`, `/plan`, `/cso`, `/dashboard`).
|
|
98
|
+
|
|
99
|
+
¡Disfruta construyendo software de grado empresarial a la velocidad de la luz!
|
package/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://via.placeholder.com/150x150/1a1a2e/ffffff?text=GS" alt="Gemstack Logo" width="120" height="120" />
|
|
3
|
+
<h1>Gemstack</h1>
|
|
4
|
+
<p><b>The Local-First Agentic Framework for Spec-Driven Development</b></p>
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/gemstack)
|
|
7
|
+
[](https://github.com/rtorrescodes/Gemstack/actions)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](#military-grade-security-shield)
|
|
10
|
+
|
|
11
|
+
> **💡 ¿No sabes por dónde empezar o cómo funciona esto?**
|
|
12
|
+
> 👉 [**¡Lee el Manual de Usuario Interactivo (La Guía Definitiva)!**](MANUAL.md) 👈
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Gemstack is a zero-dependency, local-first framework designed to supercharge your AI Coding Agents (like Google Antigravity, Claude, Cursor, or Aider).
|
|
18
|
+
|
|
19
|
+
Instead of letting AI write code blindly in a chaotic chat window, Gemstack installs a "Brain" directly into your repository. It enforces **Spec-Driven Development (SDD)**, injecting strict rules, autonomous skills, and military-grade security into the AI's context.
|
|
20
|
+
|
|
21
|
+
## ✨ Features
|
|
22
|
+
|
|
23
|
+
- 🧠 **Spec-Driven Development (SDD)**: The AI is physically prevented from hallucinating code without writing and getting approval for a `spec.md`, `plan.md`, and `tasks.md` first.
|
|
24
|
+
- 🛡️ **Military-Grade Security**: Includes a built-in Chief Security Officer (`gemstack-cso`) and immutable Constitution Rules that force the AI to respect OWASP, zero-trust secrets, and multi-tenant isolation.
|
|
25
|
+
- 🐝 **Swarm Architecture**: Tag tasks with `[P]` and invoke `/swarm` to watch the AI spawn parallel subagents to code your app simultaneously.
|
|
26
|
+
- 🏥 **Self-Healing CI/CD**: Run `/heal` when GitHub Actions fails. The AI will autonomously read the CI logs, write the patch, and push the fix.
|
|
27
|
+
- 👁️ **Visual QA Automation**: The `/qa-visual` skill instructs the agent to write and execute ephemeral Playwright scripts in an isolated sandbox to visually verify UI criteria.
|
|
28
|
+
- 📦 **Zero Dependencies**: Gemstack's footprint is just standard Markdown and JSON files. No heavy NPM packages polluting your production bundle.
|
|
29
|
+
|
|
30
|
+
## 🚀 Quickstart
|
|
31
|
+
|
|
32
|
+
Start a new project or upgrade an existing one in seconds:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Initialize Gemstack in your current repository
|
|
36
|
+
npx gemstack init
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This will generate the `.agents/`, `.gemstack/`, and `specs/` directories.
|
|
40
|
+
|
|
41
|
+
To ensure your framework is healthy or to check for manual tampering:
|
|
42
|
+
```bash
|
|
43
|
+
npx gemstack doctor
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
To update your project when Gemstack releases new Agent Skills:
|
|
47
|
+
```bash
|
|
48
|
+
npx gemstack update
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 🧠 How it Works
|
|
52
|
+
|
|
53
|
+
Gemstack works by providing an **Operating System** for your LLM via markdown files. When you chat with your agent, you use "Slash Commands" that map to specific files in your `.agents/skills/` directory.
|
|
54
|
+
|
|
55
|
+
### The SDD Workflow
|
|
56
|
+
1. `/specify I want to build a real-time chat app` -> The AI creates `specs/[feature]/spec.md`.
|
|
57
|
+
2. `/plan` -> The AI reads the spec and writes technical architecture in `plan.md`.
|
|
58
|
+
3. `/tasks` -> The AI breaks the plan into an actionable, parallelizable checklist.
|
|
59
|
+
4. **Code!** -> The AI executes the tasks.
|
|
60
|
+
5. `/review` -> The AI reviews the diffs against the `03-gemstack-security.md` rules.
|
|
61
|
+
6. `/handoff` -> The AI saves its memory to `handoff.md` so you can close your laptop and resume flawlessly tomorrow.
|
|
62
|
+
|
|
63
|
+
## 🛡️ Military-Grade Security Shield
|
|
64
|
+
|
|
65
|
+
Gemstack ships with `03-gemstack-security.md` and `04-gemstack-infrastructure.md`, rulebooks extracted from high-compliance SaaS and Cloud Native environments (OWASP, NIST). When you run `/cso` or `/review`, the AI strictly checks for:
|
|
66
|
+
- **AppSec (Level 2)**: IDOR Protection, Race Condition prevention, CSRF/SSRF blocking, Rate Limiting, and Audit Trails.
|
|
67
|
+
- **Zero Trust Secrets**: Hardcoded keys are blocked.
|
|
68
|
+
- **DevSecOps & Infra**: Enforces Immutable Infrastructure (Docker/Terraform), Private Subnets (VPC), IAM Least Privilege, and Cloud Secret Managers.
|
|
69
|
+
- **Server-Side Validation**: Complete distrust of frontend state.
|
|
70
|
+
|
|
71
|
+
## 🐝 Advanced Autonomy (The WOW Update)
|
|
72
|
+
|
|
73
|
+
Gemstack isn't just passive documents; it actively orchestrates agentic capabilities:
|
|
74
|
+
|
|
75
|
+
| Command | Action |
|
|
76
|
+
|---------|--------|
|
|
77
|
+
| `/swarm` | Orchestrates parallel subagents for tasks marked `[P]` |
|
|
78
|
+
| `/qa-visual` | Spawns sandbox browsers to visually assert Acceptance Criteria |
|
|
79
|
+
| `/dashboard` | Generates a rich, interactive inline UI of your project's progress |
|
|
80
|
+
| `/heal` | Hooks into GitHub CLI (`gh`) to read failing CI logs and auto-push fixes |
|
|
81
|
+
| `/sandbox` | Wraps risky AI execution inside an ephemeral Docker container |
|
|
82
|
+
|
|
83
|
+
## 🪝 Active Security (Git Hooks)
|
|
84
|
+
|
|
85
|
+
Gemstack ships with native, zero-dependency Git hooks. Run `npx gemstack hooks` (or just `npx gemstack init`) to install a local `pre-commit` hook that automatically blocks commits containing:
|
|
86
|
+
- Exposed `.env` files.
|
|
87
|
+
- Hardcoded secrets (Stripe, AWS, JWT keys).
|
|
88
|
+
- Unresolved merge conflict markers (`<<<<<<< HEAD`).
|
|
89
|
+
|
|
90
|
+
## 🔌 Ecosystem & Plugins (Skill Market)
|
|
91
|
+
|
|
92
|
+
You can install agent skills created by the community directly into your project using the `install` command. Gemstack will fetch the `SKILL.md`, parse its metadata, and integrate it into your AI's brain automatically:
|
|
93
|
+
```bash
|
|
94
|
+
npx gemstack install https://raw.githubusercontent.com/community/gemstack-skills/main/django-expert/SKILL.md
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## 🤖 MCP Server (Model Context Protocol)
|
|
98
|
+
|
|
99
|
+
Gemstack ships with a built-in MCP server that exposes the SDD state of your project to any MCP-compliant AI client (like Claude Desktop or Cursor).
|
|
100
|
+
|
|
101
|
+
Add the following to your MCP client configuration:
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"mcpServers": {
|
|
105
|
+
"gemstack": {
|
|
106
|
+
"command": "npx",
|
|
107
|
+
"args": ["gemstack", "mcp"]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## 📚 Documentation
|
|
114
|
+
|
|
115
|
+
Dive deeper into the Gemstack architecture:
|
|
116
|
+
- [📖 **Manual de Usuario**](MANUAL.md) - The Definitive Guide for beginners.
|
|
117
|
+
- [🧠 Spec-Driven Development](docs/spec-driven-development.md) - How the SDD loop works.
|
|
118
|
+
- [Available Skills](docs/skills.md)
|
|
119
|
+
- [Security Model](docs/security.md)
|
|
120
|
+
- [Handoff Protocol](docs/handoff.md)
|
|
121
|
+
|
|
122
|
+
## 🤝 Contributing
|
|
123
|
+
|
|
124
|
+
We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) to learn how to add new agentic skills, improve the Node CLI, or enhance the SDD Constitution.
|
|
125
|
+
|
|
126
|
+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
|
127
|
+
|
|
128
|
+
## 📄 License
|
|
129
|
+
|
|
130
|
+
MIT License. See [LICENSE](LICENSE) for details.
|