@jenga-ai/agent 1.2.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -91
- package/agents/developer.md +26 -7
- package/agents/scrum-master.md +57 -22
- package/agents/tester.md +68 -4
- package/hooks/on_session_end.sh +40 -1
- package/lib/generate-agent-context.js +18 -1
- package/lib/generate-copilot-instructions.js +18 -1
- package/lib/generate-skill-allow-list.js +191 -0
- package/lib/skill-allow-list.json +43 -0
- package/package.json +35 -20
- package/scripts/apply-j-prefix.sh +230 -0
- package/scripts/consume-context-digest.sh +103 -0
- package/scripts/postinstall.js +25 -0
- package/scripts/sweep-stale-context-digests.sh +132 -0
- package/scripts/validate-board.sh +5 -0
- package/scripts/write-context-digest.sh +230 -0
- package/skills/brainstorm/SKILL.md +1 -1
- package/skills/btw/SKILL.md +1 -1
- package/skills/clearify/SKILL.md +1 -1
- package/skills/close-story/SKILL.md +78 -6
- package/skills/close-story/scripts/check-privatized.sh +345 -0
- package/skills/commit/SKILL.md +12 -2
- package/skills/continue/SKILL.md +1 -1
- package/skills/deep-dive/SKILL.md +1 -1
- package/skills/dev-done/SKILL.md +46 -0
- package/skills/dev-done/scripts/classify-commit-outcome.sh +114 -0
- package/skills/distribute/SKILL.md +1 -1
- package/skills/do/SKILL.md +100 -10
- package/skills/doc/README.md +155 -0
- package/skills/doc/SKILL.md +43 -13
- package/skills/doc/authoring-notes.md +72 -0
- package/skills/doc/scripts/resolve_last_update.py +149 -0
- package/skills/doc-sync/SKILL.md +1 -1
- package/skills/dooo/SKILL.md +1 -1
- package/skills/error/SKILL.md +1 -1
- package/skills/evaluate/SKILL.md +1 -1
- package/skills/examplify/SKILL.md +1 -1
- package/skills/help/SKILL.md +1 -1
- package/skills/idea/SKILL.md +1 -1
- package/skills/improve/SKILL.md +1 -1
- package/skills/init/SKILL.md +8 -7
- package/skills/init/assets/scope-thresholds_template.json +7 -0
- package/skills/init/scripts/init.sh +6 -0
- package/skills/j-init/SKILL.md +168 -0
- package/skills/j-init/assets/.gitignore_template +15 -0
- package/skills/j-init/assets/PROJECT_SUMMARY_template.md +13 -0
- package/skills/j-init/assets/directory_structure.txt +14 -0
- package/skills/j-init/assets/scope-thresholds_template.json +7 -0
- package/skills/j-init/assets/strategy_stub_template.md +38 -0
- package/skills/j-init/assets/test-config_template.json +4 -0
- package/skills/j-init/assets/workflow_template.json +30 -0
- package/skills/j-init/scripts/apply-project-visibility.sh +176 -0
- package/skills/j-init/scripts/detect-existing-codebase.sh +166 -0
- package/skills/j-init/scripts/init.sh +116 -0
- package/skills/jbp/SKILL.md +1 -1
- package/skills/jenga/SKILL.md +1 -1
- package/skills/jenga/scripts/render-confirmation.sh +55 -18
- package/skills/jenga-permission-level/SKILL.md +1 -1
- package/skills/lgtm/SKILL.md +1 -1
- package/skills/pi-plan/SKILL.md +1 -1
- package/skills/proceed/SKILL.md +1 -1
- package/skills/publish/SKILL.md +67 -1
- package/skills/publish/adapters/npm-ci.md +60 -4
- package/skills/publish/adapters/npm.md +18 -0
- package/skills/publish/assets/ci-contract.md +27 -0
- package/skills/publish/assets/publish.example.json +27 -0
- package/skills/publish/schemas/publish.schema.json +20 -0
- package/skills/publish/scripts/npm_ci_pipeline.sh +50 -1
- package/skills/publish/scripts/npm_stage_inspect.sh +829 -0
- package/skills/publish/scripts/npm_stage_pipeline.sh +427 -0
- package/skills/publish/scripts/publish_common.sh +16 -0
- package/skills/publish/scripts/show_history.sh +12 -5
- package/skills/publish/scripts/validate_npm_stage_env.sh +184 -0
- package/skills/publish/scripts/write_ledger_entry.sh +92 -2
- package/skills/reconcile/SKILL.md +122 -12
- package/skills/reconcile/assets/report_format.md +17 -0
- package/skills/reconcile/scripts/resolve-reconcile-scope.sh +489 -0
- package/skills/reconcile-origin/SKILL.md +1 -1
- package/skills/redo/SKILL.md +1 -1
- package/skills/skillify/SKILL.md +1 -1
- package/skills/spinoff/SKILL.md +1 -1
- package/skills/status/SKILL.md +1 -1
- package/skills/todo/SKILL.md +40 -3
- package/skills/todo/scripts/add_trivial_task.sh +216 -0
- package/skills/todo/scripts/update_story_tasks.py +87 -0
- package/skills/uncharted/SKILL.md +201 -22
- package/skills/uncharted/scripts/directory-triage.sh +342 -0
- package/skills/uncharted/scripts/elicitation-state.sh +457 -0
- package/skills/wtf/SKILL.md +1 -1
- package/templates/SCRUM_BOARD_SCHEMA.md +90 -2
- package/templates/agent-context.md.tpl +47 -12
- package/templates/copilot-instructions.md.tpl +36 -9
- package/mcp/router/README.md +0 -19
- package/mcp/router/embedder.js +0 -23
- package/mcp/router/index.js +0 -204
- package/mcp/router/matcher.js +0 -87
- package/mcp/router/package-lock.json +0 -1048
- package/mcp/router/package.json +0 -11
- package/mcp/router/skill-index.js +0 -104
- package/skills/route/SKILL.md +0 -180
package/skills/doc-sync/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: doc-sync
|
|
2
|
+
name: j:doc-sync
|
|
3
3
|
description: Compare the current state of a project with its documentation and update documentation to reflect changes. Accepts `update:`, `source:`, `exclude:`, and `minify:` arguments to control scope. Use when documentation may be out of date with implementation, or when the user asks to sync, refresh, update, or shrink docs.
|
|
4
4
|
keywords:
|
|
5
5
|
- doc-sync
|
package/skills/dooo/SKILL.md
CHANGED
package/skills/error/SKILL.md
CHANGED
package/skills/evaluate/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: examplify
|
|
2
|
+
name: j:examplify
|
|
3
3
|
description: Explains concepts, features, use cases, and patterns based on provided context — a description, scenario, code snippet, or file. Use when the user wants to understand what something is, how it works, when to use it, or wants a concrete example.
|
|
4
4
|
keywords:
|
|
5
5
|
- examplify
|
package/skills/help/SKILL.md
CHANGED
package/skills/idea/SKILL.md
CHANGED
package/skills/improve/SKILL.md
CHANGED
package/skills/init/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: init
|
|
2
|
+
name: j:init
|
|
3
3
|
description: Initialize a new project with the standard directory structure, PROJECT_SUMMARY.md, workflow.json, git repo, and gitignore. Follows a defined ordered onboarding sequence. Use when setting up a new or empty project.
|
|
4
4
|
keywords:
|
|
5
5
|
- init
|
|
@@ -128,12 +128,13 @@ This script handles all scaffolding in one step:
|
|
|
128
128
|
4. Creates `project/PROJECT_SUMMARY.md` with placeholder content
|
|
129
129
|
5. Creates `project/configs/workflow.json` with shared constants
|
|
130
130
|
6. Creates `project/configs/test-config.json` stub
|
|
131
|
-
7. Creates `project/
|
|
132
|
-
8. Creates `project/
|
|
133
|
-
9. Creates `
|
|
134
|
-
10. Creates `
|
|
135
|
-
11.
|
|
136
|
-
12.
|
|
131
|
+
7. Creates `project/configs/scope-thresholds.json` with default execution-scope thresholds (consumed by `/jenga` and `/do`, which halt if it's missing)
|
|
132
|
+
8. Creates `project/data/baselines.json`
|
|
133
|
+
9. Creates `project/logs/events.json`
|
|
134
|
+
10. Creates `docs/STRATEGY.md` — a strategic brief stub intended for investors, partners, and the product team
|
|
135
|
+
11. Creates `CHANGELOG.md` from the shared template — a running log of notable changes, seeded with an `[Unreleased]` section
|
|
136
|
+
12. 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
|
|
137
|
+
13. Stages and commits all files with the message `init: scaffold project structure and workflow config`
|
|
137
138
|
|
|
138
139
|
The visibility mode is validated before any scaffolding happens, so an invalid
|
|
139
140
|
value fails fast and leaves nothing behind. It is applied before the commit, so
|
|
@@ -67,6 +67,12 @@ cp "$ASSETS_DIR/workflow_template.json" project/configs/workflow.json
|
|
|
67
67
|
echo "→ Copying test-config.json from template..."
|
|
68
68
|
cp "$ASSETS_DIR/test-config_template.json" project/configs/test-config.json
|
|
69
69
|
|
|
70
|
+
# ─── 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
|
|
72
|
+
# missing, so it must exist immediately after scaffold.
|
|
73
|
+
echo "→ Copying scope-thresholds.json from template..."
|
|
74
|
+
cp "$ASSETS_DIR/scope-thresholds_template.json" project/configs/scope-thresholds.json
|
|
75
|
+
|
|
70
76
|
# ─── 7. Create project/data/baselines.json ───────────────────────────────────
|
|
71
77
|
echo "→ Creating baselines.json..."
|
|
72
78
|
echo '{}' > project/data/baselines.json
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: j:j-init
|
|
3
|
+
description: Polyfill alias of the init skill under a collision-safe directory name. Identical behavior to /init — initializes a new project with the standard directory structure, PROJECT_SUMMARY.md, workflow.json, git repo, and gitignore. Use when the built-in "/init" command (e.g. GH Copilot's own init) shadows Jenga's /init alias.
|
|
4
|
+
keywords:
|
|
5
|
+
- init
|
|
6
|
+
- initialize
|
|
7
|
+
- setup
|
|
8
|
+
- new project
|
|
9
|
+
- scaffold
|
|
10
|
+
- j-init
|
|
11
|
+
- polyfill
|
|
12
|
+
examples:
|
|
13
|
+
- "initialize a new project"
|
|
14
|
+
- "set up a new workspace"
|
|
15
|
+
- "j-init"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# J-Init — Project Setup (polyfill alias of Init)
|
|
19
|
+
|
|
20
|
+
This skill is a literal-directory-name duplicate of `skills/init/`. It exists because
|
|
21
|
+
some host tools/harnesses (e.g. GH Copilot) ship their own built-in command literally
|
|
22
|
+
named `/init`, which can shadow or override Jenga AI's own `/init` alias (Claude Code's
|
|
23
|
+
native skill resolution is a literal-string, directory-name-based match — see
|
|
24
|
+
`docs/skill-authoring.md`'s "Invocation Convention"). `/j-init` (and `j:j-init`) give
|
|
25
|
+
users a guaranteed-unshadowed way to reach the exact same setup flow.
|
|
26
|
+
|
|
27
|
+
Keep this file's instructions in lockstep with `skills/init/SKILL.md` — any change made
|
|
28
|
+
there should be mirrored here.
|
|
29
|
+
|
|
30
|
+
## Instructions
|
|
31
|
+
|
|
32
|
+
Follow these steps in order. Do not skip steps — the sequence matters.
|
|
33
|
+
|
|
34
|
+
### 1. Detect existing project state
|
|
35
|
+
|
|
36
|
+
Before asking anything or scaffolding anything, classify the target directory
|
|
37
|
+
(the current directory) by running the detection script:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
skills/j-init/scripts/detect-existing-codebase.sh .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
It prints exactly one verdict on stdout:
|
|
44
|
+
|
|
45
|
+
| Verdict | Meaning | What to do |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `empty` | The directory is empty, or contains only `.git`, `.gitignore`, and top-level `README*`/`LICENSE*` boilerplate. | Proceed to step 2 — behaviour here is unchanged from before this detection step existed. |
|
|
48
|
+
| `already-scaffolded` | `project/board/`, `project/PROJECT_SUMMARY.md`, or `project/configs/workflow.json` already exists. | Tell the user this directory already has a Jenga scaffold and **stop** — do not run the scaffold script. Re-running it would silently overwrite `PROJECT_SUMMARY.md` and `workflow.json` with fresh stubs. Point them at `/continue` or `/status` instead. |
|
|
49
|
+
| `existing-codebase` | The directory has real content (source, configs, docs beyond the boilerplate list) and is not already scaffolded. | **Pause. Do not scaffold.** Present the choice below and wait for an answer. |
|
|
50
|
+
|
|
51
|
+
On `existing-codebase`, present this choice verbatim, per the Interaction Pattern in
|
|
52
|
+
`CLAUDE.md` (numbered, free-text last):
|
|
53
|
+
|
|
54
|
+
This directory already contains code that wasn't built through Jenga. How would
|
|
55
|
+
you like to proceed?
|
|
56
|
+
1. Run /uncharted onboard first, to analyze the existing code and backfill the
|
|
57
|
+
board before scaffolding
|
|
58
|
+
2. Scaffold fresh anyway, leaving the board empty (the existing code is never
|
|
59
|
+
modified either way — onboard mode and fresh scaffolding are both board-only)
|
|
60
|
+
3. Abort — don't scaffold, don't run /uncharted
|
|
61
|
+
4. Other (describe below)
|
|
62
|
+
|
|
63
|
+
- **Option 1** — invoke `/uncharted onboard`. It analyzes the existing code and backfills
|
|
64
|
+
the board; it never modifies, moves, or restructures application code. Once it
|
|
65
|
+
finishes, the directory now has `project/PROJECT_SUMMARY.md` etc., so re-running this
|
|
66
|
+
detection step returns `already-scaffolded` — there is nothing left to scaffold.
|
|
67
|
+
- **Option 2** — continue to step 2 and scaffold fresh. Note in your response that the
|
|
68
|
+
board will start empty despite the directory containing pre-existing code, since the
|
|
69
|
+
user explicitly chose that.
|
|
70
|
+
- **Option 3** — stop here. Do not run the scaffold script and do not invoke `/uncharted`.
|
|
71
|
+
- **Option 4** — handle the free-text response on its own merits.
|
|
72
|
+
|
|
73
|
+
If the run is non-interactive (no user available to answer), default to **option 3
|
|
74
|
+
(abort)**. Unlike the visibility question in step 2, none of these three choices is a
|
|
75
|
+
no-op: running `/uncharted onboard` unattended commits an analysis pass the user never
|
|
76
|
+
asked for, and scaffolding fresh unattended silently discards pre-existing code from the
|
|
77
|
+
board exactly as `/init` did before this step existed. Aborting is the only choice that
|
|
78
|
+
changes nothing on disk, so it is the only safe default.
|
|
79
|
+
|
|
80
|
+
Never treat `existing-codebase` as if it were `empty`, and never skip straight to step 2
|
|
81
|
+
on that verdict without the user (or the non-interactive default) choosing to.
|
|
82
|
+
|
|
83
|
+
### 2. Ask how Jenga AI's working files should appear
|
|
84
|
+
|
|
85
|
+
Ask the user this question, verbatim, before running any script:
|
|
86
|
+
|
|
87
|
+
How should Jenga AI's own working files (project/ — the scrum board, todo.md,
|
|
88
|
+
queue/, rapports/, and logs/) appear in this project?
|
|
89
|
+
1. Visible — keep them at `project/`, tracked and visible in directory listings
|
|
90
|
+
2. Ignored — keep them at `project/` but add them to `.gitignore` so they are never committed
|
|
91
|
+
3. Not sure — explain the trade-offs and ask me again
|
|
92
|
+
|
|
93
|
+
If the user picks option 3, explain the trade-offs and re-ask. Do not proceed until
|
|
94
|
+
the answer is one of `visible` or `ignored`.
|
|
95
|
+
|
|
96
|
+
If the run is non-interactive (no user available to answer), use the default:
|
|
97
|
+
**`visible`**. It is the only choice that changes nothing on disk, so an unattended
|
|
98
|
+
run can never silently relocate directories or edit `.gitignore`.
|
|
99
|
+
|
|
100
|
+
> A third mode, `hidden` (dot-prefixing `project/` to `.project/`, matching the
|
|
101
|
+
> `.agents/`/`.claude/` convention), was built and then withdrawn before release —
|
|
102
|
+
> testing found it left board resolution and session-end hooks writing to two
|
|
103
|
+
> different trees. It is not offered here. See
|
|
104
|
+
> `skills/distribute/CONFIG_SCHEMA.md` for the root-cause note and the tracked
|
|
105
|
+
> follow-up to reintroduce it once fixed.
|
|
106
|
+
|
|
107
|
+
Carry the chosen value into step 3. Do not apply it yourself — the script owns all
|
|
108
|
+
of the mechanical work.
|
|
109
|
+
|
|
110
|
+
### 3. Run the scaffold script
|
|
111
|
+
|
|
112
|
+
`init.sh` is not guaranteed to live at a single fixed path: in a project that
|
|
113
|
+
installed Jenga via npm, it was mirrored to `.claude/skills/j-init/scripts/`
|
|
114
|
+
(Claude Code) and `.agents/skills/j-init/scripts/` (Copilot/other agents) by
|
|
115
|
+
`postinstall.js`, and neither of those exists yet in this framework's own
|
|
116
|
+
source checkout, where it lives at the bare `skills/j-init/scripts/` path
|
|
117
|
+
instead. This step runs before `CLAUDE.md`/`AGENTS.md` exist, so it cannot
|
|
118
|
+
rely on either file's routing instructions to resolve the path — it must
|
|
119
|
+
locate its own script directly. Execute the init script from the project
|
|
120
|
+
root, passing the choice from step 2:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
INIT_SCRIPT=""
|
|
124
|
+
for candidate in .claude/skills/j-init/scripts/init.sh .agents/skills/j-init/scripts/init.sh skills/j-init/scripts/init.sh; do
|
|
125
|
+
[[ -f "$candidate" ]] && { INIT_SCRIPT="$candidate"; break; }
|
|
126
|
+
done
|
|
127
|
+
if [[ -z "$INIT_SCRIPT" ]]; then
|
|
128
|
+
echo "Error: could not locate init.sh under .claude/skills/, .agents/skills/, or skills/" >&2
|
|
129
|
+
exit 1
|
|
130
|
+
fi
|
|
131
|
+
chmod +x "$INIT_SCRIPT" && "$INIT_SCRIPT" --visibility <visible|ignored>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Omitting `--visibility` falls back to the `JENGA_PROJECT_FILES_VISIBILITY`
|
|
135
|
+
environment variable, then to `visible`.
|
|
136
|
+
|
|
137
|
+
This script handles all scaffolding in one step:
|
|
138
|
+
1. Initializes the git repository
|
|
139
|
+
2. Creates `.gitignore`
|
|
140
|
+
3. Creates the full directory structure under `project/`
|
|
141
|
+
4. Creates `project/PROJECT_SUMMARY.md` with placeholder content
|
|
142
|
+
5. Creates `project/configs/workflow.json` with shared constants
|
|
143
|
+
6. Creates `project/configs/test-config.json` stub
|
|
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
|
+
8. Creates `project/data/baselines.json`
|
|
146
|
+
9. Creates `project/logs/events.json`
|
|
147
|
+
10. Creates `docs/STRATEGY.md` — a strategic brief stub intended for investors, partners, and the product team
|
|
148
|
+
11. Creates `CHANGELOG.md` from the shared template — a running log of notable changes, seeded with an `[Unreleased]` section
|
|
149
|
+
12. 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
|
|
150
|
+
13. Stages and commits all files with the message `init: scaffold project structure and workflow config`
|
|
151
|
+
|
|
152
|
+
The visibility mode is validated before any scaffolding happens, so an invalid
|
|
153
|
+
value fails fast and leaves nothing behind. It is applied before the commit, so
|
|
154
|
+
the `.gitignore` entry is captured in the initial commit.
|
|
155
|
+
|
|
156
|
+
If the script fails, check that you are in the project root and that git and `jq`
|
|
157
|
+
are available.
|
|
158
|
+
|
|
159
|
+
See `skills/distribute/CONFIG_SCHEMA.md` for the full `project_files_visibility`
|
|
160
|
+
field reference.
|
|
161
|
+
|
|
162
|
+
### 4. Prompt next step
|
|
163
|
+
|
|
164
|
+
Inform the user that setup is complete, and state which visibility mode was applied
|
|
165
|
+
and where the working files now live. Mention that `docs/STRATEGY.md` was created as
|
|
166
|
+
a strategic brief stub for investors, partners, and the product team — they can fill
|
|
167
|
+
it in now or return to it later. Suggest running `/pi-plan` to define project goals
|
|
168
|
+
and epics.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
project/board/epics
|
|
2
|
+
project/board/stories
|
|
3
|
+
project/board/tasks
|
|
4
|
+
project/instructions
|
|
5
|
+
project/configs
|
|
6
|
+
project/data
|
|
7
|
+
project/queue
|
|
8
|
+
project/rapports/problems
|
|
9
|
+
project/rapports/analysis
|
|
10
|
+
project/logs
|
|
11
|
+
project/documentation
|
|
12
|
+
project/documentation/plans
|
|
13
|
+
project/documentation/summaries
|
|
14
|
+
project/documentation/examples
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Strategy
|
|
2
|
+
|
|
3
|
+
<!-- This document is intended for investors, strategic partners, and senior stakeholders.
|
|
4
|
+
Write in clear, confident language that conveys conviction and focus.
|
|
5
|
+
Avoid jargon. Prioritise substance over length. -->
|
|
6
|
+
|
|
7
|
+
## Vision
|
|
8
|
+
|
|
9
|
+
<!-- Describe the long-term direction of this project over a 3–5 year horizon.
|
|
10
|
+
What change do you want to see in the world, and what role does this project play in bringing it about?
|
|
11
|
+
A strong vision statement is specific, ambitious, and grounded — it should be possible to hold yourself accountable to it. -->
|
|
12
|
+
|
|
13
|
+
## Value Proposition
|
|
14
|
+
|
|
15
|
+
<!-- Articulate what makes this project uniquely valuable and to whom.
|
|
16
|
+
Answer: Why does this exist? Why now? Why this team?
|
|
17
|
+
Focus on the distinct advantage or insight that underpins the project — not features, but the underlying value delivered. -->
|
|
18
|
+
|
|
19
|
+
## Scope
|
|
20
|
+
|
|
21
|
+
### In Scope
|
|
22
|
+
|
|
23
|
+
<!-- List the capabilities, domains, or problem spaces this project actively addresses.
|
|
24
|
+
Be specific enough that a new stakeholder can quickly understand the boundaries of the work.
|
|
25
|
+
Use bullet points for readability. -->
|
|
26
|
+
|
|
27
|
+
### Out of Scope
|
|
28
|
+
|
|
29
|
+
<!-- List what this project explicitly does not cover.
|
|
30
|
+
Revenue model, pricing strategy, and competitive analysis are intentionally excluded from this document —
|
|
31
|
+
they belong in separate artefacts and are out of scope here.
|
|
32
|
+
Use this section to prevent scope creep and set clear expectations with stakeholders. -->
|
|
33
|
+
|
|
34
|
+
## Target Audience
|
|
35
|
+
|
|
36
|
+
<!-- Describe who this project is built for.
|
|
37
|
+
Include both the end users (who experiences the product) and the stakeholders (who evaluates or funds it).
|
|
38
|
+
Be specific: a well-defined audience sharpens every other section of this document. -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"statuses": ["Pending", "In Progress", "Passed", "Passed with remarks", "Failed", "Rejected", "Blocked"],
|
|
3
|
+
"rapport_types": ["conflict", "implementation_blocker", "security_concern", "test_failure", "analysis"],
|
|
4
|
+
"paths": {
|
|
5
|
+
"board": "project/board",
|
|
6
|
+
"epics": "project/board/epics",
|
|
7
|
+
"stories": "project/board/stories",
|
|
8
|
+
"tasks": "project/board/tasks",
|
|
9
|
+
"rapports_problems": "project/rapports/problems",
|
|
10
|
+
"rapports_analysis": "project/rapports/analysis",
|
|
11
|
+
"queue": "project/queue",
|
|
12
|
+
"scrum_triggers": "project/queue/scrum_triggers.jsonl",
|
|
13
|
+
"developer_triggers": "project/queue/developer_triggers.jsonl",
|
|
14
|
+
"tester_triggers": "project/queue/tester_triggers.jsonl",
|
|
15
|
+
"session_handoff": "project/queue/handoffs/",
|
|
16
|
+
"logs": "project/logs",
|
|
17
|
+
"data": "project/data",
|
|
18
|
+
"configs": "project/configs",
|
|
19
|
+
"documentation": "project/documentation",
|
|
20
|
+
"documentation_plans": "project/documentation/plans",
|
|
21
|
+
"documentation_summaries": "project/documentation/summaries"
|
|
22
|
+
},
|
|
23
|
+
"agents": ["developer", "tester", "scrum-master"],
|
|
24
|
+
"pipeline": [
|
|
25
|
+
{"step": 1, "agent": "scrum-master", "phase": "planning", "on_complete": "write planning_complete handoff → developer_triggers.jsonl"},
|
|
26
|
+
{"step": 2, "agent": "developer", "phase": "implementation", "on_complete": "write implementation_complete handoff → tester_triggers.jsonl"},
|
|
27
|
+
{"step": 3, "agent": "tester", "phase": "verification", "on_complete": "write test status handoff → scrum_triggers.jsonl (+ developer_triggers.jsonl if failed)"},
|
|
28
|
+
{"step": 4, "agent": "scrum-master", "phase": "rollup_review", "on_complete": "update board statuses, close epic/story if all done"}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# apply-project-visibility.sh — apply the `project_files_visibility` mode to a project.
|
|
4
|
+
#
|
|
5
|
+
# Usage:
|
|
6
|
+
# apply-project-visibility.sh <mode> [project_root]
|
|
7
|
+
# apply-project-visibility.sh --check-only <mode>
|
|
8
|
+
#
|
|
9
|
+
# Modes:
|
|
10
|
+
# visible Working files stay where they are. No-op on disk beyond the config write.
|
|
11
|
+
# ignored Working files are added to the project's .gitignore — present on disk,
|
|
12
|
+
# never committed.
|
|
13
|
+
#
|
|
14
|
+
# NOTE: A third mode, `hidden` (dot-prefixing project/ -> .project/), was
|
|
15
|
+
# implemented and then withdrawn before release. Testing found it functionally
|
|
16
|
+
# broken: scripts/board_resolver.sh hardcodes project/configs/workflow.json
|
|
17
|
+
# and never locates the rewritten path, and hooks/on_session_end.sh
|
|
18
|
+
# unconditionally recreates a shadow project/ tree on every session end,
|
|
19
|
+
# splitting runtime state across two trees. See
|
|
20
|
+
# project/rapports/problems/E31_S05_T01-hidden-mode-path-resolution-gaps.md
|
|
21
|
+
# for the full findings. Re-introducing `hidden` requires fixing both of
|
|
22
|
+
# those hardcoded paths first — tracked as a follow-up /todo item.
|
|
23
|
+
#
|
|
24
|
+
# Exit codes:
|
|
25
|
+
# 0 Success
|
|
26
|
+
# 1 Bad usage or missing prerequisite
|
|
27
|
+
# 2 Invalid mode (outside the two-value enum)
|
|
28
|
+
# 3 Filesystem apply failure
|
|
29
|
+
# 4 jenga.config.json write failure
|
|
30
|
+
|
|
31
|
+
# Do NOT use set -e globally — each step handles its own errors.
|
|
32
|
+
set -uo pipefail
|
|
33
|
+
|
|
34
|
+
info() { echo "[visibility] $*"; }
|
|
35
|
+
warn() { echo "[visibility] WARNING: $*"; }
|
|
36
|
+
err() { echo "[visibility] ERROR: $*" >&2; }
|
|
37
|
+
|
|
38
|
+
usage() {
|
|
39
|
+
echo "Usage: $(basename "$0") <visible|ignored> [project_root]" >&2
|
|
40
|
+
echo " $(basename "$0") --check-only <visible|ignored>" >&2
|
|
41
|
+
exit 1
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# Every Jenga AI working file named in E31_S05 — the scrum board, todo.md,
|
|
45
|
+
# queue/, rapports/ and logs/ — nests under this single root, so one entry
|
|
46
|
+
# covers them all. `ignored` consumes this list.
|
|
47
|
+
JENGA_WORKING_PATHS=("project")
|
|
48
|
+
|
|
49
|
+
VALID_MODES="visible ignored"
|
|
50
|
+
|
|
51
|
+
validate_mode() {
|
|
52
|
+
local mode="$1"
|
|
53
|
+
for valid in $VALID_MODES; do
|
|
54
|
+
[ "$mode" = "$valid" ] && return 0
|
|
55
|
+
done
|
|
56
|
+
err "Invalid project_files_visibility value: '${mode}'"
|
|
57
|
+
err "Allowed values are: ${VALID_MODES// /, }"
|
|
58
|
+
exit 2
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# ---------------------------------------------------------------------------
|
|
62
|
+
# Argument parsing
|
|
63
|
+
# ---------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
CHECK_ONLY=0
|
|
66
|
+
if [ "${1:-}" = "--check-only" ]; then
|
|
67
|
+
CHECK_ONLY=1
|
|
68
|
+
shift
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
MODE="${1:-}"
|
|
72
|
+
[ -n "$MODE" ] || usage
|
|
73
|
+
|
|
74
|
+
validate_mode "$MODE"
|
|
75
|
+
|
|
76
|
+
if [ "$CHECK_ONLY" -eq 1 ]; then
|
|
77
|
+
info "Mode '$MODE' is valid."
|
|
78
|
+
exit 0
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
PROJECT_ROOT="${2:-$PWD}"
|
|
82
|
+
if [ ! -d "$PROJECT_ROOT" ]; then
|
|
83
|
+
err "Project root does not exist: $PROJECT_ROOT"
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
86
|
+
cd "$PROJECT_ROOT" || { err "Cannot enter project root: $PROJECT_ROOT"; exit 1; }
|
|
87
|
+
|
|
88
|
+
if ! command -v jq >/dev/null 2>&1; then
|
|
89
|
+
err "jq is required to write jenga.config.json but was not found on PATH."
|
|
90
|
+
exit 1
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
# ---------------------------------------------------------------------------
|
|
94
|
+
# ignored — append to .gitignore, without ever duplicating an entry
|
|
95
|
+
# ---------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
gitignore_append() {
|
|
98
|
+
local entry="$1"
|
|
99
|
+
local gitignore=".gitignore"
|
|
100
|
+
|
|
101
|
+
if [ -f "$gitignore" ] && grep -qxF -- "$entry" "$gitignore"; then
|
|
102
|
+
info "'$entry' already present in .gitignore — skipping."
|
|
103
|
+
return 0
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
# Don't glue our entry onto a final line that lacks a newline.
|
|
107
|
+
if [ -s "$gitignore" ] && [ -n "$(tail -c 1 "$gitignore")" ]; then
|
|
108
|
+
printf '\n' >> "$gitignore"
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
if ! printf '%s\n' "$entry" >> "$gitignore"; then
|
|
112
|
+
err "Failed to append '$entry' to .gitignore"
|
|
113
|
+
exit 3
|
|
114
|
+
fi
|
|
115
|
+
info "Added '$entry' to .gitignore"
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# ---------------------------------------------------------------------------
|
|
119
|
+
# jenga.config.json — merge the field in, written atomically (temp + mv)
|
|
120
|
+
# ---------------------------------------------------------------------------
|
|
121
|
+
|
|
122
|
+
write_visibility_config() {
|
|
123
|
+
local mode="$1"
|
|
124
|
+
local config="jenga.config.json"
|
|
125
|
+
local tmp="${config}.tmp"
|
|
126
|
+
local existing='{}'
|
|
127
|
+
|
|
128
|
+
# /init normally runs before any /distribute, so the file usually does not
|
|
129
|
+
# exist yet. Merge rather than overwrite so other fields survive.
|
|
130
|
+
if [ -f "$config" ]; then
|
|
131
|
+
if ! jq empty "$config" 2>/dev/null; then
|
|
132
|
+
err "$config exists but contains malformed JSON — refusing to overwrite it."
|
|
133
|
+
exit 4
|
|
134
|
+
fi
|
|
135
|
+
existing="$(cat "$config")"
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
local content
|
|
139
|
+
content="$(jq --arg v "$mode" '.project_files_visibility = $v' <<< "$existing")"
|
|
140
|
+
if [ -z "$content" ]; then
|
|
141
|
+
err "Failed to construct $config content."
|
|
142
|
+
exit 4
|
|
143
|
+
fi
|
|
144
|
+
|
|
145
|
+
if ! printf '%s\n' "$content" > "$tmp"; then
|
|
146
|
+
err "Failed to write temporary config file: $tmp"
|
|
147
|
+
exit 4
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
if ! mv "$tmp" "$config"; then
|
|
151
|
+
err "Failed to atomically move $tmp to $config"
|
|
152
|
+
rm -f "$tmp"
|
|
153
|
+
exit 4
|
|
154
|
+
fi
|
|
155
|
+
|
|
156
|
+
info "Wrote project_files_visibility = \"$mode\" to $config"
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
# ---------------------------------------------------------------------------
|
|
160
|
+
# Apply
|
|
161
|
+
# ---------------------------------------------------------------------------
|
|
162
|
+
|
|
163
|
+
case "$MODE" in
|
|
164
|
+
visible)
|
|
165
|
+
info "Mode 'visible' — working files stay in place; nothing to change on disk."
|
|
166
|
+
;;
|
|
167
|
+
ignored)
|
|
168
|
+
for path in "${JENGA_WORKING_PATHS[@]}"; do
|
|
169
|
+
gitignore_append "${path}/"
|
|
170
|
+
done
|
|
171
|
+
;;
|
|
172
|
+
esac
|
|
173
|
+
|
|
174
|
+
write_visibility_config "$MODE"
|
|
175
|
+
|
|
176
|
+
info "Applied project_files_visibility '$MODE' to $PROJECT_ROOT"
|