ai-core-framework 0.1.0 → 0.2.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 +16 -16
- package/{core/agents → agents}/business-analyst.md +1 -1
- package/{core/agents → agents}/scrum-master.md +7 -3
- package/bin/ai-core-framework.js +4 -4
- package/hooks/hooks-cursor.json +16 -0
- package/hooks/hooks.json +16 -0
- package/hooks/session-start +21 -0
- package/lib/install-codex.js +39 -7
- package/package.json +9 -2
- package/{core/rules → rules}/00-global-rules.md +6 -6
- package/{core/rules → rules}/04-documentation.md +1 -1
- package/{core/scripts → scripts}/ai-core.sh +35 -13
- package/{core/scripts → scripts}/install-codex-prompts.sh +23 -15
- package/{core/scripts → scripts}/log-user-request.sh +3 -3
- package/{core/scripts → scripts}/setup-project.sh +18 -23
- package/{core/scripts → scripts}/sync-platforms.sh +47 -43
- package/{core/scripts → scripts}/validate-audit-log.sh +1 -1
- package/{core/scripts → scripts}/validate-docs.sh +1 -1
- package/{core/scripts → scripts}/validate-permissions.sh +15 -1
- package/{core/scripts → scripts}/validate-state.sh +2 -2
- package/{core/scripts → scripts}/workflow.sh +7 -7
- package/{core/skills → skills}/ai-core-commands/SKILL.md +9 -9
- package/{core/skills → skills}/development-implement-task/SKILL.md +2 -2
- package/{core/skills → skills}/meta-sync-platforms/SKILL.md +5 -5
- package/{core/skills → skills}/meta-validate-audit-log/SKILL.md +1 -1
- package/{core/skills → skills}/meta-validate-docs/SKILL.md +1 -1
- package/{core/skills → skills}/meta-validate-permissions/SKILL.md +2 -2
- package/{core/skills → skills}/meta-validate-state/SKILL.md +2 -2
- package/{core/skills → skills}/planning-analyze-requirements/SKILL.md +3 -3
- package/{core/skills → skills}/planning-mark-ready/SKILL.md +1 -1
- package/{core/skills → skills}/planning-plan-refactor/SKILL.md +3 -3
- package/{core/skills → skills}/project-setup-project/SKILL.md +19 -19
- package/{core/skills → skills}/qa-report-bug/SKILL.md +1 -1
- package/{core/skills → skills}/release-release/SKILL.md +2 -2
- package/{core/skills → skills}/using-ai-core/SKILL.md +2 -3
- package/{core/templates → templates}/ci/ai-core-governance.yml +23 -13
- package/{core/templates → templates}/project/CODEOWNERS +6 -1
- package/templates/project/docs-policy.json +3 -0
- package/{core/templates → templates}/project/project-structure.yaml +11 -11
- package/{core/templates → templates}/qa/bug-report-template.md +1 -1
- package/{core/templates → templates}/requirements/user-story-template.md +1 -1
- package/core/README.md +0 -162
- package/core/templates/project/docs-policy.json +0 -3
- /package/{core/agents → agents}/README.md +0 -0
- /package/{core/agents → agents}/developer.md +0 -0
- /package/{core/agents → agents}/qa-tester.md +0 -0
- /package/{core/agents → agents}/tech-lead.md +0 -0
- /package/{core/config → config}/backlog.schema.json +0 -0
- /package/{core/config → config}/docs-policy.default.json +0 -0
- /package/{core/config → config}/release.schema.json +0 -0
- /package/{core/config → config}/ticket.schema.json +0 -0
- /package/{core/rules → rules}/01-git-workflow.md +0 -0
- /package/{core/rules → rules}/02-code-quality.md +0 -0
- /package/{core/rules → rules}/03-security.md +0 -0
- /package/{core/rules → rules}/05-testing-mandatory.md +0 -0
- /package/{core/rules → rules}/06-approval-gates.md +0 -0
- /package/{core/rules → rules}/07-definition-of-ready.md +0 -0
- /package/{core/rules → rules}/08-definition-of-done.md +0 -0
- /package/{core/scripts → scripts}/generate-views.sh +0 -0
- /package/{core/skills → skills}/README.md +0 -0
- /package/{core/skills → skills}/brainstorming/SKILL.md +0 -0
- /package/{core/skills → skills}/executing-ticket/SKILL.md +0 -0
- /package/{core/skills → skills}/git-branch-status/SKILL.md +0 -0
- /package/{core/skills → skills}/git-cleanup-branches/SKILL.md +0 -0
- /package/{core/skills → skills}/git-scan-untracked/SKILL.md +0 -0
- /package/{core/skills → skills}/meta-generate-views/SKILL.md +0 -0
- /package/{core/skills → skills}/meta-request-log/SKILL.md +0 -0
- /package/{core/skills → skills}/meta-sprint-report/SKILL.md +0 -0
- /package/{core/skills → skills}/meta-ticket-health/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-backlog-status/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-document-existing-requirements/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-estimate-task/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-groom-ticket/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-plan-sprint/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-prioritize-backlog/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-write-plan/SKILL.md +0 -0
- /package/{core/skills → skills}/project-detect-stack/SKILL.md +0 -0
- /package/{core/skills → skills}/project-discover-codebase/SKILL.md +0 -0
- /package/{core/skills → skills}/qa-bug-status/SKILL.md +0 -0
- /package/{core/skills → skills}/qa-smoke-test/SKILL.md +0 -0
- /package/{core/skills → skills}/qa-triage-bug/SKILL.md +0 -0
- /package/{core/skills → skills}/qa-verify-fix/SKILL.md +0 -0
- /package/{core/skills → skills}/release-hotfix/SKILL.md +0 -0
- /package/{core/skills → skills}/release-rollback/SKILL.md +0 -0
- /package/{core/skills → skills}/review-create-pr/SKILL.md +0 -0
- /package/{core/skills → skills}/review-merge-pr/SKILL.md +0 -0
- /package/{core/skills → skills}/review-techlead-review/SKILL.md +0 -0
- /package/{core/skills → skills}/verification-before-done/SKILL.md +0 -0
- /package/{core/skills → skills}/writing-implementation-plan/SKILL.md +0 -0
- /package/{core/templates → templates}/ci/node-pnpm.yml +0 -0
- /package/{core/templates → templates}/pm/retrospective-template.md +0 -0
- /package/{core/templates → templates}/pm/sprint-plan-template.md +0 -0
- /package/{core/templates → templates}/pr/pull-request-template.md +0 -0
- /package/{core/templates → templates}/project/project-config.yaml +0 -0
- /package/{core/templates → templates}/qa/test-plan-template.md +0 -0
- /package/{core/templates → templates}/release/release-record-template.json +0 -0
- /package/{core/templates → templates}/requirements/PRD-template.md +0 -0
- /package/{core/templates → templates}/technical/ADR-template.md +0 -0
- /package/{core/templates → templates}/technical/refactor-plan-template.md +0 -0
- /package/{core/templates → templates}/technical/tech-design-template.md +0 -0
- /package/{core/workflows → workflows}/bug-lifecycle.md +0 -0
- /package/{core/workflows → workflows}/feature-lifecycle.md +0 -0
- /package/{core/workflows → workflows}/hotfix-lifecycle.md +0 -0
- /package/{core/workflows → workflows}/sprint-lifecycle.md +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# ============================================================================
|
|
3
3
|
# sync-platforms.sh
|
|
4
|
-
# Sync
|
|
5
|
-
# Usage: bash
|
|
4
|
+
# Sync root-level framework folders to Claude Code, Cursor, and Windsurf format.
|
|
5
|
+
# Usage: bash scripts/sync-platforms.sh
|
|
6
6
|
# ============================================================================
|
|
7
7
|
|
|
8
8
|
set -euo pipefail
|
|
9
9
|
|
|
10
10
|
AI_CORE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
-
PROJECT_ROOT="$
|
|
11
|
+
PROJECT_ROOT="$AI_CORE_DIR"
|
|
12
12
|
|
|
13
|
-
echo "🔄 Syncing
|
|
13
|
+
echo "🔄 Syncing root-level framework folders to AI platforms..."
|
|
14
14
|
echo " Source: $AI_CORE_DIR"
|
|
15
15
|
echo " Target: $PROJECT_ROOT"
|
|
16
16
|
|
|
@@ -41,14 +41,16 @@ sync_claude_code() {
|
|
|
41
41
|
done
|
|
42
42
|
|
|
43
43
|
# --- Sync commands (flatten from subdirs) ---
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
if [ -d "$AI_CORE_DIR/commands" ]; then
|
|
45
|
+
find "$AI_CORE_DIR/commands" -name "*.md" -type f | while read -r cmd_file; do
|
|
46
|
+
local basename
|
|
47
|
+
basename=$(basename "$cmd_file")
|
|
48
|
+
# Skip README files
|
|
49
|
+
[[ "$basename" == "README.md" ]] && continue
|
|
50
|
+
cp "$cmd_file" "$claude_dir/commands/$basename"
|
|
51
|
+
echo " ✓ command: $basename"
|
|
52
|
+
done
|
|
53
|
+
fi
|
|
52
54
|
|
|
53
55
|
# --- Sync skills ---
|
|
54
56
|
for skill_file in "$AI_CORE_DIR"/skills/*/SKILL.md; do
|
|
@@ -64,22 +66,22 @@ sync_claude_code() {
|
|
|
64
66
|
cat > "$PROJECT_ROOT/CLAUDE.md" <<'EOF'
|
|
65
67
|
# Project Instructions for Claude Code
|
|
66
68
|
|
|
67
|
-
This project uses
|
|
69
|
+
This project uses root-level framework folders for structured Agile/Scrum development.
|
|
68
70
|
|
|
69
71
|
## 🚨 CRITICAL: Read these first
|
|
70
72
|
|
|
71
|
-
1. **Rules**: See `
|
|
72
|
-
2. **Agents**: See `
|
|
73
|
-
3. **Skills**: See `
|
|
74
|
-
4. **Commands**: See `
|
|
75
|
-
5. **Workflows**: See `
|
|
73
|
+
1. **Rules**: See `rules/00-global-rules.md` — **MUST follow**
|
|
74
|
+
2. **Agents**: See `agents/` — pick correct agent for task
|
|
75
|
+
3. **Skills**: See `skills/using-ai-core/SKILL.md` — chat-first bootstrap
|
|
76
|
+
4. **Commands**: See `commands/` — use slash commands for workflows
|
|
77
|
+
5. **Workflows**: See `workflows/feature-lifecycle.md`
|
|
76
78
|
|
|
77
79
|
## Quick reference
|
|
78
80
|
|
|
79
81
|
### User interface
|
|
80
82
|
The normal user interface is the AI chat window. When the user types `/command ...`,
|
|
81
83
|
`guide /command ...`, or `next TICKET-XXX`, interpret it as an AI Core workflow
|
|
82
|
-
request. Do not ask the user to run `bash
|
|
84
|
+
request. Do not ask the user to run `bash scripts/ai-core.sh` or set
|
|
83
85
|
`AI_AGENT`; use those executable scripts internally only when helpful.
|
|
84
86
|
|
|
85
87
|
### Before any code change
|
|
@@ -100,7 +102,7 @@ DRAFT → GROOMED → READY → IN_PROGRESS → IN_REVIEW → QA → DONE
|
|
|
100
102
|
|
|
101
103
|
## ❌ Absolute prohibitions
|
|
102
104
|
|
|
103
|
-
See `
|
|
105
|
+
See `rules/00-global-rules.md` → G-011
|
|
104
106
|
|
|
105
107
|
## 🎭 Your current role
|
|
106
108
|
|
|
@@ -115,10 +117,10 @@ Read the agent file to understand your boundaries.
|
|
|
115
117
|
|
|
116
118
|
## Skill bootstrap
|
|
117
119
|
|
|
118
|
-
At session start or before any workflow request, read `
|
|
119
|
-
For feature discovery use `
|
|
120
|
-
For implementation plans use `
|
|
121
|
-
For completion claims use `
|
|
120
|
+
At session start or before any workflow request, read `skills/using-ai-core/SKILL.md`.
|
|
121
|
+
For feature discovery use `skills/brainstorming/SKILL.md`.
|
|
122
|
+
For implementation plans use `skills/writing-implementation-plan/SKILL.md`.
|
|
123
|
+
For completion claims use `skills/verification-before-done/SKILL.md`.
|
|
122
124
|
EOF
|
|
123
125
|
echo " ✓ CLAUDE.md"
|
|
124
126
|
|
|
@@ -149,12 +151,12 @@ alwaysApply: true
|
|
|
149
151
|
|
|
150
152
|
# Project Rules
|
|
151
153
|
|
|
152
|
-
This project uses
|
|
154
|
+
This project uses root-level framework folders. Read these files for full context:
|
|
153
155
|
|
|
154
|
-
- `
|
|
155
|
-
- `
|
|
156
|
-
- `
|
|
157
|
-
- `
|
|
156
|
+
- `rules/00-global-rules.md` — Hard rules (MUST follow)
|
|
157
|
+
- `agents/` — Agent personas
|
|
158
|
+
- `commands/` — Workflow commands
|
|
159
|
+
- `workflows/feature-lifecycle.md` — End-to-end process
|
|
158
160
|
|
|
159
161
|
## Top 10 Rules (summary)
|
|
160
162
|
|
|
@@ -167,7 +169,7 @@ This project uses `core/` framework. Read these files for full context:
|
|
|
167
169
|
7. **No direct push** to main/develop
|
|
168
170
|
8. **No secrets** committed
|
|
169
171
|
9. **No self-approval** of PRs
|
|
170
|
-
10. **Follow agent boundaries** in `
|
|
172
|
+
10. **Follow agent boundaries** in `agents/<agent>.md`
|
|
171
173
|
|
|
172
174
|
## Before any task
|
|
173
175
|
|
|
@@ -188,7 +190,7 @@ Users should type workflow commands in chat, for example:
|
|
|
188
190
|
- `guide /mark-ready TICKET-001`
|
|
189
191
|
- `next TICKET-001`
|
|
190
192
|
|
|
191
|
-
Do not require users to type shell commands such as `bash
|
|
193
|
+
Do not require users to type shell commands such as `bash scripts/ai-core.sh`
|
|
192
194
|
or environment variables such as `AI_AGENT=...`. Shell scripts are internal tools
|
|
193
195
|
for deterministic execution, validation, and CI.
|
|
194
196
|
EOF
|
|
@@ -264,15 +266,15 @@ sync_windsurf() {
|
|
|
264
266
|
cat > "$windsurf_file" <<'EOF'
|
|
265
267
|
# Windsurf Project Rules
|
|
266
268
|
|
|
267
|
-
This project uses
|
|
269
|
+
This project uses root-level framework folders for Agile/Scrum enforcement.
|
|
268
270
|
|
|
269
271
|
## Required Reading
|
|
270
272
|
|
|
271
273
|
Before ANY task, read:
|
|
272
|
-
1. `
|
|
273
|
-
2. `
|
|
274
|
-
3. `
|
|
275
|
-
4. `
|
|
274
|
+
1. `rules/00-global-rules.md` — hard rules
|
|
275
|
+
2. `agents/` — role definitions
|
|
276
|
+
3. `skills/using-ai-core/SKILL.md` — chat-first bootstrap
|
|
277
|
+
4. `workflows/feature-lifecycle.md` — process
|
|
276
278
|
|
|
277
279
|
## Non-negotiable rules
|
|
278
280
|
|
|
@@ -284,12 +286,14 @@ EOF
|
|
|
284
286
|
echo "" >> "$windsurf_file"
|
|
285
287
|
echo "## Available commands" >> "$windsurf_file"
|
|
286
288
|
echo "" >> "$windsurf_file"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
if [ -d "$AI_CORE_DIR/commands" ]; then
|
|
290
|
+
find "$AI_CORE_DIR/commands" -name "*.md" -type f | while read -r cmd_file; do
|
|
291
|
+
local basename
|
|
292
|
+
basename=$(basename "$cmd_file" .md)
|
|
293
|
+
[[ "$basename" == "README" ]] && continue
|
|
294
|
+
echo "- /$basename" >> "$windsurf_file"
|
|
295
|
+
done
|
|
296
|
+
fi
|
|
293
297
|
|
|
294
298
|
echo "" >> "$windsurf_file"
|
|
295
299
|
echo "## Available skills" >> "$windsurf_file"
|
|
@@ -297,7 +301,7 @@ EOF
|
|
|
297
301
|
find "$AI_CORE_DIR/skills" -name "SKILL.md" -type f | while read -r skill_file; do
|
|
298
302
|
local skill_name
|
|
299
303
|
skill_name=$(basename "$(dirname "$skill_file")")
|
|
300
|
-
echo "- $skill_name:
|
|
304
|
+
echo "- $skill_name: skills/$skill_name/SKILL.md" >> "$windsurf_file"
|
|
301
305
|
done
|
|
302
306
|
|
|
303
307
|
echo " ✓ .windsurfrules generated"
|
|
@@ -25,7 +25,21 @@ command_file_for() {
|
|
|
25
25
|
local command="$1"
|
|
26
26
|
local name
|
|
27
27
|
name=$(printf '%s' "$command" | sed 's#^/##')
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
if [ -d "commands" ]; then
|
|
30
|
+
find commands -name "$name.md" -type f | head -1
|
|
31
|
+
return 0
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
if [ -d "skills" ]; then
|
|
35
|
+
find skills -name 'SKILL.md' -type f -print0 |
|
|
36
|
+
while IFS= read -r -d '' file; do
|
|
37
|
+
if awk -v command="/$name" '$1 == "command:" && $2 == command { found=1 } END { exit found ? 0 : 1 }' "$file"; then
|
|
38
|
+
printf '%s\n' "$file"
|
|
39
|
+
break
|
|
40
|
+
fi
|
|
41
|
+
done
|
|
42
|
+
fi
|
|
29
43
|
}
|
|
30
44
|
|
|
31
45
|
allowed_agents_for_command() {
|
|
@@ -38,7 +38,7 @@ NC='\033[0m'
|
|
|
38
38
|
TICKETS_DIR="project/tickets"
|
|
39
39
|
BUGS_DIR="project/bugs"
|
|
40
40
|
BACKLOG_FILE="project/backlog/backlog.json"
|
|
41
|
-
SCHEMA_FILE="
|
|
41
|
+
SCHEMA_FILE="config/ticket.schema.json"
|
|
42
42
|
|
|
43
43
|
# ============================================================
|
|
44
44
|
# Allowed state transitions matrix (per RULE 06)
|
|
@@ -606,6 +606,6 @@ else
|
|
|
606
606
|
echo "════════════════════════════════════════════════════════"
|
|
607
607
|
echo ""
|
|
608
608
|
echo "Per RULE 06 (Approval Gates), all tickets must follow state machine."
|
|
609
|
-
echo "See:
|
|
609
|
+
echo "See: rules/06-approval-gates.md"
|
|
610
610
|
exit 1
|
|
611
611
|
fi
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
2
|
+
# scripts/workflow.sh
|
|
3
3
|
#
|
|
4
4
|
# Executable handlers for AI Core state workflow commands.
|
|
5
5
|
|
|
@@ -159,8 +159,8 @@ transition_ticket() {
|
|
|
159
159
|
}]' "$file" | write_json "$file"
|
|
160
160
|
|
|
161
161
|
append_audit "$command" "$ticket_id" "$from_state" "$to_state" "$reason"
|
|
162
|
-
bash
|
|
163
|
-
bash
|
|
162
|
+
bash scripts/validate-state.sh "$ticket_id"
|
|
163
|
+
bash scripts/validate-permissions.sh
|
|
164
164
|
log_pass "$ticket_id transitioned $from_state -> $to_state"
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -277,7 +277,7 @@ EOF
|
|
|
277
277
|
}' > "$file"
|
|
278
278
|
|
|
279
279
|
append_audit "/analyze-requirements" "$ticket_id" "null" "DRAFT" "Created from executable requirement intake"
|
|
280
|
-
bash
|
|
280
|
+
bash scripts/validate-state.sh "$ticket_id"
|
|
281
281
|
log_pass "Created $ticket_id"
|
|
282
282
|
log_pass "Created $spec_path"
|
|
283
283
|
}
|
|
@@ -407,8 +407,8 @@ EOF
|
|
|
407
407
|
}])' "$file" | write_json "$file"
|
|
408
408
|
|
|
409
409
|
append_audit "/write-plan" "$ticket_id" "$status" "$status" "Implementation plan created"
|
|
410
|
-
bash
|
|
411
|
-
bash
|
|
410
|
+
bash scripts/validate-state.sh "$ticket_id"
|
|
411
|
+
bash scripts/validate-permissions.sh
|
|
412
412
|
log_pass "Created $plan_path"
|
|
413
413
|
log_pass "Linked plan from $file"
|
|
414
414
|
}
|
|
@@ -490,7 +490,7 @@ cmd_release() {
|
|
|
490
490
|
jq --arg version "$version" --arg at "$at" --arg by "$by" \
|
|
491
491
|
'.version = $version
|
|
492
492
|
| .created_at = $at
|
|
493
|
-
| .created_by = $by'
|
|
493
|
+
| .created_by = $by' templates/release/release-record-template.json > "$file"
|
|
494
494
|
log_pass "Created release record $file"
|
|
495
495
|
}
|
|
496
496
|
|
|
@@ -5,7 +5,7 @@ description: Interpret AI Core slash-command text in Codex. Use when the user ty
|
|
|
5
5
|
|
|
6
6
|
# AI Core Commands
|
|
7
7
|
|
|
8
|
-
Codex plugins do not expose `
|
|
8
|
+
Codex plugins do not expose `commands/*.md` as native slash-command autocomplete. This skill makes AI Core command text executable through normal chat.
|
|
9
9
|
|
|
10
10
|
## Mandatory Trigger
|
|
11
11
|
|
|
@@ -34,21 +34,21 @@ next TICKET-XXX
|
|
|
34
34
|
|
|
35
35
|
1. Log the user request first:
|
|
36
36
|
```bash
|
|
37
|
-
AI_AGENT=codex bash
|
|
37
|
+
AI_AGENT=codex bash scripts/log-user-request.sh "<user request text>"
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
2. Resolve command metadata:
|
|
41
|
-
- Search `
|
|
41
|
+
- Search `commands/**/<command-name>.md`.
|
|
42
42
|
- Read the command file.
|
|
43
43
|
- Infer `owner_agent`, `requires_agents`, args, preconditions, postconditions, hard rules, and output format.
|
|
44
44
|
|
|
45
45
|
3. Load the matching agent file when present:
|
|
46
|
-
- `
|
|
46
|
+
- `agents/<owner_agent>.md`
|
|
47
47
|
|
|
48
48
|
4. Execute the command in chat-first mode:
|
|
49
49
|
- Use deterministic scripts only when the command file or workflow requires them.
|
|
50
50
|
- Do not ask the user to run shell wrappers during normal use.
|
|
51
|
-
- Preserve all hard rules from `
|
|
51
|
+
- Preserve all hard rules from `rules/00-global-rules.md`.
|
|
52
52
|
|
|
53
53
|
5. Report:
|
|
54
54
|
- Command executed
|
|
@@ -62,19 +62,19 @@ next TICKET-XXX
|
|
|
62
62
|
Command files are stored under:
|
|
63
63
|
|
|
64
64
|
```text
|
|
65
|
-
|
|
65
|
+
commands/
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
The command name maps to a Markdown file by removing the leading slash:
|
|
69
69
|
|
|
70
70
|
```text
|
|
71
|
-
/analyze-requirements ->
|
|
72
|
-
/request-log ->
|
|
71
|
+
/analyze-requirements -> commands/**/analyze-requirements.md
|
|
72
|
+
/request-log -> commands/**/request-log.md
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
If multiple files match the same command name, stop and ask for clarification.
|
|
76
76
|
|
|
77
|
-
If no file matches, say the command is not defined and suggest `/request-log`, `/setup-project`, or checking `
|
|
77
|
+
If no file matches, say the command is not defined and suggest `/request-log`, `/setup-project`, or checking `commands/README.md`.
|
|
78
78
|
|
|
79
79
|
## Strict Rules
|
|
80
80
|
|
|
@@ -90,8 +90,8 @@ Load `rules/07-definition-of-ready.md`. Verify the ticket passes every item. If
|
|
|
90
90
|
│ → Read ticket JSON │
|
|
91
91
|
│ → Read acceptance criteria │
|
|
92
92
|
│ → Read related code (if ticket references it) │
|
|
93
|
-
│ → Read
|
|
94
|
-
│ → Read
|
|
93
|
+
│ → Read rules/02-code-quality.md │
|
|
94
|
+
│ → Read rules/05-testing-mandatory.md │
|
|
95
95
|
├─────────────────────────────────────────────────┤
|
|
96
96
|
│ STEP 3: Create/checkout branch │
|
|
97
97
|
│ → Branch name: feature/${TICKET_ID}-${slug} │
|
|
@@ -19,23 +19,23 @@ postconditions:
|
|
|
19
19
|
|
|
20
20
|
# /sync-platforms
|
|
21
21
|
|
|
22
|
-
> Exports
|
|
22
|
+
> Exports root-level framework source-of-truth specs to Claude Code, Cursor, and Windsurf config files.
|
|
23
23
|
|
|
24
24
|
## 🎯 Purpose
|
|
25
25
|
|
|
26
|
-
Keep all supported AI tools aligned with the same agents, commands, and rules while editing only
|
|
26
|
+
Keep all supported AI tools aligned with the same agents, commands, and rules while editing only root-level framework folders as the canonical source.
|
|
27
27
|
|
|
28
28
|
## 🔄 Execution Flow
|
|
29
29
|
|
|
30
|
-
1. Verify `
|
|
31
|
-
2. Run `bash
|
|
30
|
+
1. Verify `scripts/sync-platforms.sh` exists.
|
|
31
|
+
2. Run `bash scripts/sync-platforms.sh`.
|
|
32
32
|
3. Review generated `.claude/`, `.cursor/rules/`, `.windsurfrules`, and `CLAUDE.md`.
|
|
33
33
|
4. Confirm generated files should be committed.
|
|
34
34
|
5. Report created/updated files.
|
|
35
35
|
|
|
36
36
|
## 🔒 Hard Rules
|
|
37
37
|
|
|
38
|
-
- Source changes MUST be made in
|
|
38
|
+
- Source changes MUST be made in root-level framework folders, not generated exports.
|
|
39
39
|
- MUST review generated files before commit.
|
|
40
40
|
- MUST rerun after changing agents, commands, or rules.
|
|
41
41
|
- MUST NOT delete user custom platform config without confirmation.
|
|
@@ -31,7 +31,7 @@ Detect manual edits to `project/audit-log.jsonl`. Executable workflow handlers a
|
|
|
31
31
|
/validate-audit-log
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
The AI may call `
|
|
34
|
+
The AI may call `scripts/validate-audit-log.sh` internally and must summarize the result.
|
|
35
35
|
|
|
36
36
|
## Hard Rules
|
|
37
37
|
|
|
@@ -29,7 +29,7 @@ postconditions:
|
|
|
29
29
|
|
|
30
30
|
## Purpose
|
|
31
31
|
|
|
32
|
-
Catch missing docs before review or release. In chat, use `/validate-docs`; the AI may call `
|
|
32
|
+
Catch missing docs before review or release. In chat, use `/validate-docs`; the AI may call `scripts/validate-docs.sh` internally and must summarize the result.
|
|
33
33
|
|
|
34
34
|
## Execution Flow
|
|
35
35
|
|
|
@@ -24,7 +24,7 @@ postconditions:
|
|
|
24
24
|
|
|
25
25
|
## Purpose
|
|
26
26
|
|
|
27
|
-
Make role boundaries mechanically enforceable by comparing `project/tickets/*.json` history entries with `
|
|
27
|
+
Make role boundaries mechanically enforceable by comparing `project/tickets/*.json` history entries with `commands/**` command ownership metadata.
|
|
28
28
|
|
|
29
29
|
## Chat Usage
|
|
30
30
|
|
|
@@ -38,7 +38,7 @@ Make role boundaries mechanically enforceable by comparing `project/tickets/*.js
|
|
|
38
38
|
`state_history[].by_agent` must match the command `owner_agent` or `requires_agents`.
|
|
39
39
|
|
|
40
40
|
### RULE VP-002: Unknown commands fail
|
|
41
|
-
Any `by_command` value without a matching `
|
|
41
|
+
Any `by_command` value without a matching `commands/**/<name>.md` file blocks validation.
|
|
42
42
|
|
|
43
43
|
### RULE VP-003: No self-approval
|
|
44
44
|
If `assignee` is recorded, the same agent cannot approve review-to-QA or DONE transitions.
|
|
@@ -28,9 +28,9 @@ Catch corrupted backlog data, missing ticket references, skipped transitions, mi
|
|
|
28
28
|
## 🔄 Execution Flow
|
|
29
29
|
|
|
30
30
|
1. Verify `jq` is installed.
|
|
31
|
-
2. In chat, run `/validate-state` with optional ticket ID. The AI may call `
|
|
31
|
+
2. In chat, run `/validate-state` with optional ticket ID. The AI may call `scripts/validate-state.sh` internally.
|
|
32
32
|
3. Validate `project/backlog/backlog.json` references existing tickets when validating all state.
|
|
33
|
-
4. If available, run JSON schema validation against `
|
|
33
|
+
4. If available, run JSON schema validation against `config/ticket.schema.json` and `config/backlog.schema.json`.
|
|
34
34
|
5. Report failures with file path, field, and recovery command.
|
|
35
35
|
6. Block workflow if validation fails.
|
|
36
36
|
|
|
@@ -62,13 +62,13 @@ Turn free-text requirement (email, Slack, voice note) into a structured ticket w
|
|
|
62
62
|
|
|
63
63
|
Check before starting. **ABORT** if any check fails.
|
|
64
64
|
|
|
65
|
-
### 1.
|
|
65
|
+
### 1. Root-level framework folders initialized
|
|
66
66
|
```bash
|
|
67
67
|
test -d "project/tickets" || ABORT "Run /setup-project first"
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
### 2. BA agent available
|
|
71
|
-
Check `
|
|
71
|
+
Check `agents/business-analyst.md` exists and is enabled in config.
|
|
72
72
|
|
|
73
73
|
### 3. Requirement text is not empty
|
|
74
74
|
If empty or < 10 chars → ABORT and ask for the actual requirement.
|
|
@@ -145,7 +145,7 @@ If empty or < 10 chars → ABORT and ask for the actual requirement.
|
|
|
145
145
|
├──────────────────────────────────────────────────────────┤
|
|
146
146
|
│ STEP 9: Write ticket JSON │
|
|
147
147
|
│ Path: project/tickets/TICKET-XXX.json │
|
|
148
|
-
│ Schema:
|
|
148
|
+
│ Schema: config/ticket.schema.json │
|
|
149
149
|
│ State: DRAFT │
|
|
150
150
|
│ created_by: "business-analyst-agent" │
|
|
151
151
|
├──────────────────────────────────────────────────────────┤
|
|
@@ -57,7 +57,7 @@ If any precondition fails, ABORT and keep the ticket in `GROOMED` or move to `BL
|
|
|
57
57
|
|
|
58
58
|
## 🔄 Execution Flow
|
|
59
59
|
|
|
60
|
-
1. Load ticket JSON and `
|
|
60
|
+
1. Load ticket JSON and `rules/07-definition-of-ready.md`.
|
|
61
61
|
2. Validate INVEST criteria.
|
|
62
62
|
3. Validate acceptance criteria are testable and include happy path, edge case, and error case.
|
|
63
63
|
4. Validate estimation evidence from grooming.
|
|
@@ -28,7 +28,7 @@ postconditions:
|
|
|
28
28
|
|
|
29
29
|
## 🎯 Purpose
|
|
30
30
|
|
|
31
|
-
Plan large refactors without putting project-specific design into
|
|
31
|
+
Plan large refactors without putting project-specific design into framework source folders.
|
|
32
32
|
|
|
33
33
|
## 🔄 Execution Flow
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ Plan large refactors without putting project-specific design into `core/`.
|
|
|
36
36
|
2. Inspect affected code areas and docs.
|
|
37
37
|
3. Identify current problem, target state, constraints, and risks.
|
|
38
38
|
4. Determine whether ADR is required.
|
|
39
|
-
5. Create `docs/runtime/refactor/<slug>-refactor-plan.md` from `
|
|
39
|
+
5. Create `docs/runtime/refactor/<slug>-refactor-plan.md` from `templates/technical/refactor-plan-template.md`.
|
|
40
40
|
6. Propose ticket breakdown for `project/tickets/`.
|
|
41
41
|
7. Propose backlog entries for `project/backlog/backlog.json`.
|
|
42
42
|
8. Define testing, rollout, and rollback plan.
|
|
@@ -45,7 +45,7 @@ Plan large refactors without putting project-specific design into `core/`.
|
|
|
45
45
|
## 🔒 Hard Rules
|
|
46
46
|
|
|
47
47
|
- MUST NOT modify production code during planning.
|
|
48
|
-
- MUST keep plan in `docs/runtime/refactor/`, not
|
|
48
|
+
- MUST keep plan in `docs/runtime/refactor/`, not framework source folders.
|
|
49
49
|
- MUST create characterization test ticket before risky behavior-preserving refactors.
|
|
50
50
|
- MUST require ADR for architectural decisions.
|
|
51
51
|
- MUST split work into tickets of 8 points or less.
|
|
@@ -29,37 +29,37 @@ postconditions:
|
|
|
29
29
|
|
|
30
30
|
## 🎯 Purpose
|
|
31
31
|
|
|
32
|
-
Make
|
|
32
|
+
Make copied root-level framework folders operational in a real repository. This command checks repo structure, updates configuration, creates state directories, syncs platform instructions, and explains next steps.
|
|
33
33
|
|
|
34
34
|
## 🚦 Trigger
|
|
35
35
|
|
|
36
|
-
Manual after copying
|
|
36
|
+
Manual after copying root-level framework folders into a project:
|
|
37
37
|
|
|
38
38
|
- `/setup-project`
|
|
39
|
-
- `bash
|
|
39
|
+
- `bash scripts/setup-project.sh`
|
|
40
40
|
|
|
41
41
|
## 📋 Preconditions, STRICT
|
|
42
42
|
|
|
43
43
|
1. Repository has `.git/`.
|
|
44
|
-
2. `
|
|
45
|
-
3. `
|
|
46
|
-
4. `
|
|
44
|
+
2. `README.md` exists.
|
|
45
|
+
3. `templates/project/project-config.yaml` exists.
|
|
46
|
+
4. `templates/project/project-structure.yaml` exists.
|
|
47
47
|
5. User has permission to create `config/`, `project/`, `docs/project/`, `docs/runtime/`, `.claude/`, `.cursor/`, `.windsurfrules`, and `CLAUDE.md`.
|
|
48
48
|
|
|
49
49
|
## 🔄 Execution Flow
|
|
50
50
|
|
|
51
|
-
1. Confirm repo root and
|
|
51
|
+
1. Confirm repo root and framework folder locations.
|
|
52
52
|
2. Create `config/` if missing.
|
|
53
|
-
3. Copy `
|
|
54
|
-
4. Copy `
|
|
53
|
+
3. Copy `templates/project/project-config.yaml` to `config/project-config.yaml` if missing.
|
|
54
|
+
4. Copy `templates/project/project-structure.yaml` to `config/project-structure.yaml` if missing.
|
|
55
55
|
5. Ask for missing project fields or infer with `/detect-stack`.
|
|
56
56
|
6. Create required `project/` directories: tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, prs.
|
|
57
57
|
7. Create required docs namespaces: `docs/project/` for project/product requirements and `docs/runtime/` for operational AI Core documentation.
|
|
58
58
|
8. Create `project/backlog/backlog.json` and `project/user-requests.jsonl` if missing.
|
|
59
|
-
9. Run `bash
|
|
60
|
-
10.
|
|
59
|
+
9. Run `bash scripts/setup-project.sh` when shell access is available, or perform steps 2-8 manually.
|
|
60
|
+
10. Confirm `scripts/` contains the portable enforcement scripts.
|
|
61
61
|
11. Install portable `.github/workflows/ai-core-governance.yml` if missing.
|
|
62
|
-
12. Run `/sync-platforms` or `bash
|
|
62
|
+
12. Run `/sync-platforms` or `bash scripts/sync-platforms.sh`.
|
|
63
63
|
13. Recommend installing hooks with `bash scripts/install-hooks.sh` if `.githooks/` exists.
|
|
64
64
|
14. Run `/validate-state`.
|
|
65
65
|
15. Output project readiness summary and first workflow suggestion.
|
|
@@ -69,8 +69,8 @@ Manual after copying `core/` into a project:
|
|
|
69
69
|
### RULE SP-001: Do not overwrite user config blindly
|
|
70
70
|
If config values already exist, preserve them unless user confirms change.
|
|
71
71
|
|
|
72
|
-
### RULE SP-002: Keep
|
|
73
|
-
Generated `.claude/`, `.cursor/`, and `.windsurfrules` files are exports. Source changes belong in
|
|
72
|
+
### RULE SP-002: Keep root-level framework folders canonical
|
|
73
|
+
Generated `.claude/`, `.cursor/`, and `.windsurfrules` files are exports. Source changes belong in root-level framework folders.
|
|
74
74
|
|
|
75
75
|
### RULE SP-003: No product code changes
|
|
76
76
|
Setup modifies AI runtime/config files only: `config/`, `project/`, `docs/project/`, `docs/runtime/`, generated platform config, and optional docs scaffolding. It MUST NOT modify production source code.
|
|
@@ -81,11 +81,11 @@ A project is not ready until `project/` contains directories for tickets, backlo
|
|
|
81
81
|
### RULE SP-004a: User request log required
|
|
82
82
|
A project is not ready until `project/user-requests.jsonl` exists. Every AI-handled user request **MUST** be logged there before substantive work begins.
|
|
83
83
|
|
|
84
|
-
### RULE SP-005:
|
|
85
|
-
Project-specific state and config MUST NOT be written under
|
|
84
|
+
### RULE SP-005: Framework folders remain framework-only
|
|
85
|
+
Project-specific state and config MUST NOT be written under framework source folders. Use `project/` and `config/`.
|
|
86
86
|
|
|
87
|
-
### RULE SP-006: `
|
|
88
|
-
Portable enforcement scripts live under `
|
|
87
|
+
### RULE SP-006: `scripts/` is canonical
|
|
88
|
+
Portable enforcement scripts live under `scripts/`.
|
|
89
89
|
|
|
90
90
|
## 📤 Outputs
|
|
91
91
|
|
|
@@ -100,7 +100,7 @@ Success:
|
|
|
100
100
|
|
|
101
101
|
Failure:
|
|
102
102
|
|
|
103
|
-
- Missing
|
|
103
|
+
- Missing root-level framework folders
|
|
104
104
|
- Not a Git repository
|
|
105
105
|
- Sync failure
|
|
106
106
|
- Invalid config
|
|
@@ -485,7 +485,7 @@ Developer cannot fix "broken" — needs specific scenario. Example of good bug:
|
|
|
485
485
|
| Ambiguous severity | AI suggests, human confirms |
|
|
486
486
|
| SEV-1 after hours | File + page on-call immediately |
|
|
487
487
|
| Reporter gave bad info | Diplomatic pushback, guide to quality |
|
|
488
|
-
| Evidence file too large | Store in
|
|
488
|
+
| Evidence file too large | Store in the project evidence area, link reference |
|
|
489
489
|
|
|
490
490
|
## 🔗 Related Commands
|
|
491
491
|
|
|
@@ -65,7 +65,7 @@ Manual:
|
|
|
65
65
|
5. Confirm QA evidence exists for every included ticket.
|
|
66
66
|
6. Check open bugs and known issues.
|
|
67
67
|
7. Generate changelog with ticket IDs, PRs, bug fixes, migrations, and breaking changes.
|
|
68
|
-
8. Create `project/releases/vX.Y.Z.json` from `
|
|
68
|
+
8. Create `project/releases/vX.Y.Z.json` from `templates/release/release-record-template.json` with scope, approvals, risks, deploy plan, rollback plan, and timestamps.
|
|
69
69
|
9. Create or update release branch if configured.
|
|
70
70
|
10. Tag release using `vX.Y.Z`.
|
|
71
71
|
11. Trigger deployment or document manual deployment step.
|
|
@@ -93,7 +93,7 @@ Database migrations MUST include forward plan, rollback or mitigation, and backu
|
|
|
93
93
|
Do not move an existing release tag. Create a new patch release instead.
|
|
94
94
|
|
|
95
95
|
### RULE REL-007: Release record schema required
|
|
96
|
-
Every release record MUST satisfy `
|
|
96
|
+
Every release record MUST satisfy `config/release.schema.json`. Missing approvals, rollback verification, QA evidence, security scan status, or known issue approval blocks release.
|
|
97
97
|
|
|
98
98
|
### RULE REL-008: Post-release smoke evidence
|
|
99
99
|
If a release is marked `RELEASED` and `qa.post_release_smoke_required=true`, then `qa.post_release_smoke_passed=true` and the evidence path MUST be recorded.
|
|
@@ -29,7 +29,7 @@ guide /mark-ready TICKET-001
|
|
|
29
29
|
next TICKET-001
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Do not ask users to type `bash
|
|
32
|
+
Do not ask users to type `bash scripts/ai-core.sh` or `AI_AGENT=...` during normal use. Those are internal tools for deterministic execution and CI.
|
|
33
33
|
|
|
34
34
|
## Agent Selection
|
|
35
35
|
|
|
@@ -45,7 +45,7 @@ If command metadata and user intent conflict, explain the conflict and stop.
|
|
|
45
45
|
- `project/` is machine-readable runtime state.
|
|
46
46
|
- `docs/` is human-readable project documentation.
|
|
47
47
|
- `config/` is project configuration.
|
|
48
|
-
-
|
|
48
|
+
- Root-level framework folders are portable framework code.
|
|
49
49
|
|
|
50
50
|
Do not move backlog, tickets, releases, bugs, sprints, or audit records into `docs/`. Generate human-readable summaries in `project/views/` and keep longer narrative docs in `docs/`.
|
|
51
51
|
|
|
@@ -69,4 +69,3 @@ Ask before running the next step. Do not continue automatically when the next co
|
|
|
69
69
|
- No self-approval.
|
|
70
70
|
- No DONE without fresh verification evidence.
|
|
71
71
|
- No public API, setup, migration, architecture, or release-impacting change without the required docs evidence.
|
|
72
|
-
|