timsquad 3.7.1 → 3.8.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.
Files changed (91) hide show
  1. package/README.ko.md +3 -2
  2. package/README.md +39 -4
  3. package/dist/commands/audit.d.ts +6 -0
  4. package/dist/commands/audit.d.ts.map +1 -0
  5. package/dist/commands/audit.js +111 -0
  6. package/dist/commands/audit.js.map +1 -0
  7. package/dist/commands/log.d.ts +6 -0
  8. package/dist/commands/log.d.ts.map +1 -0
  9. package/dist/commands/log.js +85 -0
  10. package/dist/commands/log.js.map +1 -0
  11. package/dist/commands/next.d.ts +15 -0
  12. package/dist/commands/next.d.ts.map +1 -0
  13. package/dist/commands/next.js +146 -0
  14. package/dist/commands/next.js.map +1 -0
  15. package/dist/commands/plan.d.ts +6 -0
  16. package/dist/commands/plan.d.ts.map +1 -0
  17. package/dist/commands/plan.js +83 -0
  18. package/dist/commands/plan.js.map +1 -0
  19. package/dist/commands/retro.d.ts +6 -0
  20. package/dist/commands/retro.d.ts.map +1 -0
  21. package/dist/commands/retro.js +74 -0
  22. package/dist/commands/retro.js.map +1 -0
  23. package/dist/commands/spec.d.ts +6 -0
  24. package/dist/commands/spec.d.ts.map +1 -0
  25. package/dist/commands/spec.js +56 -0
  26. package/dist/commands/spec.js.map +1 -0
  27. package/dist/commands/status.d.ts +6 -0
  28. package/dist/commands/status.d.ts.map +1 -0
  29. package/dist/commands/status.js +99 -0
  30. package/dist/commands/status.js.map +1 -0
  31. package/dist/daemon/index.d.ts.map +1 -1
  32. package/dist/daemon/index.js +12 -10
  33. package/dist/daemon/index.js.map +1 -1
  34. package/dist/daemon/meta-cache.d.ts +2 -1
  35. package/dist/daemon/meta-cache.d.ts.map +1 -1
  36. package/dist/daemon/meta-cache.js +20 -4
  37. package/dist/daemon/meta-cache.js.map +1 -1
  38. package/dist/index.js +15 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/lib/config.d.ts.map +1 -1
  41. package/dist/lib/config.js +14 -1
  42. package/dist/lib/config.js.map +1 -1
  43. package/dist/lib/planning-parser.d.ts +65 -0
  44. package/dist/lib/planning-parser.d.ts.map +1 -0
  45. package/dist/lib/planning-parser.js +306 -0
  46. package/dist/lib/planning-parser.js.map +1 -0
  47. package/dist/lib/skill-generator.d.ts.map +1 -1
  48. package/dist/lib/skill-generator.js +7 -3
  49. package/dist/lib/skill-generator.js.map +1 -1
  50. package/dist/lib/template.d.ts.map +1 -1
  51. package/dist/lib/template.js +16 -5
  52. package/dist/lib/template.js.map +1 -1
  53. package/dist/lib/workflow-state.d.ts +77 -0
  54. package/dist/lib/workflow-state.d.ts.map +1 -1
  55. package/dist/lib/workflow-state.js +194 -0
  56. package/dist/lib/workflow-state.js.map +1 -1
  57. package/dist/types/config.d.ts +14 -0
  58. package/dist/types/config.d.ts.map +1 -1
  59. package/dist/types/config.js +13 -2
  60. package/dist/types/config.js.map +1 -1
  61. package/package.json +1 -1
  62. package/templates/base/agents/base/tsq-librarian.md +1 -1
  63. package/templates/base/scripts/calculate-retro-metrics.sh +46 -0
  64. package/templates/base/scripts/check-circular-deps.sh +82 -0
  65. package/templates/base/scripts/cleanup-trails.sh +44 -0
  66. package/templates/base/scripts/generate-prd-traceability.sh +91 -0
  67. package/templates/base/scripts/manage-fp-registry.sh +83 -0
  68. package/templates/base/scripts/validate-gherkin.sh +113 -0
  69. package/templates/base/skills/tsq-controller/SKILL.md +60 -37
  70. package/templates/base/skills/tsq-controller/references/model-routing.md +38 -0
  71. package/templates/base/skills/tsq-controller/references/wave-dispatch.md +50 -0
  72. package/templates/base/skills/tsq-full/SKILL.md +12 -9
  73. package/templates/base/skills/tsq-grill/SKILL.md +60 -55
  74. package/templates/base/skills/tsq-grill/references/interview-guide.md +86 -0
  75. package/templates/base/skills/tsq-inspect/SKILL.md +108 -0
  76. package/templates/base/skills/tsq-inspect/references/checklist.md +162 -0
  77. package/templates/base/skills/tsq-start/SKILL.md +17 -44
  78. package/templates/base/skills/tsq-start/references/onboarding-steps.md +85 -0
  79. package/templates/platforms/claude-code/scripts/build-gate.sh +25 -2
  80. package/templates/platforms/claude-code/scripts/check-capability.sh +41 -10
  81. package/templates/platforms/claude-code/scripts/completion-guard.sh +79 -3
  82. package/templates/platforms/claude-code/scripts/detect-env.sh +124 -0
  83. package/templates/platforms/claude-code/scripts/stale-guard.sh +47 -0
  84. package/templates/platforms/claude-code/scripts/subagent-stop.sh +41 -2
  85. package/templates/platforms/claude-code/scripts/tdd-guard.sh +57 -0
  86. package/templates/platforms/claude-code/scripts/validate-completion-report.sh +86 -0
  87. package/templates/platforms/claude-code/settings.json +10 -0
  88. package/templates/project-types/fintech/config.yaml +1 -1
  89. package/templates/project-types/mobile-app/config.yaml +1 -1
  90. package/templates/project-types/web-app/config.yaml +1 -1
  91. package/templates/project-types/web-service/config.yaml +1 -1
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env bash
2
+ # Completion Report 스키마 검증 (A-2 CRITICAL Hook)
3
+ #
4
+ # 서브에이전트의 Completion Report 5필드 검증:
5
+ # Task, Status, Files, Tests, Notes
6
+ #
7
+ # 사용:
8
+ # bash validate-completion-report.sh [project-root]
9
+ # 또는 다른 hook에서 source로 함수만 사용
10
+ #
11
+ # 반환:
12
+ # 0 = valid, 1 = invalid (누락 필드 정보 stderr 출력)
13
+
14
+ set -euo pipefail
15
+
16
+ validate_completion_report() {
17
+ local project_root="${1:-.}"
18
+ local context_file="$project_root/.timsquad/.daemon/task-context.json"
19
+ local logs_dir="$project_root/.timsquad/logs"
20
+
21
+ # task-context.json에서 현재 task ID 확인
22
+ local task_id=""
23
+ if [ -f "$context_file" ]; then
24
+ task_id=$(jq -r '.taskId // ""' "$context_file" 2>/dev/null || echo "")
25
+ fi
26
+
27
+ # task ID가 없으면 파이프라인 외 실행 — 스킵
28
+ if [ -z "$task_id" ]; then
29
+ return 0
30
+ fi
31
+
32
+ # 최신 로그 파일에서 Completion Report 검색
33
+ local latest_log=""
34
+ if [ -d "$logs_dir" ]; then
35
+ latest_log=$(find "$logs_dir" -name "*.md" -newer "$context_file" -type f 2>/dev/null | sort -r | head -1)
36
+ fi
37
+
38
+ # 로그 파일이 없으면 아직 보고서 미생성 — 경고만
39
+ if [ -z "$latest_log" ]; then
40
+ return 0
41
+ fi
42
+
43
+ local content
44
+ content=$(cat "$latest_log")
45
+
46
+ # 5필드 검증
47
+ local missing=""
48
+ echo "$content" | grep -qi 'Task:' || missing="${missing}Task, "
49
+ echo "$content" | grep -qiE 'Status:\s*(pass|fail|blocked)' || missing="${missing}Status, "
50
+ echo "$content" | grep -qi 'Files' || missing="${missing}Files, "
51
+ echo "$content" | grep -qi 'Tests' || missing="${missing}Tests, "
52
+ echo "$content" | grep -qi 'Notes' || missing="${missing}Notes, "
53
+
54
+ if [ -n "$missing" ]; then
55
+ missing="${missing%, }"
56
+ echo "[Completion Report] 누락 필드: $missing. 5필드(Task, Status, Files, Tests, Notes)를 모두 포함해야 합니다." >&2
57
+ return 1
58
+ fi
59
+
60
+ return 0
61
+ }
62
+
63
+ # 직접 실행 시
64
+ if [ "${BASH_SOURCE[0]}" = "$0" ]; then
65
+ PROJECT_ROOT="${1:-.}"
66
+
67
+ # Find project root
68
+ # Canonicalize and validate project root
69
+ if [ "$PROJECT_ROOT" = "." ]; then
70
+ PROJECT_ROOT="$(pwd)"
71
+ while [ "$PROJECT_ROOT" != "/" ]; do
72
+ [ -d "$PROJECT_ROOT/.timsquad" ] && break
73
+ PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
74
+ done
75
+ else
76
+ PROJECT_ROOT=$(cd "$PROJECT_ROOT" 2>/dev/null && pwd || echo "")
77
+ fi
78
+
79
+ if [ ! -d "$PROJECT_ROOT/.timsquad" ]; then
80
+ exit 0
81
+ fi
82
+
83
+ if ! validate_completion_report "$PROJECT_ROOT"; then
84
+ exit 1
85
+ fi
86
+ fi
@@ -18,6 +18,16 @@
18
18
  "type": "command",
