Skip to content

Commit 5e8e1ff

Browse files
committed
chore: patch audit, CI workflows, skill registry, and project config
- Add security.yml with bun audit on PR/push - Add dependabot.yml for automated dependency updates - Bump solid-js 1.9.10 -> 1.9.13 (bug anomalyco#2046 fixed upstream), remove patch - Remove orphaned @ff-labs/[email protected] patch (project uses 0.9.4) - Add .opencode/style-guide.md and testing.md config - Modularize AGENTS.md to use separate config files - Add SKILLS-INDEX.md, CYCLE.md for improvement cycle - Add .learnings/ directory for cross-session knowledge - Update catalog versions across all package.json files - Add .atl/ skill registry cache
1 parent a31b577 commit 5e8e1ff

36 files changed

Lines changed: 977 additions & 453 deletions

‎.atl/.skill-registry.cache.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"fingerprint": "d4c3e05c6b8e63aa24e0863eeb117e57fc83207c"
3+
}

‎.atl/skill-registry.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Skill Registry — opencode
2+
3+
<!-- Auto-generated by gentle-ai skill-registry refresh. Run `gentle-ai skill-registry refresh --force` to regenerate. -->
4+
5+
Last updated: 2026-06-15
6+
7+
## Sources scanned
8+
9+
- .opencode\skills
10+
- C:\Users\LuisOrozco\.config\opencode\skills
11+
- C:\Users\LuisOrozco\.codeium\windsurf\skills
12+
13+
## Contract
14+
15+
**Delegator use only.** This registry is an index, not a summary. Any agent that launches subagents reads it to select relevant skills, then passes exact `SKILL.md` paths for the subagent to read before work.
16+
17+
`SKILL.md` remains the source of truth. Do not inject generated summaries or compact rules by default; pass paths so subagents load the full runtime contract and preserve author intent.
18+
19+
## Skills
20+
21+
| Skill | Trigger / description | Scope | Path |
22+
| --- | --- | --- | --- |
23+
| `branch-pr` | Create Gentle AI pull requests with issue-first checks. Trigger: creating, opening, or preparing PRs for review. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\branch-pr\SKILL.md` |
24+
| `chained-pr` | Trigger: PRs over 400 lines, stacked PRs, review slices. Split oversized changes into chained PRs that protect review focus. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\chained-pr\SKILL.md` |
25+
| `cognitive-doc-design` | Design docs that reduce cognitive load. Trigger: writing guides, READMEs, RFCs, onboarding, architecture, or review-facing docs. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\cognitive-doc-design\SKILL.md` |
26+
| `comment-writer` | Write warm, direct collaboration comments. Trigger: PR feedback, issue replies, reviews, Slack messages, or GitHub comments. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\comment-writer\SKILL.md` |
27+
| `effect` | Work with Effect v4 / effect-smol TypeScript code in this repo | project | `C:\Users\LuisOrozco\OneDrive - WPP Cloud\Escritorio\opencode\.opencode\skills\effect\SKILL.md` |
28+
| `go-testing` | Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\go-testing\SKILL.md` |
29+
| `issue-creation` | Create Gentle AI issues with issue-first checks. Trigger: creating GitHub issues, bug reports, or feature requests. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\issue-creation\SKILL.md` |
30+
| `judgment-day` | Trigger: judgment day, dual review, adversarial review, juzgar. Run blind dual review, fix confirmed issues, then re-judge. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\judgment-day\SKILL.md` |
31+
| `skill-creator` | Trigger: new skills, agent instructions, documenting AI usage patterns. Create LLM-first skills with valid frontmatter. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\skill-creator\SKILL.md` |
32+
| `skill-improver` | Trigger: improve skills, audit skills, refactor skills, skill quality. Audit and upgrade existing LLM-first skills. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\skill-improver\SKILL.md` |
33+
| `work-unit-commits` | Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code. | user | `C:\Users\LuisOrozco\.codeium\windsurf\skills\work-unit-commits\SKILL.md` |
34+
35+
## Loading protocol
36+
37+
1. Match task context and target files against the `Trigger / description` column.
38+
2. Pass only the matching `Path` values to the subagent under `## Skills to load before work`.
39+
3. Instruct the subagent to read those exact `SKILL.md` files before reading, writing, reviewing, testing, or creating artifacts.
40+
4. If no matching skill exists, proceed without project skill injection and report `skill_resolution: none`.

