@soleri/forge 5.14.1 → 5.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/lib.d.ts +1 -0
  2. package/dist/lib.js +1 -0
  3. package/dist/lib.js.map +1 -1
  4. package/dist/skills/skills/brain-debrief.md +214 -0
  5. package/dist/skills/skills/brainstorming.md +180 -0
  6. package/dist/skills/skills/code-patrol.md +178 -0
  7. package/dist/skills/skills/context-resume.md +146 -0
  8. package/dist/skills/skills/deliver-and-ship.md +123 -0
  9. package/dist/skills/skills/env-setup.md +151 -0
  10. package/dist/skills/skills/executing-plans.md +216 -0
  11. package/dist/skills/skills/fix-and-learn.md +167 -0
  12. package/dist/skills/skills/health-check.md +231 -0
  13. package/dist/skills/skills/knowledge-harvest.md +185 -0
  14. package/dist/skills/skills/onboard-me.md +198 -0
  15. package/dist/skills/skills/retrospective.md +205 -0
  16. package/dist/skills/skills/second-opinion.md +149 -0
  17. package/dist/skills/skills/systematic-debugging.md +241 -0
  18. package/dist/skills/skills/test-driven-development.md +281 -0
  19. package/dist/skills/skills/vault-capture.md +170 -0
  20. package/dist/skills/skills/vault-navigator.md +140 -0
  21. package/dist/skills/skills/verification-before-completion.md +182 -0
  22. package/dist/skills/skills/writing-plans.md +215 -0
  23. package/dist/templates/skills.js +1 -0
  24. package/dist/templates/skills.js.map +1 -1
  25. package/dist/templates/test-facades.js +6 -4
  26. package/dist/templates/test-facades.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/__tests__/scaffolder.test.ts +3 -1
  29. package/src/lib.ts +1 -0
  30. package/src/skills/deliver-and-ship.md +123 -0
  31. package/src/skills/env-setup.md +151 -0
  32. package/src/templates/skills.ts +1 -0
  33. package/src/templates/test-facades.ts +6 -4
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: deliver-and-ship
3
+ description: >
4
+ Use when the user says "ship it", "ready to deploy", "package", "release",
5
+ "pre-PR check", "delivery checklist", "is this ready", "final review", or mentions
6
+ shipping, deploying, packaging, or releasing work. Runs pre-delivery quality gates
7
+ to ensure nothing ships without passing stability, knowledge capture, and code quality checks.
8
+ ---
9
+
10
+ # Deliver & Ship — Quality Gate Runner
11
+
12
+ Run all pre-delivery quality gates before shipping. This ensures nothing leaves without passing stability checks, knowledge capture, and code quality verification.
13
+
14
+ ## When to Use
15
+
16
+ When work is considered "done" and ready to be committed, PR'd, or deployed. This is the last checkpoint before code leaves the developer's hands.
17
+
18
+ ## Orchestration Sequence
19
+
20
+ ### Step 1: Code Quality
21
+
22
+ Run the project's linter, formatter, and type checker on all modified files:
23
+
24
+ 1. Check for lint/format scripts in `package.json` (or equivalent)
25
+ 2. Run `typecheck` / `tsc --noEmit` if TypeScript
26
+ 3. Run any project-specific quality gates (clippy for Rust, mypy for Python, etc.)
27
+
28
+ Any type error or lint failure is a blocker.
29
+
30
+ ### Step 2: Test Suite
31
+
32
+ Run the full test suite to catch regressions:
33
+
34
+ ```
35
+ YOUR_AGENT_core op:admin_health
36
+ ```
37
+
38
+ Verify the agent itself is healthy, then run project tests. All tests must pass.
39
+
40
+ ### Step 3: Stability Assessment
41
+
42
+ Classify the changes as safe or breaking:
43
+
44
+ - **Safe**: Internal refactors, bug fixes, additive features (new exports, new ops)
45
+ - **Breaking**: Removed exports, changed signatures, renamed public APIs, schema migrations
46
+ - Breaking changes need migration guidance in the commit/PR description
47
+
48
+ ### Step 4: Knowledge Audit
49
+
50
+ Check if patterns discovered during this work session should be captured before shipping:
51
+
52
+ ```
53
+ YOUR_AGENT_core op:memory_search
54
+ params: { query: "current session" }
55
+ ```
56
+
57
+ ```
58
+ YOUR_AGENT_core op:brain_stats
59
+ ```
60
+
61
+ Look for:
62
+
63
+ - Bug fixes that reveal an anti-pattern worth capturing
64
+ - New patterns that should be in the vault for next time
65
+ - Architectural decisions that need documenting
66
+
67
+ Uncaptured knowledge is lost knowledge. If something should be captured:
68
+
69
+ ```
70
+ YOUR_AGENT_core op:capture_knowledge
71
+ params: {
72
+ title: "<what was learned>",
73
+ description: "<the pattern or anti-pattern>",
74
+ type: "pattern",
75
+ tags: ["<relevant-tags>"]
76
+ }
77
+ ```
78
+
79
+ ### Step 5: Commit Quality
80
+
81
+ Verify commit messages follow conventional commits:
82
+
83
+ - `feat:` for new features
84
+ - `fix:` for bug fixes
85
+ - `refactor:` for refactors
86
+ - `chore:` for maintenance
87
+ - No AI attribution (blocked by engine rules)
88
+
89
+ ### Step 6: Delivery Report
90
+
91
+ Present a checklist:
92
+
93
+ - [ ] Code quality: pass/fail (Step 1)
94
+ - [ ] Tests: pass/fail (Step 2)
95
+ - [ ] Stability: safe change / breaking change (Step 3)
96
+ - [ ] Knowledge: captured / needs capture (Step 4)
97
+ - [ ] Commits: clean / needs cleanup (Step 5)
98
+
99
+ All items must pass before recommending "ship it."
100
+
101
+ ## Domain-Specific Gates
102
+
103
+ Agents with domain-specific facades may add extra gates. For example:
104
+
105
+ - **Design system agents**: token validation, contrast checks, accessibility audit
106
+ - **API agents**: schema validation, backward compatibility checks
107
+ - **Security agents**: dependency audit, secret scanning
108
+
109
+ These are additive — they don't replace the generic gates above.
110
+
111
+ ## Exit Criteria
112
+
113
+ Delivery is approved when all gates pass. If any gate fails, report the failure and recommend fixes before shipping. Never approve delivery with blocking issues.
114
+
115
+ ## Agent Tools Reference
116
+
117
+ | Op | When to Use |
118
+ |----|-------------|
119
+ | `admin_health` | Verify agent/system health |
120
+ | `memory_search` | Check for uncaptured session knowledge |
121
+ | `brain_stats` | Review learning state |
122
+ | `capture_knowledge` | Persist patterns before shipping |
123
+ | `capture_quick` | Fast capture for simple learnings |
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: env-setup
3
+ description: >
4
+ Use when a developer needs to set up, fix, or restore a local development environment.
5
+ Triggers on post-clone setup, project onboarding, first-time running a repo, pulled changes
6
+ that broke the build, missing or misconfigured dependencies, MODULE_NOT_FOUND or Cannot find
7
+ module errors, gyp ERR or native module build failures, missing .env files or unknown required
8
+ environment variables, database setup, Docker compose issues, or connection refused during
9
+ local dev. Covers Node.js, Python, Rust, Go, Ruby, PHP, and Docker-based projects.
10
+ ---
11
+
12
+ # Environment Setup
13
+
14
+ Detect what a project needs, diagnose what's missing, and produce an actionable setup checklist.
15
+
16
+ ## Overview
17
+
18
+ Scan the project root for configuration files, detect the tech stack and dependencies, identify gaps between what's required and what's present, then generate ordered setup steps. Offer to execute each step.
19
+
20
+ ## When to Use
21
+
22
+ - Just cloned a repo and need to get it running
23
+ - Getting errors after pulling changes (missing deps, env vars, DB migrations)
24
+ - Onboarding to an unfamiliar project
25
+ - Setting up a project on a new machine
26
+ - Docker/container environment not starting
27
+ - Missing `.env` file or environment variables
28
+
29
+ ## Detection Phase
30
+
31
+ Scan the project root and identify:
32
+
33
+ ### Package Managers & Dependencies
34
+
35
+ | File | Stack | Install Command |
36
+ |------|-------|-----------------|
37
+ | `package.json` | Node.js | `npm install` / `yarn` / `pnpm install` (check for lockfile) |
38
+ | `requirements.txt` | Python | `pip install -r requirements.txt` |
39
+ | `pyproject.toml` | Python | `pip install -e .` or `poetry install` or `uv sync` |
40
+ | `Pipfile` | Python | `pipenv install` |
41
+ | `Cargo.toml` | Rust | `cargo build` |
42
+ | `go.mod` | Go | `go mod download` |
43
+ | `Gemfile` | Ruby | `bundle install` |
44
+ | `composer.json` | PHP | `composer install` |
45
+
46
+ **Lockfile priority:** If a lockfile exists (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `Pipfile.lock`, `poetry.lock`), use the matching package manager. Don't mix.
47
+
48
+ ### Environment Variables
49
+
50
+ 1. Check for `.env.example`, `.env.sample`, `.env.template`
51
+ 2. Check for existing `.env` — if missing, copy from template
52
+ 3. Parse template for required variables (lines without defaults or with placeholder values)
53
+ 4. Flag variables that need real values (API keys, secrets, database URLs)
54
+ 5. **If no template exists:** grep source for `process.env.`, `os.environ`, `env::var`, `os.Getenv` to discover env vars the project actually uses.
55
+
56
+ ### Native Dependencies
57
+
58
+ | Indicator | What It Means |
59
+ |-----------|--------------|
60
+ | `better-sqlite3`, `sqlite3` in deps | Needs C++ compiler |
61
+ | `node-gyp` in deps or scripts | Needs Python 3 + C++ toolchain |
62
+ | `sharp` in deps | Needs `libvips` |
63
+ | `Cargo.toml` with `[build-dependencies]` | Needs Rust toolchain for build scripts |
64
+ | `setup.py` with `ext_modules` | Needs C compiler for Python extensions |
65
+
66
+ ### Databases
67
+
68
+ | File/Config | Database | Setup Needed |
69
+ |-------------|----------|-------------|
70
+ | `docker-compose.yml` with postgres/mysql | PostgreSQL/MySQL | Container + migrations |
71
+ | `prisma/schema.prisma` | Prisma-managed | `npx prisma migrate dev` |
72
+ | `drizzle.config.*` | Drizzle-managed | `npx drizzle-kit push` |
73
+ | `alembic.ini` | SQLAlchemy | `alembic upgrade head` |
74
+ | `config/database.yml` | Rails | `rails db:create db:migrate` |
75
+
76
+ ### Infrastructure
77
+
78
+ | File | What It Means |
79
+ |------|--------------|
80
+ | `docker-compose.yml` | Services to start with `docker compose up` |
81
+ | `Dockerfile` | Can build container locally |
82
+ | `Makefile` | Check for `setup`, `install`, `dev` targets |
83
+ | `.tool-versions` / `.node-version` / `.nvmrc` | Required runtime version |
84
+ | `turbo.json` / `nx.json` / `lerna.json` | Monorepo setup |
85
+
86
+ ### IDE & Tool Integration
87
+
88
+ | File | Integration |
89
+ |------|------------|
90
+ | `.vscode/` | VS Code settings, extensions |
91
+ | `.mcp.json` / `mcp.json` | MCP server config |
92
+ | `.editorconfig` | Cross-editor formatting |
93
+
94
+ ## Diagnosis Phase
95
+
96
+ After detection, check what's present vs needed:
97
+
98
+ 1. **Runtime version** — does installed version match version files?
99
+ 2. **Dependencies installed?** — does `node_modules/`, `venv/`, `vendor/` exist?
100
+ 3. **Native build tools?** — are compilers available?
101
+ 4. **Env file present?** — does `.env` exist when a template does?
102
+ 5. **Database reachable?** — can the configured DB URL connect?
103
+ 6. **Docker running?** — is Docker daemon running if needed?
104
+ 7. **Build artifacts** — does the project need an initial build step?
105
+
106
+ ## Checklist Generation
107
+
108
+ Produce steps in dependency order:
109
+
110
+ ```
111
+ ## Setup Checklist
112
+
113
+ 1. [ ] Install runtime (Node 20.x via nvm)
114
+ 2. [ ] Install dependencies (pnpm install)
115
+ 3. [ ] Copy environment file (cp .env.example .env)
116
+ 4. [ ] Fill in required env vars: DATABASE_URL, API_KEY
117
+ 5. [ ] Start Docker services (docker compose up -d)
118
+ 6. [ ] Run database migrations (npx prisma migrate dev)
119
+ 7. [ ] Build the project (pnpm build)
120
+ 8. [ ] Start dev server (pnpm dev)
121
+ ```
122
+
123
+ **Order matters:** runtime → deps → env → infrastructure → migrations → build → run.
124
+
125
+ After presenting the checklist, offer: "Want me to run these steps for you?"
126
+
127
+ ## Execution Phase
128
+
129
+ If the user says yes, execute steps sequentially. Stop and ask if:
130
+
131
+ - A step fails
132
+ - A step requires manual input (API keys, passwords)
133
+ - A step would modify system-level config (global installs, PATH changes)
134
+
135
+ ## Monorepo Handling
136
+
137
+ If monorepo detected (turbo.json, nx.json, pnpm-workspace.yaml):
138
+
139
+ 1. Install root dependencies first
140
+ 2. Ask which package/app the user wants to work on
141
+ 3. Check for package-specific setup
142
+ 4. Run package-specific setup after root
143
+
144
+ ## Common Mistakes
145
+
146
+ - **Wrong package manager** — using `npm install` when `yarn.lock` exists. Always check lockfiles first.
147
+ - **Skipping env file** — project crashes on first API call. Always check for templates.
148
+ - **Missing native build tools** — `npm install` fails with gyp errors. Check before installing.
149
+ - **Missing runtime version** — subtle bugs from wrong Node/Python version.
150
+ - **Docker not running** — cryptic "connection refused" errors.
151
+ - **Stale dependencies** — after `git pull`, always re-install if lockfile changed.
@@ -12,6 +12,7 @@ const AGENT_SPECIFIC_SKILLS = new Set([
12
12
  'brainstorming',
13
13
  'code-patrol',
14
14
  'context-resume',
15
+ 'deliver-and-ship',
15
16
  'executing-plans',
16
17
  'fix-and-learn',
17
18
  'health-check',
@@ -63,9 +63,10 @@ ${domainDescribes}
63
63
  return createSemanticFacades(runtime, '${config.id}');
64
64
  }
65
65
 
66
- it('should create 10 semantic facades', () => {
66
+ it('should create all expected semantic facades', () => {
67
67
  const facades = buildSemanticFacades();
68
- expect(facades).toHaveLength(10);
68
+ // At least the core 10 facades must exist; new ones may be added by @soleri/core
69
+ expect(facades.length).toBeGreaterThanOrEqual(10);
69
70
  const names = facades.map(f => f.name);
70
71
  expect(names).toContain('${config.id}_vault');
71
72
  expect(names).toContain('${config.id}_plan');
@@ -79,10 +80,11 @@ ${domainDescribes}
79
80
  expect(names).toContain('${config.id}_cognee');
80
81
  });
81
82
 
82
- it('total ops across all facades should be 209', () => {
83
+ it('total ops across all facades should meet minimum threshold', () => {
83
84
  const facades = buildSemanticFacades();
84
85
  const totalOps = facades.reduce((sum, f) => sum + f.ops.length, 0);
85
- expect(totalOps).toBe(209);
86
+ // At least 209 ops (baseline); new ops may be added by @soleri/core
87
+ expect(totalOps).toBeGreaterThanOrEqual(209);
86
88
  });
87
89
  });
88
90