@jenga-ai/agent 1.0.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.
Files changed (177) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +340 -0
  3. package/agents/ai_engineer.md +113 -0
  4. package/agents/developer.md +236 -0
  5. package/agents/scrum-master.md +349 -0
  6. package/agents/scrutiny-agent.md +137 -0
  7. package/agents/solution-assessor.md +185 -0
  8. package/agents/tester.md +339 -0
  9. package/bin/jenga.js +70 -0
  10. package/hooks/copilot_session_end.sh +29 -0
  11. package/hooks/on_session_end.sh +238 -0
  12. package/hooks/prompt_router.sh +11 -0
  13. package/hooks/prompt_router_helper.js +52 -0
  14. package/hooks/session_end_helper.js +29 -0
  15. package/hooks/session_end_watcher.sh +24 -0
  16. package/lib/commands/attach.js +47 -0
  17. package/lib/commands/init.js +207 -0
  18. package/lib/commands/start.js +16 -0
  19. package/lib/commands/status.js +53 -0
  20. package/lib/config-schema.js +72 -0
  21. package/lib/inject-settings.js +61 -0
  22. package/lib/mirror.js +244 -0
  23. package/lib/resolve-project-dir.sh +47 -0
  24. package/mcp/execute-ticket/index.js +10 -0
  25. package/mcp/execute-ticket/package.json +5 -0
  26. package/mcp/help/index.js +79 -0
  27. package/mcp/help/package.json +14 -0
  28. package/mcp/router/README.md +19 -0
  29. package/mcp/router/embedder.js +23 -0
  30. package/mcp/router/index.js +204 -0
  31. package/mcp/router/matcher.js +87 -0
  32. package/mcp/router/package-lock.json +1048 -0
  33. package/mcp/router/package.json +11 -0
  34. package/mcp/router/skill-index.js +104 -0
  35. package/package.json +47 -0
  36. package/scripts/board_resolver.sh +46 -0
  37. package/scripts/e25_s01_extract_board_graph.py +292 -0
  38. package/scripts/e25_s01_generate_synthetic_board.py +90 -0
  39. package/scripts/measurement-10x.json +50 -0
  40. package/scripts/measurement-10x.txt +4 -0
  41. package/scripts/measurement-real.json +50 -0
  42. package/scripts/measurement-real.txt +4 -0
  43. package/scripts/postinstall.js +165 -0
  44. package/scripts/todo_cleanup.sh +22 -0
  45. package/scripts/todo_manager.sh +86 -0
  46. package/scripts/validate-board.sh +190 -0
  47. package/scripts/validate-story-format.sh +53 -0
  48. package/skills/brainstorm/SKILL.md +47 -0
  49. package/skills/btw/SKILL.md +42 -0
  50. package/skills/commit/SKILL.md +29 -0
  51. package/skills/commit/assets/user_instructions_template.md +22 -0
  52. package/skills/continue/SKILL.md +29 -0
  53. package/skills/convert/SKILL.md +124 -0
  54. package/skills/convert/convert_cli.py +235 -0
  55. package/skills/convert/tests/sample.csv +4 -0
  56. package/skills/convert/tests/sample.json +5 -0
  57. package/skills/convert/tests/sample.jsonl +3 -0
  58. package/skills/convert/tests/sample.yaml +18 -0
  59. package/skills/convert/tests/sample_obj.csv +2 -0
  60. package/skills/convert/tests/sample_obj.json +9 -0
  61. package/skills/deep-dive/SKILL.md +167 -0
  62. package/skills/do/SKILL.md +88 -0
  63. package/skills/do/assets/sender_template.json +12 -0
  64. package/skills/doc/SKILL.md +314 -0
  65. package/skills/doc/assets/path-objectives.yaml +38 -0
  66. package/skills/doc-sync/SKILL.md +167 -0
  67. package/skills/doc-sync/assets/default_excludes.txt +21 -0
  68. package/skills/doc-sync/assets/doc_targets.md +14 -0
  69. package/skills/dooo/SKILL.md +60 -0
  70. package/skills/error/SKILL.md +29 -0
  71. package/skills/evaluate/SKILL.md +45 -0
  72. package/skills/evaluate/assets/evaluation_invokation_template.yml +3 -0
  73. package/skills/evaluate/assets/evaluation_rapport_template.md +24 -0
  74. package/skills/examplify/SKILL.md +42 -0
  75. package/skills/help/SKILL.md +36 -0
  76. package/skills/improve/SKILL.md +55 -0
  77. package/skills/index/scripts/board-index +4 -0
  78. package/skills/index/scripts/board_index.py +615 -0
  79. package/skills/index/scripts/smoke_test.sh +86 -0
  80. package/skills/init/SKILL.md +44 -0
  81. package/skills/init/assets/.gitignore_template +15 -0
  82. package/skills/init/assets/PROJECT_SUMMARY_template.md +13 -0
  83. package/skills/init/assets/directory_structure.txt +13 -0
  84. package/skills/init/assets/test-config_template.json +4 -0
  85. package/skills/init/assets/workflow_template.json +30 -0
  86. package/skills/init/scripts/init.sh +48 -0
  87. package/skills/jbp/SKILL.md +25 -0
  88. package/skills/jenga/SKILL.md +68 -0
  89. package/skills/lgtm/SKILL.md +21 -0
  90. package/skills/mirror-public/SKILL.md +237 -0
  91. package/skills/mirror-public/assets/config.json +5 -0
  92. package/skills/mirror-public/scripts/mirror.sh +374 -0
  93. package/skills/pi-plan/SKILL.md +62 -0
  94. package/skills/pi-plan/assets/epic.json +7 -0
  95. package/skills/pi-plan/assets/story_template.md +18 -0
  96. package/skills/proceed/SKILL.md +29 -0
  97. package/skills/publish/SKILL.md +351 -0
  98. package/skills/publish/adapters/droplet.md +200 -0
  99. package/skills/publish/adapters/mobile-ios.md +114 -0
  100. package/skills/publish/adapters/npm-ci.md +223 -0
  101. package/skills/publish/adapters/npm.md +121 -0
  102. package/skills/publish/assets/ExportOptions.plist.template +19 -0
  103. package/skills/publish/assets/ci-contract.md +111 -0
  104. package/skills/publish/assets/ownership-matrix.md +17 -0
  105. package/skills/publish/assets/publish.example.json +85 -0
  106. package/skills/publish/assets/publish.example.npm-ci.json +40 -0
  107. package/skills/publish/assets/publish.example.npm.json +41 -0
  108. package/skills/publish/assets/secrets-guide.md +104 -0
  109. package/skills/publish/schemas/fixtures/npm-ci-minimal.json +17 -0
  110. package/skills/publish/schemas/fixtures/npm-ci-with-empty-secrets.json +18 -0
  111. package/skills/publish/schemas/fixtures/npm-ci-with-workflow-path.json +18 -0
  112. package/skills/publish/schemas/publish.schema.json +428 -0
  113. package/skills/publish/scripts/check_target_config.sh +96 -0
  114. package/skills/publish/scripts/droplet_pipeline.sh +208 -0
  115. package/skills/publish/scripts/generate_release_notes.sh +200 -0
  116. package/skills/publish/scripts/ios_pipeline.sh +486 -0
  117. package/skills/publish/scripts/npm_ci_pipeline.sh +225 -0
  118. package/skills/publish/scripts/npm_pipeline.sh +249 -0
  119. package/skills/publish/scripts/publish_common.sh +253 -0
  120. package/skills/publish/scripts/publish_deploy.sh +538 -0
  121. package/skills/publish/scripts/reconcile_tags.sh +135 -0
  122. package/skills/publish/scripts/run_gates.sh +616 -0
  123. package/skills/publish/scripts/setup_wizard.sh +394 -0
  124. package/skills/publish/scripts/show_history.sh +95 -0
  125. package/skills/publish/scripts/suggest_semver_bump.sh +105 -0
  126. package/skills/publish/scripts/validate_config.sh +163 -0
  127. package/skills/publish/scripts/validate_droplet_env.sh +45 -0
  128. package/skills/publish/scripts/validate_ios_env.sh +68 -0
  129. package/skills/publish/scripts/validate_npm_ci_env.sh +71 -0
  130. package/skills/publish/scripts/validate_npm_env.sh +22 -0
  131. package/skills/publish/scripts/write_ledger_entry.sh +126 -0
  132. package/skills/publish/wizards/droplet.md +275 -0
  133. package/skills/publish/wizards/mobile-ios.md +157 -0
  134. package/skills/publish/wizards/npm-ci.md +240 -0
  135. package/skills/publish/wizards/npm.md +224 -0
  136. package/skills/reconcile/SKILL.md +93 -0
  137. package/skills/reconcile/assets/report_format.md +44 -0
  138. package/skills/reconcile-origin/SKILL.md +75 -0
  139. package/skills/reconcile-origin/scripts/reconcile-origin.sh +372 -0
  140. package/skills/redo/SKILL.md +70 -0
  141. package/skills/route/SKILL.md +180 -0
  142. package/skills/self-sync/SKILL.md +73 -0
  143. package/skills/self-sync/scripts/run.js +136 -0
  144. package/skills/skillify/SKILL.md +68 -0
  145. package/skills/skillify/assets/init-new/SKILL.md +35 -0
  146. package/skills/skillify/assets/init-new/assets/.gitignore_template +15 -0
  147. package/skills/skillify/assets/init-new/assets/PROJECT_SUMMARY_template.md +13 -0
  148. package/skills/skillify/assets/init-new/assets/directory_structure.txt +10 -0
  149. package/skills/skillify/assets/init-new/assets/test-config_template.json +4 -0
  150. package/skills/skillify/assets/init-new/assets/workflow_template.json +17 -0
  151. package/skills/skillify/assets/init-new/scripts/init.sh +48 -0
  152. package/skills/skillify/assets/init-old/SKILL.md +124 -0
  153. package/skills/spinoff/SKILL.md +48 -0
  154. package/skills/status/SKILL.md +33 -0
  155. package/skills/status/assets/output_format.md +41 -0
  156. package/skills/todo/SKILL.md +46 -0
  157. package/skills/todo/assets/todo_handoff_template.md +22 -0
  158. package/skills/todo/assets/todo_template.md +3 -0
  159. package/skills/train/SKILL.md +116 -0
  160. package/skills/train/assets/dashboard-templates/classifiers.html +106 -0
  161. package/skills/train/assets/dashboard-templates/nlp.html +102 -0
  162. package/skills/train/assets/dashboard-templates/transformers.html +98 -0
  163. package/skills/train/assets/results-parsers/__init__.py +9 -0
  164. package/skills/train/assets/results-parsers/classifiers.py +84 -0
  165. package/skills/train/assets/results-parsers/nlp.py +88 -0
  166. package/skills/train/assets/results-parsers/reporter.py +154 -0
  167. package/skills/train/assets/results-parsers/transformers.py +120 -0
  168. package/skills/train/train_cli.py +786 -0
  169. package/templates/EXECUTION_PLAN_TEMPLATE.md +43 -0
  170. package/templates/EXECUTION_SUMMARY_TEMPLATE.md +50 -0
  171. package/templates/JENGA_CONFIG_TEMPLATE.json +23 -0
  172. package/templates/PROBLEM_RAPPORT_TEMPLATE.md +88 -0
  173. package/templates/SCRUM_BOARD_SCHEMA.md +311 -0
  174. package/templates/SKILL.md +16 -0
  175. package/templates/SKILL_TEMPLATE.md +28 -0
  176. package/templates/USER_INSTRUCTIONS_TEMPLATE.md +22 -0
  177. package/templates/copilot-instructions.md.tpl +55 -0
