Skip to content

Skills IgnitionRL — rendre skills/ publiable tel quel - #122

Merged
salim4n merged 1 commit into
devfrom
skill/publish-cleanup
Nov 16, 2026
Merged

salim4n merged 1 commit into
devfrom
skill/publish-cleanup

Conversation

@salim4n

@salim4n salim4n commented Nov 16, 2026

Copy link
Copy Markdown
Member

Closes #121

Rendre skills/ignition-<nom>/ copiable tel quel : exemples dans le dossier, texte public (@ignitionai/* 0.1.0), prérequis ONNX explicites. Aucun changement dans packages/.

Changements

  • Chaque exemple + test vitest est dans skills/ignition-<nom>/examples/ (plus examples/skill-*.ts à la racine).
  • Liens et imports mis à jour ; script skills/check-relative-links.mjs pour les liens markdown de SKILL.md et references/*.md.
  • SHA interne, « this SHA », numéros de PR non fusionnées et vocabulaire de lot retirés du texte public.
  • skills/README.md : installation vérifiée (cp -R skills/ignition-quickstart .claude/skills/ignition-quickstart).
  • ignition-export-onnx : section Prerequisites (Python 3.11, pins packages/backend-onnx/examples/requirements-onnx.txt, onnxruntime==1.16.3, @tensorflow/tfjs-node, IGNITION_ONNX_PYTHON).

Critère 1 — un dossier suffit (liens relatifs)

Commande :

node skills/check-relative-links.mjs

Sortie (abrégée) : tous les liens markdown de chaque SKILL.md / references/*.md sont soit intra-dossier, soit https://, soit cités comme sources packages/ (aucun lien packages/ relatif n’apparaît dans ces fichiers).

OK  ignition-create-env/SKILL.md -> references/env-contract.md
OK  ignition-export-onnx/SKILL.md -> https://ignitionai.dev/docs/tutorials/onnx-unity
OK  ignition-export-onnx/SKILL.md -> references/conversion.md
OK  ignition-train/SKILL.md -> references/algorithm-choice.md
…
checked=15 failed=no

Code de sortie : 0

Les imports TypeScript ../../../packages/backend-tfjs/node_modules/@tensorflow/tfjs (exemples debug / train-infer-split) et createRequire(resolve('packages/backend-tfjs/package.json')) (export-onnx) restent des sources framework pour Vitest à la racine du monorepo. Ce ne sont pas des liens markdown.

Critère 2 — grep interne

grep -rnE "343a7695|this SHA|#77|#78|#90|#39|#42" skills
echo $?

Aucune ligne. Code de sortie : 1 (grep : pas de match).

grep -rnE "343a7695|this SHA|#77|#78|#90|#39|#42|batch" skills
echo $?

Code de sortie : 0 — critère tel quel impossible pour le mot batch. Les occurrences restantes sont uniquement le champ public batchSize (DQN / PPO DQN_DEFAULTS / PPO_DEFAULTS). Vérification :

grep -rnE "batch" skills | grep -v batchSize
echo $?

Aucune ligne. Code de sortie : 1.

Le vocabulaire de lot (« same batch », « batch #102 », « batches many learning steps ») a été retiré. Renommer batchSize dans les skills casserait les exemples exécutables.

Critère 3 — Vitest skills (56 réussis, 1 ignoré) et suite complète

Avant le déplacement, sur dev @ cf6d42b :

corepack pnpm exec vitest run skills ne voyait que les tests déjà sous skills/ (17 tests), parce que les exemples étaient à la racine. Commande comparable (exemples + skills) :

corepack pnpm exec vitest run examples/skill- skills
 Test Files  19 passed (19)
      Tests  56 passed | 1 skipped (57)

Code de sortie : 0

Après (cette branche) — les exemples sont dans skills/, donc la commande demandée suffit :

corepack pnpm exec vitest run skills
 Test Files  19 passed (19)
      Tests  56 passed | 1 skipped (57)

Code de sortie : 0

Suite complète :

corepack pnpm exec vitest run
 Test Files  100 passed | 3 skipped (103)
      Tests  679 passed | 4 skipped (683)

Code de sortie : 0

ppo.test.ts n’a pas échoué ici (pas de comparaison de flake nécessaire).

Critère 4 — aucun changement packages/

git diff --stat origin/dev -- packages/
echo $?

Sortie vide. Code de sortie : 0

Lint / typecheck

corepack pnpm run lint

Code de sortie : 0 (les packages sans script lint sont ignorés ; packages/web skip ESLint 9 comme sur dev).

corepack pnpm run typecheck

Code de sortie : 2 — erreurs préexistantes dans packages/web (images manquantes) et démos (train / stop sur IgnitionEnvTFJS). Non introduites ici : git diff origin/dev -- packages/ est vide.

Open in Web Open in Cursor 

Move executable examples next to each SKILL.md, drop internal SHA and
unmerged-PR wording in favor of @ignitionai/* 0.1.0, and document the
exact ONNX conversion prerequisites.

Co-authored-by: Salim <salim4n@users.noreply.github.com>
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ignition-rl Ready Ready Preview Nov 16, 2026 4:20pm UTC

Request Review

@salim4n
salim4n marked this pull request as ready for review November 16, 2026 16:35
@salim4n
salim4n merged commit 72bff79 into dev Nov 16, 2026
9 checks passed
@salim4n
salim4n deleted the skill/publish-cleanup branch November 16, 2026 16:35
salim4n added a commit that referenced this pull request Nov 19, 2026
* feat(ppo): discrete+continuous PPO with logged before/after demo

Stabilize PPO-Clip behind the existing public adapter: GAE bootstrap vs
termination, minibatch updates, categorical and squashed-Gaussian policies,
and file checkpoint replay. Target-chasing serves a replay page whose
reward curve is loaded from the declared-budget JSONL logs.

Co-authored-by: Salim <salim4n@users.noreply.github.com>

* chore(ppo): restamp nav1d logs and checkpoints on feature HEAD

Re-run the frozen 80-episode budget after the implementation commit so
manifest.json records d7657aa and the demo artifacts match that SHA.

Co-authored-by: Salim <salim4n@users.noreply.github.com>

* fix(ppo): show greedy before/after gap and restore DQN demo README

Select the demo seed by trained minus untrained greedy eval, record both
returns in summary.json, and surface them in the replay UI. Restore the
original target-chasing DQN README and append the PPO section. Cover
hand-calculated continuous log-prob, first-minibatch ratio≈1, clipFraction,
and continuous checkpoint load including log-std.

Co-authored-by: Salim <salim4n@users.noreply.github.com>

* fix(ppo): make Node ESM load dist and document gitSha parent rule

Emit .js specifiers in core and backend-tfjs so Node 22 can import
dist/index.js. Add repo-root scripts/train-ppo-nav1d.mjs, round PPO
demo returns, and record gitSha as train-time HEAD (parent of the
later artifacts commit).

Co-authored-by: Salim <salim4n@users.noreply.github.com>

* chore(ppo): restamp nav1d artifacts at train-time HEAD 6c8b35c

Regenerate manifest.json after the ESM/script fix. gitSha is
6c8b35c (train-time HEAD); it cannot equal the commit that stores
this file. Verify against the first parent of the manifest commit.

Co-authored-by: Salim <salim4n@users.noreply.github.com>

* IGN-118: démo Dock spatial + tutoriel FR/EN (#92)

* feat(typo): identité IgnitionAI auto-hébergée (#82)

Co-authored-by: Fulgrim <fulgrim@ignition.local>

* fix(typo): aligner les alias next/font et les fichiers (#83)

Co-authored-by: Fulgrim <fulgrim@ignition.local>

* fix(typo): espacer le texte courant (#84)

Co-authored-by: Fulgrim <fulgrim@ignition.local>

* feat(space-dock): integrate demo, tutorial (FR/EN) and model licenses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(space-dock): resolve visual test paths independently of cwd (#86)

Read GLBs from the package via import.meta.url and write projection
proofs under os.tmpdir so the 29 visual tests pass from the repo root
and from the package without leaving untracked files.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* fix(space-dock): align license line and public demo copy

Use the MIT copyright line from dev for the root and package licenses,
the model license and ASSETS.md. Replace internal wording in the demo
header and page title.

* fix(ci): alias @ vers packages/web dans le vitest racine

registry.test.ts (demo-space-dock) importe packages/web/components/demos.tsx, qui utilise @/lib/blog. L'alias n'existait que dans la config du package, d'où l'échec de test (20)/(22). Une ligne de config, aucun test ni code applicatif touché. vitest racine : 599/0 (avant : 598, 1 fichier KO).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Fulgrim <fulgrim@ignition.local>
Co-authored-by: IgnitionAI <noreply@ignitionai.fr>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>
Co-authored-by: Salim <salim-laimeche@users.noreply.github.com>
Co-authored-by: khayon <khayon@ignitionai.local>

* perf(space-dock): souder les GLB du Dock, 4,79 Mo → 1,43 Mo à géométrie identique (#94)

* perf(space-dock): weld GLB vertices, identical geometry

Merge bitwise-identical vertices with gltf-transform weld 4.5.1.
Models drop from 4,792,364 to 1,432,152 bytes; triangles, meshes,
materials, node graph and animation data are unchanged. Update the
frozen hangar hash and byte totals in the visual test and validation.json.

* docs(space-dock): update GLB sizes and hashes after weld

---------

Co-authored-by: Salim <salim-laimeche@users.noreply.github.com>

* Dock spatial : réseau de neurones DQN entraînable dans le navigateur + agent pré-entraîné (#96)

* build(demo-space-dock): wire workspace TF.js backend without new npm packages

Adds @ignitionai/backend-tfjs (workspace) and @tensorflow/tfjs (4.22.0, already
locked for other demos) to the dock demo, with the same source aliases as
demo-ball-thrust. Lockfile diff is limited to the importer entries.
Drops an unused type import in backend-tfjs/src/defaults.ts so the demo's
strict tsc (noUnusedLocals) can typecheck the backend sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(demo-space-dock): DockTrainingEnv, bounded reward and seeded episodes for DQN

Wraps SpaceDockEnv (physics unchanged) as a TrainingEnv: 26 normalized
observations, 8 discrete actions, dense reward clipped to [-1,1] plus
collision/terminal terms (bounds [-12, 11]), success/collision/bounds as
termination, 300-decision horizon as truncation, deterministic seed sequence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(demo-space-dock): in-browser DQN training panel and greedy agent mode

TrainingSession (IgnitionEnvTFJS + DQNAgent, CPU backend) runs time-boxed
chunks so rendering continues; start/pause/resume/reset, real Keras loss,
moving-average reward curve, docking success rates, greedy inference,
tfjs JSON export/import. DockRuntime yields the shared world while the
network drives; manual and scripted PD remain available. TF.js loads in a
lazy chunk after the scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(space-dock): list DQN in the catalogue and add a short training section FR/EN

demos.json algos become "DQN · Manuel · PD non entraîné"; blog metadata and
both tutorials describe the in-browser DQN (environment, reward, episode,
controls) without any convergence figure. Registry test also requires DQN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(demo-space-dock): keep the cadence selector inside the panel on narrow screens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(demo-space-dock): training recipe that docks: curriculum starts, potential shaping

Measured headless (seed 118, 20 greedy episodes every 2,000 steps): the first
recipe never docked in 40,000 steps. This one (training-only curriculum of
starts at rest on the docking axis 0.5-13 m from the dock, potential-difference
shaping, epsilon decay 0.9999, target update 1000) reached 20/20 from the
standard start at 32,000 steps; rerun bit-identical. Physics, actions and the
IGN-118 docking criterion are unchanged; SpaceDockEnv.placeOnAxis only places
the pair before the first step. Watching always uses the standard start.
Session can import a shipped model with a validated provenance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(demo-space-dock): optional agent pre-trained offline, with measured provenance

"Charger un agent pré-entraîné" lazy-loads src/pretrained/space-dock-dqn.json
(36 KB, tfjs JSON): 32,000 DQN steps with the a07d1d7 recipe, seed 118,
reproduced bit-identically; 50/50 greedy dockings from the standard start on
unseen seeds (50000...), mean final distance 0.29 m. The panel shows that
provenance from the file; a visitor's own import never does. Live training
and Reset network stay available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(space-dock): curriculum, measured offline results and pre-trained agent FR/EN

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(demo-space-dock): French decimal separator in the pre-trained provenance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(space-dock): use the sourced in-browser throughput (65-104 steps/s), fix FR comma

Replaces the unsourced ~100 steps/s figure and the unproven 'slower with the
scene' claim with Talos's acceptance measurement (local prod build, Chromium,
with the scene). The five-minute minimum follows from 32,000 / 104.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: khayon <khayon@ignitionai.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* docs(space-dock): mention de maquette provisoire, virgule EN, « potentiel » non prouvé retiré (#99)

* docs(space-dock): restore technical-mockup notice, fix EN comma, drop unproven "potential" claim

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: relancer la CI (ppo.test.ts convergence instable, sans lien avec ce correctif de texte)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: khayon <khayon@ignitionai.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* docs(skills): add ignition-quickstart entry skill and index (#113)

Add the Agent Skill that walks a beginner through the CartPole docs
Quickstart, bounds the DQN loop with stop(), and indexes all nine
skills from issue #102. Include a measured example plus tests.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): add ignition-create-env skill (#112)

Add the Agent Skill for writing a valid TrainingEnv, plus a 1D LineWorld
example and tests that exercise validation, terminated vs truncated, and a
declared-budget qtable run on three seeds.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): add ignition-train skill for DQN, PPO, and Q-Table (#116)

Teach algorithm choice, train/stop/setSpeed, and measured Q-Table vs random
on GridWorld with declared seeds and budget. Examples live under examples/skill-train*.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): add ignition-train-infer-split skill (#115)

Document train vs infer on IgnitionEnv, freeze-and-reload greedy actions,
and tensor dispose with a real CartPole example (no package code changes).

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): add ignition-evaluate skill (#114)

Add the Agent Skill, CartPole evaluate() helper, and tests for
reproducible greedy eval, frozen weights, hand-checked stats, and a
random baseline. No package API changes.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): add ignition-export-onnx skill (#118)

* docs(skills): add ignition-export-onnx skill and example

Add the Agent Skill for exporting a TF.js DQN policy to ONNX and
serving it with OnnxAgent, plus a Vitest example that trains on
declared seeds without claiming convergence. Python conversion is
skipped unless the pinned toolchain is present.

Co-authored-by: Salim <salim4n@users.noreply.github.com>

* test(skills): run real TF.js to ONNX conversion when the venv exists

Probe .venv-onnx / IGNITION_ONNX_PYTHON for tensorflowjs, tf2onnx, and
onnxruntime. Convert the saved DQN for seeds 7, 13, and 29 and compare
Q-values and greedy actions. Skip only if that toolchain is missing.
Document the uv/pip install commands in the skill.

Co-authored-by: Salim <salim4n@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): add ignition-reward-shaping wrapper and MountainCar comparison (#117)

Teach potential-based reward shaping as a TrainingEnv wrapper, with
hand-calculated transition tests and a declared-budget flag-success
comparison on stock MountainCar (sparse vs shaped).

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): add ignition-debug-training skill (#120)

Add an Agent Skill that maps training symptoms to checks on the public
IgnitionRL API, plus a CartPole example that records a declared-budget
flat-reward failure and tensor-count stability across three seeds.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skill): add ignition-save-load agent skill (#119)

Teach save/load, checkpoint versioning, and resume via getState/setState
using the published storage providers. Includes a Node localStorage
polyfill and a measured DQN round-trip example.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* docs(skills): make skill folders copyable as published units (#122)

Move executable examples next to each SKILL.md, drop internal SHA and
unmerged-PR wording in favor of @ignitionai/* 0.1.0, and document the
exact ONNX conversion prerequisites.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>

* fix(target-chasing): use the TF.js IgnitionEnv so the DQN page mounts

The core IgnitionEnv has no algorithm factories, so train('dqn') threw
'Unknown algorithm "dqn"' on mount and the page stayed blank. The
backend-tfjs export registers the TF.js factories.

* feat(ppo): serve the replay under the demo base, in French and English

- vite.config.ts honours DEMO_BASE like the other demos.
- PPO manifest, logs and checkpoints resolve against import.meta.env.BASE_URL
  (ppoArtifactUrl), as do the links between the DQN page and the replay.
- The replay page uses the demo i18n (stored choice, then browser language):
  every visible string has en/fr keys, html lang and title follow the
  language, decimals use a comma in French, FR/EN switcher in the header.
- Missing artifacts raise typed errors so the message can be localized;
  missingArtifactMessage keeps its English text.
- Add the site favicon to both pages so no favicon request 404s.

* feat(web): list the target-chasing demo

Builds it into /demos/target-chasing/ with build-demos, which publishes
the PPO before/after replay at /demos/target-chasing/ppo.html.

* test(skills): include PPO actionSpace default in ignition-train

PPO_DEFAULTS now carries actionSpace: 'discrete' (backward compatible).
Align the skill tests and document the key in SKILL.md and
references/hyperparameters.md.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Salim <salim4n@users.noreply.github.com>
Co-authored-by: Fulgrim <fulgrim@ignition.local>
Co-authored-by: IgnitionAI <noreply@ignitionai.fr>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Salim <salim-laimeche@users.noreply.github.com>
Co-authored-by: khayon <khayon@ignitionai.local>
Co-authored-by: openbotgit[bot] <335604065+openbotgit[bot]@users.noreply.github.com>
salim4n added a commit that referenced this pull request Nov 19, 2026
Release dev → main : PPO avant/après (#90) + skills (#112–#122)

This branch was successfully deployed

1 active deployment
Preview — c19b77ec Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants