@windyroad/jtbd 0.5.1-preview.75 → 0.5.1-preview.81
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/agents/agent.md
CHANGED
|
@@ -45,6 +45,10 @@ All review criteria come from the JTBD documentation. Read the docs first and ap
|
|
|
45
45
|
- If the change involves API interactions, do the actions align with the job's expected flow?
|
|
46
46
|
- Are new actions documented in the relevant job's action list?
|
|
47
47
|
|
|
48
|
+
## Output Formatting
|
|
49
|
+
|
|
50
|
+
When referencing JTBD IDs, problem IDs (P<NNN>), or ADR IDs in prose output, always include the human-readable title on first mention. Use the format `JTBD-001 (Enforce Governance Without Slowing Down)`, not bare `JTBD-001`.
|
|
51
|
+
|
|
48
52
|
## How to Report
|
|
49
53
|
|
|
50
54
|
If the change aligns with documented jobs:
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
# Doc-lint guard: jtbd agent.md must include the output formatting rule
|
|
3
|
+
# requiring human-readable titles alongside bare IDs (P032).
|
|
4
|
+
#
|
|
5
|
+
# Structural assertion — Permitted Exception to the source-grep ban (ADR-005 / P011).
|
|
6
|
+
#
|
|
7
|
+
# Cross-reference:
|
|
8
|
+
# P032 (agent output uses opaque IDs without titles)
|
|
9
|
+
# @jtbd JTBD-001 (enforce governance without slowing down)
|
|
10
|
+
|
|
11
|
+
setup() {
|
|
12
|
+
AGENT_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
|
|
13
|
+
AGENT_FILE="${AGENT_DIR}/agent.md"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@test "agent.md contains output formatting section" {
|
|
17
|
+
run grep -n "## Output Formatting" "$AGENT_FILE"
|
|
18
|
+
[ "$status" -eq 0 ]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@test "agent.md output formatting rule requires titles with IDs (P032)" {
|
|
22
|
+
run grep -n "title" "$AGENT_FILE"
|
|
23
|
+
[ "$status" -eq 0 ]
|
|
24
|
+
run grep -n "Output Formatting" "$AGENT_FILE"
|
|
25
|
+
[ "$status" -eq 0 ]
|
|
26
|
+
}
|
package/hooks/jtbd-eval.sh
CHANGED
|
@@ -22,7 +22,10 @@ REQUIRED ACTIONS:
|
|
|
22
22
|
4. Do NOT skip this step even if you think you can handle it yourself
|
|
23
23
|
|
|
24
24
|
SCOPE: All project files.
|
|
25
|
-
Does NOT apply to: CSS, images, fonts, lockfiles, changesets, memory files,
|
|
25
|
+
Does NOT apply to: CSS, images, fonts, lockfiles, changesets, memory files,
|
|
26
|
+
plan files, docs/problems/ (problem tickets), docs/BRIEFING.md,
|
|
27
|
+
RISK-POLICY.md, .risk-reports/, docs/jtbd/, docs/JOBS_TO_BE_DONE.md,
|
|
28
|
+
docs/PRODUCT_DISCOVERY.md, docs/VOICE-AND-TONE.md, docs/STYLE-GUIDE.md.
|
|
26
29
|
HOOK_OUTPUT
|
|
27
30
|
elif [ -f "docs/JOBS_TO_BE_DONE.md" ]; then
|
|
28
31
|
cat <<'HOOK_OUTPUT'
|
|
@@ -42,7 +45,10 @@ REQUIRED ACTIONS:
|
|
|
42
45
|
4. Do NOT skip this step even if you think you can handle it yourself
|
|
43
46
|
|
|
44
47
|
SCOPE: All project files.
|
|
45
|
-
Does NOT apply to: CSS, images, fonts, lockfiles, changesets, memory files,
|
|
48
|
+
Does NOT apply to: CSS, images, fonts, lockfiles, changesets, memory files,
|
|
49
|
+
plan files, docs/problems/ (problem tickets), docs/BRIEFING.md,
|
|
50
|
+
RISK-POLICY.md, .risk-reports/, docs/jtbd/, docs/JOBS_TO_BE_DONE.md,
|
|
51
|
+
docs/PRODUCT_DISCOVERY.md, docs/VOICE-AND-TONE.md, docs/STYLE-GUIDE.md.
|
|
46
52
|
HOOK_OUTPUT
|
|
47
53
|
else
|
|
48
54
|
cat <<'HOOK_OUTPUT'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
|
|
3
|
+
# Tests for jtbd-eval.sh (UserPromptSubmit) — verifies the injected scope
|
|
4
|
+
# exclusion text lists governance docs that the PreToolUse gate already
|
|
5
|
+
# exempts (P029). Without this, the LLM wastes time delegating to the
|
|
6
|
+
# jtbd-lead for files the edit gate would allow anyway.
|
|
7
|
+
|
|
8
|
+
setup() {
|
|
9
|
+
SCRIPT_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
|
|
10
|
+
HOOK="$SCRIPT_DIR/jtbd-eval.sh"
|
|
11
|
+
ORIG_DIR="$PWD"
|
|
12
|
+
TEST_DIR=$(mktemp -d)
|
|
13
|
+
cd "$TEST_DIR"
|
|
14
|
+
mkdir -p docs/jtbd
|
|
15
|
+
echo "# Index" > docs/jtbd/README.md
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
teardown() {
|
|
19
|
+
cd "$ORIG_DIR"
|
|
20
|
+
rm -rf "$TEST_DIR"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@test "eval: scope text mentions problem files exemption (P029)" {
|
|
24
|
+
run bash "$HOOK"
|
|
25
|
+
[ "$status" -eq 0 ]
|
|
26
|
+
[[ "$output" == *"docs/problems/"* ]] || [[ "$output" == *"problem tickets"* ]]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@test "eval: scope text mentions BRIEFING.md exemption (P029)" {
|
|
30
|
+
run bash "$HOOK"
|
|
31
|
+
[ "$status" -eq 0 ]
|
|
32
|
+
[[ "$output" == *"BRIEFING"* ]]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@test "eval: scope text mentions RISK-POLICY exemption (P029)" {
|
|
36
|
+
run bash "$HOOK"
|
|
37
|
+
[ "$status" -eq 0 ]
|
|
38
|
+
[[ "$output" == *"RISK-POLICY"* ]]
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -17,6 +17,10 @@ This skill is **read-only**. It does not commit, push, or modify files.
|
|
|
17
17
|
- After a significant capability change: check whether existing jobs are still served
|
|
18
18
|
- Any time the hook gate is not convenient: planning mode, spike work, design review
|
|
19
19
|
|
|
20
|
+
## Output Formatting
|
|
21
|
+
|
|
22
|
+
When referencing JTBD IDs, problem IDs (P<NNN>), or ADR IDs in prose output, always include the human-readable title on first mention. Use the format `JTBD-001 (Enforce Governance Without Slowing Down)`, not bare `JTBD-001`.
|
|
23
|
+
|
|
20
24
|
## Steps
|
|
21
25
|
|
|
22
26
|
### 1. Parse arguments
|