‎.github/dependabot.yml‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "09:00"
9+
timezone: "America/Argentina/Buenos_Aires"
10+
open-pull-requests-limit: 10
11+
versioning-strategy: increase
12+
labels:
13+
- "dependencies"
14+
- "automated"
15+
groups:
16+
effect:
17+
patterns:
18+
- "effect"
19+
- "@effect/*"
20+
- "@effect-smol/*"
21+
update-types:
22+
- "minor"
23+
- "patch"
24+
ai-sdk:
25+
patterns:
26+
- "@ai-sdk/*"
27+
- "ai"
28+
update-types:
29+
- "minor"
30+
- "patch"
31+
solidjs:
32+
patterns:
33+
- "solid-js"
34+
- "@solidjs/*"
35+
- "@opentui/*"
36+
update-types:
37+
- "minor"
38+
- "patch"
39+
drizzle:
40+
patterns:
41+
- "drizzle-orm"
42+
- "@drizzle-team/*"
43+
update-types:
44+
- "minor"
45+
- "patch"
46+
dev-dependencies:
47+
dependency-type: "development"
48+
update-types:
49+
- "minor"
50+
- "patch"
51+
ignore:
52+
- dependency-name: "typescript"
53+
versions: [">=6.0.0"]
54+
- dependency-name: "effect"
55+
versions: [">=4.1.0"]
56+
commit-message:
57+
prefix: "chore(deps)"
58+
prefix-development: "chore(deps-dev)"
59+
reviewers:
60+
- "jlongster"
61+
62+
- package-ecosystem: "github-actions"
63+
directory: "/"
64+
schedule:
65+
interval: "weekly"
66+
day: "monday"
67+
labels:
68+
- "ci"
69+
- "automated"
70+
commit-message:
71+
prefix: "chore(ci)"

‎.github/workflows/security.yml‎

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: security
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: "0 6 * * 1" # every Monday 06:00 UTC
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
issues: write
19+
20+
env:
21+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
22+
23+
jobs:
24+
audit:
25+
name: dependency-audit
26+
runs-on: blacksmith-4vcpu-ubuntu-2404
27+
defaults:
28+
run:
29+
shell: bash
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
33+
with:
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Setup Node
37+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
38+
with:
39+
node-version: "24"
40+
41+
- name: Setup Bun
42+
uses: ./.github/actions/setup-bun
43+
44+
- name: Run dependency audit
45+
id: audit
46+
continue-on-error: true
47+
run: |
48+
bun audit --audit-level=high --json > audit-result.json 2>&1 || true
49+
50+
- name: Analyze audit results
51+
id: analyze
52+
run: |
53+
if [ ! -f audit-result.json ] || [ "$(wc -l < audit-result.json)" -lt 5 ]; then
54+
echo "No high/critical vulnerabilities found. ✅"
55+
echo "has_vulns=false" >> "$GITHUB_OUTPUT"
56+
exit 0
57+
fi
58+
59+
node << 'EOF' >> "$GITHUB_OUTPUT"
60+
const data = JSON.parse(require('fs').readFileSync('audit-result.json', 'utf-8'));
61+
const packages = Object.keys(data);
62+
let total = 0;
63+
let table = '';
64+
const details = [];
65+
66+
for (const [pkg, advisories] of Object.entries(data)) {
67+
const high = advisories.filter(a => a.severity === 'high').length;
68+
const critical = advisories.filter(a => a.severity === 'critical').length;
69+
total += advisories.length;
70+
71+
const worst = critical > 0 ? 'critical' : 'high';
72+
const label = critical > 0 ? '🔴' : '🟡';
73+
table += `| ${pkg} | ${label} ${worst} | ${advisories.length} |\n`;
74+
75+
for (const adv of advisories) {
76+
details.push({ pkg, id: adv.id, title: adv.title, severity: adv.severity, url: adv.url, cvss: adv.cvss?.score || 'N/A' });
77+
}
78+
}
79+
80+
console.log(`has_vulns=true`);
81+
console.log(`total=${total}`);
82+
console.log(`packages_count=${packages.length}`);
83+
84+
const summary = `### 🔒 Audit: ${total} high/critical vulnerabilities\n\n| Package | Severity | Count |\n|---|---|---|\n${table}`;
85+
require('fs').writeFileSync('audit-summary.md', summary);
86+
require('fs').writeFileSync('audit-details.json', JSON.stringify(details, null, 2));
87+
EOF
88+
89+
- name: Post summary to PR
90+
if: github.event_name == 'pull_request' && fromJSON(steps.analyze.outputs.has_vulns)
91+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
92+
with:
93+
script: |
94+
const fs = require('fs');
95+
const summary = fs.readFileSync('audit-summary.md', 'utf-8');
96+
const body = summary + '\n_Run `bun audit` locally for full details._\n\n> This is a soft gate — the workflow does not fail. Review and prioritize fixes.';
97+
const { data: comment } = await github.rest.issues.createComment({
98+
issue_number: context.issue.number,
99+
owner: context.repo.owner,
100+
repo: context.repo.repo,
101+
body: body
102+
});
103+
core.notice(`Audit results posted to PR #${context.issue.number}`);
104+
105+
- name: Upload audit report
106+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
107+
with:
108+
name: audit-report-${{ github.run_attempt }}
109+
if-no-files-found: warn
110+
retention-days: 30
111+
path: |
112+
audit-result.json
113+
audit-details.json