19
19
  "command": "bash .claude/scripts/change-scope-guard.sh 2>/dev/null || true",
20
20
  "timeout": 3
21
+ },
22
+ {
23
+ "type": "command",
24
+ "command": "bash .claude/scripts/tdd-guard.sh 2>/dev/null || true",
25
+ "timeout": 3
26
+ },
27
+ {
28
+ "type": "command",
29
+ "command": "bash .claude/scripts/stale-guard.sh 2>/dev/null || true",
30
+ "timeout": 3
21
31
  }
22
32
  ]
23
33
  },
@@ -4,7 +4,7 @@
4
4
  template:
5
5
  name: fintech
6
6
  description: 금융/결제 시스템을 위한 보안 강화 템플릿
7
- version: 3.7.0
7
+ version: 3.8.0
8
8
 
9
9
  # ============================================================
10
10
  # 프로젝트 기본값
@@ -4,7 +4,7 @@
4
4
  template:
5
5
  name: mobile-app
6
6
  description: 크로스플랫폼 모바일 앱을 위한 템플릿
7
- version: 3.7.0
7
+ version: 3.8.0
8
8
 
9
9
  # ============================================================
10
10
  # 프로젝트 기본값 (덮어쓰기 가능)
@@ -4,7 +4,7 @@
4
4
  template:
5
5
  name: web-app
6
6
  description: BaaS 기반 웹앱을 위한 템플릿
7
- version: 3.7.0
7
+ version: 3.8.0
8
8
 
9
9
  # ============================================================
10
10
  # 프로젝트 기본값
@@ -4,7 +4,7 @@
4
4
  template:
5
5
  name: web-service
6
6
  description: SaaS, 웹앱을 위한 템플릿
7
- version: 3.7.0
7
+ version: 3.8.0
8
8
 
9
9
  # ============================================================
10
10
  # 프로젝트 기본값 (덮어쓰기 가능)