Skip to content

Commit 7d843e3

Browse files
Merge remote-tracking branch 'origin/main' into worktree-20260321-203133
2 parents 91b1971 + deb42ca commit 7d843e3

File tree

5 files changed

+334
-3
lines changed

5 files changed

+334
-3
lines changed

.tickets/dso-psan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: dso-psan
3-
status: open
3+
status: closed
44
deps: [w22-45i1, w22-5z9r]
55
links: []
66
created: 2026-03-19T18:20:58Z

.tickets/w22-45i1.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: w22-45i1
3-
status: open
3+
status: closed
44
deps: []
55
links: []
66
created: 2026-03-20T16:00:36Z
@@ -44,3 +44,33 @@ Run against original SKILL.md → test FAILS (RED) because no Step 7 exists.
4444
Verify: grep -q 'test_step7_exists' $(git rev-parse --show-toplevel)/tests/skills/test-project-setup-onboarding-step.sh && grep -q 'test_descriptive_labels' $(git rev-parse --show-toplevel)/tests/skills/test-project-setup-onboarding-step.sh
4545
- [ ] Running test against original SKILL.md returns non-zero (RED)
4646
Verify: ! bash $(git rev-parse --show-toplevel)/tests/skills/test-project-setup-onboarding-step.sh
47+
48+
## Notes
49+
50+
**2026-03-22T04:02:41Z**
51+
52+
CHECKPOINT 1/6: Task context loaded ✓
53+
54+
**2026-03-22T04:03:06Z**
55+
56+
CHECKPOINT 2/6: Code patterns understood ✓
57+
58+
**2026-03-22T04:03:49Z**
59+
60+
CHECKPOINT 3/6: Tests written ✓
61+
62+
**2026-03-22T04:03:54Z**
63+
64+
CHECKPOINT 4/6: Implementation complete ✓
65+
66+
**2026-03-22T04:04:04Z**
67+
68+
CHECKPOINT 5/6: Validation passed ✓ — test exits non-zero (8 failures) against current SKILL.md as expected (TDD RED)
69+
70+
**2026-03-22T04:05:24Z**
71+
72+
CHECKPOINT 6/6: Done ✓ — all 5 AC checks pass; 8 tests fail RED against current SKILL.md (no Step 7)
73+
74+
**2026-03-22T04:10:46Z**
75+
76+
CHECKPOINT 6/6: Done ✓ — Files: tests/skills/test-project-setup-onboarding-step.sh. Tests: 0 passed, 8 failed (expected RED). Review: passed (score 4/5).