@@ -0,0 +1,136 @@
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();
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: skillify
3
+ description: Refactor one or more existing skills into a cleaner, more maintainable structure — extracting hardcoded content into asset files, offloading deterministic steps into scripts, and reorganizing the skill body to reflect the leaner result. Use this whenever the user wants to clean up, improve, or restructure an existing skill, mentions that a skill has hardcoded content that could be templated, or asks to "skillify", "refactor", or "tidy up" a skill. Trigger even if the user just pastes a skill and says something like "can we make this better?".
4
+ ---
5
+
6
+ # Skillify — Refactor a Skill into a Cleaner Structure
7
+
8
+ ## What this skill does
9
+
10
+ Takes one or more existing skills and refactors them by:
11
+ - Extracting hardcoded file content (JSON, Markdown, config, etc.) into `assets/` templates
12
+ - Extracting hardcoded directory lists into `assets/` reference files
13
+ - Moving deterministic multi-step sequences into `scripts/` bash scripts
14
+ - Rewriting the skill body to delegate to those scripts and assets, keeping instructions lean
15
+
16
+ See `assets/init-old/SKILL.md` and `assets/init-new/SKILL.md` for a concrete before/after example.
17
+
18
+ ---
19
+
20
+ ## Instructions
21
+
22
+ ### 1. Read the skill(s)
23
+
24
+ Read every SKILL.md the user references. If they also reference scripts or assets already in the skill, read those too.
25
+
26
+ ### 2. Identify refactor opportunities
27
+
28
+ For each skill, look for:
29
+
30
+ | Pattern | Refactor to |
31
+ |---|---|
32
+ | Hardcoded file content written inline (heredoc, echo, cat) | `assets/<name>_template.<ext>` copied via `cp` |
33
+ | Hardcoded list of directories or paths | `assets/<name>.txt` read via a `while read` loop |
34
+ | Sequential deterministic steps (create files, run commands) | `scripts/<name>.sh` executed by the skill |
35
+ | `SCRIPT_DIR` defined repeatedly across steps | Define once at top of script |
36
+
37
+ ### 3. Confirm the plan with the user
38
+
39
+ Before making changes, summarise what you found and what you propose to extract. List:
40
+ - Which files will move to `assets/`
41
+ - Which steps will move to `scripts/`
42
+ - What the updated skill body will look like
43
+
44
+ Get a thumbs-up before proceeding.
45
+
46
+ ### 4. Produce the outputs
47
+
48
+ For each change:
49
+ - Write the extracted asset files with their content
50
+ - Write or update the bash script(s), following the structure in `assets/init-new/SKILL.md`
51
+ - Rewrite the skill body so each offloaded step becomes a single `cp` or script call with a short explanation
52
+
53
+ ### 5. Update the skill body
54
+
55
+ The rewritten SKILL.md should:
56
+ - Keep narrative and conversational steps in the skill body (things Claude decides or explains)
57
+ - Delegate all deterministic file/directory operations to scripts
58
+ - Reference asset files by name so it's clear what exists where
59
+ - Stay concise — if a step is now just "run the script", say so in one line
60
+
61
+ ---
62
+
63
+ ## Reference files
64
+
65
+ - `assets/init-old/SKILL.md` — The init skill before refactoring (hardcoded heredocs, inline JSON, hardcoded directory list)
66
+ - `assets/init-new/SKILL.md` — The init skill after refactoring (all content in assets, steps delegated to `init.sh`)
67
+
68
+ Read these when you need a concrete example of the before/after pattern.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: init
3
+ description: Initialize a new project with the standard directory structure, PROJECT_SUMMARY.md, workflow.json, git repo, and gitignore. Follows a defined ordered onboarding sequence. Use when setting up a new or empty project.
4
+ ---
5
+
6
+ # Init — Project Setup
7
+
8
+ ## Instructions
9
+
10
+ Follow these steps in order. Do not skip steps — the sequence matters.
11
+
12
+ ### 1–9. Run the scaffold script
13
+
14
+ Execute the init script from the project root:
15
+
16
+ ```bash
17
+ chmod +x ./scripts/init.sh && ./scripts/init.sh
18
+ ```
19
+
20
+ This script handles all scaffolding in one step:
21
+ 1. Initializes the git repository
22
+ 2. Creates `.gitignore`
23
+ 3. Creates the full directory structure under `project/`
24
+ 4. Creates `project/PROJECT_SUMMARY.md` with placeholder content
25
+ 5. Creates `project/configs/workflow.json` with shared constants
26
+ 6. Creates `project/configs/test-config.json` stub
27
+ 7. Creates `project/data/baselines.json`
28
+ 8. Creates `project/logs/events.json`
29
+ 9. Stages and commits all files with the message `init: scaffold project structure and workflow config`
30
+
31
+ If the script fails, check that you are in the project root and that git is available.
32
+
33
+ ### 10. Prompt next step
34
+
35
+ Inform the user that setup is complete and suggest running `/pi-plan` to define project goals and epics.
@@ -0,0 +1,15 @@
1
+ # macOS & Windows system files
2
+ .DS_Store
3
+ Thumbs.db
4
+ Desktop.ini
5
+
6
+ # Environment files
7
+ .env
8
+ .env.*
9
+ *.local
10
+
11
+ # Dependency directories
12
+ node_modules/
13
+ vendor/
14
+ .venv/
15
+ EOF
@@ -0,0 +1,13 @@
1
+ # Project Summary
2
+
3
+ ## Overview
4
+ _To be completed._
5
+
6
+ ## Architecture & Structure
7
+ _To be completed._
8
+
9
+ ## Epics
10
+ _To be completed via /pi-plan._
11
+
12
+ ## Conventions
13
+ _To be completed._
@@ -0,0 +1,10 @@
1
+ project/board/epics
2
+ project/board/stories
3
+ project/board/tasks
4
+ project/configs
5
+ project/data
6
+ project/queue
7
+ project/rapports/problems
8
+ project/rapports/analysis
9
+ project/logs
10
+ documentation
@@ -0,0 +1,4 @@
1
+ {
2
+ "_note": "Run the tester agent to configure tools for this project.",
3
+ "tools": []
4
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "statuses": ["Pending", "In Progress", "Passed", "Passed with remarks", "Failed", "Rejected", "Blocked"],
3
+ "rapport_types": ["conflict", "implementation_blocker", "security_concern", "test_failure", "analysis"],
4
+ "paths": {
5
+ "board": "project/board",
6
+ "epics": "project/board/epics",
7
+ "stories": "project/board/stories",
8
+ "tasks": "project/board/tasks",
9
+ "rapports_problems": "project/rapports/problems",
10
+ "rapports_analysis": "project/rapports/analysis",
11
+ "queue": "project/queue",
12
+ "logs": "project/logs",
13
+ "data": "project/data",
14
+ "configs": "project/configs"
15
+ },
16
+ "agents": ["developer", "tester", "scrum-master"]
17
+ }
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ ASSETS_DIR="$SCRIPT_DIR/../assets"
6
+
7
+ # ─── 1. Initialize git repository ────────────────────────────────────────────
8
+ echo "→ Initializing git repository..."
9
+ git init
10
+
11
+ # ─── 2. Create .gitignore ─────────────────────────────────────────────────────
12
+ echo "→ Copying .gitignore from template..."
13
+ cp "$ASSETS_DIR/.gitignore_template" .gitignore
14
+
15
+ # ─── 3. Scaffold directory structure ──────────────────────────────────────────
16
+ echo "→ Scaffolding directory structure..."
17
+ while IFS= read -r dir || [[ -n "$dir" ]]; do
18
+ [[ -z "$dir" || "$dir" == \#* ]] && continue
19
+ mkdir -p "$dir"
20
+ done < "$ASSETS_DIR/directory_structure.txt"
21
+
22
+ # ─── 4. Create project/PROJECT_SUMMARY.md ────────────────────────────────────
23
+ echo "→ Copying PROJECT_SUMMARY.md from template..."
24
+ cp "$ASSETS_DIR/PROJECT_SUMMARY_template.md" project/PROJECT_SUMMARY.md
25
+
26
+ # ─── 5. Create project/configs/workflow.json ─────────────────────────────────
27
+ echo "→ Copying workflow.json from template..."
28
+ cp "$ASSETS_DIR/workflow_template.json" project/configs/workflow.json
29
+
30
+ # ─── 6. Create project/configs/test-config.json stub ─────────────────────────
31
+ echo "→ Copying test-config.json from template..."
32
+ cp "$ASSETS_DIR/test-config_template.json" project/configs/test-config.json
33
+
34
+ # ─── 7. Create project/data/baselines.json ───────────────────────────────────
35
+ echo "→ Creating baselines.json..."
36
+ echo '{}' > project/data/baselines.json
37
+
38
+ # ─── 8. Create project/logs/events.json ──────────────────────────────────────
39
+ echo "→ Creating events.json..."
40
+ echo '[]' > project/logs/events.json
41
+
42
+ # ─── 9. Initial commit ───────────────────────────────────────────────────────
43
+ echo "→ Staging and committing scaffolded files..."
44
+ git add -A
45
+ git commit -m "init: scaffold project structure and workflow config"
46
+
47
+ echo ""
48
+ echo "✓ Project scaffold complete."
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: init
3
+ description: Initialize a new project with the standard directory structure, PROJECT_SUMMARY.md, workflow.json, git repo, and gitignore. Follows a defined ordered onboarding sequence. Use when setting up a new or empty project.
4
+ ---
5
+
6
+ # Init — Project Setup
7
+
8
+ ## Instructions
9
+
10
+ Follow these steps in order. Do not skip steps — the sequence matters.
11
+
12
+ ### 1. Initialize git repository
13
+ Run `git init` in the project root. Do **not** set up any remote origin.
14
+
15
+ ### 2. Create `.gitignore`
16
+ Ignore the following at minimum:
17
+ - macOS and Windows system files: `.DS_Store`, `Thumbs.db`, `Desktop.ini`
18
+ - Environment files: `.env`, `.env.*`, `*.local`
19
+ - Dependency directories: `node_modules/`, `vendor/`, `.venv/`
20
+
21
+ ### 3. Scaffold directory structure
22
+
23
+ Create the following directories:
24
+
25
+ ```
26
+ project/
27
+ board/
28
+ epics/
29
+ stories/
30
+ tasks/
31
+ configs/
32
+ data/
33
+ queue/
34
+ rapports/
35
+ problems/
36
+ analysis/
37
+ logs/
38
+ documentation/
39
+ plans/
40
+ summaries/
41
+ ```
42
+
43
+ ### 4. Create `project/PROJECT_SUMMARY.md`
44
+
45
+ Create the file with the following placeholder structure. The scrum master will populate it during the `/pi-plan` flow.
46
+
47
+ ```markdown
48
+ # Project Summary
49
+
50
+ ## Overview
51
+ _To be completed._
52
+
53
+ ## Architecture & Structure
54
+ _To be completed._
55
+
56
+ ## Epics
57
+ _To be completed via /pi-plan._
58
+
59
+ ## Conventions
60
+ _To be completed._
61
+ ```
62
+
63
+ ### 5. Create `project/configs/workflow.json`
64
+
65
+ Write the shared constants file:
66
+
67
+ ```json
68
+ {
69
+ "statuses": ["Pending", "In Progress", "Passed", "Passed with remarks", "Failed", "Rejected", "Blocked"],
70
+ "rapport_types": ["conflict", "implementation_blocker", "security_concern", "test_failure", "analysis"],
71
+ "paths": {
72
+ "board": "project/board",
73
+ "epics": "project/board/epics",
74
+ "stories": "project/board/stories",
75
+ "tasks": "project/board/tasks",
76
+ "rapports_problems": "project/rapports/problems",
77
+ "rapports_analysis": "project/rapports/analysis",
78
+ "queue": "project/queue",
79
+ "logs": "project/logs",
80
+ "data": "project/data",
81
+ "configs": "project/configs"
82
+ },
83
+ "agents": ["developer", "tester", "scrum-master"]
84
+ }
85
+ ```
86
+
87
+ ### 6. Create `project/configs/test-config.json` stub
88
+
89
+ Write a minimal stub so the tester agent knows to configure it:
90
+
91
+ ```json
92
+ {
93
+ "_note": "Run the tester agent to configure tools for this project.",
94
+ "tools": []
95
+ }
96
+ ```
97
+
98
+ ### 7. Create `project/data/baselines.json`
99
+
100
+ Write an empty baselines file:
101
+
102
+ ```json
103
+ {}
104
+ ```
105
+
106
+ ### 8. Create `project/logs/events.json`
107
+
108
+ Initialize the event log:
109
+
110
+ ```json
111
+ []
112
+ ```
113
+
114
+ ### 9. Initial commit
115
+
116
+ Stage and commit all scaffolded files:
117
+
118
+ ```
119
+ init: scaffold project structure and workflow config
120
+ ```
121
+
122
+ ### 10. Prompt next step
123
+
124
+ Inform the user that setup is complete and suggest running `/pi-plan` to define project goals and epics.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: spinoff
3
+ description: Capture a diverging topic mid-conversation. Collects context, optionally runs /brainstorm for prerequisites, saves a /todo entry, and returns focus to the primary thread.
4
+ keywords:
5
+ - spinoff
6
+ - diverge
7
+ - side topic
8
+ - capture topic
9
+ - new thread
10
+ examples:
11
+ - "let's spinoff this idea"
12
+ - "capture this as a separate thread"
13
+ metadata:
14
+ prefered_agent: scrum-master
15
+ ---
16
+
17
+ # Spinoff — Capture a Diverging Topic
18
+
19
+ ## Instructions
20
+
21
+ 1. **Identify the diverging topic** — Ask the user to confirm or briefly describe the diverging topic.
22
+ - Pre-fill the prompt with a one-sentence summary of what the agent detected as the diverging subject (if known).
23
+ - Example: *"It looks like we started discussing [detected topic]. Is that the diverging thread you'd like to capture, or would you like to describe it differently?"*
24
+
25
+ 2. **Collect context** — Summarise the relevant context gathered so far in the current conversation that relates to the diverging topic. This summary will pre-fill the `/todo` description so no context is lost.
26
+
27
+ 3. **Check prerequisites** — Ask the user:
28
+ > "Are the requirements for **[diverging topic]** clear enough to act on, or would you like to run `/brainstorm` first to flesh them out?"
29
+
30
+ Offer these choices:
31
+ - **"Requirements are clear — save the todo now"** → go to step 5
32
+ - **"Run /brainstorm first"** → go to step 4
33
+
34
+ 4. **Run /brainstorm (if chosen)** — Invoke the `/brainstorm` skill, passing the diverging topic and collected context as the opening prompt. After `/brainstorm` completes, use the refined output as the todo description.
35
+
36
+ 5. **Save the /todo** — Populate `skills/todo/assets/todo_handoff_template.md` with the context collected so far:
37
+ - **Mission title**: the diverging topic name (as confirmed in step 1)
38
+ - **Goal / objective**: what the diverging topic aims to achieve
39
+ - **Affected files or scope**: any files or modules identified during the conversation
40
+ - **Intended approach**: the context/approach collected in step 2 (or the refined output from step 4)
41
+ - **Epic/Story linkage**: include a reference if a relevant Epic or Story was identified, otherwise `None`
42
+
43
+ Then invoke the `/todo` skill with the populated template. Since the template fields are pre-filled, `/todo` will skip any questions already answered.
44
+
45
+ 6. **Return focus** — Inform the user:
46
+ > "✅ Diverging topic saved as a todo. Returning focus to **[primary topic]**."
47
+
48
+ Then resume the primary conversation thread exactly where it was paused.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: status
3
+ description: Print a human-readable summary of the entire scrum board — all epics, stories, and tasks with their statuses — plus any open rapports and unprocessed queue triggers. Use when you want a quick overview of project state without reading raw files.
4
+ keywords:
5
+ - status
6
+ - board summary
7
+ - overview
8
+ - project state
9
+ - what's done
10
+ examples:
11
+ - "show me the project status"
12
+ - "what's the state of the board?"
13
+ ---
14
+
15
+ # Status — Board Overview
16
+
17
+ ## Instructions
18
+
19
+ 1. **Read `project/configs/workflow.json`** to confirm board paths. Fall back to `project/board/` if the file does not exist.
20
+
21
+ 2. **Scan epics** — Read all files in `project/board/epics/`. For each epic, extract: `id`, `title`, `status`, `date_started`, `date_completed`, and the `stories` list.
22
+
23
+ 3. **Scan stories** — For each story referenced in the epics list, read its file from `project/board/stories/`. Extract: `id`, `title`, `status`, `tasks` list.
24
+
25
+ 4. **Scan tasks** — For each task referenced in each story, read its file from `project/board/tasks/`. Extract: `id`, `title`, `status`, `assigned_to`.
26
+
27
+ 5. **Scan open rapports** — List all `.md` files in `project/rapports/problems/` that do **not** end in `.IGNORE.md`. List all `.md` files in `project/rapports/analysis/`.
28
+
29
+ 6. **Check the queue** — If `project/queue/scrum_triggers.jsonl` is non-empty, note the number of pending triggers awaiting the scrum master.
30
+
31
+ 7. **Print the summary** following the layout and icon conventions in `assets/output_format.md`.
32
+
33
+ 8. If no epics exist, print: `No board items found. Run /pi-plan to define epics or /todo to add items.`
@@ -0,0 +1,41 @@
1
+ ## Output Format
2
+
3
+ ```
4
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5
+ PROJECT STATUS
6
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7
+
8
+ 📦 E01 · <Epic Title> [<Status>]
9
+ 📖 E01_S01 · <Story Title> [<Status>]
10
+ ✅ E01_S01_T01 · <Task Title> [Passed]
11
+ 🔄 E01_S01_T02 · <Task Title> [In Progress]
12
+ ⏳ E01_S01_T03 · <Task Title> [Pending]
13
+ 📖 E01_S02 · <Story Title> [<Status>]
14
+ ...
15
+
16
+ 📦 E02 · <Epic Title> [<Status>]
17
+ ...
18
+
19
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
20
+ OPEN RAPPORTS (2)
21
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
+ ⚠️ problems/E01_S02-auth-conflict.md
23
+ 📊 analysis/E01-performance-baseline.md
24
+
25
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
26
+ QUEUE (1 pending trigger for scrum master)
27
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28
+ ```
29
+
30
+ ## Status Icons
31
+
32
+ | Icon | Status |
33
+ |------|--------|
34
+ | ✅ | Passed / Passed with remarks |
35
+ | ❌ | Failed / Rejected |
36
+ | 🔄 | In Progress |
37
+ | ⏳ | Pending |
38
+ | 🚫 | Blocked |
39
+ | 📦 | Epic |
40
+ | 📖 | Story |
41
+ | 🔧 | Task |
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: todo
3
+ description: Add missions to the project todo list (project/todo.md), optionally linking them to epics and stories. Loops until the user is done, then optionally executes the list.
4
+ keywords:
5
+ - todo
6
+ - add task
7
+ - queue work
8
+ - backlog
9
+ - add to list
10
+ examples:
11
+ - "add this to the todo list"
12
+ - "queue this as a task"
13
+ metadata:
14
+ prefered_agent: scrum-master
15
+ ---
16
+
17
+ # Todo — Add Missions to the Todo List
18
+
19
+ ## Instructions
20
+
21
+ 1. **Ensure `project/todo.md` exists** — If it doesn't exist, it will be auto-created by `todo_manager.sh` — no manual action needed.
22
+
23
+ 2. **Ask the user about the mission:**
24
+ - Where do you want to do this?
25
+ - What would you like to do?
26
+ - What is the goal?
27
+
28
+ 3. **Classify the mission** — Check if it fits into:
29
+ - An existing story
30
+ - A new story inside an existing Epic
31
+ - A new story inside a new Epic
32
+ - None of the above
33
+
34
+ 4. **Update project documentation** — Add the mission to the appropriate files under `project/board/epics/` and `project/board/stories/` if applicable.
35
+
36
+ 5. **Add to `project/todo.md`** by running:
37
+ ```
38
+ bash scripts/todo_manager.sh add '<mission title>: <Epic no.>_<Story no.>'
39
+ ```
40
+ The epic and story reference is only required if the mission is assigned to one.
41
+
42
+ 6. **Ask the user**: "Add another todo" or "Done"?
43
+ - If **add another** — go back to step 2.
44
+ - If **done** — ask if they want to execute the todo list.
45
+ - If **yes** — invoke the `/do` skill.
46
+ - If **no** — exit.
@@ -0,0 +1,22 @@
1
+ # Todo Handoff
2
+
3
+ <!-- PREAMBLE (for /todo): This template was pre-filled by a caller (e.g. /redo, /spinoff).
4
+ Skip any questions whose answers are already provided below. Only prompt the user
5
+ for fields that remain empty or marked as a placeholder. -->
6
+
7
+ <!-- Format: <mission title>: <E##_S##> (epic/story ref optional) -->
8
+
9
+ ## Mission Title
10
+ <!-- PLACEHOLDER: short name for this todo item, e.g. "Refactor auth middleware" -->
11
+
12
+ ## Goal / Objective
13
+ <!-- PLACEHOLDER: what this todo is trying to achieve -->
14
+
15
+ ## Affected Files or Scope
16
+ <!-- PLACEHOLDER: which files, modules, or areas are involved, e.g. src/auth/, skills/todo/ -->
17
+
18
+ ## Intended Approach
19
+ <!-- PLACEHOLDER: step-by-step or high-level approach to the work -->
20
+
21
+ ## Epic / Story Linkage
22
+ <!-- PLACEHOLDER: known Epic or Story ID this links to, e.g. E02_S03 — or "None" if not linked -->