@jenga-ai/agent 3.4.0 → 3.6.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 +85 -78
- package/agents/developer.md +1 -1
- package/agents/scrum-master.md +20 -2
- package/agents/tester.md +3 -3
- package/hooks/on_session_end.sh +5 -5
- package/lib/generate-agent-context.js +2 -2
- package/lib/generate-copilot-hooks.js +1 -1
- package/lib/generate-skill-allow-list.js +37 -3
- package/lib/mirror.js +1 -1
- package/lib/postinstall-manifest.js +1 -1
- package/lib/skill-allow-list.json +2 -2
- package/mcp/help/index.js +8 -17
- package/mcp/help/scan.js +73 -0
- package/package.json +6 -1
- package/project/app/api/parsers/knowledge-graph.js +100 -9
- package/project/app/api/routes/health.js +36 -0
- package/project/app/api/scripts/capture-snapshot.js +9 -6
- package/project/app/ui/dist/assets/{index-CdK3Qrep.css → index-BVR_7Owg.css} +1 -1
- package/project/app/ui/dist/assets/index-CtU2xLQm.js +104 -0
- package/project/app/ui/dist/index.html +2 -2
- package/project/app/ui/package.json +4 -0
- package/project/app/ui/scripts/build-snapshot-html.cjs +63 -2
- package/scripts/acquire-concurrency-slot.sh +1 -1
- package/scripts/apply-j-prefix.sh +46 -5
- package/scripts/audit-twin-divergence.sh +73 -5
- package/scripts/build-pages-site.sh +1 -1
- package/scripts/check-public-playbook-steps.sh +158 -52
- package/scripts/check-publicignore-match.sh +2 -2
- package/scripts/compute-deploy-reconcile.sh +5 -5
- package/scripts/delete-bare-skill-dirs.sh +330 -0
- package/scripts/generate-legacy-shipped-paths.js +2 -2
- package/scripts/idea_manager.sh +258 -3
- package/scripts/mark-deployed.sh +2 -2
- package/scripts/populate-knowledge-graph.entity-resolution.test.js +254 -0
- package/scripts/populate-knowledge-graph.js +213 -5
- package/scripts/populate-knowledge-graph.staleness.test.js +130 -0
- package/scripts/postinstall.js +1 -1
- package/scripts/repoint-skill-refs.sh +539 -0
- package/scripts/todo_manager.sh +1 -1
- package/scripts/verify-legacy-seed-reconcile.sh +10 -10
- package/scripts/verify-postinstall-reconcile.sh +7 -7
- package/scripts/write-context-digest.sh +1 -1
- package/skills/j-clearify/SKILL.md +2 -2
- package/skills/j-close-story/scripts/check-privatized.sh +4 -4
- package/skills/j-distribute/CONFIG_SCHEMA.md +82 -5
- package/skills/j-do/SKILL.md +101 -17
- package/skills/j-doc-sync/SKILL.md +1 -0
- package/skills/j-gitignore/SKILL.md +157 -0
- package/skills/j-gitignore/assets/jenga-paths.txt +50 -0
- package/skills/j-gitignore/scripts/_catalog.sh +105 -0
- package/skills/j-gitignore/scripts/audit-gitignore.sh +194 -0
- package/skills/j-gitignore/scripts/repair-gitignore.sh +226 -0
- package/skills/j-gitignore/scripts/untrack-jenga-files.sh +210 -0
- package/skills/j-idea/SKILL.md +78 -6
- package/skills/j-idea/assets/idea_template.md +1 -1
- package/skills/j-improve/SKILL.md +1 -1
- package/skills/j-init/SKILL.md +53 -14
- package/skills/j-init/assets/.gitignore_template +1 -2
- package/skills/j-init/assets/scope-thresholds_template.json +5 -2
- package/skills/j-init/scripts/apply-scaffold-visibility.sh +192 -0
- package/skills/j-init/scripts/init.sh +22 -8
- package/skills/j-playbook/SKILL.md +1 -1
- package/skills/j-publish/SKILL.md +1 -1
- package/skills/j-publish/adapters/npm-ci.md +6 -1
- package/skills/j-publish/adapters/npm.md +1 -1
- package/skills/j-publish/scripts/generate_release_notes.sh +1 -1
- package/skills/j-publish/scripts/npm_stage_inspect.sh +61 -0
- package/skills/j-reconcile/SKILL.md +2 -2
- package/skills/j-reconcile/scripts/detect-unlinked-code.sh +11 -11
- package/skills/j-redo/SKILL.md +1 -1
- package/skills/j-skillify/assets/init-new/assets/.gitignore_template +1 -2
- package/skills/j-spinoff/SKILL.md +1 -1
- package/skills/j-status/SKILL.md +15 -0
- package/skills/j-todo/SKILL.md +3 -1
- package/skills/j-uncharted/SKILL.md +55 -8
- package/skills/j-uncharted/assets/NODE_QUESTION_TEMPLATE.md +69 -0
- package/skills/j-uncharted/scripts/detect-dependencies.sh +1 -1
- package/skills/j-uncharted/scripts/detect-tests.sh +1 -1
- package/skills/j-uncharted/scripts/elicitation-state.sh +46 -8
- package/skills/j-uncharted/scripts/validate-proposed-items.sh +1 -1
- package/skills/j-wtf/SKILL.md +1 -1
- package/skills/jenga/SKILL.md +43 -9
- package/skills/jenga/playbooks/board-hygiene.json +32 -0
- package/skills/jenga/playbooks/schema.json +73 -6
- package/skills/jenga/playbooks/understand-then-commit.json +19 -0
- package/skills/jenga/scripts/load-nl-catalog.sh +1 -1
- package/skills/jenga/scripts/load-playbooks.sh +23 -11
- package/skills/jenga/scripts/match-playbook.sh +1 -1
- package/templates/SCRUM_BOARD_SCHEMA.md +14 -1
- package/templates/SKILL_TEMPLATE.md +12 -0
- package/templates/permission-levels/level-4-elevated.json +1 -1
- package/templates/permission-levels/level-5-unrestricted.json +1 -1
- package/templates/playbook-types.json +34 -6
- package/project/app/ui/dist/assets/index-7fj-vllY.js +0 -104
- package/scripts/generate-j-alias.sh +0 -333
- package/skills/j-dev-done/SKILL.md +0 -53
- package/skills/j-dev-done/scripts/classify-commit-outcome.sh +0 -114
|
@@ -4,6 +4,7 @@ set -euo pipefail
|
|
|
4
4
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
5
|
ASSETS_DIR="$SCRIPT_DIR/../assets"
|
|
6
6
|
VISIBILITY_SCRIPT="$SCRIPT_DIR/apply-project-visibility.sh"
|
|
7
|
+
SCAFFOLD_VISIBILITY_SCRIPT="$SCRIPT_DIR/apply-scaffold-visibility.sh"
|
|
7
8
|
|
|
8
9
|
# ─── Resolve the package root that owns templates/ and lib/ ──────────────────
|
|
9
10
|
# postinstall.js mirrors only skills/ and agents/ into .claude/ and .agents/ —
|
|
@@ -22,23 +23,33 @@ else
|
|
|
22
23
|
exit 1
|
|
23
24
|
fi
|
|
24
25
|
|
|
25
|
-
# ─── 0. Resolve project_files_visibility
|
|
26
|
+
# ─── 0. Resolve project_files_visibility and scaffold_visibility ─────────────
|
|
26
27
|
# Defaults to `visible` — the only value that touches nothing on disk — so an
|
|
27
28
|
# unattended run can never silently relocate directories or edit .gitignore.
|
|
29
|
+
# project_files_visibility covers the project/ working tree (board, todo.md,
|
|
30
|
+
# queue/, rapports/, logs/). scaffold_visibility is a distinct, independent
|
|
31
|
+
# flag (E31_S07_T01, ported here in E31_S07_T03) covering the distributed
|
|
32
|
+
# .claude/.agents framework scaffold — kept separate per
|
|
33
|
+
# skills/j-distribute/CONFIG_SCHEMA.md's "Scaffold visibility" section, rather
|
|
34
|
+
# than folded into project_files_visibility's existing enum.
|
|
28
35
|
VISIBILITY="${JENGA_PROJECT_FILES_VISIBILITY:-visible}"
|
|
36
|
+
SCAFFOLD_VISIBILITY="${JENGA_SCAFFOLD_VISIBILITY:-visible}"
|
|
29
37
|
|
|
30
38
|
while [[ $# -gt 0 ]]; do
|
|
31
39
|
case "$1" in
|
|
32
40
|
--visibility) VISIBILITY="${2:-}"; shift 2 ;;
|
|
33
41
|
--visibility=*) VISIBILITY="${1#*=}"; shift ;;
|
|
42
|
+
--scaffold-visibility) SCAFFOLD_VISIBILITY="${2:-}"; shift 2 ;;
|
|
43
|
+
--scaffold-visibility=*) SCAFFOLD_VISIBILITY="${1#*=}"; shift ;;
|
|
34
44
|
*) echo "Unknown argument: $1" >&2
|
|
35
|
-
echo "Usage: $(basename "$0") [--visibility <visible|ignored>]" >&2
|
|
45
|
+
echo "Usage: $(basename "$0") [--visibility <visible|ignored>] [--scaffold-visibility <visible|ignored>]" >&2
|
|
36
46
|
exit 1 ;;
|
|
37
47
|
esac
|
|
38
48
|
done
|
|
39
49
|
|
|
40
50
|
# Validate before scaffolding so a typo cannot leave a half-initialised project.
|
|
41
51
|
bash "$VISIBILITY_SCRIPT" --check-only "$VISIBILITY"
|
|
52
|
+
bash "$SCAFFOLD_VISIBILITY_SCRIPT" --check-only "$SCAFFOLD_VISIBILITY"
|
|
42
53
|
|
|
43
54
|
# ─── 1. Initialize git repository ────────────────────────────────────────────
|
|
44
55
|
echo "→ Initializing git repository..."
|
|
@@ -68,7 +79,7 @@ echo "→ Copying test-config.json from template..."
|
|
|
68
79
|
cp "$ASSETS_DIR/test-config_template.json" project/configs/test-config.json
|
|
69
80
|
|
|
70
81
|
# ─── 6.5. Create project/configs/scope-thresholds.json ───────────────────────
|
|
71
|
-
# Consumed by skills/jenga (Phase 0) and skills/do (Step 0); both halt if it's
|
|
82
|
+
# Consumed by skills/jenga (Phase 0) and skills/j-do (Step 0); both halt if it's
|
|
72
83
|
# missing, so it must exist immediately after scaffold.
|
|
73
84
|
echo "→ Copying scope-thresholds.json from template..."
|
|
74
85
|
cp "$ASSETS_DIR/scope-thresholds_template.json" project/configs/scope-thresholds.json
|
|
@@ -82,7 +93,7 @@ echo "→ Creating events.json..."
|
|
|
82
93
|
echo '[]' > project/logs/events.json
|
|
83
94
|
|
|
84
95
|
# ─── 8.5. Create project/knowledge-graph/{STUB_SCHEMA.md,graph.json} ─────────
|
|
85
|
-
# Consumed by skills/uncharted's conversational elicitation flow (`onboard`,
|
|
96
|
+
# Consumed by skills/j-uncharted's conversational elicitation flow (`onboard`,
|
|
86
97
|
# `segment --mode investigate`), which writes coarse graph nodes/edges to
|
|
87
98
|
# graph.json per the stub schema — both must exist before that flow's first
|
|
88
99
|
# write, per templates/KNOWLEDGE_GRAPH_STUB_SCHEMA_TEMPLATE.md's own header
|
|
@@ -101,11 +112,14 @@ cp "$ASSETS_DIR/strategy_stub_template.md" docs/STRATEGY.md
|
|
|
101
112
|
echo "→ Creating CHANGELOG.md from template..."
|
|
102
113
|
cp "$PKG_ROOT/templates/CHANGELOG_TEMPLATE.md" CHANGELOG.md
|
|
103
114
|
|
|
104
|
-
# ─── 11. Apply project_files_visibility
|
|
105
|
-
#
|
|
106
|
-
# initial commit
|
|
115
|
+
# ─── 11. Apply project_files_visibility and scaffold_visibility ─────────────
|
|
116
|
+
# Both run before the commit so any resulting .gitignore entries (ignored)
|
|
117
|
+
# are captured in the initial commit rather than left for the user to notice
|
|
118
|
+
# after the fact.
|
|
107
119
|
echo "→ Applying project files visibility ($VISIBILITY)..."
|
|
108
120
|
bash "$VISIBILITY_SCRIPT" "$VISIBILITY" "$PWD"
|
|
121
|
+
echo "→ Applying scaffold visibility ($SCAFFOLD_VISIBILITY)..."
|
|
122
|
+
bash "$SCAFFOLD_VISIBILITY_SCRIPT" "$SCAFFOLD_VISIBILITY" "$PWD"
|
|
109
123
|
|
|
110
124
|
# ─── 12. Generate CLAUDE.md / AGENTS.md ──────────────────────────────────────
|
|
111
125
|
# Unconditional — never gated on agentTarget (E41_S04). Applies the J-
|
|
@@ -124,4 +138,4 @@ git add -A
|
|
|
124
138
|
git commit -m "init: scaffold project structure and workflow config"
|
|
125
139
|
|
|
126
140
|
echo ""
|
|
127
|
-
echo "✓ Project scaffold complete."
|
|
141
|
+
echo "✓ Project scaffold complete."
|
|
@@ -265,7 +265,7 @@ Release-note rules:
|
|
|
265
265
|
- **`--output <path>`:** writes a standalone, disposable draft to that path instead (the pre-E36 behavior) — `CHANGELOG.md` is not touched in this mode.
|
|
266
266
|
- If no prior ledger-backed tag exists, a `--output` draft includes `> First release — full history included`; the standing `CHANGELOG.md` merge mode has no equivalent banner (it just merges full history into `[Unreleased]` like any other run).
|
|
267
267
|
- Scrum-board enrichment is best-effort only; missing or unreadable board data never fails the command.
|
|
268
|
-
- **`.publicignore` filtering:** when a repo-root `.publicignore` exists (the blocklist `/mirror-public` also reads), a candidate commit — or a completed task's associated commit(s), matched via the `task(E##_S##_T##):` commit-message convention — is dropped entirely when every changed file it touches is covered by that blocklist. A commit touching a mix of blocked and unblocked files is still logged normally; only full coverage excludes an entry. This exists because `CHANGELOG.md` itself is not blocklisted and ships to the public mirror, so an unfiltered entry referencing a private-only path (e.g. `project/board/`) would leak. Absent `.publicignore`, this is a strict no-op — unchanged from pre-E36_S02_T02 behavior. Matching reuses `skills/mirror-public/scripts/mirror.sh`'s `rsync --exclude-from` evaluation rather than a separate glob implementation, so a path classified "blocked" by `/mirror-public --dry-run` is classified "blocked" here too.
|
|
268
|
+
- **`.publicignore` filtering:** when a repo-root `.publicignore` exists (the blocklist `/mirror-public` also reads), a candidate commit — or a completed task's associated commit(s), matched via the `task(E##_S##_T##):` commit-message convention — is dropped entirely when every changed file it touches is covered by that blocklist. A commit touching a mix of blocked and unblocked files is still logged normally; only full coverage excludes an entry. This exists because `CHANGELOG.md` itself is not blocklisted and ships to the public mirror, so an unfiltered entry referencing a private-only path (e.g. `project/board/`) would leak. Absent `.publicignore`, this is a strict no-op — unchanged from pre-E36_S02_T02 behavior. Matching reuses `skills/j-mirror-public/scripts/mirror.sh`'s `rsync --exclude-from` evaluation rather than a separate glob implementation, so a path classified "blocked" by `/mirror-public --dry-run` is classified "blocked" here too.
|
|
269
269
|
|
|
270
270
|
## Ledger & Tagging
|
|
271
271
|
|
|
@@ -239,7 +239,12 @@ automated and human halves of the flow:
|
|
|
239
239
|
relies on the automated CI-staged test result) and then
|
|
240
240
|
`bash skills/j-publish/scripts/npm_stage_inspect.sh approve <stage-id> --otp <otp>`
|
|
241
241
|
from their own machine. `reject` (same script) is available to either
|
|
242
|
-
side to discard a staged candidate.
|
|
242
|
+
side to discard a staged candidate. On success, `approve` also generates
|
|
243
|
+
release notes into `CHANGELOG.md`'s `[Unreleased]` section and finalizes
|
|
244
|
+
it with the approved version — the same behavior described in
|
|
245
|
+
`adapters/npm.md`'s Staged Publishing section, shared by both target
|
|
246
|
+
types since it lives in `npm_stage_inspect.sh` itself, not in either
|
|
247
|
+
target-type-specific pipeline (E22_S09_T08).
|
|
243
248
|
- **Stage-id capture reads the CI run's own log, not a local `npm stage
|
|
244
249
|
list` call.** Because the actual `npm stage publish --provenance` call
|
|
245
250
|
runs inside the dispatched Actions run, the local `npm_stage_pipeline.sh`
|
|
@@ -119,7 +119,7 @@ becomes visible on the registry. See `skills/j-publish/SKILL.md`'s
|
|
|
119
119
|
|
|
120
120
|
- `bash skills/j-publish/scripts/npm_stage_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive] [--otp <otp>]` runs validate → gates → pack → stage → capture → ledger and writes a `staged` ledger entry.
|
|
121
121
|
- `bash skills/j-publish/scripts/npm_stage_inspect.sh test <stage-id>` installs the staged tarball into an isolated scratch directory and smoke-tests it, writing a `stage_tested` ledger entry.
|
|
122
|
-
- `bash skills/j-publish/scripts/npm_stage_inspect.sh approve <stage-id>` requires an npm 2FA one-time password and refuses without a passing `test` on record unless `--force <reason>` is given.
|
|
122
|
+
- `bash skills/j-publish/scripts/npm_stage_inspect.sh approve <stage-id>` requires an npm 2FA one-time password and refuses without a passing `test` on record unless `--force <reason>` is given. On a successful `npm stage approve`, it also generates release notes into `CHANGELOG.md`'s `[Unreleased]` section and finalizes that section with the approved version — the same `generate_release_notes.sh` + `finalize_changelog.sh` pair `/publish deploy` runs, reused rather than duplicated (E22_S09_T08). `--dry-run` skips this (it exits before the real approve call runs at all); a failed `npm stage approve` skips it too (no changelog write on a failed approve); `--force` still runs it — `--force` only bypasses the passing-test requirement, not the changelog step.
|
|
123
123
|
- `bash skills/j-publish/scripts/npm_stage_inspect.sh reject <stage-id>` discards the staged version.
|
|
124
124
|
|
|
125
125
|
Same registry-existence precondition as a normal `npm` publish: staged
|
|
@@ -76,7 +76,7 @@ git rev-parse --verify "$TO_REF" >/dev/null 2>&1 || {
|
|
|
76
76
|
# Absence of .publicignore is a strict no-op — PI_ACTIVE stays 0 and every
|
|
77
77
|
# _pi_* helper below fails open immediately.
|
|
78
78
|
#
|
|
79
|
-
# Matching semantics are borrowed from skills/mirror-public/scripts/mirror.sh
|
|
79
|
+
# Matching semantics are borrowed from skills/j-mirror-public/scripts/mirror.sh
|
|
80
80
|
# rather than reimplemented: that script's compute_ship_list asks rsync
|
|
81
81
|
# itself "what would transfer past --exclude-from=.publicignore?" and that
|
|
82
82
|
# is the single source of truth /mirror-public --dry-run reports as
|
|
@@ -86,6 +86,8 @@ fi
|
|
|
86
86
|
source "${SCRIPT_DIR}/publish_common.sh"
|
|
87
87
|
|
|
88
88
|
WRITE_LEDGER_SCRIPT="${SCRIPT_DIR}/write_ledger_entry.sh"
|
|
89
|
+
GENERATE_RELEASE_NOTES_SCRIPT="${SCRIPT_DIR}/generate_release_notes.sh"
|
|
90
|
+
FINALIZE_CHANGELOG_SCRIPT="${SCRIPT_DIR}/finalize_changelog.sh"
|
|
89
91
|
|
|
90
92
|
# ---------------------------------------------------------------------------
|
|
91
93
|
# OTP tracing guard — MUST run at the top level, before `main "$@"` is ever
|
|
@@ -397,6 +399,53 @@ _write_stage_tested_ledger() {
|
|
|
397
399
|
"${cmd[@]}" || log_warn "failed to write 'stage_tested' ledger entry for stage ${stage_id} (result: ${result})"
|
|
398
400
|
}
|
|
399
401
|
|
|
402
|
+
# _finalize_stage_changelog <target_name> <config_path> <package_version>
|
|
403
|
+
#
|
|
404
|
+
# `approve`'s equivalent of publish_deploy.sh's generate_release_notes() +
|
|
405
|
+
# finalize_changelog() pair (E22_S09_T08) — reused verbatim, not
|
|
406
|
+
# reimplemented. Only ever called AFTER a real `npm stage approve` call has
|
|
407
|
+
# already succeeded, so a failure here never masks (nor is masked by) the
|
|
408
|
+
# approve result itself; the caller decides how to report it.
|
|
409
|
+
#
|
|
410
|
+
# Mirrors publish_deploy.sh's resolve_last_tag(): resolves the last publish
|
|
411
|
+
# tag from the ledger via publish_resolve_last_publish_tag, never a
|
|
412
|
+
# hardcoded/guessed tag. Passes --from-tag only when a tag was actually
|
|
413
|
+
# resolved, and passes the config path positional only when one is
|
|
414
|
+
# resolved -- generate_release_notes.sh treats an omitted config the same
|
|
415
|
+
# way it treats an unresolved one internally (falls back to its own
|
|
416
|
+
# defaults via publish_resolve_history_file "").
|
|
417
|
+
#
|
|
418
|
+
# Uses the already-resolved package_version (from the stage's own `npm
|
|
419
|
+
# stage view` output) for finalize_changelog.sh, per the task's acceptance
|
|
420
|
+
# criteria -- never a re-derived version.
|
|
421
|
+
_finalize_stage_changelog() {
|
|
422
|
+
local target_name="$1" config_path="$2" package_version="$3"
|
|
423
|
+
local history_file last_tag
|
|
424
|
+
local -a notes_cmd=(bash "${GENERATE_RELEASE_NOTES_SCRIPT}" --target "${target_name}")
|
|
425
|
+
|
|
426
|
+
history_file="$(publish_resolve_history_file "${config_path}")"
|
|
427
|
+
last_tag="$(publish_resolve_last_publish_tag "${history_file}" HEAD 2>/dev/null || true)"
|
|
428
|
+
[[ -n "${last_tag}" ]] && notes_cmd+=(--from-tag "${last_tag}")
|
|
429
|
+
[[ -n "${config_path}" ]] && notes_cmd+=("${config_path}")
|
|
430
|
+
|
|
431
|
+
if ! "${notes_cmd[@]}"; then
|
|
432
|
+
log_warn "failed to generate release notes for stage approve (target: ${target_name})"
|
|
433
|
+
return 1
|
|
434
|
+
fi
|
|
435
|
+
|
|
436
|
+
if [[ -z "${package_version}" ]]; then
|
|
437
|
+
log_warn "no package version resolved from stage view — skipping CHANGELOG.md finalization"
|
|
438
|
+
return 1
|
|
439
|
+
fi
|
|
440
|
+
|
|
441
|
+
if ! bash "${FINALIZE_CHANGELOG_SCRIPT}" "${package_version}" "${REPO_ROOT}/CHANGELOG.md"; then
|
|
442
|
+
log_warn "failed to finalize CHANGELOG.md for stage approve (version: ${package_version})"
|
|
443
|
+
return 1
|
|
444
|
+
fi
|
|
445
|
+
|
|
446
|
+
return 0
|
|
447
|
+
}
|
|
448
|
+
|
|
400
449
|
# ---------------------------------------------------------------------------
|
|
401
450
|
# list [<package-spec>] [--config <path>] [--dry-run] [--json]
|
|
402
451
|
# ---------------------------------------------------------------------------
|
|
@@ -772,6 +821,18 @@ cmd_approve() {
|
|
|
772
821
|
exit "${EXIT_OP_FAILED}"
|
|
773
822
|
fi
|
|
774
823
|
|
|
824
|
+
# Generate release notes into CHANGELOG.md's [Unreleased] section and
|
|
825
|
+
# stamp it with the approved version — mirroring publish_deploy.sh's own
|
|
826
|
+
# generate_release_notes() + finalize_changelog() pair (E22_S09_T08).
|
|
827
|
+
# Only reached after a confirmed successful `npm stage approve` above, so
|
|
828
|
+
# a failed approve never gets a changelog write, and --force only ever
|
|
829
|
+
# affects the test-interlock check earlier in this function — this step
|
|
830
|
+
# runs identically on both the normal and --force paths, no divergent
|
|
831
|
+
# logic. Never reached at all under --dry-run, which already exited
|
|
832
|
+
# earlier, before the real approve call.
|
|
833
|
+
_finalize_stage_changelog "${target_name}" "${config_path}" "${package_version}" \
|
|
834
|
+
|| log_warn "stage ${stage_id} was approved, but CHANGELOG.md was not updated — see warnings above"
|
|
835
|
+
|
|
775
836
|
local -a ledger_cmd=(bash "${WRITE_LEDGER_SCRIPT}" "${target_name}" "${target_type}" approved "" --stage-id "${stage_id}")
|
|
776
837
|
[[ -n "${config_path}" ]] && ledger_cmd+=(--config "${config_path}")
|
|
777
838
|
[[ -n "${package_version}" ]] && ledger_cmd+=(--version "${package_version}")
|
|
@@ -3,7 +3,7 @@ name: j.reconcile
|
|
|
3
3
|
description: Polyfill alias of the reconcile skill under a collision-safe directory name. Identical behavior to /reconcile — Reconcile the scrum board with actual implementation state. Cross-checks every task's board status against git history and worktrees, merges orphaned worktree branches, demotes unimplemented "Done" items, promotes secretly-implemented items, flags code with no board provenance and offers /uncharted segment for it, and cleans stale entries from todo.md. Use when the board feels out of sync, after a big merge session, when tasks were completed outside the normal workflow, or when todo.md has grown stale. Trigger on phrases like "sync the board", "clean up the board", "reconcile", "board is out of date", "todo is stale", or "check what's really done". Use when the bare /reconcile form is shadowed by another tool's own built-in command of the same name.
|
|
4
4
|
metadata:
|
|
5
5
|
prefered_agent: scrum-master
|
|
6
|
-
output_types:
|
|
6
|
+
output_types: id_list
|
|
7
7
|
keywords:
|
|
8
8
|
- j-reconcile
|
|
9
9
|
- polyfill
|
|
@@ -200,7 +200,7 @@ older conventions still present in this repo's history (`E04_S01: ...` and
|
|
|
200
200
|
`feat(train): implement E01_S05 - ...`).
|
|
201
201
|
|
|
202
202
|
The script reuses the board-linkage check from
|
|
203
|
-
`skills/uncharted/scripts/resolve-segment-target.sh` through its batch interface. Do not
|
|
203
|
+
`skills/j-uncharted/scripts/resolve-segment-target.sh` through its batch interface. Do not
|
|
204
204
|
re-derive linkage yourself, and do not substitute a `grep` over `project/board/` if the script
|
|
205
205
|
fails — a second answer to "is this path on the board" is what that reuse exists to prevent.
|
|
206
206
|
If the script exits non-zero, report the failure in the reconcile report and continue to phase 6.
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
# SIGNAL A IS BORROWED, NOT REBUILT
|
|
38
38
|
# ---------------------------------------------------------------------------
|
|
39
39
|
# The board-linkage question is answered by
|
|
40
|
-
# `skills/uncharted/scripts/resolve-segment-target.sh` (E40_S02_T01) through its
|
|
40
|
+
# `skills/j-uncharted/scripts/resolve-segment-target.sh` (E40_S02_T01) through its
|
|
41
41
|
# documented batch interface:
|
|
42
42
|
#
|
|
43
43
|
# git ls-files | resolve-segment-target.sh --paths-from -
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
#
|
|
71
71
|
# This is deliberate. `run-engine.sh` currently renders the out-of-repo
|
|
72
72
|
# `not_checked` case as `unlinked` in its understanding document, which asserts
|
|
73
|
-
# a verified absence that was never verified. `skills/uncharted/SKILL.md` names
|
|
73
|
+
# a verified absence that was never verified. `skills/j-uncharted/SKILL.md` names
|
|
74
74
|
# Step 1 (`resolve-segment-target.sh`) authoritative on linkage where the two
|
|
75
75
|
# disagree, so this script passes the resolver's status through unchanged and
|
|
76
76
|
# does not repeat that conflation.
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
# Classifying files and then reporting directories would assert about a
|
|
105
105
|
# directory something that was only ever verified about its contents. Because
|
|
106
106
|
# the resolver's match is a path-boundary test, a board item naming
|
|
107
|
-
# `skills/convert/` links THAT DIRECTORY without linking
|
|
108
|
-
# `skills/convert/convert_cli.py`. Both facts are true, and the directory-level
|
|
107
|
+
# `skills/j-convert/` links THAT DIRECTORY without linking
|
|
108
|
+
# `skills/j-convert/convert_cli.py`. Both facts are true, and the directory-level
|
|
109
109
|
# one is what decides whether a segment is worth investigating -- offering
|
|
110
110
|
# `/uncharted segment` there would duplicate a board item that already exists.
|
|
111
111
|
#
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
# MIRROR SPELLINGS. Per CLAUDE.md the canonical file lives in the root tree and
|
|
126
126
|
# `.agents/`, `.claude/` are generated build outputs -- but older board items
|
|
127
127
|
# were often written against the mirror path. E17_S05 owns `/reconcile-origin`
|
|
128
|
-
# and names it `.agents/skills/reconcile-origin/SKILL.md`, so a match on the
|
|
128
|
+
# and names it `.agents/skills/j-reconcile-origin/SKILL.md`, so a match on the
|
|
129
129
|
# root path alone misses a board item that plainly owns the directory. Each
|
|
130
130
|
# group directory is therefore asked about under its own name and under both
|
|
131
131
|
# mirror prefixes, and `directory_linkage.matched_as` records which spelling
|
|
@@ -187,14 +187,14 @@
|
|
|
187
187
|
# "not_checked_paths": N,
|
|
188
188
|
# "groups": N, "covered_groups": N },
|
|
189
189
|
# "groups": [
|
|
190
|
-
# { "directory": "skills/skillify",
|
|
190
|
+
# { "directory": "skills/j-skillify",
|
|
191
191
|
# "unlinked_count": N, // files keyed to THIS group
|
|
192
192
|
# "subtree_candidates": N, // all candidates under the directory
|
|
193
193
|
# "subtree_unlinked": N, // all unlinked under the directory
|
|
194
194
|
# "fully_unlinked": true,
|
|
195
195
|
# "directory_linkage": { "status": "unlinked", "reason": "...",
|
|
196
196
|
# "items": [], "match_count": 0,
|
|
197
|
-
# "matched_as": "skills/skillify" },
|
|
197
|
+
# "matched_as": "skills/j-skillify" },
|
|
198
198
|
# "files": ["..."], // capped by --limit
|
|
199
199
|
# "files_truncated": N }
|
|
200
200
|
# ],
|
|
@@ -295,7 +295,7 @@ REPO_ROOT=$(cd -- "$REPO_ROOT" && pwd -P)
|
|
|
295
295
|
[ -n "$RESOLVER" ] || RESOLVER="$SCRIPT_DIR/../../uncharted/scripts/resolve-segment-target.sh"
|
|
296
296
|
[ -f "$RESOLVER" ] || die 4 "board-linkage checker not found: $RESOLVER
|
|
297
297
|
This script deliberately has no fallback implementation -- see the header. Restore
|
|
298
|
-
skills/uncharted/scripts/resolve-segment-target.sh or pass --resolver <path>."
|
|
298
|
+
skills/j-uncharted/scripts/resolve-segment-target.sh or pass --resolver <path>."
|
|
299
299
|
[ -x "$RESOLVER" ] || die 4 "board-linkage checker is not executable: $RESOLVER"
|
|
300
300
|
RESOLVER=$(cd -- "$(dirname -- "$RESOLVER")" && pwd -P)/$(basename -- "$RESOLVER")
|
|
301
301
|
|
|
@@ -572,8 +572,8 @@ for path, status in sorted(status_of.items()):
|
|
|
572
572
|
# --- second pass: is the GROUP DIRECTORY itself on the board? ---------------------------------
|
|
573
573
|
# Reporting a directory while only ever having checked the files inside it asserts an absence
|
|
574
574
|
# that was never verified -- the same error this script is careful to avoid for `not_checked`.
|
|
575
|
-
# The resolver's match is a path-boundary test, so a board item naming `skills/convert/` links
|
|
576
|
-
# that directory without linking `skills/convert/convert_cli.py`. Both facts are true and the
|
|
575
|
+
# The resolver's match is a path-boundary test, so a board item naming `skills/j-convert/` links
|
|
576
|
+
# that directory without linking `skills/j-convert/convert_cli.py`. Both facts are true and the
|
|
577
577
|
# directory-level one is the one that decides whether a segment is worth investigating.
|
|
578
578
|
#
|
|
579
579
|
# Same borrowed checker, same batch interface, one extra call. No new linkage logic -- the only
|
|
@@ -582,7 +582,7 @@ for path, status in sorted(status_of.items()):
|
|
|
582
582
|
# MIRROR SPELLINGS. Per CLAUDE.md the canonical file lives in the root tree and `.agents/` and
|
|
583
583
|
# `.claude/` are generated build outputs, but plenty of older board items were written against
|
|
584
584
|
# the mirror path -- E17_S05 owns `/reconcile-origin` and names it as
|
|
585
|
-
# `.agents/skills/reconcile-origin/SKILL.md`. A boundary match on the root path alone therefore
|
|
585
|
+
# `.agents/skills/j-reconcile-origin/SKILL.md`. A boundary match on the root path alone therefore
|
|
586
586
|
# misses a board item that plainly owns the directory. So each directory is asked about under its
|
|
587
587
|
# own name and under both mirror prefixes, and a hit on any spelling is board provenance. This
|
|
588
588
|
# adds path spellings to the QUESTION; it does not add a second answer to it.
|
package/skills/j-redo/SKILL.md
CHANGED
|
@@ -60,7 +60,7 @@ Compare the user's redo description against the original implementation to deter
|
|
|
60
60
|
Summarise scope findings to the user in a brief list before continuing.
|
|
61
61
|
|
|
62
62
|
### 3. Plan the redo
|
|
63
|
-
Populate `skills/todo/assets/todo_handoff_template.md` with the following pre-collected context:
|
|
63
|
+
Populate `skills/j-todo/assets/todo_handoff_template.md` with the following pre-collected context:
|
|
64
64
|
- **Mission title**: a short name for the redo work
|
|
65
65
|
- **Goal / objective**: the redo objective — what is changing and the desired outcome
|
|
66
66
|
- **Affected files or scope**: code, tests, and documentation files identified in step 2
|
|
@@ -44,7 +44,7 @@ This file is generated/synced by `scripts/generate-j-alias.sh spinoff` from `ski
|
|
|
44
44
|
|
|
45
45
|
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 idea description.
|
|
46
46
|
|
|
47
|
-
5. **Save via `/idea`** — Populate `skills/idea/assets/idea_handoff_template.md` with the context collected so far:
|
|
47
|
+
5. **Save via `/idea`** — Populate `skills/j-idea/assets/idea_handoff_template.md` with the context collected so far:
|
|
48
48
|
- **Mission title**: the diverging topic name (as confirmed in step 1)
|
|
49
49
|
- **Goal / objective**: what the diverging topic aims to achieve
|
|
50
50
|
- **Affected files or scope**: any files or modules identified during the conversation
|
package/skills/j-status/SKILL.md
CHANGED
|
@@ -36,6 +36,21 @@ This file is generated/synced by `scripts/generate-j-alias.sh status` from `skil
|
|
|
36
36
|
|
|
37
37
|
6. **Check the queue** — If `project/queue/scrum_triggers.jsonl` is non-empty, note the number of pending triggers awaiting the scrum master.
|
|
38
38
|
|
|
39
|
+
6.5. **Run the deploy-reconcile pass** (`E51_S05`) before printing the summary — `/status` has no
|
|
40
|
+
`scripts/` directory of its own comparable to `/self-sync`'s, so invoke the shared pipeline
|
|
41
|
+
directly rather than adding a third skill-local wrapper script:
|
|
42
|
+
```
|
|
43
|
+
bash scripts/mark-deployed.sh
|
|
44
|
+
```
|
|
45
|
+
This defaults to invoking its own sibling `scripts/compute-deploy-reconcile.sh`, which
|
|
46
|
+
discovers any not-yet-reconciled `vX.Y.Z-stage`/`vX.Y.Z` tags on the public `jenga-npm` repo
|
|
47
|
+
(unauthenticated read — no credential required) and promotes matching `Publicized`/
|
|
48
|
+
`Deployed to Stage` tickets to `Deployed to Stage`/`Deployed to Prod` (writing
|
|
49
|
+
`date_deployed_prod` on a Prod promotion) by commit ancestry, before this skill re-scans the
|
|
50
|
+
board in steps 2-4 above. This step is **non-fatal**: a failure anywhere in the pipeline
|
|
51
|
+
(including an unreachable public repo) is logged as a warning only and never prevents `/status`
|
|
52
|
+
from printing whatever board state it already has, and never causes a non-zero exit.
|
|
53
|
+
|
|
39
54
|
7. **Print the summary** following the layout and icon conventions in `assets/output_format.md`.
|
|
40
55
|
|
|
41
56
|
8. If no epics exist, print: `No board items found. Run /pi-plan to define epics or /todo to add items.`
|
package/skills/j-todo/SKILL.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: j.todo
|
|
3
3
|
description: Polyfill alias of the todo skill under a collision-safe directory name. Identical behavior to /todo — 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. Use when the bare /todo form is shadowed by another tool's own built-in command of the same name.
|
|
4
|
+
output_types: id_list
|
|
5
|
+
input_types: id_list
|
|
4
6
|
keywords:
|
|
5
7
|
- todo
|
|
6
8
|
- add task
|
|
@@ -29,7 +31,7 @@ This file is generated/synced by `scripts/generate-j-alias.sh todo` from `skills
|
|
|
29
31
|
|
|
30
32
|
When `--trivial` is present, the mission is written as a **fully-formed task board file immediately** (not just a raw `todo.md` line deferred to `/do`'s own breakdown pass) with `execution_scope: inline` forced unconditionally — no threshold computation is consulted for the scope value itself. See step 4.5 below for the mechanics.
|
|
31
33
|
|
|
32
|
-
**Human-only override.** `--trivial` is invoked by a human typing `/todo --trivial ...` — it is never applied by the scrum-master to itself during autonomous story/epic breakdown elsewhere (e.g. `/jenga`'s Phase 0.5, or `/do`'s own scrum-master decomposition step in `skills/do/SKILL.md` step 3). Those paths keep using the normal heuristic-only `execution_scope` assignment documented in `agents/scrum-master.md`'s Execution Scope Assignment section, unmodified by this flag.
|
|
34
|
+
**Human-only override.** `--trivial` is invoked by a human typing `/todo --trivial ...` — it is never applied by the scrum-master to itself during autonomous story/epic breakdown elsewhere (e.g. `/jenga`'s Phase 0.5, or `/do`'s own scrum-master decomposition step in `skills/j-do/SKILL.md` step 3). Those paths keep using the normal heuristic-only `execution_scope` assignment documented in `agents/scrum-master.md`'s Execution Scope Assignment section, unmodified by this flag.
|
|
33
35
|
|
|
34
36
|
**Fallback on failure is out of scope here.** If a `--trivial`-forced inline run fails the smoke-harness or shows scope creep at dispatch time, `/do`'s own `--trivial` handling (a separate task, E32_S14_T02) is responsible for falling back to the full `task` pipeline — this skill only ever writes the initial forced-inline task.
|
|
35
37
|
|
|
@@ -168,6 +168,7 @@ For genuinely undocumented code, there is often no reliable human oracle to conf
|
|
|
168
168
|
|
|
169
169
|
- **The deterministic pipeline remains the tool of record for zero-oracle codebases.** `onboard --legacy` and `segment --mode delivery` never depend on anyone confirming intent — they ground everything in mechanical evidence (file structure, dependencies, test coverage) and say so explicitly under `Open Questions` when the evidence doesn't support a conclusion. When there is no one left who understands the code, reach for one of those, not the conversational flow.
|
|
170
170
|
- **When running the conversational flow, do not manufacture confidence.** If the user's answer is uncertain, hedged, or contradicts what discovery/Investigative Mode found, write the node honestly — do not round an uncertain answer up to a confirmed one. There is no schema field yet to tag confidence (the stub schema is intentionally minimal); until one exists, say so in the node's `description` text itself (e.g. "per the user, this module retries failed charges — unconfirmed against the code, which shows only a single retry attempt") rather than silently dropping the caveat.
|
|
171
|
+
- **`verification_depth: strict` is this guidance's concrete implementation, not a separate idea (E40_S06_T02).** When a candidate's Familiarity Check answer is `No` (Convergence Loop Step 1), Step 4's risk-weighted gating never lets an escalating finding round up to a false confirmation by asking the user to bless it — it auto-flags the node with exactly the hedged-`description` convention this bullet describes and converges it without a prompt. This bullet states the principle; Step 4's `strict` branch is what enforces it mechanically, so the two sections should be read as one mechanism, not two independently-arrived-at claims.
|
|
171
172
|
- **A confidently wrong answer is not detectable by this flow.** Corroboration against a second signal (commit history, existing docs, a second person) is the only mitigation, and it is not built here — this is the accepted residual risk, not a gap to engineer around mid-conversation.
|
|
172
173
|
|
|
173
174
|
### Directory Triage
|
|
@@ -213,10 +214,56 @@ Silence, a counter-question, or an ambiguous reply is not consent — re-ask, th
|
|
|
213
214
|
|
|
214
215
|
Runs once per surviving candidate (a subsystem, a named flow, a directory) after Directory Triage. This is the "propose understanding, ask the user to confirm or correct" cycle at the center of the redesign — and the one the scrutiny flagged as having no termination bound and no defense against confirmation fatigue. Both gaps are closed mechanically, not by agent discipline alone:
|
|
215
216
|
|
|
216
|
-
1. **
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
1. **Familiarity Check — once per candidate, before Investigative Mode dispatch.** Ask (per the Interaction Pattern in `CLAUDE.md` — numbered list, free-text last):
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
Are you familiar with this service/segment?
|
|
221
|
+
1. Yes
|
|
222
|
+
2. A little
|
|
223
|
+
3. No
|
|
224
|
+
4. Other (describe below)
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Silence, a counter-question, or an ambiguous reply is not consent — re-ask, the same convention used at every other confirmation gate in this skill. Map the answer to a `verification_depth` scoped to this candidate only — `Yes` → `shallow`, `A little` → `moderate`, `No` → `strict` — and persist it immediately, keyed by this candidate's node id, via `elicitation-state.sh`'s checkpoint mechanism (see Multi-Session Persistence below for the exact call and merge semantics):
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
printf '{"verification_depth": {"%s": "%s"}}' "<candidate-id>" "<shallow|moderate|strict>" \
|
|
231
|
+
| bash skills/j-uncharted/scripts/elicitation-state.sh checkpoint --id <elicitation-id> --json -
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Check before asking.** A candidate whose `verification_depth` is already present in the state file's `checkpoint.verification_depth` (per Multi-Session Persistence below) has already answered this — do not re-ask it, on a fresh session or otherwise.
|
|
235
|
+
|
|
236
|
+
This question operationalizes the Human-Oracle-Availability Limitation above — it is the mechanism for finding out, per candidate, how much weight the user's own confirmations should carry, rather than assuming a uniform level of trust for every candidate in one run. **`verification_depth` is read back and consumed by Step 4's risk-weighted gating below (`E40_S06_T02`)**, which branches its auto-accept/confirm/auto-flag behavior per depth. The fixed internal/external question template used whenever shallow/moderate gating does decide to prompt (Step 5) is `skills/j-uncharted/assets/NODE_QUESTION_TEMPLATE.md` (`E40_S06_T03`) — this step's job remains asking the question and making the answer durable for those steps to read.
|
|
237
|
+
2. **Dispatch Investigative Mode.** Per `agents/developer.md`'s and `agents/tester.md`'s Investigative Mode sections (E20_S08_T02), dispatch the developer to trace what the code actually does for the candidate, and the tester to trace what the test suite actually exercises and verifies for the same candidate — two distinct vantage points, not two names for the same read. Both are read-only, worktree-sandboxed, no commits, no board writes.
|
|
238
|
+
3. **Propose understanding.** From both traces, draft the candidate's coarse graph node(s)/edge(s) (per the stub schema) and a plain-language summary of what they represent.
|
|
239
|
+
4. **Risk-weighted gating — not every finding gets a prompt, and `verification_depth` (Step 1) decides how gating itself behaves, not just what counts as risky.** This is the fix for confirmation fatigue (solution assessment, Problem 6, Solution B — RECOMMENDED). The baseline escalation criteria — the three triggers that force an explicit confirmation — are unchanged from before `E40_S06`:
|
|
240
|
+
|
|
241
|
+
- **T1 — inference-dependent:** the node's description depends on an inference the traces don't fully support.
|
|
242
|
+
- **T2 — structurally central:** the node has many outgoing edges.
|
|
243
|
+
- **T3 — already-flagged uncertain:** the Human-Oracle-Availability Limitation above already flagged this finding as uncertain.
|
|
244
|
+
|
|
245
|
+
A finding tripping none of T1-T3 is **low-risk** and auto-accepts regardless of depth. A finding tripping any of T1-T3 is **escalating**, and what happens to it now branches on the current candidate's `verification_depth` (read from `checkpoint.verification_depth.<candidate-id>`, per Step 1):
|
|
246
|
+
|
|
247
|
+
- **`moderate` (the default, unchanged calibration)** — exactly today's behavior: every escalating finding (any of T1-T3) forces a confirm prompt (Step 5); every low-risk finding auto-accepts without a prompt. **Log every auto-accepted node** in the elicitation state's checkpoint data (see Multi-Session Persistence below) so the decision is auditable later, per that solution's own mitigation for "the scoring mechanism itself misjudges impact."
|
|
248
|
+
- **`shallow` (widened auto-accept)** — the concrete widening rule: **drop T2 (structurally central) as an escalation trigger.** A finding tripping T2 alone — structurally central, but not inference-dependent and not already flagged uncertain — is reclassified low-risk and auto-accepted (still logged, same as above) instead of escalating. T1 and T3 still force a confirm prompt exactly as under `moderate`; only the T2-alone case widens. This is the literal reading of "findings that would sit just below today's high-impact bar" from the task's own framing — a purely structural signal with no corroborating uncertainty is no longer, by itself, enough to interrupt the user.
|
|
249
|
+
- **`strict` (no confirm prompt for escalating findings, ever)** — a finding tripping any of T1-T3 is **never presented to the user**. Instead:
|
|
250
|
+
1. Write the node directly with a hedged, low-confidence `description`, reusing the exact hedging convention the Human-Oracle-Availability Limitation section already specifies (e.g. "unconfirmed — traces did not fully corroborate this," adapted to name the specific gap).
|
|
251
|
+
2. Call `elicitation-state.sh converge` directly — **do not call `elicitation-state.sh turn` for this node.** No confirmation round is spent; the node goes straight from "proposed" to "converged," never "pending":
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
bash skills/j-uncharted/scripts/elicitation-state.sh converge --id <elicitation-id> --node <node-id> --note "auto-flagged under strict depth: <one-line reason, e.g. 'structurally central, traces disagree on scope'>"
|
|
255
|
+
```
|
|
256
|
+
3. **Log the auto-flag** in the elicitation state's checkpoint data, the same way `moderate`/`shallow` auto-accepts are logged — this is an automatic decision, not a silent one, and stays auditable exactly like every other gating outcome.
|
|
257
|
+
|
|
258
|
+
Low-risk findings under `strict` are unaffected — they auto-accept exactly as under `moderate`/`shallow`. `strict` only changes what happens to the escalating case.
|
|
259
|
+
|
|
260
|
+
The fixed internal/external question template used whenever `shallow`/`moderate` gating does decide to prompt is `skills/j-uncharted/assets/NODE_QUESTION_TEMPLATE.md` (Step 5, `E40_S06_T03`) — dormant under `strict`, since no prompt ever fires there.
|
|
261
|
+
5. **Confirm/correct, one round per call to `elicitation-state.sh turn`.** Never reached for a `strict`-depth candidate's escalating findings — those converge directly per Step 4 above. For a node requiring confirmation under `shallow`/`moderate`, do **not** present the draft with a fully open-ended "propose understanding, ask to confirm or correct" prompt. Instead use the fixed question set in `skills/j-uncharted/assets/NODE_QUESTION_TEMPLATE.md` (`E40_S06_T03`), selecting the variant by node kind:
|
|
262
|
+
|
|
263
|
+
- **Internal variant** — the node represents the candidate/service itself (the thing this investigation is about).
|
|
264
|
+
- **External variant** — the node represents a dependency or consumer the traces surfaced outside the candidate (something it calls, or something that calls it).
|
|
265
|
+
|
|
266
|
+
Present the drafted node/edge summary from Step 3 first, then ask the selected variant's fixed questions, then offer the same confirm / correct-with-detail / defer-as-unconfirmed / other choice as before (per the Interaction Pattern in `CLAUDE.md`) — the template file spells out both the questions and this response block verbatim, so read it rather than reconstructing either from memory. Each round, call:
|
|
220
267
|
|
|
221
268
|
```bash
|
|
222
269
|
bash skills/j-uncharted/scripts/elicitation-state.sh turn --id <elicitation-id> --node <node-id>
|
|
@@ -233,7 +280,7 @@ Runs once per surviving candidate (a subsystem, a named flow, a directory) after
|
|
|
233
280
|
```
|
|
234
281
|
|
|
235
282
|
Option 3 is the only way past the cap, and it is a per-node, explicit, one-time override — it does not raise the cap for the rest of the run.
|
|
236
|
-
|
|
283
|
+
6. **On convergence** (confirmed, corrected-and-accepted, or resolved via the cap choice above), call:
|
|
237
284
|
|
|
238
285
|
```bash
|
|
239
286
|
bash skills/j-uncharted/scripts/elicitation-state.sh converge --id <elicitation-id> --node <node-id> --note "<one-line summary of what was confirmed>"
|
|
@@ -252,9 +299,9 @@ A whole-codebase `onboard` conversation, or an investigation of a large director
|
|
|
252
299
|
```
|
|
253
300
|
|
|
254
301
|
Idempotent — safe to call again on a resumed `<elicitation-id>` without resetting progress. Choose `<elicitation-id>` so it is stable and re-derivable across sessions (e.g. `onboard-<root-slug>-<date>`, or `segment-investigate-<target-slug>`), since a resuming session must be able to reconstruct it to call `init` again.
|
|
255
|
-
- **`checkpoint` after every converged node
|
|
302
|
+
- **`checkpoint` after every converged node, after the Directory Triage confirmation gate, and after every Familiarity Check answer** — never only at the end. This is what makes a mid-run pause lossless: `checkpoint --id <id> --json <file>` merges arbitrary progress data (triage results, draft nodes not yet converged, per-candidate `verification_depth`, anything else worth surviving a pause) into the state file. `verification_depth` is stored as one object keyed by candidate id — `checkpoint.verification_depth.<candidate-id>` — and, per the script's own merge semantics (see its header), checking one candidate in never clobbers another candidate already recorded there.
|
|
256
303
|
- **`pause` when a session must end before the elicitation has converged.** Immediately after calling `elicitation-state.sh pause --id <elicitation-id>`, write the scrum-master's own `SessionEnd` handoff (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 `handoffs/` convention) with `status: "elicitation_paused"` and both `elicitation_id` and `state_file` set — `hooks/on_session_end.sh` routes that into an `elicitation_resume` trigger on `scrum_triggers.jsonl`, which the next scrum-master session's Drain Scrum Triggers Queue procedure picks up (`agents/scrum-master.md`).
|
|
257
|
-
- **On resume**, read `state_file` directly — every converged node, every flagged node, and the checkpoint data (including the confirmed directory-triage lists) are already there. Do not re-run Directory Triage or re-ask about an already-converged node; resume the Convergence Loop only for nodes still `pending` or explicitly deferred.
|
|
304
|
+
- **On resume**, read `state_file` directly — every converged node, every flagged node, and the checkpoint data (including the confirmed directory-triage lists and any per-candidate `verification_depth` already recorded) are already there. Do not re-run Directory Triage, re-ask the Familiarity Check for a candidate already present under `checkpoint.verification_depth`, or re-ask about an already-converged node; resume the Convergence Loop only for nodes still `pending` or explicitly deferred, and only ask the Familiarity Check for a candidate that has neither.
|
|
258
305
|
- **`complete` when every candidate has converged, been deferred, or been explicitly accepted past the cap.** The state file is left on disk afterward as an audit trail — nothing currently prunes a completed elicitation's state file.
|
|
259
306
|
|
|
260
307
|
---
|
|
@@ -813,7 +860,7 @@ sections of `project/PROJECT_SUMMARY.md`:
|
|
|
813
860
|
|
|
814
861
|
**Step B — Check both sections for existing content before proposing anything.** A section counts
|
|
815
862
|
as a **stub** only if its body is empty, whitespace-only, or is (or is limited to) the literal
|
|
816
|
-
placeholder text from `skills/init/assets/PROJECT_SUMMARY_template.md` — `_To be completed._`.
|
|
863
|
+
placeholder text from `skills/j-init/assets/PROJECT_SUMMARY_template.md` — `_To be completed._`.
|
|
817
864
|
Anything else — a sentence, a partial list, a paragraph someone already wrote by hand — is real,
|
|
818
865
|
non-stub content, however short, and is never silently overwritten. Check the Overview and
|
|
819
866
|
Architecture & Structure sections independently; one can be a stub while the other is not.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
NODE QUESTION TEMPLATE — /uncharted Convergence Loop.
|
|
3
|
+
|
|
4
|
+
Added by E40_S06_T03. Consumed by the Convergence Loop's Step 5
|
|
5
|
+
("Confirm/correct", skills/j-uncharted/SKILL.md) whenever risk-weighted
|
|
6
|
+
gating (Step 4) decides a finding needs a confirm prompt under
|
|
7
|
+
`verification_depth: shallow` or `moderate`. Never reached under `strict`
|
|
8
|
+
— Step 4's strict branch converges the node directly, without ever
|
|
9
|
+
reaching Step 5, so this template is simply not invoked in that case.
|
|
10
|
+
|
|
11
|
+
Two fixed variants, selected by node kind:
|
|
12
|
+
|
|
13
|
+
INTERNAL — the node represents the candidate/service itself (the thing
|
|
14
|
+
`/uncharted` is investigating).
|
|
15
|
+
EXTERNAL — the node represents something outside the candidate that the
|
|
16
|
+
traces surfaced: a dependency it calls, or a consumer that calls it.
|
|
17
|
+
|
|
18
|
+
This replaces a fully open-ended "propose understanding, ask the user to
|
|
19
|
+
confirm or correct it" prompt for any node that fits one of these two
|
|
20
|
+
kinds — which, per the Convergence Loop, is every node this flow drafts.
|
|
21
|
+
Wording is fixed and matches the brainstorm's agreed phrasing verbatim
|
|
22
|
+
(project/documentation/examples/uncharted-conversational-elicitation-procedure.md);
|
|
23
|
+
do not paraphrase it when presenting the prompt.
|
|
24
|
+
|
|
25
|
+
Usage: present the drafted node/edge summary first (per Step 3's draft),
|
|
26
|
+
then ask the questions below for the selected variant, then offer the
|
|
27
|
+
same confirm / correct-with-detail / defer-as-unconfirmed / other choice
|
|
28
|
+
Step 5 already documents. This file supplies the fixed *questions*; the
|
|
29
|
+
response mechanics (turn cap, converge call) are unchanged and live in
|
|
30
|
+
SKILL.md, not here.
|
|
31
|
+
-->
|
|
32
|
+
|
|
33
|
+
# Node Question Template
|
|
34
|
+
|
|
35
|
+
## Internal Node
|
|
36
|
+
|
|
37
|
+
Use when the node represents the candidate/service itself — the thing this investigation is about,
|
|
38
|
+
not something external to it.
|
|
39
|
+
|
|
40
|
+
1. What is this?
|
|
41
|
+
2. What does it do?
|
|
42
|
+
3. Who consumes it?
|
|
43
|
+
4. Other (describe below)
|
|
44
|
+
|
|
45
|
+
## External Node
|
|
46
|
+
|
|
47
|
+
Use when the node represents a dependency or consumer the traces surfaced outside the candidate —
|
|
48
|
+
something the service calls, or something that calls the service.
|
|
49
|
+
|
|
50
|
+
1. What is this?
|
|
51
|
+
2. What does it do?
|
|
52
|
+
3. Is the service producing to it, or consuming from it?
|
|
53
|
+
4. Who is the producer, and who is the consumer?
|
|
54
|
+
5. Other (describe below)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
After the selected question set, present the standard confirm/correct choice (per the Interaction
|
|
59
|
+
Pattern in `CLAUDE.md` and Convergence Loop Step 5):
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
1. Confirm the draft as accurate
|
|
63
|
+
2. Correct it — describe what's wrong
|
|
64
|
+
3. Defer — mark this node "unconfirmed" for now
|
|
65
|
+
4. Other (describe below)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Silence, a counter-question, or an ambiguous reply is not consent — re-ask, the same convention used
|
|
69
|
+
at every other confirmation gate in this skill.
|