@jenga-ai/agent 1.0.1 → 1.1.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.
Files changed (117) hide show
  1. package/README.md +10 -7
  2. package/agents/developer.md +82 -2
  3. package/agents/scrum-master.md +215 -21
  4. package/agents/tester.md +90 -8
  5. package/hooks/on_session_end.sh +171 -20
  6. package/mcp/router/embedder.js +1 -1
  7. package/mcp/training_runner/index.js +239 -0
  8. package/mcp/training_runner/package-lock.json +1065 -0
  9. package/mcp/training_runner/package.json +15 -0
  10. package/package.json +14 -16
  11. package/scripts/check-permission-level.sh +107 -0
  12. package/scripts/check-publicignore-match.sh +122 -0
  13. package/scripts/check-worktree-liveness.sh +193 -0
  14. package/scripts/generate-rapport-manifest.sh +43 -0
  15. package/scripts/idea_manager.sh +47 -0
  16. package/scripts/install-worktree-commit-guard.sh +134 -0
  17. package/scripts/jenga-permission-level-switch.sh +109 -0
  18. package/scripts/smoke-harness.sh +139 -0
  19. package/scripts/validate-board.sh +62 -0
  20. package/scripts/with-lock.sh +158 -0
  21. package/scripts/worktree-remove-guard.sh +204 -0
  22. package/skills/clearify/SKILL.md +52 -0
  23. package/skills/close-story/SKILL.md +203 -0
  24. package/skills/close-story/scripts/check-story-closeable.sh +195 -0
  25. package/skills/close-story/scripts/compute-scope-divergence.sh +128 -0
  26. package/skills/close-story/scripts/extract-diff-stats.sh +48 -0
  27. package/skills/close-story/scripts/extract-task-diff-stats.sh +97 -0
  28. package/skills/close-story/scripts/update-task-frontmatter.sh +103 -0
  29. package/skills/commit/SKILL.md +30 -3
  30. package/skills/distribute/CONFIG_SCHEMA.md +148 -0
  31. package/skills/distribute/SKILL.md +173 -0
  32. package/skills/distribute/scripts/check-version.sh +74 -0
  33. package/skills/distribute/scripts/commit-version-bump.sh +108 -0
  34. package/skills/distribute/scripts/distribute-changes.sh +381 -0
  35. package/skills/do/SKILL.md +352 -1
  36. package/skills/do/assets/intent-vs-diff-prompt.md +69 -0
  37. package/skills/doc/assets/path-objectives.yaml +13 -0
  38. package/skills/doc-sync/SKILL.md +16 -0
  39. package/skills/doc-sync/assets/doc_targets.md +11 -0
  40. package/skills/idea/SKILL.md +56 -0
  41. package/skills/idea/assets/idea_handoff_template.md +26 -0
  42. package/skills/idea/assets/idea_template.md +3 -0
  43. package/skills/init/SKILL.md +101 -7
  44. package/skills/init/assets/directory_structure.txt +1 -0
  45. package/skills/init/assets/strategy_stub_template.md +38 -0
  46. package/skills/init/assets/workflow_template.json +1 -1
  47. package/skills/init/scripts/apply-project-visibility.sh +176 -0
  48. package/skills/init/scripts/detect-existing-codebase.sh +166 -0
  49. package/skills/init/scripts/init.sh +35 -1
  50. package/skills/jenga/SKILL.md +206 -14
  51. package/skills/jenga/scripts/board-scan.sh +238 -0
  52. package/skills/jenga/scripts/cascade-resolve.sh +297 -0
  53. package/skills/jenga/scripts/render-confirmation.sh +679 -0
  54. package/skills/jenga/scripts/render-picker.sh +439 -0
  55. package/skills/jenga/scripts/resolve-id.sh +367 -0
  56. package/skills/jenga-permission-level/SKILL.md +81 -0
  57. package/skills/proceed/SKILL.md +1 -1
  58. package/skills/publish/SKILL.md +8 -5
  59. package/skills/publish/assets/ci-contract.md +2 -2
  60. package/skills/publish/assets/ownership-matrix.md +1 -1
  61. package/skills/publish/scripts/finalize_changelog.sh +115 -0
  62. package/skills/publish/scripts/generate_release_notes.sh +475 -28
  63. package/skills/publish/scripts/npm_ci_pipeline.sh +44 -6
  64. package/skills/publish/scripts/publish_deploy.sh +38 -8
  65. package/skills/publish/scripts/run_gates.sh +2 -2
  66. package/skills/reconcile/SKILL.md +117 -5
  67. package/skills/reconcile/scripts/detect-unlinked-code.sh +741 -0
  68. package/skills/skillify/assets/init-new/assets/directory_structure.txt +5 -1
  69. package/skills/spinoff/SKILL.md +12 -7
  70. package/skills/todo/SKILL.md +2 -0
  71. package/skills/uncharted/SKILL.md +711 -0
  72. package/skills/uncharted/assets/SEGMENT_PROPOSAL_TEMPLATE.md +129 -0
  73. package/skills/uncharted/assets/UNDERSTANDING_DOC_TEMPLATE.md +160 -0
  74. package/skills/uncharted/scripts/apply-subsystem-cap.sh +573 -0
  75. package/skills/uncharted/scripts/detect-dependencies.sh +732 -0
  76. package/skills/uncharted/scripts/detect-tests.sh +553 -0
  77. package/skills/uncharted/scripts/discover-subsystems.sh +1029 -0
  78. package/skills/uncharted/scripts/enumerate-target.sh +470 -0
  79. package/skills/uncharted/scripts/import-source.sh +517 -0
  80. package/skills/uncharted/scripts/inspect-provenance.sh +573 -0
  81. package/skills/uncharted/scripts/resolve-segment-target.sh +640 -0
  82. package/skills/uncharted/scripts/run-engine.sh +655 -0
  83. package/skills/uncharted/scripts/validate-proposed-items.sh +125 -0
  84. package/skills/uncharted/scripts/write-backfilled-epics.sh +498 -0
  85. package/skills/wtf/SKILL.md +20 -0
  86. package/templates/CHANGELOG_TEMPLATE.md +13 -0
  87. package/templates/PROBLEM_RAPPORT_TEMPLATE.md +4 -1
  88. package/templates/SCRUM_BOARD_SCHEMA.md +206 -10
  89. package/templates/permission-levels/README.md +73 -0
  90. package/templates/permission-levels/level-1-locked.json +71 -0
  91. package/templates/permission-levels/level-2-guarded.json +64 -0
  92. package/templates/permission-levels/level-3-standard.json +62 -0
  93. package/templates/permission-levels/level-4-elevated.json +60 -0
  94. package/templates/permission-levels/level-5-unrestricted.json +58 -0
  95. package/skills/convert/SKILL.md +0 -124
  96. package/skills/convert/convert_cli.py +0 -235
  97. package/skills/convert/tests/sample.csv +0 -4
  98. package/skills/convert/tests/sample.json +0 -5
  99. package/skills/convert/tests/sample.jsonl +0 -3
  100. package/skills/convert/tests/sample.yaml +0 -18
  101. package/skills/convert/tests/sample_obj.csv +0 -2
  102. package/skills/convert/tests/sample_obj.json +0 -9
  103. package/skills/mirror-public/SKILL.md +0 -237
  104. package/skills/mirror-public/assets/config.json +0 -5
  105. package/skills/mirror-public/scripts/mirror.sh +0 -374
  106. package/skills/self-sync/SKILL.md +0 -73
  107. package/skills/self-sync/scripts/run.js +0 -136
  108. package/skills/train/SKILL.md +0 -116
  109. package/skills/train/assets/dashboard-templates/classifiers.html +0 -106
  110. package/skills/train/assets/dashboard-templates/nlp.html +0 -102
  111. package/skills/train/assets/dashboard-templates/transformers.html +0 -98
  112. package/skills/train/assets/results-parsers/__init__.py +0 -9
  113. package/skills/train/assets/results-parsers/classifiers.py +0 -84
  114. package/skills/train/assets/results-parsers/nlp.py +0 -88
  115. package/skills/train/assets/results-parsers/reporter.py +0 -154
  116. package/skills/train/assets/results-parsers/transformers.py +0 -120
  117. package/skills/train/train_cli.py +0 -786
