@abarcenas/ai-workflow-template 1.44.0 → 1.45.0
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/instructions/agent.instructions.md +10 -10
- package/.agents/instructions/learned-knowledge.instructions.md +60 -0
- package/.agents/skills/caveman-compress/README.md +2 -0
- package/.agents/skills/caveman-compress/SECURITY.md +3 -1
- package/.agents/skills/caveman-compress/SKILL.md +4 -0
- package/.agents/skills/caveman-compress/scripts/compress.py +9 -2
- package/.agents/skills/compress/SKILL.md +4 -0
- package/.agents/skills/compress/scripts/compress.py +9 -2
- package/.opencode/agents/architect.agent.md +0 -1
- package/.opencode/agents/coder.agent.md +0 -1
- package/.opencode/agents/deployer.agent.md +0 -1
- package/.opencode/agents/designer.agent.md +0 -1
- package/.opencode/agents/e2e-tester.agent.md +0 -1
- package/.opencode/agents/implementer.agent.md +0 -1
- package/.opencode/agents/orchestrator/feature-pipeline.agent.md +0 -1
- package/.opencode/agents/orchestrator/orchestrator.agent.md +0 -1
- package/.opencode/agents/orchestrator/tdd-orchestrator.agent.md +0 -1
- package/.opencode/agents/plan.agent.md +0 -1
- package/.opencode/agents/researcher.agent.md +0 -1
- package/.opencode/agents/reviewer.agent.md +0 -1
- package/.opencode/agents/tracker.agent.md +0 -1
- package/.opencode/agents/unit-tester.agent.md +0 -1
- package/AGENTS.md +3 -3
- package/README.md +1 -1
- package/package.json +1 -1
- package/scripts/bump-version.js +7 -0
|
@@ -12,7 +12,7 @@ Instructions for creating effective and maintainable custom agent files that pro
|
|
|
12
12
|
- Target audience: Developers creating custom agents for opencode
|
|
13
13
|
- File format: Markdown with YAML frontmatter
|
|
14
14
|
- File naming convention: lowercase with hyphens (e.g., `test-specialist.agent.md`)
|
|
15
|
-
- Location: `.
|
|
15
|
+
- Location: `.opencode/agents/` directory (repository-level)
|
|
16
16
|
- Purpose: Define specialized agents with tailored expertise, tools, and instructions for specific tasks
|
|
17
17
|
- Official documentation: [opencode.ai](https://opencode.ai)
|
|
18
18
|
|
|
@@ -191,7 +191,7 @@ Structure each step invocation with:
|
|
|
191
191
|
```text
|
|
192
192
|
Step 1: Transform raw input data
|
|
193
193
|
Agent: data-processor
|
|
194
|
-
Spec: .
|
|
194
|
+
Spec: .opencode/agents/data-processor.agent.md
|
|
195
195
|
Context: projectName, basePath
|
|
196
196
|
Input: basePath/raw/
|
|
197
197
|
Output: basePath/processed/
|
|
@@ -199,7 +199,7 @@ Expected: write basePath/processed/summary.md
|
|
|
199
199
|
|
|
200
200
|
Step 2: Analyze processed data (depends on Step 1 output)
|
|
201
201
|
Agent: data-analyst
|
|
202
|
-
Spec: .
|
|
202
|
+
Spec: .opencode/agents/data-analyst.agent.md
|
|
203
203
|
Context: projectName, basePath
|
|
204
204
|
Input: basePath/processed/
|
|
205
205
|
Output: basePath/analysis/
|
|
@@ -363,7 +363,7 @@ When invoking a sub-agent, pass all context through descriptive instructions in
|
|
|
363
363
|
Example (prompt template):
|
|
364
364
|
|
|
365
365
|
```text
|
|
366
|
-
This phase must be performed as the agent "documentation-writer" defined in ".
|
|
366
|
+
This phase must be performed as the agent "documentation-writer" defined in ".opencode/agents/documentation-writer.agent.md".
|
|
367
367
|
|
|
368
368
|
IMPORTANT:
|
|
369
369
|
- Read and apply the entire .agent.md spec.
|
|
@@ -394,19 +394,19 @@ Example of a simple orchestrator that validates code through multiple specialize
|
|
|
394
394
|
```text
|
|
395
395
|
Step 1: Security Review
|
|
396
396
|
Agent: security-reviewer
|
|
397
|
-
Spec: .
|
|
397
|
+
Spec: .opencode/agents/security-reviewer.agent.md
|
|
398
398
|
Context: repository name, PR number, base path
|
|
399
399
|
Output: security-review.md
|
|
400
400
|
|
|
401
401
|
Step 2: Test Coverage
|
|
402
402
|
Agent: test-coverage
|
|
403
|
-
Spec: .
|
|
403
|
+
Spec: .opencode/agents/test-coverage.agent.md
|
|
404
404
|
Context: repository name, PR number, base path
|
|
405
405
|
Output: coverage-report.md
|
|
406
406
|
|
|
407
407
|
Step 3: Aggregate
|
|
408
408
|
Agent: review-aggregator
|
|
409
|
-
Spec: .
|
|
409
|
+
Spec: .opencode/agents/review-aggregator.agent.md
|
|
410
410
|
Context: repository name, PR number, base path
|
|
411
411
|
Output: final-review.md
|
|
412
412
|
```
|
|
@@ -456,7 +456,7 @@ Use consistent variable naming conventions:
|
|
|
456
456
|
|
|
457
457
|
### Repository-Level Agents
|
|
458
458
|
|
|
459
|
-
- Location: `.
|
|
459
|
+
- Location: `.opencode/agents/`
|
|
460
460
|
- Scope: Available only in the specific repository
|
|
461
461
|
- Access: Uses repository-configured MCP servers from `opencode.json`
|
|
462
462
|
|
|
@@ -491,7 +491,7 @@ Use consistent variable naming conventions:
|
|
|
491
491
|
### File Structure
|
|
492
492
|
|
|
493
493
|
- [ ] Filename follows lowercase-with-hyphens convention
|
|
494
|
-
- [ ] File placed in correct directory (`.
|
|
494
|
+
- [ ] File placed in correct directory (`.opencode/agents/`)
|
|
495
495
|
- [ ] Filename uses only allowed characters
|
|
496
496
|
- [ ] File extension is `.agent.md`
|
|
497
497
|
|
|
@@ -564,7 +564,7 @@ Use consistent variable naming conventions:
|
|
|
564
564
|
### Organizational Issues
|
|
565
565
|
|
|
566
566
|
- ❌ Filename doesn't reflect agent purpose
|
|
567
|
-
- ❌ Wrong directory (using `.github/agents/` instead of `.
|
|
567
|
+
- ❌ Wrong directory (using `.github/agents/` instead of `.opencode/agents/`)
|
|
568
568
|
- ❌ Using spaces or special characters in filename
|
|
569
569
|
- ❌ Duplicate agent names causing conflicts
|
|
570
570
|
|
|
@@ -407,3 +407,63 @@
|
|
|
407
407
|
- **unit-tester**: Independently re-prove negative-assertion non-vacuity with a real temp mutation (inject the forbidden pattern into a scoped file → test FAILS → `git checkout` restore → PASSES). Independently verify git state: `git log --oneline -3` order, `git ls-files .env` empty, commit-scope diffs (`--name-status`), local `.env` preserved. Grep the commit TREES for the secret (`git grep`), not just the working tree.
|
|
408
408
|
- **reviewer**: For a security remediation review, verify: gitignore line present, `git ls-files` empty, local file preserved, `git grep` 0 hits in HEAD AND HEAD~1, commit scopes exact, redaction complete across all committed docs. Check for the two re-leak footguns explicitly: (1) untracked secret-bearing files, (2) uncommitted working-tree entries (memory-bank) that quote the secret in verification commands — these are the classic ways a "clean" commit still leaks. When the working tree is dirty with the secret, DO NOT append your own memory-bank entry until it is fixed (appending entrenches the leak). Check derived indexes for residue (memory.db WAL) — `memory_rebuild` alone may not purge; VACUUM may be required.
|
|
409
409
|
- **tracker**: When documenting a security pipeline, use ONLY the established redacted forms (`<REDACTED>` or the short truncated prefix) — never reproduce the full leaked value, including inside quoted grep commands in docs (that is exactly how the leak re-entrenched this pipeline). Record the tracked-secret remediation pattern (git rm --cached + gitignore + redact-all-sources + commit split) as a universal pattern, and reuse the canonical `projectId` from `require('./package.json').name` (`@abarcenas/ai-workflow-template`) when re-indexing this session into the PG knowledgebase.
|
|
410
|
+
|
|
411
|
+
## Session: 2026-09-14 — Stale Path Reference Cleanup + Env-Var Fail-Fast (vendor-neutral defaults)
|
|
412
|
+
|
|
413
|
+
**Pipeline:** coder (2 tasks) → reviewer (✅ APPROVED) → tracker
|
|
414
|
+
**Coverage:** N/A (documentation + Python helper scripts only; Vitest suite 15 files / 285 tests unaffected)
|
|
415
|
+
**TDD Iterations:** 0 (quick-fix pipeline, not TDD)
|
|
416
|
+
|
|
417
|
+
**New knowledge:**
|
|
418
|
+
- **A ported instruction file can carry a mechanically-renamed but non-existent path for months** — `.agents/instructions/agent.instructions.md` referenced `.agents/agents/` in 10 places because the original Copilot→opencode port mechanically substituted `.github/agents/` → `.agents/agents/` (logged at `docs/tracker-log.md` line 109 of the 2026-06-25 standalone entry) without verifying the directory exists. All real agent specs live in `.opencode/agents/`. **Universal pattern:** after any bulk find-and-replace/rebase of path references, verify EACH new path exists on disk — a plausible-looking rename (`.github/agents/` → `.agents/agents/`, both in the `.agents/` family) is exactly the kind of change that silently produces a dead path.
|
|
419
|
+
- **Freeze historical audit-trail docs; fix only live docs** — `docs/tracker-log.md`, `docs/.orchestrator-log.md`, `memory-bank` history, and `learned-knowledge.instructions.md` deliberately keep the literal `.agents/agents` string as an accurate record of past state; editing them would falsify the audit trail. This is the third pipeline to apply the "historical documentation freeze" precedent (MCP Config Rename, README trim). **Universal pattern:** when correcting a stale reference, classify hits into live vs historical and only edit live docs.
|
|
420
|
+
- **Vendor-neutral defaults: fail fast on an unset env var instead of hardcoding a model** — replacing `os.environ.get("CAVEMAN_MODEL", "claude-sonnet-4-5")` with `os.environ.get("CAVEMAN_MODEL")` + an explicit `RuntimeError` when unset removes a vendor lock-in default and converts a silent misconfiguration into an actionable failure. **Universal pattern:** a template/distributed tool should not hardcode a vendor-specific model/endpoint default; require the env var and fail with a message that NAMES the variable and shows the format (`export CAVEMAN_MODEL="<model-id>"`).
|
|
421
|
+
- **Fail-fast exceptions must not be swallowed by sibling `except` clauses** — the `RuntimeError` is raised INSIDE the `try:` whose sibling handler is `except ImportError: pass` (which falls through to the `claude --print` CLI fallback). Because `RuntimeError` is not an `ImportError`, it correctly propagates. The reviewer explicitly verified this propagation path (the narrow except must not be broadened to a bare `except:`). **Universal pattern:** when adding a fail-fast raise inside an existing try/except, confirm the exception type is not caught by any handler in scope.
|
|
422
|
+
- **Byte-identical duplicate files must be edited in lockstep and verified with `cmp`** — `.agents/skills/compress/` and `.agents/skills/caveman-compress/` hold duplicate `compress.py` copies; the fix was applied to both and the reviewer confirmed byte-identity via `cmp`. **Universal pattern:** duplicated files drift silently — edit all copies together and make `cmp`/`diff` a verification step, not just a claim.
|
|
423
|
+
- **`CAVEMAN_MODEL` is required but undocumented** — after making the env var mandatory, the skill docs (`.agents/skills/compress/SKILL.md`, `.agents/skills/caveman-compress/SKILL.md`, `.agents/skills/caveman-compress/README.md`, `.agents/skills/caveman-compress/SECURITY.md`) still mention only `ANTHROPIC_API_KEY` and the CLI fallback. **Universal pattern:** whenever a code change makes a new env var/flag REQUIRED, grep the docs for the sibling env vars (here `ANTHROPIC_API_KEY`) and add the new one to the same sections — a required config knob that is undocumented is a support trap.
|
|
424
|
+
|
|
425
|
+
**Agent tuning notes:**
|
|
426
|
+
- **coder**: For a stale-path task, enumerate ALL hits first and split "live docs" from "historical audit trail"; remap a non-existent referenced filename to the REAL equivalent you verify on disk (here `implementation-plan.agent.md` → `implementer.agent.md`) rather than inventing a file. For env-var defaults, grep for sibling copies of the script and keep them byte-identical.
|
|
427
|
+
- **reviewer**: Independently verify (a) each relinked target exists, (b) 0 stale refs remain in live docs only, (c) the fail-fast exception actually propagates past narrower `except` clauses, and (d) duplicated files are byte-identical. Flag doc/`.gitignore` gaps (an undocumented required env var; untracked `__pycache__`) as NON-blocking recommendations rather than blockers when core behavior is correct.
|
|
428
|
+
- **tracker**: Record the "bulk path rename must be existence-verified" and "vendor-neutral fail-fast default" patterns as universal — both recurred here (a long-ago ported instruction file; a vendor default copied into two duplicate scripts). When a pipeline touches only docs + non-test helper scripts, state explicitly that the Vitest suite is unaffected.
|
|
429
|
+
|
|
430
|
+
## Session: 2026-09-14 — Pipeline 11 Follow-ups (required-env-var docs + multi-commit auto-bump side effect)
|
|
431
|
+
|
|
432
|
+
**Pipeline:** coder (3 tasks) → reviewer (✅ APPROVED) → deployer (5 atomic commits) → tracker
|
|
433
|
+
**Coverage:** N/A (documentation + `.gitignore` + agent frontmatter only; Vitest suite unaffected)
|
|
434
|
+
**TDD Iterations:** 0 (quick-fix follow-up pipeline, not TDD)
|
|
435
|
+
|
|
436
|
+
**New knowledge:**
|
|
437
|
+
- **Required-env-var documentation must describe EACH auth/branch path, not just the var's existence** — the `CAVEMAN_MODEL` docs added in this pipeline are deliberately conditional: "When `ANTHROPIC_API_KEY` is set, the script calls the Anthropic API directly and REQUIRES `CAVEMAN_MODEL` … it fails fast with a clear error if unset. When relying on the `claude` CLI fallback, no model variable is needed." Writing a bare "`CAVEMAN_MODEL` is required" would be wrong — it only applies to one of the two branches. **Universal pattern:** when a required config knob applies to only one code path, document the conditional (which path requires it, which does not) — an unconditional claim misleads users of the other path. This extends the prior session's "required env var must be documented alongside sibling env vars" with *which branch* precision.
|
|
438
|
+
- **A partial auth-behavior doc is still incomplete — enumerate every branch** — the reviewer flagged (non-blocking) that the "`anthropic` SDK not installed" edge is undocumented. The actual control flow has three states: (1) API key set + SDK importable → direct API + requires `CAVEMAN_MODEL`; (2) API key set + SDK missing (`except ImportError: pass`) → falls through to the `claude` CLI (no model var); (3) API key unset → `claude` CLI. Documenting only the SDK-present and no-key paths leaves the middle state implied. **Universal pattern:** when documenting a try/except-fallback flow, count the branches and describe each — a two-path description of a three-path flow is a latent support trap.
|
|
439
|
+
- **Precisely inventory a large PRE-EXISTING diff before committing — never blind `git add`** — the pipeline committed a 14-file working-tree diff it did not author (the `model:` frontmatter removals, mtime 2026-09-13). The coder characterized it exactly first: 14 files, exactly **one deletion each** (0 insertions/1 deletion per file, 1-deletion hunk, no other changes), two distinct values (`deepseek/deepseek-v4-pro` ×7 / `deepseek/deepseek-v4-flash` ×7), and `git grep '^model:' HEAD -- .opencode/agents` returning the same 14 files. That inventory made a scoped, atomic `chore(agents): remove hardcoded model bindings from agent definitions` commit safe and reviewable. **Universal pattern:** a pre-existing diff must be inventoried (`git diff --stat` + per-file hunk inspection) and committed with a scope-accurate message; blind staging can mix unrelated hunks or ship unexpected deletions.
|
|
440
|
+
- **Committing a PRIOR pipeline's uncommitted docs is a valid close-the-loop move** — the deployer's `docs:` commit (`4f84947`) shipped the previous Pipeline 11 tracker record (tracker-log entry + index rows + learned-knowledge session + memory-bank updates) that had been written but never committed. Previously this work was left in the working tree (Pipeline 11's own note: "No commit made by this pipeline — the orchestrator handles staging/commit"). Committing it as its own `docs:` commit closed the loop and left a clean tree. **Universal pattern:** when a pipeline leaves documentation uncommitted, a later deployer step should commit it as a correctly-scoped `docs:` commit rather than letting it accumulate indefinitely.
|
|
441
|
+
- **The Husky pre-commit `bump-version.js` hook auto-bumps the MINOR version on EVERY commit and has no `SKIP_BUMP` guard** — across this pipeline's 5 sequential commits, `package.json` moved **1.44.0 → 1.49.0** (+0.1.0 × 5) with no intended release. The deployer deliberately did **not** use `--no-verify` (contrast Pipeline 10, where `--no-verify` + manual validator re-run was the compensating control). This is the second time the auto-bump has bitten (first documented 2026-08-02). **Universal pattern:** with an unconditional bump-on-commit hook, an N-commit pipeline produces N minor bumps — before cutting a release, either settle/revert the version or add a `SKIP_BUMP` env guard; and when `--no-verify` IS used, always re-run `validate-memory-schema.js` + `vocab-sync.js` manually.
|
|
442
|
+
- **Docs + `.gitignore` + YAML-frontmatter changes leave the test suite bit-identical** — no test-relevant surface changed, so the Vitest suite was explicitly declared unaffected. **Universal pattern:** state this invariant explicitly when a pipeline touches no test/`scripts/` surface, so the missing coverage delta is not mistaken for a regression signal.
|
|
443
|
+
|
|
444
|
+
**Agent tuning notes:**
|
|
445
|
+
- **coder**: For doc follow-ups, describe every branch of the code path being documented (primary + fallback + edge like SDK-missing) and prefer a complete-sentence section (e.g. `## Configuration`) when the rule is conditional; a terse one-liner invites ambiguity. When a pre-existing diff is to be committed, inventory it first (`git diff --stat`, per-file hunk check) and never stage blindly.
|
|
446
|
+
- **reviewer**: For doc-only changes, verify wording precision against the ACTUAL code branches — flag terse/ambiguous lines (e.g. `README.md:84`) and missing branches (the "SDK not installed" edge) as non-blocking minors. Confirm the documented fail-fast still matches the code's exception type and propagation.
|
|
447
|
+
- **deployer**: Before a multi-commit pipeline, check the pre-commit hook for an unconditional version bump and count the expected bumps (N commits → N minor bumps here); plan to settle the version or add a `SKIP_BUMP` guard before release. Commit pre-existing diffs with a scope-accurate message derived from the inventory. Commit any lingering prior-pipeline docs as a separate `docs:` commit.
|
|
448
|
+
- **tracker**: Record the auto-bump as an explicit side effect with the exact version delta (`1.44.0 → 1.49.0`) whenever a multi-commit pipeline runs; note when a deployer has committed a prior pipeline's provisional record. Reuse the canonical `projectId` from `require('./package.json').name` (`@abarcenas/ai-workflow-template`) when re-indexing this session.
|
|
449
|
+
|
|
450
|
+
## Session: 2026-09-14 — Pipeline 11 Final Polish (doc nits + version settle + `SKIP_BUMP` opt-out)
|
|
451
|
+
|
|
452
|
+
**Pipeline:** coder (4 tasks) → reviewer (✅ APPROVED) → deployer (4 commits) → tracker
|
|
453
|
+
**Coverage:** N/A (docs + a comment-only script change + a version constant; Vitest suite unaffected)
|
|
454
|
+
**TDD Iterations:** 0 (quick-fix follow-up pipeline, not TDD)
|
|
455
|
+
|
|
456
|
+
**New knowledge:**
|
|
457
|
+
- **The long-recommended `SKIP_BUMP` opt-out is now implemented as an additive pre-write guard — and it was exercised on the very commits that introduced it.** `scripts/bump-version.js` now checks `if (process.env.SKIP_BUMP) { log + process.exit(0) }` at lines 9–15, BEFORE reading or writing `package.json`; the default (unset) path is unchanged. The deployer ran all 4 commits with `SKIP_BUMP=1`, and the hook logged "SKIP_BUMP set — version bump skipped" each time, leaving the settled `1.45.0` stable. **Universal pattern:** when you add an opt-out flag for a hook that fires on every commit, use that flag on the commits that introduce it — self-dogfooding is both the proof the guard works and the way to keep the batch's own version stable. This also closes the recommendation first recorded 2026-08-02 and repeated 2026-09-14 (Pipeline 11 Follow-ups). Prefer this opt-out over `--no-verify`, which skips ALL hooks (including memory-schema validation).
|
|
458
|
+
- **Settling an N-commit auto-bump batch: target = pre-batch base parent's version + exactly one bump, not a guessed number.** `package.json` had drifted `1.44.0 → 1.49.0` over the 5-commit follow-up batch (the hook bumps minor on EVERY commit). The correct settled value was derived from `git show 267da69^:package.json` → base `1.44.0`, and one logical change set ⇒ one bump ⇒ `1.45.0` (reverting the four spurious bumps `1.46.0`–`1.49.0`). **Universal pattern:** to undo spurious bump-on-commit drift, compute the target from the base commit's PARENT (`<base_commit>^`) plus a single bump — the post-batch current value tells you how far it drifted but not where it should settle.
|
|
459
|
+
- **JS truthy-string footgun for env-var flags: `SKIP_BUMP=0` and `SKIP_BUMP=false` are non-empty strings and therefore TRUTHY — they also skip the bump.** The documented contract is "set `SKIP_BUMP=1`", but the guard as written accepts ANY non-empty value. Flagged as non-blocking M-1; a strict parse (`value === '1' || value === 'true'`) would close it. **Universal pattern:** an `if (process.env.X)` guard treats `"0"`/`"false"`/`"no"` as enabled — if the flag is meant to be numeric/boolean, parse it explicitly rather than relying on string truthiness.
|
|
460
|
+
- **A stale lockfile is a separate concern from the manifest version — do not "fix" it inside a version-settle commit.** `package-lock.json` exists but is stale at `1.34.0` (last touched `d788f68`) and does NOT mirror `package.json`; the repo's `bump-version.js` convention never syncs it. Keeping it out of scope avoided a large, unrelated lockfile churn; `npm ci --dry-run` passes, so it is not a build blocker. **Universal pattern:** when the task is "settle the manifest version," leave lockfile drift alone and flag it as pre-existing; classify pre-existing drift separately from pipeline findings.
|
|
461
|
+
- **Comment-only edits to byte-identical duplicate files still require byte-identity verification.** The `except ImportError:` clarification was applied to BOTH `compress.py` copies (`.agents/skills/compress/scripts/`, `.agents/skills/caveman-compress/scripts/`) and the reviewer confirmed `cmp`/`diff` byte-identity. Runtime behavior is unchanged, so the Vitest suite is unaffected — consistent with the established "duplicated files drift silently; edit in lockstep + `cmp`" rule.
|
|
462
|
+
- **A three-path try/except-fallback flow must be documented as three paths, and this pipeline actually did it.** The auth behavior now reads: (1) `ANTHROPIC_API_KEY` set + SDK installed → direct API + `CAVEMAN_MODEL` required; (2) key set but SDK missing (`except ImportError: pass`) → `claude` CLI, no model var; (3) key unset → `claude` CLI. This implements the "count the branches, describe each" rule from the prior session instead of leaving the middle state implied. **Universal pattern:** a two-path description of a three-path flow is a latent support trap — enumerate every branch.
|
|
463
|
+
- **A version-settle commit does not need a CHANGELOG.** None exists in this repo; the settle is documented in the commit message + tracker record, not fabricated into a changelog file. **Universal pattern:** do not invent release-notes artifacts to justify a version change — record the rationale where the repo already keeps history.
|
|
464
|
+
|
|
465
|
+
**Agent tuning notes:**
|
|
466
|
+
- **coder**: For a version settle, derive the target from `<base_commit>^` + one bump and leave any stale lockfile untouched (flag it as drift). For comment-only edits to duplicated scripts, apply to every copy and verify byte-identity. When you implement a hook opt-out, verify the default path is byte-unchanged and exercise the flag (`SKIP_BUMP=1 node scripts/bump-version.js` → exit 0, manifest untouched). When documenting a try/except fallback, enumerate all three states.
|
|
467
|
+
- **reviewer**: Verify the opt-out guard is placed BEFORE any read/write (additive, default unchanged) and probe the truthy-string edge — `SKIP_BUMP=0`/`false` also skip (M-1). Confirm comment-only changes leave duplicate files byte-identical and runtime unchanged. Distinguish pre-existing drift (`package-lock.json` at `1.34.0`; missing `architecture-context` vocab entity) from issues introduced by the change; a historical tracker entry referencing the pre-settle version is a frozen-record artifact, not a defect.
|
|
468
|
+
- **deployer**: Use the newly added `SKIP_BUMP=1` on the commits that introduce it, rather than `--no-verify` — the guard is the targeted mitigation and keeps the other hooks (memory-schema validation, vocab-sync) running. After a version settle, verify the manifest version at HEAD and that it was committed exactly once (no re-bump), and confirm the hook logged the skip.
|
|
469
|
+
- **tracker**: Record the `SKIP_BUMP` guard as IMPLEMENTED (closing the 2026-08-02 / 2026-09-14 recommendation) with the exact settle delta (`1.49.0 → 1.45.0`), and carry the non-blocking minors forward (M-1 truthy string, M-2 missing SDK qualifier in README, M-3 lockfile drift, M-4 vocab entity gap, M-5 stale historical "1.49.0" narrative). Reuse the canonical `projectId` from `require('./package.json').name` (`@abarcenas/ai-workflow-template`) when re-indexing this session.
|
|
@@ -81,6 +81,8 @@ caveman-compress/
|
|
|
81
81
|
|
|
82
82
|
**Requires:** Python 3.10+
|
|
83
83
|
|
|
84
|
+
**Model config:** When `ANTHROPIC_API_KEY` is set, `CAVEMAN_MODEL` must also be exported (e.g. `export CAVEMAN_MODEL=<model-id>`) — the script fails fast if it is unset. When using the `claude` CLI fallback, no model variable is needed.
|
|
85
|
+
|
|
84
86
|
## Usage
|
|
85
87
|
|
|
86
88
|
```
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
### Auth behavior
|
|
22
22
|
|
|
23
|
-
If `ANTHROPIC_API_KEY` is set, the skill uses the
|
|
23
|
+
If `ANTHROPIC_API_KEY` is set and the Anthropic Python SDK is installed, the skill uses the SDK directly (no subprocess). If the key is not set — or the SDK is not installed — it falls back to the `claude` CLI, which uses the user's existing Claude desktop authentication.
|
|
24
|
+
|
|
25
|
+
When using the Anthropic API directly (i.e. the SDK is installed), `CAVEMAN_MODEL` MUST also be exported with the model identifier (e.g. `export CAVEMAN_MODEL=<model-id>`) — the skill fails fast with a clear error if it is unset. The `claude` CLI fallback requires no model variable.
|
|
24
26
|
|
|
25
27
|
### File size limit
|
|
26
28
|
|
|
@@ -35,6 +35,10 @@ cd caveman-compress && python3 -m scripts <absolute_filepath>
|
|
|
35
35
|
|
|
36
36
|
4. Return result to user
|
|
37
37
|
|
|
38
|
+
## Configuration
|
|
39
|
+
|
|
40
|
+
When `ANTHROPIC_API_KEY` is set, the script calls the Anthropic API directly (when the Anthropic SDK is installed) and REQUIRES `CAVEMAN_MODEL` to be exported with the model identifier (e.g. `export CAVEMAN_MODEL=<model-id>`); it fails fast with a clear error if unset. If the Anthropic SDK is not installed, it falls back to the `claude` CLI, which requires no model variable.
|
|
41
|
+
|
|
38
42
|
## Compression Rules
|
|
39
43
|
|
|
40
44
|
### Remove
|
|
@@ -78,15 +78,22 @@ def call_claude(prompt: str) -> str:
|
|
|
78
78
|
try:
|
|
79
79
|
import anthropic
|
|
80
80
|
|
|
81
|
+
model = os.environ.get("CAVEMAN_MODEL")
|
|
82
|
+
if not model:
|
|
83
|
+
raise RuntimeError(
|
|
84
|
+
"CAVEMAN_MODEL environment variable is not set. "
|
|
85
|
+
"Set it to the model identifier to use for compression "
|
|
86
|
+
'(e.g. export CAVEMAN_MODEL="<model-id>").'
|
|
87
|
+
)
|
|
81
88
|
client = anthropic.Anthropic(api_key=api_key)
|
|
82
89
|
msg = client.messages.create(
|
|
83
|
-
model=
|
|
90
|
+
model=model,
|
|
84
91
|
max_tokens=8192,
|
|
85
92
|
messages=[{"role": "user", "content": prompt}],
|
|
86
93
|
)
|
|
87
94
|
return strip_llm_wrapper(msg.content[0].text.strip())
|
|
88
95
|
except ImportError:
|
|
89
|
-
pass # anthropic not installed
|
|
96
|
+
pass # anthropic SDK not installed → fall back to CLI (no CAVEMAN_MODEL needed)
|
|
90
97
|
# Fallback: use claude CLI (handles desktop auth)
|
|
91
98
|
try:
|
|
92
99
|
result = subprocess.run(
|
|
@@ -35,6 +35,10 @@ cd <directory_containing_this_SKILL.md> && python3 -m scripts <absolute_filepath
|
|
|
35
35
|
|
|
36
36
|
4. Return result to user
|
|
37
37
|
|
|
38
|
+
## Configuration
|
|
39
|
+
|
|
40
|
+
When `ANTHROPIC_API_KEY` is set, the script calls the Anthropic API directly (when the Anthropic SDK is installed) and REQUIRES `CAVEMAN_MODEL` to be exported with the model identifier (e.g. `export CAVEMAN_MODEL=<model-id>`); it fails fast with a clear error if unset. If the Anthropic SDK is not installed, it falls back to the `claude` CLI, which requires no model variable.
|
|
41
|
+
|
|
38
42
|
## Compression Rules
|
|
39
43
|
|
|
40
44
|
### Remove
|
|
@@ -78,15 +78,22 @@ def call_claude(prompt: str) -> str:
|
|
|
78
78
|
try:
|
|
79
79
|
import anthropic
|
|
80
80
|
|
|
81
|
+
model = os.environ.get("CAVEMAN_MODEL")
|
|
82
|
+
if not model:
|
|
83
|
+
raise RuntimeError(
|
|
84
|
+
"CAVEMAN_MODEL environment variable is not set. "
|
|
85
|
+
"Set it to the model identifier to use for compression "
|
|
86
|
+
'(e.g. export CAVEMAN_MODEL="<model-id>").'
|
|
87
|
+
)
|
|
81
88
|
client = anthropic.Anthropic(api_key=api_key)
|
|
82
89
|
msg = client.messages.create(
|
|
83
|
-
model=
|
|
90
|
+
model=model,
|
|
84
91
|
max_tokens=8192,
|
|
85
92
|
messages=[{"role": "user", "content": prompt}],
|
|
86
93
|
)
|
|
87
94
|
return strip_llm_wrapper(msg.content[0].text.strip())
|
|
88
95
|
except ImportError:
|
|
89
|
-
pass # anthropic not installed
|
|
96
|
+
pass # anthropic SDK not installed → fall back to CLI (no CAVEMAN_MODEL needed)
|
|
90
97
|
# Fallback: use claude CLI (handles desktop auth)
|
|
91
98
|
try:
|
|
92
99
|
result = subprocess.run(
|
package/AGENTS.md
CHANGED
|
@@ -6,13 +6,13 @@ This project includes AI-assisted development configuration distributed through
|
|
|
6
6
|
|
|
7
7
|
- `.agents/instructions/` — Language, framework, and workflow instructions
|
|
8
8
|
- `.agents/skills/` — Reusable skill definitions for task-based workflows
|
|
9
|
-
- `.
|
|
9
|
+
- `.opencode/agents/` — Specialized agent definitions for planning, research, and implementation
|
|
10
10
|
- `.agents/prompts/` — Reusable prompt templates
|
|
11
11
|
|
|
12
12
|
## Core Workflow
|
|
13
13
|
|
|
14
14
|
1. **Understand before acting** — Read relevant instructions from `.agents/instructions/` before working with specific technologies
|
|
15
|
-
2. **Plan before implementing** — Use `.
|
|
15
|
+
2. **Plan before implementing** — Use `.opencode/agents/plan.agent.md` or `.opencode/agents/implementer.agent.md` patterns for structured work
|
|
16
16
|
3. **Track progress** — Update `memory-bank/activeContext.md` and `memory-bank/progress.md` after each task (see `.agents/instructions/task-implementation.instructions.md`)
|
|
17
17
|
4. **Maintain context** — Keep memory bank files updated (see `.agents/instructions/memory-bank.instructions.md`)
|
|
18
18
|
|
|
@@ -81,7 +81,7 @@ Prompts in `.agents/prompts/` can be invoked directly:
|
|
|
81
81
|
|
|
82
82
|
## Available Agent Workflows
|
|
83
83
|
|
|
84
|
-
These agent workflows (from `.
|
|
84
|
+
These agent workflows (from `.opencode/agents/`) define specialized modes of operation. Invoke the relevant workflow at the start of a task by stating which mode you want to activate.
|
|
85
85
|
|
|
86
86
|
### Plan Mode — Strategic Planning & Architecture
|
|
87
87
|
|
package/README.md
CHANGED
|
@@ -229,7 +229,7 @@ All memory-bank files use YAML frontmatter (`id`, `title`, `updated`, `tags`, `e
|
|
|
229
229
|
|
|
230
230
|
## Versioning
|
|
231
231
|
|
|
232
|
-
Husky auto-bumps versions on every commit: minor by default (`1.2.0 → 1.3.0`), patch resets to 0 on each bump, and major changes reset to `<major>.0.0`. No manual version management required.
|
|
232
|
+
Husky auto-bumps versions on every commit: minor by default (`1.2.0 → 1.3.0`), patch resets to 0 on each bump, and major changes reset to `<major>.0.0`. No manual version management required. Set `SKIP_BUMP=1` (e.g. `SKIP_BUMP=1 git commit ...`) to skip the bump for that commit — useful for doc-only changes.
|
|
233
233
|
|
|
234
234
|
## Publish Flow
|
|
235
235
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abarcenas/ai-workflow-template",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"description": "A comprehensive template repository for AI-assisted development workflows using GitHub Copilot. This template provides a structured approach to leveraging AI assistance through pre-configured skills, prompts, agents, and coding standards.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/scripts/bump-version.js
CHANGED
|
@@ -6,6 +6,13 @@ import { fileURLToPath } from 'url'
|
|
|
6
6
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
7
7
|
const pkgPath = resolve(__dirname, '../package.json')
|
|
8
8
|
|
|
9
|
+
// Opt-out: SKIP_BUMP=1 keeps the current version (e.g. when a batch of commits
|
|
10
|
+
// is one logical change set and should yield a single bump).
|
|
11
|
+
if (process.env.SKIP_BUMP) {
|
|
12
|
+
console.log('SKIP_BUMP set — version bump skipped')
|
|
13
|
+
process.exit(0)
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
|
10
17
|
const current = pkg.version
|
|
11
18
|
const [curMajor, curMinor] = current.split('.').map(Number)
|