@jenga-ai/agent 3.1.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -12
- package/agents/developer.md +31 -16
- package/agents/scrum-master.md +18 -17
- package/agents/tester.md +25 -15
- package/bin/jenga.js +10 -0
- package/lib/commands/dashboard.js +92 -0
- package/lib/skill-allow-list.json +7 -2
- package/package.json +21 -2
- package/project/app/api/lib/resolve-project-root.js +120 -0
- package/project/app/api/package.json +16 -0
- package/project/app/api/parsers/architecture.js +72 -0
- package/project/app/api/parsers/board.js +141 -0
- package/project/app/api/parsers/documentation.js +125 -0
- package/project/app/api/parsers/git-log.js +52 -0
- package/project/app/api/parsers/ideas.js +62 -0
- package/project/app/api/parsers/knowledge-graph.js +73 -0
- package/project/app/api/parsers/lib/markdown-dir-reader.js +163 -0
- package/project/app/api/parsers/rapports.js +148 -0
- package/project/app/api/parsers/todo.js +179 -0
- package/project/app/api/response.js +47 -0
- package/project/app/api/routes/architecture.js +23 -0
- package/project/app/api/routes/board.js +46 -0
- package/project/app/api/routes/documentation.js +24 -0
- package/project/app/api/routes/health.js +25 -0
- package/project/app/api/routes/history.js +55 -0
- package/project/app/api/routes/rapports.js +24 -0
- package/project/app/api/scripts/capture-snapshot.js +294 -0
- package/project/app/api/server.js +112 -0
- package/project/app/api/types.js +40 -0
- package/project/app/package.json +21 -0
- package/project/app/ui/dist/assets/index-7fj-vllY.js +104 -0
- package/project/app/ui/dist/assets/index-CdK3Qrep.css +1 -0
- package/project/app/ui/dist/index.html +13 -0
- package/project/app/ui/package.json +23 -0
- package/project/app/ui/scripts/build-snapshot-html.cjs +214 -0
- package/project/app/ui/scripts/dashboard-open.cjs +88 -0
- package/project/app/ui/scripts/dashboard-start.cjs +87 -0
- package/scripts/acquire-concurrency-slot.sh +220 -0
- package/scripts/audit-twin-divergence.sh +625 -0
- package/scripts/check-public-playbook-steps.sh +136 -0
- package/scripts/compute-deploy-reconcile.sh +439 -0
- package/scripts/jenga-permission-level-switch.sh +19 -3
- package/scripts/mark-deployed.sh +532 -0
- package/scripts/populate-knowledge-graph.js +429 -0
- package/scripts/release-concurrency-slot.sh +129 -0
- package/scripts/validate-board.sh +60 -2
- package/scripts/verify-consumer-install.sh +470 -0
- package/skills/j-close-story/SKILL.md +1 -1
- package/skills/j-cloud-connect/SKILL.md +95 -0
- package/skills/j-cloud-connect/scripts/configure-backend.sh +267 -0
- package/skills/j-cloud-connect/scripts/install-rclone.sh +153 -0
- package/skills/j-dashboard/SKILL.md +144 -0
- package/skills/j-dashboard/scripts/launch.sh +121 -0
- package/skills/j-dashboard/scripts/resolve-app-dir.sh +164 -0
- package/skills/j-dashboard/scripts/snapshot.sh +267 -0
- package/skills/j-dashboard-share/SKILL.md +96 -0
- package/skills/j-dashboard-share/scripts/upload-snapshot.sh +173 -0
- package/skills/j-do/SKILL.md +19 -19
- package/skills/j-doc-sync/SKILL.md +12 -1
- package/skills/j-idea/SKILL.md +1 -1
- package/skills/j-init/SKILL.md +5 -4
- package/skills/j-init/assets/directory_structure.txt +1 -0
- package/skills/j-init/scripts/detect-existing-codebase.sh +2 -2
- package/skills/j-init/scripts/init.sh +13 -2
- package/skills/j-playbook/SKILL.md +93 -0
- package/skills/j-playbook-new/SKILL.md +155 -0
- package/skills/j-playbook-new/scripts/playbook-new.sh +332 -0
- package/skills/j-proceed/SKILL.md +1 -1
- package/skills/j-publish/SKILL.md +1 -1
- package/skills/j-publish/adapters/npm-ci.md +29 -0
- package/skills/j-publish/scripts/npm_ci_pipeline.sh +9 -0
- package/skills/j-publish/scripts/npm_pipeline.sh +18 -0
- package/skills/j-publish/scripts/npm_stage_pipeline.sh +81 -41
- package/skills/j-reconcile/SKILL.md +1 -0
- package/skills/j-redo/SKILL.md +1 -1
- package/skills/j-status/SKILL.md +12 -0
- package/skills/j-todo/SKILL.md +2 -2
- package/skills/j-uncharted/SKILL.md +8 -7
- package/skills/j-uncharted/scripts/validate-proposed-items.sh +18 -2
- package/skills/jenga/SKILL.md +55 -16
- package/skills/jenga/playbooks/idea-to-committed.json +20 -0
- package/skills/jenga/playbooks/schema.json +1 -1
- package/skills/jenga/scripts/load-nl-catalog.js +22 -6
- package/skills/jenga/scripts/load-playbooks.sh +968 -41
- package/skills/jenga/scripts/match-playbook.sh +1 -1
- package/skills/jenga/scripts/render-playbook-confirmation.sh +162 -8
- package/skills/jenga/scripts/run-playbook-step.sh +535 -42
- package/skills/jenga-permission-level/SKILL.md +4 -4
- package/templates/KNOWLEDGE_GRAPH_STUB_SCHEMA_TEMPLATE.md +128 -0
- package/templates/SCRUM_BOARD_SCHEMA.md +18 -6
- package/templates/playbook-types.json +8 -0
- package/skills/jenga/playbooks/brainstorm-to-mirror.json +0 -22
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# -----------------------------------------------------------------------------
|
|
3
|
+
# skills/j-dashboard-share/scripts/upload-snapshot.sh
|
|
4
|
+
#
|
|
5
|
+
# Uploads a local dashboard snapshot HTML file (as produced by j-dashboard's
|
|
6
|
+
# `scripts/snapshot.sh`) to a configured rclone remote via `rclone copyto`, at
|
|
7
|
+
# a templated, Drive-side (remote-side) destination path:
|
|
8
|
+
#
|
|
9
|
+
# JengaAI/<repo-directory-name>/<datetime>-board-snapshot.html
|
|
10
|
+
#
|
|
11
|
+
# - <repo-directory-name> is the basename of the repository root, derived
|
|
12
|
+
# via `basename "$(git rev-parse --show-toplevel)"` — never hardcoded to
|
|
13
|
+
# any specific project.
|
|
14
|
+
# - <datetime> is the actual UTC run time, formatted `%Y%m%dT%H%M%SZ`
|
|
15
|
+
# (compact ISO 8601-ish, sortable, filesystem/URL-safe).
|
|
16
|
+
#
|
|
17
|
+
# This destination path is entirely independent of the LOCAL snapshot
|
|
18
|
+
# filename (whatever `snapshot.sh --out` wrote it as) — this script only
|
|
19
|
+
# reads the local file's bytes and uploads them under its own remote-side
|
|
20
|
+
# name.
|
|
21
|
+
#
|
|
22
|
+
# Before attempting any upload, this script verifies the target rclone
|
|
23
|
+
# remote is actually configured (present in `rclone listremotes`). If it is
|
|
24
|
+
# not, this script does NOT attempt the upload and does NOT let rclone
|
|
25
|
+
# surface its own raw error — it dies with an actionable message pointing
|
|
26
|
+
# the user at `j.cloud-connect` (E60_S01) to configure a remote first.
|
|
27
|
+
#
|
|
28
|
+
# HARD SCOPE BOUNDARY: this script uploads ONLY. It never invokes
|
|
29
|
+
# `rclone link` or any other link-creating/sharing subcommand, anywhere in
|
|
30
|
+
# its logic — that is a deliberate, separate, manual action reserved for the
|
|
31
|
+
# user (see E47_S05's story decision). Do not add one.
|
|
32
|
+
#
|
|
33
|
+
# This script does not create or wire up the `j-dashboard-share` skill
|
|
34
|
+
# itself (SKILL.md) — that is a separate task (E47_S05_T02). It assumes a
|
|
35
|
+
# remote has already been configured via `j.cloud-connect`
|
|
36
|
+
# (skills/j-cloud-connect/scripts/{install-rclone.sh,configure-backend.sh},
|
|
37
|
+
# E60_S01) and that `rclone` is already on PATH.
|
|
38
|
+
#
|
|
39
|
+
# Invoked via `bash`, not executed directly: this script intentionally ships
|
|
40
|
+
# without the executable bit, matching the convention already documented in
|
|
41
|
+
# skills/j-cloud-connect/scripts/install-rclone.sh and
|
|
42
|
+
# skills/j-dashboard/scripts/resolve-app-dir.sh. Whatever wires this into the
|
|
43
|
+
# j-dashboard-share skill (E47_S05_T02) should invoke it as
|
|
44
|
+
# `bash skills/j-dashboard-share/scripts/upload-snapshot.sh`.
|
|
45
|
+
#
|
|
46
|
+
# Usage:
|
|
47
|
+
# upload-snapshot.sh --file <local-snapshot-path> --remote <remote-name>
|
|
48
|
+
#
|
|
49
|
+
# --file <path> Path to the local snapshot HTML file to upload (e.g.
|
|
50
|
+
# the output of `j.dashboard --snapshot`). Must exist
|
|
51
|
+
# and be non-empty.
|
|
52
|
+
# --remote <name> Name of an already-configured rclone remote (without a
|
|
53
|
+
# trailing colon), e.g. `gdrive`. Checked against
|
|
54
|
+
# `rclone listremotes` before any upload is attempted.
|
|
55
|
+
#
|
|
56
|
+
# Exit codes:
|
|
57
|
+
# 0 Upload succeeded. The full remote destination path is printed on
|
|
58
|
+
# stdout as the last line.
|
|
59
|
+
# 1 Any failure: bad arguments, missing/empty local file, `rclone` not on
|
|
60
|
+
# PATH, not inside a git repository, the target remote is not
|
|
61
|
+
# configured (points the user at `j.cloud-connect`), or `rclone copyto`
|
|
62
|
+
# itself failed. A human-readable reason is always printed to stderr.
|
|
63
|
+
# -----------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
set -euo pipefail
|
|
66
|
+
|
|
67
|
+
usage() {
|
|
68
|
+
cat <<'EOF'
|
|
69
|
+
Usage: upload-snapshot.sh --file <local-snapshot-path> --remote <remote-name>
|
|
70
|
+
|
|
71
|
+
Uploads a local dashboard snapshot HTML file to a configured rclone remote
|
|
72
|
+
via `rclone copyto`, at the templated destination path:
|
|
73
|
+
|
|
74
|
+
JengaAI/<repo-directory-name>/<datetime>-board-snapshot.html
|
|
75
|
+
|
|
76
|
+
--file <path> Path to the local snapshot HTML file to upload. Must
|
|
77
|
+
exist and be non-empty.
|
|
78
|
+
--remote <name> Name of an already-configured rclone remote (no
|
|
79
|
+
trailing colon). If not configured, this script tells
|
|
80
|
+
you to run j.cloud-connect instead of attempting the
|
|
81
|
+
upload.
|
|
82
|
+
|
|
83
|
+
Upload only — never runs `rclone link` or any other sharing/link-creating
|
|
84
|
+
command.
|
|
85
|
+
EOF
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
die() {
|
|
89
|
+
echo "Error: $*" >&2
|
|
90
|
+
exit 1
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# -----------------------------------------------------------------------------
|
|
94
|
+
# Argument parsing.
|
|
95
|
+
# -----------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
LOCAL_FILE=""
|
|
98
|
+
REMOTE_NAME=""
|
|
99
|
+
|
|
100
|
+
while [ "$#" -gt 0 ]; do
|
|
101
|
+
case "$1" in
|
|
102
|
+
-h|--help)
|
|
103
|
+
usage
|
|
104
|
+
exit 0
|
|
105
|
+
;;
|
|
106
|
+
--file)
|
|
107
|
+
[ "$#" -ge 2 ] || die "--file requires a value"
|
|
108
|
+
LOCAL_FILE="$2"
|
|
109
|
+
shift 2
|
|
110
|
+
;;
|
|
111
|
+
--remote)
|
|
112
|
+
[ "$#" -ge 2 ] || die "--remote requires a value"
|
|
113
|
+
REMOTE_NAME="$2"
|
|
114
|
+
shift 2
|
|
115
|
+
;;
|
|
116
|
+
*)
|
|
117
|
+
usage >&2
|
|
118
|
+
die "unknown argument: $1"
|
|
119
|
+
;;
|
|
120
|
+
esac
|
|
121
|
+
done
|
|
122
|
+
|
|
123
|
+
[ -n "$LOCAL_FILE" ] || { usage >&2; die "--file is required"; }
|
|
124
|
+
[ -n "$REMOTE_NAME" ] || { usage >&2; die "--remote is required"; }
|
|
125
|
+
|
|
126
|
+
# -----------------------------------------------------------------------------
|
|
127
|
+
# Preflight — local file, rclone availability, git repository.
|
|
128
|
+
# -----------------------------------------------------------------------------
|
|
129
|
+
|
|
130
|
+
[ -f "$LOCAL_FILE" ] || die "local snapshot file not found: $LOCAL_FILE"
|
|
131
|
+
[ -s "$LOCAL_FILE" ] || die "local snapshot file is empty: $LOCAL_FILE"
|
|
132
|
+
|
|
133
|
+
command -v rclone >/dev/null 2>&1 || die "rclone is not on PATH. Install it first (see skills/j-cloud-connect/scripts/install-rclone.sh) and re-run."
|
|
134
|
+
|
|
135
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || die "not inside a git repository — cannot derive <repo-directory-name> for the destination path. Run this script from within the project's repository."
|
|
136
|
+
REPO_DIR_NAME="$(basename "$REPO_ROOT")"
|
|
137
|
+
|
|
138
|
+
# -----------------------------------------------------------------------------
|
|
139
|
+
# Step 1 — Verify the target remote is actually configured BEFORE attempting
|
|
140
|
+
# any upload. Never let a raw rclone error surface for "remote not
|
|
141
|
+
# configured" — point the user at j.cloud-connect instead.
|
|
142
|
+
# -----------------------------------------------------------------------------
|
|
143
|
+
|
|
144
|
+
REMOTES_OUTPUT="$(rclone listremotes 2>&1)" || die "'rclone listremotes' failed: $REMOTES_OUTPUT"
|
|
145
|
+
|
|
146
|
+
if ! printf '%s\n' "$REMOTES_OUTPUT" | grep -Fxq "${REMOTE_NAME}:"; then
|
|
147
|
+
die "remote '$REMOTE_NAME' is not configured in rclone. Run j.cloud-connect first to set it up, then re-run this upload."
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
# -----------------------------------------------------------------------------
|
|
151
|
+
# Step 2 — Build the templated destination path.
|
|
152
|
+
# -----------------------------------------------------------------------------
|
|
153
|
+
|
|
154
|
+
DATETIME="$(date -u +%Y%m%dT%H%M%SZ)"
|
|
155
|
+
DEST_RELATIVE_PATH="JengaAI/${REPO_DIR_NAME}/${DATETIME}-board-snapshot.html"
|
|
156
|
+
DEST="${REMOTE_NAME}:${DEST_RELATIVE_PATH}"
|
|
157
|
+
|
|
158
|
+
# -----------------------------------------------------------------------------
|
|
159
|
+
# Step 3 — Upload. stdio inherited (no capture/reformatting), matching this
|
|
160
|
+
# repo's j-cloud-connect script conventions. Upload only: this script never
|
|
161
|
+
# calls `rclone link` or any other sharing/link-creating command.
|
|
162
|
+
# -----------------------------------------------------------------------------
|
|
163
|
+
|
|
164
|
+
echo "Uploading '$LOCAL_FILE' to '$DEST'..."
|
|
165
|
+
|
|
166
|
+
COPY_EXIT=0
|
|
167
|
+
rclone copyto "$LOCAL_FILE" "$DEST" || COPY_EXIT=$?
|
|
168
|
+
if [ "$COPY_EXIT" -ne 0 ]; then
|
|
169
|
+
die "'rclone copyto $LOCAL_FILE $DEST' exited with status $COPY_EXIT. Upload did not succeed — see rclone's output above for the reason."
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
echo "Upload succeeded."
|
|
173
|
+
echo "$DEST"
|
package/skills/j-do/SKILL.md
CHANGED
|
@@ -58,7 +58,7 @@ Extract the following named values for use throughout this skill:
|
|
|
58
58
|
These values must be read fresh on each invocation. Never use hardcoded fallbacks.
|
|
59
59
|
|
|
60
60
|
### 1. Check for `project/todo.md`
|
|
61
|
-
Run `bash scripts/todo_manager.sh exists`. If it exits non-zero, inform the user there are no queued tasks and exit.
|
|
61
|
+
Run `bash "$([ -f scripts/todo_manager.sh ] && echo scripts/todo_manager.sh || echo node_modules/@jenga-ai/agent/scripts/todo_manager.sh)" exists`. If it exits non-zero, inform the user there are no queued tasks and exit.
|
|
62
62
|
|
|
63
63
|
### 1.5. Story-Bundle Execution Mode
|
|
64
64
|
|
|
@@ -284,7 +284,7 @@ No patch file is written on success.
|
|
|
284
284
|
If `/do` is invoked with a task ID (`E##_S##_T##`) or a plain-text title, skip this section and use the normal task execution path (steps 2–8 below).
|
|
285
285
|
|
|
286
286
|
### 2. List tasks and let the user choose
|
|
287
|
-
Run `bash scripts/todo_manager.sh list` to display the queued tasks. Ask the user:
|
|
287
|
+
Run `bash "$([ -f scripts/todo_manager.sh ] && echo scripts/todo_manager.sh || echo node_modules/@jenga-ai/agent/scripts/todo_manager.sh)" list` to display the queued tasks. Ask the user:
|
|
288
288
|
- Execute a specific task (by number or title)
|
|
289
289
|
- Execute the next task from the top of the list
|
|
290
290
|
- Exit
|
|
@@ -294,14 +294,14 @@ Run `bash scripts/todo_manager.sh list` to display the queued tasks. Ask the use
|
|
|
294
294
|
Before resolving a task for execution, inspect the selected entry's ID:
|
|
295
295
|
|
|
296
296
|
- **Epic (`E##`)** — the entry refers to a whole epic that has not yet been broken into stories.
|
|
297
|
-
Use the scrum-master agent to read the epic's board file (`$(bash scripts/board_resolver.sh)epics/`) and decompose it into stories. For each story produced:
|
|
298
|
-
1. Write a story file to `$(bash scripts/board_resolver.sh)stories/`.
|
|
299
|
-
2. Run `bash scripts/todo_manager.sh add '<story title>: <E##_S##>'`
|
|
300
|
-
After breakdown, Run `bash scripts/todo_manager.sh remove '<epic entry title>'` and go back to step 2 so the new stories are visible.
|
|
297
|
+
Use the scrum-master agent to read the epic's board file (`$(bash "$([ -f scripts/board_resolver.sh ] && echo scripts/board_resolver.sh || echo node_modules/@jenga-ai/agent/scripts/board_resolver.sh)")epics/`) and decompose it into stories. For each story produced:
|
|
298
|
+
1. Write a story file to `$(bash "$([ -f scripts/board_resolver.sh ] && echo scripts/board_resolver.sh || echo node_modules/@jenga-ai/agent/scripts/board_resolver.sh)")stories/`.
|
|
299
|
+
2. Run `bash "$([ -f scripts/todo_manager.sh ] && echo scripts/todo_manager.sh || echo node_modules/@jenga-ai/agent/scripts/todo_manager.sh)" add '<story title>: <E##_S##>'`
|
|
300
|
+
After breakdown, Run `bash "$([ -f scripts/todo_manager.sh ] && echo scripts/todo_manager.sh || echo node_modules/@jenga-ai/agent/scripts/todo_manager.sh)" remove '<epic entry title>'` and go back to step 2 so the new stories are visible.
|
|
301
301
|
|
|
302
302
|
- **Story (`E##_S##`) with no tasks** — the entry refers to a story that has not yet been broken into tasks.
|
|
303
|
-
Check `$(bash scripts/board_resolver.sh)tasks/` for any task files whose front-matter `story_id` matches this story. If none exist, use the scrum-master agent to read the story's board file and decompose it into tasks. For each task produced:
|
|
304
|
-
1. Write a task file to `$(bash scripts/board_resolver.sh)tasks/`.
|
|
303
|
+
Check `$(bash "$([ -f scripts/board_resolver.sh ] && echo scripts/board_resolver.sh || echo node_modules/@jenga-ai/agent/scripts/board_resolver.sh)")tasks/` for any task files whose front-matter `story_id` matches this story. If none exist, use the scrum-master agent to read the story's board file and decompose it into tasks. For each task produced:
|
|
304
|
+
1. Write a task file to `$(bash "$([ -f scripts/board_resolver.sh ] && echo scripts/board_resolver.sh || echo node_modules/@jenga-ai/agent/scripts/board_resolver.sh)")tasks/`.
|
|
305
305
|
After breakdown, keep the story entry in `project/todo.md` (tasks are discovered from it automatically). Go back to step 2.
|
|
306
306
|
|
|
307
307
|
- **Story (`E##_S##`) with existing tasks**, or **Task (`E##_S##_T##`)** — no breakdown needed; proceed to step 4.
|
|
@@ -310,7 +310,7 @@ Before resolving a task for execution, inspect the selected entry's ID:
|
|
|
310
310
|
Each todo entry uses the format: `<mission title>: <E##_S##_T##>` (or `E##_S##` if no task ID).
|
|
311
311
|
|
|
312
312
|
Before starting:
|
|
313
|
-
1. Locate and read the matching file from `$(bash scripts/board_resolver.sh)tasks/` (or `$(bash scripts/board_resolver.sh)stories/` if story-level)
|
|
313
|
+
1. Locate and read the matching file from `$(bash "$([ -f scripts/board_resolver.sh ] && echo scripts/board_resolver.sh || echo node_modules/@jenga-ai/agent/scripts/board_resolver.sh)")tasks/` (or `$(bash "$([ -f scripts/board_resolver.sh ] && echo scripts/board_resolver.sh || echo node_modules/@jenga-ai/agent/scripts/board_resolver.sh)")stories/` if story-level)
|
|
314
314
|
2. If the file does not exist, warn the user and skip — do not proceed with a task that has no scrum board definition
|
|
315
315
|
3. Present a brief summary of the task: title, acceptance criteria, parent story, parent epic
|
|
316
316
|
|
|
@@ -343,7 +343,7 @@ After override validation (step 4.1) and before branching on `execution_scope` i
|
|
|
343
343
|
|
|
344
344
|
3. **Overwrite `execution_scope` to `inline`** in the task's frontmatter, unconditionally — `--trivial` always forces `inline`, never a softer "lightest safe tier."
|
|
345
345
|
|
|
346
|
-
4. **Record the override for audit**, reusing the existing `jenga_assigned` / `override_justification` pairing already defined in
|
|
346
|
+
4. **Record the override for audit**, reusing the existing `jenga_assigned` / `override_justification` pairing already defined in `$([ -f templates/SCRUM_BOARD_SCHEMA.md ] && echo templates/SCRUM_BOARD_SCHEMA.md || echo node_modules/@jenga-ai/agent/templates/SCRUM_BOARD_SCHEMA.md)` for exactly this situation ("scope overridden by a human"), rather than inventing a new field:
|
|
347
347
|
- Set `jenga_assigned: false` (if not already `false`).
|
|
348
348
|
- Set (or append to, if already present) `override_justification`:
|
|
349
349
|
```
|
|
@@ -368,7 +368,7 @@ After override validation (step 4.1) and before branching on `execution_scope` i
|
|
|
368
368
|
|
|
369
369
|
After resolving the task context (step 4), passing override validation (step 4.1), and applying the `--trivial` dispatch-time override if present (step 4.1.5), read `execution_scope` from the task frontmatter.
|
|
370
370
|
|
|
371
|
-
**Locked-task dispatch guard (defense-in-depth).** Before branching on `execution_scope` below, read `crucial_level` from the task frontmatter (per
|
|
371
|
+
**Locked-task dispatch guard (defense-in-depth).** Before branching on `execution_scope` below, read `crucial_level` from the task frontmatter (per `$([ -f templates/SCRUM_BOARD_SCHEMA.md ] && echo templates/SCRUM_BOARD_SCHEMA.md || echo node_modules/@jenga-ai/agent/templates/SCRUM_BOARD_SCHEMA.md)`'s Crucial Flag Fields). If `crucial_level: locked`:
|
|
372
372
|
|
|
373
373
|
- This task MUST be routed through the inline execution path below — no worktree, no developer subagent — regardless of what `execution_scope` currently reads. This guards against a locked task reaching dispatch with a non-`inline` `execution_scope` (a race, a manually edited file, or a task added to a story's `tasks:` list after `skills/jenga/SKILL.md` Phase 0.5's Rule 4 last ran).
|
|
374
374
|
- If `execution_scope` is already `inline`, proceed directly to the inline steps below — no correction needed.
|
|
@@ -389,10 +389,10 @@ After resolving the task context (step 4), passing override validation (step 4.1
|
|
|
389
389
|
1. Read the task file and load its full content (description, acceptance criteria). Do NOT create a worktree. Do NOT spawn a developer subagent.
|
|
390
390
|
2. Implement the task inline — make the required changes to files directly in the current session.
|
|
391
391
|
3. Run the smoke test harness before committing anything:
|
|
392
|
-
- Run `bash scripts/smoke-harness.sh <changed_file>...`, passing the paths changed in step 2. With no arguments the harness infers them from `git diff --name-only HEAD`. It exits `0` on pass and `1` on failure.
|
|
393
|
-
- If `scripts/smoke-harness.sh`
|
|
392
|
+
- Run `bash "$([ -f scripts/smoke-harness.sh ] && echo scripts/smoke-harness.sh || echo node_modules/@jenga-ai/agent/scripts/smoke-harness.sh)" <changed_file>...`, passing the paths changed in step 2. With no arguments the harness infers them from `git diff --name-only HEAD`. It exits `0` on pass and `1` on failure.
|
|
393
|
+
- If neither `scripts/smoke-harness.sh` nor `node_modules/@jenga-ai/agent/scripts/smoke-harness.sh` exists, log a warning and treat the result as a pass:
|
|
394
394
|
```
|
|
395
|
-
WARNING [<task_id>]:
|
|
395
|
+
WARNING [<task_id>]: smoke-harness.sh not found. Smoke test skipped (stub pass).
|
|
396
396
|
```
|
|
397
397
|
4. **If the smoke test exits non-zero**:
|
|
398
398
|
- **If this is a `--trivial`-forced run** (marker set in step 4.1.5 — and `crucial_level` is not `locked`, which never falls back, per 4.1.5's precedence note): do NOT write `status: Failed`. `--trivial` always forces `inline` with no softer "lightest safe tier" to fall back to first, so a smoke-harness failure here goes straight to the shared `#### Fallback to Full Task-Scope Pipeline` procedure below (origin: `trivial`). Do not proceed with the remaining inline steps below — the Fallback procedure takes over from here.
|
|
@@ -431,10 +431,10 @@ After resolving the task context (step 4), passing override validation (step 4.1
|
|
|
431
431
|
1. **Spawn a developer subagent** (Agent tool, `subagent_type: "developer"`) with the same sender object and context payload as step 5 would use, but with an explicit instruction added to the dispatch prompt: **do not create a worktree** — implement directly against the current checkout (the session's existing working tree), not an isolated `.claude/worktrees/<slug>` copy. This is the one concrete difference from the step-5 `task` path: everything else about how the subagent implements the task (reading the task file, following acceptance criteria, following repo conventions) is unchanged.
|
|
432
432
|
|
|
433
433
|
2. **After the developer subagent reports implementation complete**, run the smoke test harness using the same invocation convention as `### 4.2. Inline Execution Path`:
|
|
434
|
-
- Run `bash scripts/smoke-harness.sh <changed_file>...`, passing the paths the subagent changed. With no arguments the harness infers them from `git diff --name-only HEAD`. It exits `0` on pass and `1` on failure.
|
|
435
|
-
- If `scripts/smoke-harness.sh`
|
|
434
|
+
- Run `bash "$([ -f scripts/smoke-harness.sh ] && echo scripts/smoke-harness.sh || echo node_modules/@jenga-ai/agent/scripts/smoke-harness.sh)" <changed_file>...`, passing the paths the subagent changed. With no arguments the harness infers them from `git diff --name-only HEAD`. It exits `0` on pass and `1` on failure.
|
|
435
|
+
- If neither `scripts/smoke-harness.sh` nor `node_modules/@jenga-ai/agent/scripts/smoke-harness.sh` exists, log a warning and treat the result as a pass:
|
|
436
436
|
```
|
|
437
|
-
WARNING [<task_id>]:
|
|
437
|
+
WARNING [<task_id>]: smoke-harness.sh not found. Smoke test skipped (stub pass).
|
|
438
438
|
```
|
|
439
439
|
|
|
440
440
|
3. **If the smoke test passes**:
|
|
@@ -528,8 +528,8 @@ Additionally, if the completed work introduces user-facing changes, update `READ
|
|
|
528
528
|
### 7. After successful completion
|
|
529
529
|
- Check for any `_INSTRUCTIONS.md` files in `project/instructions/` whose ID matches the completed task. If found, present them to the user and explain that these actions must be completed before the feature will work correctly.
|
|
530
530
|
- Invoke the `/commit` skill to commit the work (if not already committed by the developer)
|
|
531
|
-
- Run `bash scripts/todo_manager.sh remove '<task title>'` to remove the completed task from `project/todo.md`
|
|
532
|
-
- Run `bash scripts/todo_manager.sh teardown` to delete `project/todo.md` if it is now effectively empty
|
|
531
|
+
- Run `bash "$([ -f scripts/todo_manager.sh ] && echo scripts/todo_manager.sh || echo node_modules/@jenga-ai/agent/scripts/todo_manager.sh)" remove '<task title>'` to remove the completed task from `project/todo.md`
|
|
532
|
+
- Run `bash "$([ -f scripts/todo_manager.sh ] && echo scripts/todo_manager.sh || echo node_modules/@jenga-ai/agent/scripts/todo_manager.sh)" teardown` to delete `project/todo.md` if it is now effectively empty
|
|
533
533
|
|
|
534
534
|
### 8. Loop
|
|
535
535
|
Go back to step 1.
|
|
@@ -101,7 +101,7 @@ Every candidate identified above as "missing documentation for new things added
|
|
|
101
101
|
1. **Check for `.publicignore` at the repo root.** Most projects using this framework will not have one (they haven't adopted `/mirror-public`) — if it's absent, **skip this entire sub-step**. Fall through to flagging every "missing documentation" candidate exactly as `3.` above already would, with no further filtering.
|
|
102
102
|
2. **If `.publicignore` exists**, for each "missing documentation" candidate, determine its source path (relative to the repo root) and classify it by running:
|
|
103
103
|
```
|
|
104
|
-
scripts/check-publicignore-match.sh <path> [<path> ...]
|
|
104
|
+
bash "$([ -f scripts/check-publicignore-match.sh ] && echo scripts/check-publicignore-match.sh || echo node_modules/@jenga-ai/agent/scripts/check-publicignore-match.sh)" <path> [<path> ...]
|
|
105
105
|
```
|
|
106
106
|
This reuses `/mirror-public`'s own `mirror.sh` matching logic (`rsync --exclude-from=.publicignore`) — a file this script reports `BLOCKED` is guaranteed to be a file `/mirror-public --dry-run` would also report as "would be blocked", and vice versa for `PUBLIC`. It needs no network access and does not require `/mirror-public` to be configured.
|
|
107
107
|
3. **`BLOCKED`** → do not flag this candidate as missing documentation. It's private-only and will never ship to the public mirror, so public docs coverage is not applicable.
|
|
@@ -181,6 +181,17 @@ After all writes are done, print a summary:
|
|
|
181
181
|
If nothing needed updating, print: `✅ Documentation is already in sync with the source.`
|
|
182
182
|
If minification could not reach the target, note: `⚠️ docs/API.md reduced to X% (target was Y% — essential content limit reached).`
|
|
183
183
|
|
|
184
|
+
### 8. GitHub Pages site follow-up (E41_S13)
|
|
185
|
+
|
|
186
|
+
If this run updated `project/.wiki/documentation.md`, `project/.wiki/intro-guide.md`, or any
|
|
187
|
+
`project/.wiki/concepts/*.md` file, also re-run `bash "$([ -f scripts/build-pages-site.sh ] && echo scripts/build-pages-site.sh || echo node_modules/@jenga-ai/agent/scripts/build-pages-site.sh)"` afterward. That
|
|
188
|
+
script deterministically regenerates the GitHub Pages documentation site's wiki-derived pages
|
|
189
|
+
(`docs/getting-started.md`, `docs/concepts.md`, `docs/skills.md`, `docs/agents.md`,
|
|
190
|
+
`docs/hooks.md`, `docs/mcp-tools.md`, `docs/reference.md`) from the wiki content this step just
|
|
191
|
+
updated — without re-running it, the Pages site silently drifts from the wiki the same way
|
|
192
|
+
`README.md` and the wiki itself have drifted from each other before. Mention this in the
|
|
193
|
+
summary output (e.g. `🔄 Re-ran build-pages-site.sh to refresh the Pages site`).
|
|
194
|
+
|
|
184
195
|
---
|
|
185
196
|
|
|
186
197
|
## Reference files
|
package/skills/j-idea/SKILL.md
CHANGED
|
@@ -36,7 +36,7 @@ This file is generated/synced by `scripts/generate-j-alias.sh idea` from `skills
|
|
|
36
36
|
|
|
37
37
|
3. **Add to `project/ideas.md`** by running:
|
|
38
38
|
```
|
|
39
|
-
bash scripts/idea_manager.sh add '<idea>'
|
|
39
|
+
bash "$([ -f scripts/idea_manager.sh ] && echo scripts/idea_manager.sh || echo node_modules/@jenga-ai/agent/scripts/idea_manager.sh)" add '<idea>'
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
4. **Ask the user**: "Capture another idea, or done?"
|
package/skills/j-init/SKILL.md
CHANGED
|
@@ -144,10 +144,11 @@ This script handles all scaffolding in one step:
|
|
|
144
144
|
7. Creates `project/configs/scope-thresholds.json` with default execution-scope thresholds (consumed by `/jenga` and `/do`, which halt if it's missing)
|
|
145
145
|
8. Creates `project/data/baselines.json`
|
|
146
146
|
9. Creates `project/logs/events.json`
|
|
147
|
-
10. Creates `
|
|
148
|
-
11. Creates `
|
|
149
|
-
12.
|
|
150
|
-
13.
|
|
147
|
+
10. Creates `project/knowledge-graph/STUB_SCHEMA.md` from the shared template and `project/knowledge-graph/graph.json` seeded with empty `nodes`/`edges` arrays — consumed by `/uncharted`'s conversational elicitation flow
|
|
148
|
+
11. Creates `docs/STRATEGY.md` — a strategic brief stub intended for investors, partners, and the product team
|
|
149
|
+
12. Creates `CHANGELOG.md` from the shared template — a running log of notable changes, seeded with an `[Unreleased]` section
|
|
150
|
+
13. Applies the chosen visibility mode via `scripts/apply-project-visibility.sh`, which records it as `project_files_visibility` in `jenga.config.json` and performs any `.gitignore` change
|
|
151
|
+
14. Stages and commits all files with the message `init: scaffold project structure and workflow config`
|
|
151
152
|
|
|
152
153
|
The visibility mode is validated before any scaffolding happens, so an invalid
|
|
153
154
|
value fails fast and leaves nothing behind. It is applied before the commit, so
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# ---------------------------------------------------------------------------
|
|
3
|
-
# skills/init/scripts/detect-existing-codebase.sh
|
|
3
|
+
# skills/j-init/scripts/detect-existing-codebase.sh
|
|
4
4
|
#
|
|
5
5
|
# Deterministic front half of the /init "detect existing project state" step.
|
|
6
6
|
# /init currently always scaffolds as though the target directory were empty.
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# This script answers exactly one question -- "what kind of directory is
|
|
13
13
|
# this?" -- and nothing else. It never scaffolds, never prompts, never runs
|
|
14
14
|
# /uncharted, and never modifies anything on disk. Deciding what to DO with
|
|
15
|
-
# the verdict is agent judgement and lives in skills/init/SKILL.md.
|
|
15
|
+
# the verdict is agent judgement and lives in skills/j-init/SKILL.md.
|
|
16
16
|
#
|
|
17
17
|
# ---------------------------------------------------------------------------
|
|
18
18
|
# VERDICTS -- exactly one is printed on stdout, nothing else
|
|
@@ -8,9 +8,9 @@ VISIBILITY_SCRIPT="$SCRIPT_DIR/apply-project-visibility.sh"
|
|
|
8
8
|
# ─── Resolve the package root that owns templates/ and lib/ ──────────────────
|
|
9
9
|
# postinstall.js mirrors only skills/ and agents/ into .claude/ and .agents/ —
|
|
10
10
|
# templates/ and lib/ are never copied there, so a script running from a
|
|
11
|
-
# mirrored copy (.claude/skills/init/scripts/ or .agents/skills/init/scripts/)
|
|
11
|
+
# mirrored copy (.claude/skills/j-init/scripts/ or .agents/skills/j-init/scripts/)
|
|
12
12
|
# cannot reach its siblings via a fixed ../../../ climb the way it can in this
|
|
13
|
-
# monorepo checkout, where init.sh actually lives at skills/init/scripts/ with
|
|
13
|
+
# monorepo checkout, where init.sh actually lives at skills/j-init/scripts/ with
|
|
14
14
|
# templates/ and lib/ three levels up. Consumers instead have them inside the
|
|
15
15
|
# installed npm package.
|
|
16
16
|
if [[ -d "$SCRIPT_DIR/../../../templates" ]]; then
|
|
@@ -81,6 +81,17 @@ echo '{}' > project/data/baselines.json
|
|
|
81
81
|
echo "→ Creating events.json..."
|
|
82
82
|
echo '[]' > project/logs/events.json
|
|
83
83
|
|
|
84
|
+
# ─── 8.5. Create project/knowledge-graph/{STUB_SCHEMA.md,graph.json} ─────────
|
|
85
|
+
# Consumed by skills/uncharted's conversational elicitation flow (`onboard`,
|
|
86
|
+
# `segment --mode investigate`), which writes coarse graph nodes/edges to
|
|
87
|
+
# graph.json per the stub schema — both must exist before that flow's first
|
|
88
|
+
# write, per templates/KNOWLEDGE_GRAPH_STUB_SCHEMA_TEMPLATE.md's own header
|
|
89
|
+
# comment (E20_S08_T01; replaced wholesale once E20_S01's real schema lands).
|
|
90
|
+
echo "→ Copying knowledge-graph STUB_SCHEMA.md from template..."
|
|
91
|
+
cp "$PKG_ROOT/templates/KNOWLEDGE_GRAPH_STUB_SCHEMA_TEMPLATE.md" project/knowledge-graph/STUB_SCHEMA.md
|
|
92
|
+
echo "→ Creating project/knowledge-graph/graph.json..."
|
|
93
|
+
echo '{"nodes": [], "edges": []}' > project/knowledge-graph/graph.json
|
|
94
|
+
|
|
84
95
|
# ─── 9. Create docs/STRATEGY.md ──────────────────────────────────────────────
|
|
85
96
|
echo "→ Creating docs/STRATEGY.md (strategic brief for investors, partners, and the product team)..."
|
|
86
97
|
mkdir -p docs
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: j.playbook
|
|
3
|
+
description: Invoke a specific /jenga playbook directly by ID, skipping natural-language matching entirely and going straight to chain confirmation and execution.
|
|
4
|
+
keywords:
|
|
5
|
+
- run playbook
|
|
6
|
+
- invoke playbook by id
|
|
7
|
+
- playbook direct
|
|
8
|
+
- execute playbook
|
|
9
|
+
examples:
|
|
10
|
+
- "j.playbook brainstorm-to-mirror"
|
|
11
|
+
- "run the understand-then-ship playbook"
|
|
12
|
+
- "invoke playbook by id"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Playbook — Direct Playbook Invocation by ID
|
|
16
|
+
|
|
17
|
+
## Purpose
|
|
18
|
+
|
|
19
|
+
`/jenga`'s natural-language branch (`skills/jenga/SKILL.md`) proposes a playbook only when
|
|
20
|
+
free-text intent doesn't cleanly resolve to a single skill and `skills/jenga/scripts/match-playbook.sh`
|
|
21
|
+
finds a confident match. That's the right default when the user doesn't know a playbook exists or
|
|
22
|
+
doesn't know its exact id. `j.playbook <id>` is the other case: the user already knows exactly
|
|
23
|
+
which playbook they want and names it directly — this skill skips `detect-nl-intent.sh` and
|
|
24
|
+
`match-playbook.sh` entirely and goes straight to the same confirmation-and-execution machinery
|
|
25
|
+
`/jenga`'s natural-language branch already uses (`E53_S06_T03`, per story `E53_S06`'s fourth and
|
|
26
|
+
fifth Acceptance Criteria).
|
|
27
|
+
|
|
28
|
+
This skill never re-implements chain confirmation, sequential execution, `forward_from`/`resolve`
|
|
29
|
+
resolution, or composition/conditional handling — all of that is `skills/jenga/SKILL.md`'s
|
|
30
|
+
Natural-language branch steps 5a-5e, reused here by reference. The only genuinely new logic in
|
|
31
|
+
this skill is id resolution (step 1 below).
|
|
32
|
+
|
|
33
|
+
## Instructions
|
|
34
|
+
|
|
35
|
+
0. **Bare invocation — no id given.** If this skill was invoked with no argument at all, do not
|
|
36
|
+
proceed to step 1. Instead:
|
|
37
|
+
a. Invoke `skills/jenga/scripts/load-playbooks.sh` with no arguments (its existing full-catalog
|
|
38
|
+
mode — the same call step 1's `"not_found"` branch already uses for its "did you mean"
|
|
39
|
+
nudge; no new script is introduced for this).
|
|
40
|
+
b. Render the returned JSON array as a Markdown table with columns `Id`, `Name`, `Source`, and
|
|
41
|
+
`Steps`. For the `Source` column, render `Built-in` for a `source` field of `"builtin"` and
|
|
42
|
+
`Project` for `"project"`. For the `Steps` column, render each entry in that playbook's
|
|
43
|
+
`steps` array joined by `->`: a bare string step renders as itself; a StepObject step
|
|
44
|
+
renders its `skill` or `playbook` field value (whichever is present).
|
|
45
|
+
c. Halt this invocation after rendering the table — do not proceed to step 1.
|
|
46
|
+
|
|
47
|
+
1. **Resolve the id** — invoke `skills/jenga/scripts/load-playbooks.sh lookup "<id>"`
|
|
48
|
+
(`E53_S06_T02`), where `<id>` is this skill's argument. Branch on the returned `status` field:
|
|
49
|
+
|
|
50
|
+
- **`"not_found"`** — no playbook with that id exists. Tell the user plainly that no such
|
|
51
|
+
playbook was found. As a "did you mean" nudge, you may additionally invoke
|
|
52
|
+
`skills/jenga/scripts/load-playbooks.sh` (no arguments, full-catalog mode) and list the
|
|
53
|
+
available `id`s from its output — use your judgment on whether this is helpful given the
|
|
54
|
+
specific id the user typed. Halt this invocation; do not proceed to step 2.
|
|
55
|
+
- **`"invalid"`** — a file for that id exists but failed load-time validation. Report the
|
|
56
|
+
`reason` field to the user **verbatim** — never a generic "not found" message, since this is
|
|
57
|
+
a materially different situation from `not_found` (the story's explicit distinguishing
|
|
58
|
+
requirement, `E53_S06_T02`). Halt this invocation; do not proceed to step 2.
|
|
59
|
+
- **`"valid"`** — continue to step 2, using the returned `playbook` object's `id`, `name`, and
|
|
60
|
+
`steps` fields. This object has the exact same field shape as one entry from
|
|
61
|
+
`load-playbooks.sh`'s full-catalog output — the same shape `match-playbook.sh`'s
|
|
62
|
+
`playbook_match` result carries `id`/`name`/`steps` in, for `/jenga`'s Natural-language
|
|
63
|
+
branch step 5.
|
|
64
|
+
|
|
65
|
+
2. **Confirm and execute the chain** — follow `skills/jenga/SKILL.md`'s Natural-language branch
|
|
66
|
+
**step 5, sub-steps a through e, verbatim** (conditional/origin metadata resolution; render and
|
|
67
|
+
confirm the chain via `render-playbook-confirmation.sh`; the reply loop; sequential-runner
|
|
68
|
+
`init`; the execute-in-a-loop procedure covering skip evaluation, `forward_from`/`resolve`
|
|
69
|
+
resolution (`E53_S06_T01`), invocation, `advance`, and halt handling) exactly as written there
|
|
70
|
+
— do not duplicate that prose here. Use the `id`/`name`/`steps` resolved in step 1 above
|
|
71
|
+
wherever that section refers to `match-playbook.sh`'s `playbook_id`/`name`/`steps` output; every
|
|
72
|
+
other detail (including how `forward_from`, `resolve`, conditionals, and composed/nested steps
|
|
73
|
+
are handled) is identical, with no special-casing for this direct-invocation entry point.
|
|
74
|
+
|
|
75
|
+
The one framing difference: step 5b's confirmation prompt need not (and should not) present
|
|
76
|
+
this as a *proposal* the user might not have expected — they named this playbook explicitly by
|
|
77
|
+
id. Otherwise render, confirm, and execute exactly as that section already does.
|
|
78
|
+
|
|
79
|
+
3. **On a `complete` or `halted` result** (per step 5e-v/5e-vi), report exactly as that section
|
|
80
|
+
already specifies. This skill does not continue into any further phase — there is no `/jenga`
|
|
81
|
+
Phase 1-4 to fall into here, since this is a direct entry point, not `/jenga` itself.
|
|
82
|
+
|
|
83
|
+
## Edge Cases
|
|
84
|
+
|
|
85
|
+
- **The looked-up playbook contains a `resolve` step or composed/nested steps** — handled
|
|
86
|
+
identically to the natural-language path; no special-casing exists or is ever needed here (per
|
|
87
|
+
story `E53_S06`'s fifth Acceptance Criterion).
|
|
88
|
+
- **The user cancels at the chain confirmation step (step 5c)** — identical posture to
|
|
89
|
+
`/jenga`'s own playbook-confirmation cancellation: halt immediately after relaying the
|
|
90
|
+
cancellation acknowledgement, with no step of the chain executed.
|
|
91
|
+
- **`load-playbooks.sh lookup` itself fails unexpectedly (exit code 2, usage/setup error)** — this
|
|
92
|
+
is an environment/setup problem, not a normal `not_found`/`invalid` result; surface the script's
|
|
93
|
+
stderr output to the user rather than treating it as either playbook-lookup outcome.
|