@@ -1,73 +0,0 @@
1
- ---
2
- name: self-sync
3
- description: Mirror this repo's root-level framework directories into its own `.claude/` and `.agents/` sub-trees so edits to `/skills/*`, `/agents/*`, `/hooks/*`, `/scripts/*`, `/templates/*`, and `settings.json` take effect in the current Claude Code (and non-Claude) agent session — the in-repo replacement for the retired `/distribute` self-sync loop.
4
- keywords:
5
- - "self sync"
6
- - "mirror skills"
7
- - "sync .claude"
8
- - "sync .agents"
9
- - "in-repo distribute"
10
- examples:
11
- - "self-sync the mirrors"
12
- - "/self-sync --dry-run"
13
- - "refresh .claude/skills from root"
14
- ---
15
-
16
- # Self-Sync
17
-
18
- Copies the framework's root-level entries into this repo's own `.claude/` and `.agents/` mirrors so agent tooling (Claude Code, Copilot, custom) picks up local edits without reinstalling or running `/distribute`.
19
-
20
- Delegates the actual filesystem work to `lib/mirror.js`, the same helper used by `scripts/postinstall.js` on consumer installs. Two-directory mirror + delete reconciliation are the only differences from that consumer path.
21
-
22
- ## Instructions
23
-
24
- 1. If the user passed `--dry-run` (or asked for a preview), invoke:
25
- ```
26
- node skills/self-sync/scripts/run.js --dry-run
27
- ```
28
- Report the printed plan (added / overwritten / deleted) verbatim.
29
-
30
- 2. Otherwise, invoke:
31
- ```
32
- node skills/self-sync/scripts/run.js
33
- ```
34
- Report the printed summary. Do not run any inline `cp`, `rsync`, or `fs` commands — all mirroring goes through the script.
35
-
36
- 3. If the summary shows `+0 ~0 -0` on a second consecutive real run, the mirrors are already in sync — surface that as confirmation of idempotency.
37
-
38
- ## Copy Set
39
-
40
- The script mirrors exactly these root-level entries:
41
-
42
- ```
43
- bin/ lib/ scripts/ agents/ hooks/ mcp/ skills/ templates/ settings.json
44
- ```
45
-
46
- This is an **explicit constant** in `scripts/run.js`, deliberately not derived at runtime from `package.json` `files`. Two reasons:
47
-
48
- - `package.json` `files` includes `README.md` and `LICENSE`, which should not appear in the agent mirrors.
49
- - `settings.json` is required in the mirrors but is intentionally not shipped in the npm tarball, so it does not appear in `files`.
50
-
51
- The list is kept aligned with `package.json` `files` by convention. If a new top-level framework directory is added, update both.
52
-
53
- ## Invocation Model
54
-
55
- **Manual invocation only.** The user runs `/self-sync` (or `node skills/self-sync/scripts/run.js`) after making framework edits and before expecting them to be visible to the current agent session.
56
-
57
- Rationale: an on-`/commit` or file-watch trigger would fire on every edit — including drafts that shouldn't leak into the mirrors — and would obscure the write footprint (delete reconciliation prunes orphans, so accidental deletes on the source side propagate). Making the sync explicit keeps the human in the loop for a destructive-by-default operation, which matches the framework's boundary-checked, dry-runnable posture.
58
-
59
- ## Dry-Run Behavior
60
-
61
- `--dry-run` computes the full plan (added / overwritten / deleted / unchanged) via `lib/mirror.js` without touching the filesystem. Use it before every real run when the mirror state is uncertain, or when running in a repo where uncommitted mirror edits might exist.
62
-
63
- ## Safety Guarantees
64
-
65
- - **Never writes outside the repo root.** `lib/mirror.js` boundary-checks every destination path with `assertInside(destRoot, target)`; the helper throws if a resolved child escapes its destination root.
66
- - **Additive helper + explicit reconciliation.** The mirror helper is additive by default; delete reconciliation is enabled only because this skill passes `reconcileDeletes: true`.
67
- - **No shell out.** Pure Node built-ins (`node:fs`, `node:path`) — no `cp`, `rsync`, or subprocess calls.
68
- - **Idempotent.** A second consecutive run reports `+0 ~0 -0` because the byte-comparison in `filesEqual` classifies unchanged files as `skipped`.
69
-
70
- ## Guard Rails
71
-
72
- - Do not inline mirroring logic in this skill body — all filesystem work goes through `scripts/run.js` → `lib/mirror.js`.
73
- - Do not run this skill from a directory other than a checkout of the framework repo itself. `scripts/postinstall.js` handles consumer installs; this skill handles the framework's own repo.
@@ -1,136 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * skills/self-sync/scripts/run.js — In-repo mirror runner
4
- *
5
- * Mirrors this repo's root-level framework directories into its own
6
- * `.claude/` and `.agents/` sub-trees so edits to `/skills/*`, `/agents/*`,
7
- * `/hooks/*`, etc. take effect in the current Claude Code / non-Claude agent
8
- * session without a `/distribute` cycle.
9
- *
10
- * Wraps lib/mirror.js — same helper used by scripts/postinstall.js — but
11
- * with `reconcileDeletes: true` so orphans in the mirrors are pruned.
12
- *
13
- * Flags:
14
- * --dry-run Print the plan without writing.
15
- */
16
- import fs from 'node:fs';
17
- import path from 'node:path';
18
- import { fileURLToPath } from 'node:url';
19
-
20
- import { mirror } from '../../../lib/mirror.js';
21
-
22
- const __filename = fileURLToPath(import.meta.url);
23
- const __dirname = path.dirname(__filename);
24
-
25
- // Repo root is four levels up: run.js → scripts → self-sync → skills → repo
26
- const REPO_ROOT = path.resolve(__dirname, '..', '..', '..');
27
-
28
- // Explicit copy set — documented in SKILL.md.
29
- // Aligned with package.json `files`, plus `settings.json` (not shipped in
30
- // the npm tarball but required in-repo so Claude Code picks it up locally).
31
- const COPY_SET = [
32
- 'bin',
33
- 'lib',
34
- 'scripts',
35
- 'agents',
36
- 'hooks',
37
- 'mcp',
38
- 'skills',
39
- 'templates',
40
- 'settings.json',
41
- ];
42
-
43
- const DEST_ROOTS = ['.claude', '.agents'];
44
-
45
- // Basenames to skip anywhere in the walk. These are recursive mirror
46
- // artifacts, dev caches, or scm dirs that must never propagate into the
47
- // agent-visible mirror. `.agents` and `.claude` in particular can appear
48
- // nested inside `agents/` and `skills/` from legacy distribute runs.
49
- const EXCLUDE = [
50
- '.agents',
51
- '.claude',
52
- '.git',
53
- '.tmp',
54
- '.training',
55
- 'node_modules',
56
- '.DS_Store',
57
- ];
58
-
59
- function parseArgs(argv) {
60
- const dryRun = argv.includes('--dry-run');
61
- return { dryRun };
62
- }
63
-
64
- function short(p) {
65
- return path.relative(REPO_ROOT, p) || '.';
66
- }
67
-
68
- function printSection(label, items) {
69
- if (items.length === 0) return;
70
- console.log(` ${label} (${items.length}):`);
71
- for (const item of items) {
72
- console.log(` - ${short(item)}`);
73
- }
74
- }
75
-
76
- function main() {
77
- const { dryRun } = parseArgs(process.argv.slice(2));
78
-
79
- console.log('');
80
- console.log('╔══════════════════════════════════════════════════════╗');
81
- console.log(`║ /self-sync — mirror root → .claude/ + .agents/ ║`);
82
- console.log('╚══════════════════════════════════════════════════════╝');
83
- console.log(` Repo root : ${REPO_ROOT}`);
84
- console.log(` Copy set : ${COPY_SET.join(', ')}`);
85
- console.log(` Dry-run : ${dryRun ? 'YES (no writes)' : 'no'}`);
86
- console.log('');
87
-
88
- const missing = COPY_SET.filter(
89
- (entry) => !fs.existsSync(path.join(REPO_ROOT, entry))
90
- );
91
- if (missing.length > 0) {
92
- console.log(` ⚠ Missing from repo root — skipped: ${missing.join(', ')}`);
93
- console.log('');
94
- }
95
-
96
- const totals = { added: 0, overwritten: 0, deleted: 0, skipped: 0 };
97
-
98
- for (const targetRoot of DEST_ROOTS) {
99
- const destRoot = path.join(REPO_ROOT, targetRoot);
100
- console.log(`→ ${targetRoot}/`);
101
-
102
- const result = mirror({
103
- sourceRoot: REPO_ROOT,
104
- destRoot,
105
- copySet: COPY_SET,
106
- dryRun,
107
- reconcileDeletes: true,
108
- exclude: EXCLUDE,
109
- });
110
-
111
- printSection('added', result.added);
112
- printSection('overwritten', result.overwritten);
113
- printSection('deleted', result.deleted);
114
- console.log(
115
- ` summary: +${result.added.length} ~${result.overwritten.length} -${result.deleted.length} =${result.skipped.length}`
116
- );
117
- console.log('');
118
-
119
- totals.added += result.added.length;
120
- totals.overwritten += result.overwritten.length;
121
- totals.deleted += result.deleted.length;
122
- totals.skipped += result.skipped.length;
123
- }
124
-
125
- console.log('──────────────────────────────────────────────────────');
126
- console.log(
127
- ` Total: +${totals.added} added ~${totals.overwritten} overwritten -${totals.deleted} deleted =${totals.skipped} unchanged`
128
- );
129
- if (dryRun) {
130
- console.log(' (dry-run — nothing was written)');
131
- }
132
- console.log('──────────────────────────────────────────────────────');
133
- console.log('');
134
- }
135
-
136
- main();
@@ -1,116 +0,0 @@
1
- ---
2
- name: train
3
- description: Scaffold and run ML training jobs. Use `new <type> <job-name>` to scaffold a job from a template, or `run <job-dir>` to execute the two-phase validate → train pipeline on an existing job.
4
- keywords:
5
- - train
6
- - ml training
7
- - model training
8
- - machine learning
9
- - fine-tune
10
- examples:
11
- - "scaffold a new training job"
12
- - "train a classifier model"
13
- ---
14
-
15
- # Train — ML Training Job Orchestrator
16
-
17
- ## Usage
18
-
19
- ```
20
- python skills/train/train_cli.py <subcommand> [args]
21
-
22
- Subcommands:
23
- new <type> <job-name> Scaffold a new training job from a template
24
- run <job-dir> Execute validate → train pipeline on an existing job
25
-
26
- Types: classifiers, transformers, nlp
27
- ```
28
-
29
- If an unrecognised subcommand is given, argparse prints the usage message above and
30
- exits with a non-zero code.
31
-
32
- ## Subcommands
33
-
34
- ### `/train new <type> <job-name>`
35
- Scaffold a new training job from the appropriate template (positional / scriptable mode).
36
-
37
- **Supported types:** `classifiers`, `transformers`, `nlp`
38
-
39
- **Optional flags:**
40
- - `--model <value>` — Override the model name/type in `config.yaml`
41
- - `--epochs <n>` — Override the number of training epochs/iterations
42
- - `--batch-size <n>` — Override the batch size
43
-
44
- **Steps:**
45
- 1. Validate `<type>` is one of: `classifiers`, `transformers`, `nlp`
46
- 2. Copy the template directory from `.training/template/<type>/` to `jobs/<job-name>/`
47
- - If `jobs/<job-name>/` already exists, auto-suffix: `jobs/<job-name>-1/`, `jobs/<job-name>-2/`, etc.
48
- 3. Apply any CLI flag overrides to the scaffolded `config.yaml`
49
- 4. Generate `start.sh` in the job directory (executable)
50
- 5. Read the `workflow:` block from `config.yaml` and print next-step instructions
51
- 6. Print: `✅ Scaffolded job '<job-name>' from template '<type>' at jobs/<job-name>/`
52
-
53
- ### `/train new --interactive [--full]`
54
- Launch a guided wizard that scaffolds the job **and** configures `config.yaml` interactively.
55
-
56
- **Flags:**
57
- - `--interactive` / `-i` — Enable the wizard. Job name and type are collected via prompts.
58
- - `--full` — Expand the wizard to prompt for **every** configurable field (not just the critical ones).
59
-
60
- **Wizard flow:**
61
- 1. Prompt for job name (freeform, used as directory name under `jobs/`)
62
- 2. Prompt for job type (`classifiers`, `transformers`, or `nlp`)
63
- 3. Scaffold the job directory from the template
64
- 4. Prompt for critical config fields (2–3 key model params + data path per type):
65
- - **classifiers**: train file, target column, model algorithm, n_estimators, test split
66
- - **transformers**: model name, task, train file, epochs, learning rate
67
- - **nlp**: model name, task, train file, iterations, learning rate
68
- 5. With `--full`: additionally prompt for every remaining field in `config.yaml`
69
- 6. Write user responses back into the scaffolded `config.yaml`
70
-
71
- Each prompt shows the field name, its current default, and an inline description hint.
72
-
73
- **Ctrl+C handling:**
74
- Pressing `Ctrl+C` at any point during the wizard interrupts cleanly. If a scaffold directory has already been created, the user is asked:
75
- ```
76
- Delete scaffolded directory '<path>'? [y/N]
77
- ```
78
- Answering `y` removes the directory; `N` (or Enter) keeps it.
79
-
80
- ### `/train run <job-dir>`
81
- Execute the two-phase pre-flight → smoke test pipeline on an existing job directory.
82
-
83
- **Steps:**
84
-
85
- #### Phase A — Pre-flight validation
86
- 1. Print: `[pre-flight] Running validate.py in <job-dir>...`
87
- 2. Run `validate.py` as a subprocess inside `<job-dir>`:
88
- ```bash
89
- cd <job-dir> && python validate.py
90
- ```
91
- 3. Stream all stdout/stderr output to the terminal in real time.
92
- 4. If `validate.py` exits non-zero:
93
- - Print: `❌ [pre-flight] FAILED — halting before smoke test.`
94
- - Surface the full error output.
95
- - **Stop here. Do not proceed to Phase B.**
96
- 5. If `validate.py` exits zero:
97
- - Print: `✅ [pre-flight] Passed.`
98
-
99
- #### Phase B — Smoke test
100
- 1. Print: `[smoke test] Running train.py --smoke in <job-dir>...`
101
- 2. Run `train.py --smoke` as a subprocess inside `<job-dir>`:
102
- ```bash
103
- cd <job-dir> && python train.py --smoke
104
- ```
105
- 3. Stream all stdout/stderr output to the terminal in real time.
106
- 4. If `train.py` exits non-zero:
107
- - Print: `❌ [smoke test] FAILED.`
108
- - Surface the full error output.
109
- 5. If `train.py` exits zero:
110
- - Print: `✅ [smoke test] Passed. Job '<job-dir>' completed successfully.`
111
-
112
- ## Notes
113
- - `train.py` and `validate.py` must have no awareness of each other — the `/train` skill owns the gate.
114
- - Both subprocess calls must stream output (not buffer) so the user sees progress in real time.
115
- - Phase B is **never** invoked if Phase A fails.
116
- - The `--interactive` wizard requires `pyyaml` (`pip install pyyaml`) to patch `config.yaml`.
@@ -1,106 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Classifier Training Dashboard — {{job_name}}</title>
7
- <style>
8
- *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
9
- body { font-family: system-ui, -apple-system, sans-serif; background: #f5f7fa; color: #1a1a2e; padding: 2rem; }
10
- header { margin-bottom: 2rem; }
11
- header h1 { font-size: 1.6rem; font-weight: 700; }
12
- header p { color: #555; margin-top: .25rem; font-size: .9rem; }
13
- .card { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 1.5rem; margin-bottom: 1.5rem; }
14
- .card h2 { font-size: 1rem; font-weight: 600; color: #333; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .05em; }
15
- .metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
16
- .metric-box { background: #f0f4ff; border-radius: 8px; padding: 1rem; text-align: center; }
17
- .metric-box .value { font-size: 2rem; font-weight: 700; color: #3b5bdb; }
18
- .metric-box .label { font-size: .8rem; color: #666; margin-top: .25rem; }
19
- .bar-chart { display: flex; flex-direction: column; gap: .6rem; }
20
- .bar-row { display: flex; align-items: center; gap .5rem; }
21
- .bar-label { width: 100px; font-size: .85rem; color: #444; flex-shrink: 0; }
22
- .bar-track { flex: 1; background: #e9ecef; border-radius: 4px; height: 20px; position: relative; }
23
- .bar-fill { height: 100%; border-radius: 4px; background: #3b5bdb; transition: width .4s; }
24
- .bar-val { width: 50px; text-align: right; font-size: .8rem; color: #444; }
25
- table { width: 100%; border-collapse: collapse; }
26
- th, td { padding: .6rem 1rem; text-align: left; font-size: .9rem; border-bottom: 1px solid #eee; }
27
- th { background: #f8f9fa; font-weight: 600; color: #555; }
28
- footer { text-align: center; font-size: .75rem; color: #999; margin-top: 2rem; }
29
- </style>
30
- </head>
31
- <body>
32
-
33
- <header>
34
- <h1>🤖 Classifier Training Dashboard</h1>
35
- <p>Job: <strong>{{job_name}}</strong> &nbsp;|&nbsp; Model: <strong>{{model_type}}</strong></p>
36
- </header>
37
-
38
- <div class="card">
39
- <h2>Key Metrics</h2>
40
- <div class="metrics-grid">
41
- <div class="metric-box">
42
- <div class="value">{{accuracy}}</div>
43
- <div class="label">Accuracy</div>
44
- </div>
45
- <div class="metric-box">
46
- <div class="value">{{f1_score}}</div>
47
- <div class="label">F1 Score</div>
48
- </div>
49
- <div class="metric-box">
50
- <div class="value">{{precision}}</div>
51
- <div class="label">Precision</div>
52
- </div>
53
- <div class="metric-box">
54
- <div class="value">{{recall}}</div>
55
- <div class="label">Recall</div>
56
- </div>
57
- </div>
58
- </div>
59
-
60
- <div class="card">
61
- <h2>Metric Comparison</h2>
62
- <div class="bar-chart">
63
- <div class="bar-row">
64
- <span class="bar-label">Accuracy</span>
65
- <div class="bar-track"><div class="bar-fill" style="width: calc({{accuracy}} * 100%)"></div></div>
66
- <span class="bar-val">{{accuracy}}</span>
67
- </div>
68
- <div class="bar-row">
69
- <span class="bar-label">F1 Score</span>
70
- <div class="bar-track"><div class="bar-fill" style="width: calc({{f1_score}} * 100%)"></div></div>
71
- <span class="bar-val">{{f1_score}}</span>
72
- </div>
73
- <div class="bar-row">
74
- <span class="bar-label">Precision</span>
75
- <div class="bar-track"><div class="bar-fill" style="width: calc({{precision}} * 100%)"></div></div>
76
- <span class="bar-val">{{precision}}</span>
77
- </div>
78
- <div class="bar-row">
79
- <span class="bar-label">Recall</span>
80
- <div class="bar-track"><div class="bar-fill" style="width: calc({{recall}} * 100%)"></div></div>
81
- <span class="bar-val">{{recall}}</span>
82
- </div>
83
- </div>
84
- </div>
85
-
86
- <div class="card">
87
- <h2>Summary Table</h2>
88
- <table>
89
- <thead>
90
- <tr><th>Metric</th><th>Value</th></tr>
91
- </thead>
92
- <tbody>
93
- <tr><td>Accuracy</td><td>{{accuracy}}</td></tr>
94
- <tr><td>F1 Score</td><td>{{f1_score}}</td></tr>
95
- <tr><td>Precision</td><td>{{precision}}</td></tr>
96
- <tr><td>Recall</td><td>{{recall}}</td></tr>
97
- <tr><td>Model Type</td><td>{{model_type}}</td></tr>
98
- <tr><td>Job Name</td><td>{{job_name}}</td></tr>
99
- </tbody>
100
- </table>
101
- </div>
102
-
103
- <footer>Generated by JengaAgent /train skill &nbsp;|&nbsp; {{job_name}}</footer>
104
-
105
- </body>
106
- </html>
@@ -1,102 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>NLP Pipeline Dashboard — {{job_name}}</title>
7
- <style>
8
- *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
9
- body { font-family: system-ui, -apple-system, sans-serif; background: #f5f7fa; color: #1a1a2e; padding: 2rem; }
10
- header { margin-bottom: 2rem; }
11
- header h1 { font-size: 1.6rem; font-weight: 700; }
12
- header p { color: #555; margin-top: .25rem; font-size: .9rem; }
13
- .card { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 1.5rem; margin-bottom: 1.5rem; }
14
- .card h2 { font-size: 1rem; font-weight: 600; color: #333; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .05em; }
15
- .metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
16
- .metric-box { background: #fff8e1; border-radius: 8px; padding: 1rem; text-align: center; }
17
- .metric-box .value { font-size: 2rem; font-weight: 700; color: #e67700; }
18
- .metric-box .label { font-size: .8rem; color: #666; margin-top: .25rem; }
19
- .bar-chart { display: flex; flex-direction: column; gap: .6rem; }
20
- .bar-row { display: flex; align-items: center; gap: .5rem; }
21
- .bar-label { width: 100px; font-size: .85rem; color: #444; flex-shrink: 0; }
22
- .bar-track { flex: 1; background: #e9ecef; border-radius: 4px; height: 20px; position: relative; }
23
- .bar-fill { height: 100%; border-radius: 4px; background: #e67700; transition: width .4s; }
24
- .bar-val { width: 50px; text-align: right; font-size: .8rem; color: #444; }
25
- table { width: 100%; border-collapse: collapse; }
26
- th, td { padding: .6rem 1rem; text-align: left; font-size: .9rem; border-bottom: 1px solid #eee; }
27
- th { background: #f8f9fa; font-weight: 600; color: #555; }
28
- footer { text-align: center; font-size: .75rem; color: #999; margin-top: 2rem; }
29
- </style>
30
- </head>
31
- <body>
32
-
33
- <header>
34
- <h1>🔤 NLP Pipeline Dashboard</h1>
35
- <p>Job: <strong>{{job_name}}</strong> &nbsp;|&nbsp; Model: <strong>{{model_name}}</strong> &nbsp;|&nbsp; Task: <strong>{{task}}</strong></p>
36
- </header>
37
-
38
- <div class="card">
39
- <h2>Key Metrics</h2>
40
- <div class="metrics-grid">
41
- <div class="metric-box">
42
- <div class="value">{{f1}}</div>
43
- <div class="label">F1 Score</div>
44
- </div>
45
- <div class="metric-box">
46
- <div class="value">{{precision}}</div>
47
- <div class="label">Precision</div>
48
- </div>
49
- <div class="metric-box">
50
- <div class="value">{{recall}}</div>
51
- <div class="label">Recall</div>
52
- </div>
53
- <div class="metric-box">
54
- <div class="value">{{iterations}}</div>
55
- <div class="label">Iterations</div>
56
- </div>
57
- </div>
58
- </div>
59
-
60
- <div class="card">
61
- <h2>Score Breakdown</h2>
62
- <div class="bar-chart">
63
- <div class="bar-row">
64
- <span class="bar-label">F1 Score</span>
65
- <div class="bar-track"><div class="bar-fill" style="width: calc({{f1}} * 100%)"></div></div>
66
- <span class="bar-val">{{f1}}</span>
67
- </div>
68
- <div class="bar-row">
69
- <span class="bar-label">Precision</span>
70
- <div class="bar-track"><div class="bar-fill" style="width: calc({{precision}} * 100%)"></div></div>
71
- <span class="bar-val">{{precision}}</span>
72
- </div>
73
- <div class="bar-row">
74
- <span class="bar-label">Recall</span>
75
- <div class="bar-track"><div class="bar-fill" style="width: calc({{recall}} * 100%)"></div></div>
76
- <span class="bar-val">{{recall}}</span>
77
- </div>
78
- </div>
79
- </div>
80
-
81
- <div class="card">
82
- <h2>Summary Table</h2>
83
- <table>
84
- <thead>
85
- <tr><th>Metric</th><th>Value</th></tr>
86
- </thead>
87
- <tbody>
88
- <tr><td>F1 Score</td><td>{{f1}}</td></tr>
89
- <tr><td>Precision</td><td>{{precision}}</td></tr>
90
- <tr><td>Recall</td><td>{{recall}}</td></tr>
91
- <tr><td>Iterations</td><td>{{iterations}}</td></tr>
92
- <tr><td>Model Name</td><td>{{model_name}}</td></tr>
93
- <tr><td>Task</td><td>{{task}}</td></tr>
94
- <tr><td>Job Name</td><td>{{job_name}}</td></tr>
95
- </tbody>
96
- </table>
97
- </div>
98
-
99
- <footer>Generated by JengaAgent /train skill &nbsp;|&nbsp; {{job_name}}</footer>
100
-
101
- </body>
102
- </html>
@@ -1,98 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Transformer Fine-Tuning Dashboard — {{job_name}}</title>
7
- <style>
8
- *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
9
- body { font-family: system-ui, -apple-system, sans-serif; background: #f5f7fa; color: #1a1a2e; padding: 2rem; }
10
- header { margin-bottom: 2rem; }
11
- header h1 { font-size: 1.6rem; font-weight: 700; }
12
- header p { color: #555; margin-top: .25rem; font-size: .9rem; }
13
- .card { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 1.5rem; margin-bottom: 1.5rem; }
14
- .card h2 { font-size: 1rem; font-weight: 600; color: #333; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .05em; }
15
- .metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
16
- .metric-box { background: #f0fff4; border-radius: 8px; padding: 1rem; text-align: center; }
17
- .metric-box .value { font-size: 2rem; font-weight: 700; color: #2f9e44; }
18
- .metric-box .label { font-size: .8rem; color: #666; margin-top: .25rem; }
19
- .loss-section { margin-top: 1rem; }
20
- .loss-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid #eee; font-size: .9rem; }
21
- .loss-row .loss-label { color: #555; }
22
- .loss-row .loss-val { font-weight: 600; color: #2f9e44; }
23
- table { width: 100%; border-collapse: collapse; }
24
- th, td { padding: .6rem 1rem; text-align: left; font-size: .9rem; border-bottom: 1px solid #eee; }
25
- th { background: #f8f9fa; font-weight: 600; color: #555; }
26
- .perplexity-note { font-size: .8rem; color: #777; margin-top: .5rem; }
27
- footer { text-align: center; font-size: .75rem; color: #999; margin-top: 2rem; }
28
- </style>
29
- </head>
30
- <body>
31
-
32
- <header>
33
- <h1>🤗 Transformer Fine-Tuning Dashboard</h1>
34
- <p>Job: <strong>{{job_name}}</strong> &nbsp;|&nbsp; Model: <strong>{{model_name}}</strong></p>
35
- </header>
36
-
37
- <div class="card">
38
- <h2>Key Metrics</h2>
39
- <div class="metrics-grid">
40
- <div class="metric-box">
41
- <div class="value">{{perplexity}}</div>
42
- <div class="label">Perplexity</div>
43
- </div>
44
- <div class="metric-box">
45
- <div class="value">{{eval_loss}}</div>
46
- <div class="label">Eval Loss</div>
47
- </div>
48
- <div class="metric-box">
49
- <div class="value">{{train_loss}}</div>
50
- <div class="label">Train Loss</div>
51
- </div>
52
- <div class="metric-box">
53
- <div class="value">{{epochs}}</div>
54
- <div class="label">Epochs</div>
55
- </div>
56
- </div>
57
- <p class="perplexity-note">â„šī¸ Lower perplexity = better language model. Derived from eval_loss (e^loss).</p>
58
- </div>
59
-
60
- <div class="card">
61
- <h2>Loss Breakdown</h2>
62
- <div class="loss-section">
63
- <div class="loss-row">
64
- <span class="loss-label">Evaluation Loss</span>
65
- <span class="loss-val">{{eval_loss}}</span>
66
- </div>
67
- <div class="loss-row">
68
- <span class="loss-label">Training Loss</span>
69
- <span class="loss-val">{{train_loss}}</span>
70
- </div>
71
- <div class="loss-row">
72
- <span class="loss-label">Perplexity (e^eval_loss)</span>
73
- <span class="loss-val">{{perplexity}}</span>
74
- </div>
75
- </div>
76
- </div>
77
-
78
- <div class="card">
79
- <h2>Summary Table</h2>
80
- <table>
81
- <thead>
82
- <tr><th>Metric</th><th>Value</th></tr>
83
- </thead>
84
- <tbody>
85
- <tr><td>Perplexity</td><td>{{perplexity}}</td></tr>
86
- <tr><td>Eval Loss</td><td>{{eval_loss}}</td></tr>
87
- <tr><td>Train Loss</td><td>{{train_loss}}</td></tr>
88
- <tr><td>Epochs</td><td>{{epochs}}</td></tr>
89
- <tr><td>Model Name</td><td>{{model_name}}</td></tr>
90
- <tr><td>Job Name</td><td>{{job_name}}</td></tr>
91
- </tbody>
92
- </table>
93
- </div>
94
-
95
- <footer>Generated by JengaAgent /train skill &nbsp;|&nbsp; {{job_name}}</footer>
96
-
97
- </body>
98
- </html>
@@ -1,9 +0,0 @@
1
- """
2
- results-parsers — ML training result extraction utilities.
3
-
4
- Each submodule exposes: parse(job_dir: Path) -> dict
5
- Each submodule extracts type-specific metrics from job output artifacts.
6
- """
7
- from pathlib import Path
8
-
9
- PARSERS = ["classifiers", "transformers", "nlp"]