‎.github/workflows/test.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,45 @@ jobs:
7474
working-directory: packages/opencode
7575
run: bun run test:httpapi
7676

77+
coverage:
78+
name: coverage
79+
needs: unit
80+
runs-on: blacksmith-4vcpu-ubuntu-2404
81+
defaults:
82+
run:
83+
shell: bash
84+
steps:
85+
- name: Checkout repository
86+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
87+
with:
88+
token: ${{ secrets.GITHUB_TOKEN }}
89+
90+
- name: Setup Node
91+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
92+
with:
93+
node-version: "24"
94+
95+
- name: Setup Bun
96+
uses: ./.github/actions/setup-bun
97+
98+
- name: Run coverage on core
99+
working-directory: packages/core
100+
run: bun test:coverage --timeout 60000 2>&1 | tee coverage-core.log
101+
102+
- name: Run coverage on opencode
103+
working-directory: packages/opencode
104+
run: bun test:coverage --timeout 60000 2>&1 | tee coverage-opencode.log
105+
106+
- name: Upload coverage reports
107+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
108+
with:
109+
name: coverage-reports-${{ github.run_attempt }}
110+
if-no-files-found: warn
111+
retention-days: 14
112+
path: |
113+
packages/core/coverage-core.log
114+
packages/opencode/coverage-opencode.log
115+
77116
e2e:
78117
name: e2e (${{ matrix.settings.name }})
79118
strategy:
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Sesión: Compilación con Bun nativo en Windows
2+
3+
## Goal
4+
Compilar opencode con `Bun.build()` + `compile` para generar binario autocontenido en Windows.
5+
6+
## Aprendizajes Clave
7+
8+
### Bun no está instalado por defecto — hay que instalarlo
9+
- **Qué**: El repo usa `[email protected]` como package manager. No funcionan npm ni pnpm.
10+
- **Por qué**: Todos los scripts (`build.ts`, `dev`, `postinstall`) llaman a `bun` directamente.
11+
- **Dónde**: `package.json` → `packageManager: "[email protected]"`
12+
- **Detalle**: En Windows se instala con `powershell -c "irm bun.sh/install.ps1 | iex"`. Queda en `~/.bun/bin/bun.exe`. Hay que agregarlo al PATH de la sesión.
13+
14+
### El build script tiene múltiples flags útiles
15+
- **Qué**: `packages/opencode/script/build.ts` soporta `--single`, `--skip-install`, `--skip-embed-web-ui`, `--sourcemaps`, `--baseline`.
16+
- **Por qué**: `--single` compila solo la plataforma actual (ahorra ~5min vs los 12 targets default). `--skip-embed-web-ui` reduce el binario en ~44MB.
17+
- **Dónde**: `packages/opencode/script/build.ts`
18+
- **Detalle**: Sin `--single`, intenta compilar para Linux/macOS/Windows × x64/arm64 × glibc/musl — falla en Windows por falta de toolchains cruzados.
19+
20+
### La versión del binario se resuelve dinámicamente
21+
- **Qué**: `Script.version` se compone como `package.json version` + `-{branch}`. En `dev` da `1.17.7-dev`.
22+
- **Por qué**: El módulo `@opencode-ai/script` en `packages/script/src/index.ts` lee el branch de git y genera preview builds automáticamente.
23+
- **Dónde**: `packages/script/src/index.ts`
24+
- **Detalle**: Se puede forzar con `$env:OPENCODE_VERSION = "1.17.7-vmk1.2"` antes del build para version custom.
25+
26+
### Web UI embebido es ~25% del binario
27+
- **Qué**: El build de Vite para `packages/app` genera ~44MB de assets embebidos en el binario.
28+
- **Por qué**: El build.ts ejecuta `bun run --cwd packages/app build`, genera un file map virtual (`opencode-web-ui.gen.ts`), y lo compila dentro del binario.
29+
- **Dónde**: `packages/app/dist/` (985 archivos, 44MB)
30+
- **Detalle**: Si no se necesita web UI, `--skip-embed-web-ui` evita ese paso y reduce el binario de 169MB a ~125MB.
31+
32+
## Decisiones
33+
- Usar `--single --skip-install` para builds rápidos de desarrollo en Windows.
34+
- El web UI embebido es necesario para la versión completa; se omite solo si es un build de CLI/server.
35+
36+
## Pendiente
37+
- Verificar si UPX compression post-build es viable para distribuir binarios más chicos.
38+
- Probar `bun run script/build.ts` sin flags para ver si cross-compile funciona en WSL2.

0 commit comments

Comments
 (0)