.tickets/w22-5z9r.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: w22-5z9r
3-
status: open
3+
status: closed
44
deps: [w22-45i1]
55
links: []
66
created: 2026-03-20T16:00:42Z
@@ -41,3 +41,33 @@ Task w22-45i1 provides the RED/GREEN structural test for this feature (8 asserti
4141
Verify: test -f $(git rev-parse --show-toplevel)/plugins/dso/skills/project-setup/SKILL.md
4242
- [ ] Structural test passes (GREEN — 8 assertions covering all SCs)
4343
Verify: bash $(git rev-parse --show-toplevel)/tests/skills/test-project-setup-onboarding-step.sh
44+
45+
## Notes
46+
47+
**2026-03-22T04:15:06Z**
48+
49+
CHECKPOINT 1/6: Task context loaded ✓
50+
51+
**2026-03-22T04:15:14Z**
52+
53+
CHECKPOINT 2/6: Code patterns understood ✓
54+
55+
**2026-03-22T04:15:18Z**
56+
57+
CHECKPOINT 3/6: Tests written (none required — w22-45i1 provides structural test) ✓
58+
59+
**2026-03-22T04:15:49Z**
60+
61+
CHECKPOINT 4/6: Implementation complete ✓
62+
63+
**2026-03-22T04:16:36Z**
64+
65+
CHECKPOINT 5/6: Validation passed ✓
66+
67+
**2026-03-22T04:16:40Z**
68+
69+
CHECKPOINT 6/6: Done ✓ — AC1: SKILL.md exists (pass), AC2: structural test 8/8 assertions pass (pass)
70+
71+
**2026-03-22T04:20:40Z**
72+
73+
CHECKPOINT 6/6: Done ✓ — Files: plugins/dso/skills/project-setup/SKILL.md. Tests: 8 passed, 0 failed (GREEN). Review: passed (score 4/5).

plugins/dso/skills/project-setup/SKILL.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,99 @@ Full documentation: plugins/dso/docs/INSTALL.md
656656

657657
---
658658

659+
## Step 7: Onboarding Foundations
660+
661+
After completing project setup, offer to run the architecture and design onboarding skills. These skills produce foundational documents that guide future Claude sessions in the target project.
662+
663+
- `/dso:dev-onboarding` — produces `ARCH_ENFORCEMENT.md`: an architecture blueprint and enforcement rules for the codebase
664+
- `/dso:design-onboarding` — produces `DESIGN_NOTES.md`: visual language conventions and component golden paths
665+
666+
### Artifact detection
667+
668+
Check for the sentinel files that indicate whether each onboarding skill has already run:
669+
670+
```bash
671+
ARCH_SENTINEL="$TARGET_REPO/ARCH_ENFORCEMENT.md"
672+
DESIGN_SENTINEL="$TARGET_REPO/DESIGN_NOTES.md"
673+
674+
dev_done=false
675+
design_done=false
676+
677+
[ -f "$ARCH_SENTINEL" ] && dev_done=true
678+
[ -f "$DESIGN_SENTINEL" ] && design_done=true
679+
```
680+
681+
- **`ARCH_ENFORCEMENT.md`** is the sentinel for `/dso:dev-onboarding`
682+
- **`DESIGN_NOTES.md`** is the sentinel for `/dso:design-onboarding`
683+
684+
### Conditional prompt
685+
686+
**Case 1: Both artifacts present — skip this step entirely**
687+
688+
If both `ARCH_ENFORCEMENT.md` and `DESIGN_NOTES.md` already exist in the target project, both onboarding skills have already run. Skip the prompt entirely and log:
689+
690+
```
691+
(skipping onboarding prompt — both artifacts already present: ARCH_ENFORCEMENT.md, DESIGN_NOTES.md)
692+
```
693+
694+
No further action is needed. Setup is complete.
695+
696+
---
697+
698+
**Case 2: Both artifacts missing — 4-option AskUserQuestion**
699+
700+
When both `ARCH_ENFORCEMENT.md` and `DESIGN_NOTES.md` are missing, use `AskUserQuestion` to offer all onboarding options:
701+
702+
```
703+
Would you like to set up architecture and design foundations for this project?
704+
705+
1) Both (recommended) — runs dev-onboarding then design-onboarding: produces ARCH_ENFORCEMENT.md (architecture blueprint and enforcement rules) and DESIGN_NOTES.md (visual design language and golden paths)
706+
2) Architecture only — runs /dso:dev-onboarding: produces ARCH_ENFORCEMENT.md with codebase architecture guide and enforcement rules for future Claude sessions
707+
3) Design system only — runs /dso:design-onboarding: produces DESIGN_NOTES.md with visual language conventions and component golden paths
708+
4) Skip for now — setup is complete with no additional steps
709+
710+
Enter 1, 2, 3, or 4:
711+
```
712+
713+
Handle each selection:
714+
715+
- **Option 1 (Both)**: Invoke `/dso:dev-onboarding` first, then invoke `/dso:design-onboarding` after it completes.
716+
- **Option 2 (Architecture only)**: Invoke `/dso:dev-onboarding`.
717+
- **Option 3 (Design system only)**: Invoke `/dso:design-onboarding`.
718+
- **Option 4 (Skip)**: End setup. No additional steps are run.
719+
720+
---
721+
722+
**Case 3: Only one artifact missing — yes/no AskUserQuestion**
723+
724+
When only one skill is still needed (if only one artifact is missing), use a yes/no prompt for the remaining skill.
725+
726+
**If only `ARCH_ENFORCEMENT.md` is missing** (dev-onboarding not yet run):
727+
728+
```
729+
Would you like to run /dso:dev-onboarding?
730+
dev-onboarding produces ARCH_ENFORCEMENT.md — an architecture blueprint and enforcement rules
731+
that guide future Claude sessions through your codebase structure and conventions. (yes/no)
732+
```
733+
734+
If yes: invoke `/dso:dev-onboarding`. If no: skip — no additional steps.
735+
736+
**If only `DESIGN_NOTES.md` is missing** (design-onboarding not yet run):
737+
738+
```
739+
Would you like to run /dso:design-onboarding?
740+
design-onboarding produces DESIGN_NOTES.md — a visual design language guide and component
741+
golden paths that keep UI decisions consistent across Claude sessions. (yes/no)
742+
```
743+
744+
If yes: invoke `/dso:design-onboarding`. If no: skip — no additional steps.
745+
746+
### Invocation order
747+
748+
When both skills are selected (option 1 in the 4-option prompt), always invoke `/dso:dev-onboarding` before `/dso:design-onboarding`. This ordering ensures the architecture context is available when the design onboarding runs.
749+
750+
---
751+
659752
## Error Handling Reference
660753

661754
| Situation | Response |
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
#!/usr/bin/env bash
2+
# tests/skills/test-project-setup-onboarding-step.sh
3+
# Tests that plugins/dso/skills/project-setup/SKILL.md contains an onboarding
4+
# integration step (Step 7) that offers /dso:dev-onboarding and /dso:design-onboarding
5+
# with correct structure, prompts, and artifact detection.
6+
#
7+
# Validates (8 named assertions):
8+
# SC1: Step 7 heading present after Step 6 in SKILL.md
9+
# SC2: Option descriptions include brief summaries of what each skill produces
10+
# SC3: AskUserQuestion with 4 options when both skills available
11+
# SC4: yes/no variant when only one skill available
12+
# SC5: dev-onboarding invoked before design-onboarding in the sequence
13+
# SC6: skip option ends setup with no additional steps
14+
# SC8a: references DESIGN_NOTES.md and ARCH_ENFORCEMENT.md for artifact detection
15+
# SC8b: both artifacts present → prompt skipped entirely
16+
#
17+
# Usage: bash tests/skills/test-project-setup-onboarding-step.sh
18+
# Returns: exit 0 if all tests pass, exit 1 if any fail
19+
20+
set -uo pipefail
21+
22+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
23+
PLUGIN_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
24+
DSO_PLUGIN_DIR="$PLUGIN_ROOT/plugins/dso"
25+
SKILL_MD="$DSO_PLUGIN_DIR/skills/project-setup/SKILL.md"
26+
27+
source "$PLUGIN_ROOT/tests/lib/assert.sh"
28+
29+
echo "=== test-project-setup-onboarding-step.sh ==="
30+
31+
# test_step7_exists (SC1): Step 7 heading must be present in SKILL.md after Step 6
32+
test_step7_exists() {
33+
_snapshot_fail
34+
local step7_exists="missing"
35+
if grep -q "^## Step 7" "$SKILL_MD" 2>/dev/null; then
36+
local step6_line step7_line
37+
step6_line=$(grep -n "^## Step 6" "$SKILL_MD" 2>/dev/null | head -1 | cut -d: -f1)
38+
step7_line=$(grep -n "^## Step 7" "$SKILL_MD" 2>/dev/null | head -1 | cut -d: -f1)
39+
if [[ -n "$step6_line" && -n "$step7_line" && "$step7_line" -gt "$step6_line" ]]; then
40+
step7_exists="found"
41+
fi
42+
fi
43+
assert_eq "test_step7_exists" "found" "$step7_exists"
44+
assert_pass_if_clean "test_step7_exists"
45+
}
46+
47+
# test_descriptive_labels (SC2): option descriptions must include brief summaries of
48+
# what each skill produces (e.g. what dev-onboarding and design-onboarding generate)
49+
test_descriptive_labels() {
50+
_snapshot_fail
51+
local step7_content has_skill_names has_descriptions has_descriptive_labels
52+
step7_content=$(awk '/^## Step 7/,/^## Step [89]|^## Error/' "$SKILL_MD" 2>/dev/null)
53+
if echo "$step7_content" | grep -qiE "dev-onboarding|design-onboarding"; then
54+
has_skill_names="yes"
55+
else
56+
has_skill_names="no"
57+
fi
58+
if echo "$step7_content" | grep -qiE "produces|generates|creates|sets up|ARCH_ENFORCEMENT|DESIGN_NOTES|codebase guide|architecture"; then
59+
has_descriptions="yes"
60+
else
61+
has_descriptions="no"
62+
fi
63+
if [[ "$has_skill_names" == "yes" && "$has_descriptions" == "yes" ]]; then
64+
has_descriptive_labels="found"
65+
else
66+
has_descriptive_labels="missing"
67+
fi
68+
assert_eq "test_descriptive_labels" "found" "$has_descriptive_labels"
69+
assert_pass_if_clean "test_descriptive_labels"
70+
}
71+
72+
# test_four_option_prompt (SC3): Step 7 must include an AskUserQuestion with 4 options
73+
# when both skills are available (dev-onboarding and design-onboarding)
74+
test_four_option_prompt() {
75+
_snapshot_fail
76+
local step7_content four_option_found
77+
step7_content=$(awk '/^## Step 7/,/^## Step [89]|^## Error/' "$SKILL_MD" 2>/dev/null)
78+
four_option_found="missing"
79+
if echo "$step7_content" | grep -qiE "AskUserQuestion"; then
80+
if echo "$step7_content" | grep -qiE "both.*onboarding|run both|both skills|option.*both|4\)"; then
81+
four_option_found="found"
82+
fi
83+
fi
84+
assert_eq "test_four_option_prompt" "found" "$four_option_found"
85+
assert_pass_if_clean "test_four_option_prompt"
86+
}
87+
88+
# test_single_option_prompt (SC4): Step 7 must include a yes/no variant for when
89+
# only one onboarding skill is available
90+
test_single_option_prompt() {
91+
_snapshot_fail
92+
local step7_content single_option_found
93+
step7_content=$(awk '/^## Step 7/,/^## Step [89]|^## Error/' "$SKILL_MD" 2>/dev/null)
94+
single_option_found="missing"
95+
if echo "$step7_content" | grep -qiE "only one|one.*available|yes.*no|yes/no|if only"; then
96+
single_option_found="found"
97+
fi
98+
assert_eq "test_single_option_prompt" "found" "$single_option_found"
99+
assert_pass_if_clean "test_single_option_prompt"
100+
}
101+
102+
# test_invocation_order (SC5): dev-onboarding must be invoked before design-onboarding
103+
# when running in sequence (dev-onboarding appears at a lower line number)
104+
test_invocation_order() {
105+
_snapshot_fail
106+
local step7_content dev_line design_line invocation_order_ok
107+
step7_content=$(awk '/^## Step 7/,/^## Step [89]|^## Error/' "$SKILL_MD" 2>/dev/null)
108+
invocation_order_ok="missing"
109+
dev_line=$(echo "$step7_content" | grep -n "dev-onboarding" | head -1 | cut -d: -f1)
110+
design_line=$(echo "$step7_content" | grep -n "design-onboarding" | head -1 | cut -d: -f1)
111+
if [[ -n "$dev_line" && -n "$design_line" && "$dev_line" -lt "$design_line" ]]; then
112+
invocation_order_ok="found"
113+
fi
114+
assert_eq "test_invocation_order" "found" "$invocation_order_ok"
115+
assert_pass_if_clean "test_invocation_order"
116+
}
117+
118+
# test_skip_ends_setup (SC6): skip option must end setup with no additional steps
119+
test_skip_ends_setup() {
120+
_snapshot_fail
121+
local step7_content skip_ends_setup
122+
step7_content=$(awk '/^## Step 7/,/^## Step [89]|^## Error/' "$SKILL_MD" 2>/dev/null)
123+
skip_ends_setup="missing"
124+
if echo "$step7_content" | grep -qiE "skip.*setup.*complete|skip.*no.*additional|skip.*end|skip.*nothing|skip.*done|setup is complete|no additional steps"; then
125+
skip_ends_setup="found"
126+
fi
127+
assert_eq "test_skip_ends_setup" "found" "$skip_ends_setup"
128+
assert_pass_if_clean "test_skip_ends_setup"
129+
}
130+
131+
# test_artifact_detection (SC8): Step 7 must reference DESIGN_NOTES.md and
132+
# ARCH_ENFORCEMENT.md as the artifacts used to detect whether onboarding already ran
133+
test_artifact_detection() {
134+
_snapshot_fail
135+
local step7_content has_design_notes has_arch_enforcement artifact_detection
136+
step7_content=$(awk '/^## Step 7/,/^## Step [89]|^## Error/' "$SKILL_MD" 2>/dev/null)
137+
has_design_notes="no"
138+
has_arch_enforcement="no"
139+
if echo "$step7_content" | grep -q "DESIGN_NOTES.md"; then
140+
has_design_notes="yes"
141+
fi
142+
if echo "$step7_content" | grep -q "ARCH_ENFORCEMENT.md"; then
143+
has_arch_enforcement="yes"
144+
fi
145+
if [[ "$has_design_notes" == "yes" && "$has_arch_enforcement" == "yes" ]]; then
146+
artifact_detection="found"
147+
else
148+
artifact_detection="missing"
149+
fi
150+
assert_eq "test_artifact_detection" "found" "$artifact_detection"
151+
assert_pass_if_clean "test_artifact_detection"
152+
}
153+
154+
# test_both_artifacts_skip_entirely (SC8): when both DESIGN_NOTES.md and
155+
# ARCH_ENFORCEMENT.md are present, the prompt must be skipped entirely
156+
test_both_artifacts_skip_entirely() {
157+
_snapshot_fail
158+
local step7_content both_artifacts_skip
159+
step7_content=$(awk '/^## Step 7/,/^## Step [89]|^## Error/' "$SKILL_MD" 2>/dev/null)
160+
both_artifacts_skip="missing"
161+
if echo "$step7_content" | grep -qiE "both.*present.*skip|skip.*both.*present|both.*artifact.*skip|already.*both.*skip|both.*exist.*skip|skip.*entirely|skip.*prompt|skip this step"; then
162+
both_artifacts_skip="found"
163+
fi
164+
assert_eq "test_both_artifacts_skip_entirely" "found" "$both_artifacts_skip"
165+
assert_pass_if_clean "test_both_artifacts_skip_entirely"
166+
}
167+
168+
# Run all 8 assertion functions
169+
test_step7_exists
170+
test_descriptive_labels
171+
test_four_option_prompt
172+
test_single_option_prompt
173+
test_invocation_order
174+
test_skip_ends_setup
175+
test_artifact_detection
176+
test_both_artifacts_skip_entirely
177+
178+
print_summary

0 commit comments

Comments
 (0)