spec-runner 1.1.2 → 1.1.4
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/docs/flow.md
CHANGED
package/package.json
CHANGED
|
@@ -45,11 +45,12 @@ UC_ID_RE="$(jq -r '.naming.uc_id_pattern' "$PROJECT_JSON")"
|
|
|
45
45
|
exit 1
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
local
|
|
48
|
+
next_uc_id_for_category() {
|
|
49
|
+
local category="$1"
|
|
50
|
+
local dir="$REPO_ROOT/docs/02_ユースケース仕様/${category}"
|
|
50
51
|
mkdir -p "$dir"
|
|
51
52
|
local max=0
|
|
52
|
-
for f in "$dir"
|
|
53
|
+
for f in "$dir"/UC-*.md; do
|
|
53
54
|
[[ -e "$f" ]] || continue
|
|
54
55
|
base=$(basename "$f" .md)
|
|
55
56
|
if [[ "$base" =~ ^(${UC_ID_RE})- ]]; then
|
|
@@ -63,7 +64,8 @@ next_uc_id() {
|
|
|
63
64
|
printf "UC-%d\n" $((max + 1))
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
NEXT_UC="
|
|
67
|
+
NEXT_UC=""
|
|
68
|
+
UC_ID_EXPLICIT=0
|
|
67
69
|
SLUG=""
|
|
68
70
|
TITLE=""
|
|
69
71
|
CATEGORY=""
|
|
@@ -74,6 +76,7 @@ if [[ ${#ARGS[@]} -ge 1 ]] && [[ "${ARGS[0]}" =~ ^${UC_ID_RE}$ ]]; then
|
|
|
74
76
|
exit 1
|
|
75
77
|
}
|
|
76
78
|
NEXT_UC="${ARGS[0]}"
|
|
79
|
+
UC_ID_EXPLICIT=1
|
|
77
80
|
SLUG="${ARGS[1]}"
|
|
78
81
|
TITLE="${ARGS[2]}"
|
|
79
82
|
CATEGORY="${ARGS[3]}"
|
|
@@ -113,6 +116,10 @@ if [[ -z "$CATEGORY" ]]; then
|
|
|
113
116
|
exit 1
|
|
114
117
|
fi
|
|
115
118
|
|
|
119
|
+
if [[ $UC_ID_EXPLICIT -eq 0 ]]; then
|
|
120
|
+
NEXT_UC="$(next_uc_id_for_category "$CATEGORY")"
|
|
121
|
+
fi
|
|
122
|
+
|
|
116
123
|
FEATURE_DIR="docs/02_ユースケース仕様/${CATEGORY}"
|
|
117
124
|
UC_DOC="${FEATURE_DIR}/${NEXT_UC}-${DOC_TITLE}.md"
|
|
118
125
|
|
|
@@ -28,9 +28,10 @@ $ARGUMENTS
|
|
|
28
28
|
|
|
29
29
|
## フォルダの作成
|
|
30
30
|
|
|
31
|
-
- **`docs/02_ユースケース仕様/`** が無ければ新規作成。**カテゴリごとにフォルダ**(例: タスク管理、認証)を切り、その中に **UC-N-xxx.md
|
|
31
|
+
- **`docs/02_ユースケース仕様/`** が無ければ新規作成。**カテゴリごとにフォルダ**(例: タスク管理、認証)を切り、その中に **UC-N-xxx.md を複数本**作る(カテゴリは 1 UC で終わらせない)。
|
|
32
32
|
- `uc-next-start.sh` でカテゴリ指定するとそのフォルダ内に作成される。
|
|
33
33
|
- **CRUD は原則別 UC**(作成 / 編集 / 削除を分ける)。同一フロー・同一権限・同一受入条件で差分が小さい場合のみ統合可。
|
|
34
|
+
- 目安: 1カテゴリにつき最低 2〜3 UC。MVP は最小 1 UC でも可だが、次に必ず細分化候補を洗い出す。
|
|
34
35
|
|
|
35
36
|
## 実行フロー
|
|
36
37
|
|