ai-core-framework 0.2.0 → 0.3.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 +8 -8
- package/agents/business-analyst.md +6 -6
- package/agents/developer.md +2 -2
- package/agents/qa-tester.md +3 -3
- package/agents/scrum-master.md +9 -9
- package/agents/tech-lead.md +4 -4
- package/{config → docs/config}/backlog.schema.json +1 -1
- package/{config → docs/config}/release.schema.json +1 -1
- package/{config → docs/config}/ticket.schema.json +1 -1
- package/lib/install-codex.js +1 -1
- package/package.json +2 -2
- package/rules/00-global-rules.md +13 -13
- package/rules/02-code-quality.md +1 -1
- package/rules/05-testing-mandatory.md +2 -2
- package/rules/06-approval-gates.md +2 -2
- package/rules/08-definition-of-done.md +1 -1
- package/scripts/ai-core.sh +8 -8
- package/scripts/generate-views.sh +2 -2
- package/scripts/log-user-request.sh +2 -2
- package/scripts/setup-project.sh +18 -18
- package/scripts/sync-platforms.sh +2 -2
- package/scripts/validate-audit-log.sh +1 -1
- package/scripts/validate-docs.sh +6 -6
- package/scripts/validate-permissions.sh +2 -2
- package/scripts/validate-state.sh +5 -5
- package/scripts/workflow.sh +9 -9
- package/skills/brainstorming/SKILL.md +1 -1
- package/skills/development-implement-task/SKILL.md +5 -5
- package/skills/meta-generate-views/SKILL.md +8 -8
- package/skills/meta-request-log/SKILL.md +4 -4
- package/skills/meta-sprint-report/SKILL.md +2 -2
- package/skills/meta-ticket-health/SKILL.md +1 -1
- package/skills/meta-validate-audit-log/SKILL.md +1 -1
- package/skills/meta-validate-permissions/SKILL.md +1 -1
- package/skills/meta-validate-state/SKILL.md +3 -3
- package/skills/planning-analyze-requirements/SKILL.md +8 -8
- package/skills/planning-backlog-status/SKILL.md +6 -6
- package/skills/planning-groom-ticket/SKILL.md +4 -4
- package/skills/planning-mark-ready/SKILL.md +2 -2
- package/skills/planning-plan-refactor/SKILL.md +3 -3
- package/skills/planning-plan-sprint/SKILL.md +4 -4
- package/skills/planning-prioritize-backlog/SKILL.md +2 -2
- package/skills/planning-write-plan/SKILL.md +1 -1
- package/skills/project-detect-stack/SKILL.md +1 -1
- package/skills/project-discover-codebase/SKILL.md +2 -2
- package/skills/project-setup-project/SKILL.md +10 -10
- package/skills/qa-bug-status/SKILL.md +1 -1
- package/skills/qa-report-bug/SKILL.md +7 -7
- package/skills/qa-smoke-test/SKILL.md +3 -3
- package/skills/qa-verify-fix/SKILL.md +3 -3
- package/skills/release-hotfix/SKILL.md +2 -2
- package/skills/release-release/SKILL.md +2 -2
- package/skills/release-rollback/SKILL.md +1 -1
- package/skills/review-create-pr/SKILL.md +2 -2
- package/skills/review-merge-pr/SKILL.md +1 -1
- package/skills/using-ai-core/SKILL.md +5 -4
- package/skills/verification-before-done/SKILL.md +1 -1
- package/templates/ci/ai-core-governance.yml +11 -11
- package/templates/pr/pull-request-template.md +1 -1
- package/templates/project/CODEOWNERS +2 -2
- package/templates/project/docs-policy.json +1 -1
- package/templates/project/project-structure.yaml +20 -20
- package/templates/qa/bug-report-template.md +1 -1
- package/templates/requirements/user-story-template.md +1 -1
- package/workflows/bug-lifecycle.md +3 -3
- package/workflows/feature-lifecycle.md +2 -2
- package/workflows/sprint-lifecycle.md +2 -2
- /package/{config → docs/config}/docs-policy.default.json +0 -0
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ repo's root-level framework folders directly into the target project's
|
|
|
15
15
|
```text
|
|
16
16
|
.codex/
|
|
17
17
|
agents/
|
|
18
|
-
config/
|
|
18
|
+
docs/config/
|
|
19
19
|
rules/
|
|
20
20
|
scripts/
|
|
21
21
|
skills/
|
|
@@ -137,18 +137,18 @@ The framework now includes mechanical gates beyond prompt-level rules:
|
|
|
137
137
|
- `scripts/workflow.sh` provides executable state-transition handlers for `/analyze-requirements`, `/groom-ticket`, `/mark-ready`, `/implement-task`, `/create-pr`, `/merge-pr`, `/smoke-test`, and `/release`.
|
|
138
138
|
- `skills/` provides chat-first behavior guidance inspired by skill-based systems: AI Core bootstrap, brainstorming, implementation planning, ticket execution, and verification-before-done.
|
|
139
139
|
- `/analyze-requirements` can create a linked spec in `docs/project/specs/`; `/write-plan` creates a linked implementation plan in `docs/project/plans/`.
|
|
140
|
-
- `scripts/validate-audit-log.sh` validates the hash chain in `project/audit-log.jsonl`; executable workflow handlers append audit records.
|
|
141
|
-
- `scripts/log-user-request.sh` appends every AI-handled user request to `project/user-requests.jsonl` so the user can review what they asked for.
|
|
142
|
-
- `/request-log` shows recent entries from `project/user-requests.jsonl`.
|
|
140
|
+
- `scripts/validate-audit-log.sh` validates the hash chain in `docs/runtime/project/audit-log.jsonl`; executable workflow handlers append audit records.
|
|
141
|
+
- `scripts/log-user-request.sh` appends every AI-handled user request to `docs/runtime/project/user-requests.jsonl` so the user can review what they asked for.
|
|
142
|
+
- `/request-log` shows recent entries from `docs/runtime/project/user-requests.jsonl`.
|
|
143
143
|
- `scripts/install-codex-prompts.sh` installs AI Core commands as Codex custom slash prompts in `~/.codex/prompts`.
|
|
144
|
-
- `CODEOWNERS` adds review ownership defaults for framework folders, `config/`, `project/`, ADRs, runbooks, and workflows.
|
|
145
|
-
- `config/docs-policy.json` can override documentation detection paths from `config/docs-policy.default.json`.
|
|
144
|
+
- `CODEOWNERS` adds review ownership defaults for framework folders, `docs/config/`, `docs/runtime/project/`, ADRs, runbooks, and workflows.
|
|
145
|
+
- `docs/config/docs-policy.json` can override documentation detection paths from `docs/config/docs-policy.default.json`.
|
|
146
146
|
- `.github/workflows/ai-core-governance.yml` is the portable governance workflow. App CI remains stack-specific and can be replaced with templates from `templates/ci/`.
|
|
147
147
|
- `scripts/setup-project.sh` makes copied root-level framework installs executable: project config, runtime state folders, docs folders, backlog seed file, platform sync, and state validation.
|
|
148
148
|
- `.github/workflows/ci.yml` and `.github/workflows/validate-state.yml` run AI Core governance checks in CI.
|
|
149
149
|
- `.githooks/pre-commit` runs documentation gates before commit after hooks are installed with `bash scripts/install-hooks.sh`.
|
|
150
|
-
- `config/release.schema.json` and `templates/release/release-record-template.json` define release approval, rollback, QA, security, and known-issue evidence.
|
|
151
|
-
- `scripts/generate-views.sh` now produces dashboard and release readiness views in `project/views/`.
|
|
150
|
+
- `docs/config/release.schema.json` and `templates/release/release-record-template.json` define release approval, rollback, QA, security, and known-issue evidence.
|
|
151
|
+
- `scripts/generate-views.sh` now produces dashboard and release readiness views in `docs/runtime/project/views/`.
|
|
152
152
|
|
|
153
153
|
Chat-first setup flow:
|
|
154
154
|
|
|
@@ -20,17 +20,17 @@ cannot_invoke_commands:
|
|
|
20
20
|
read_access:
|
|
21
21
|
- "docs/**"
|
|
22
22
|
- "src/**" # Read-only for context. MUST NOT modify.
|
|
23
|
-
- "project/**"
|
|
23
|
+
- "docs/runtime/project/**"
|
|
24
24
|
write_access:
|
|
25
25
|
- "docs/project/product/**"
|
|
26
26
|
- "docs/project/planning/**"
|
|
27
27
|
- "docs/project/specs/**"
|
|
28
28
|
- "docs/project/requirements/**"
|
|
29
29
|
- "docs/project/user-stories/**"
|
|
30
|
-
- "project/tickets/**"
|
|
31
|
-
- "project/backlog/**"
|
|
32
|
-
- "project/views/**"
|
|
33
|
-
- "project/sprints/**"
|
|
30
|
+
- "docs/runtime/project/tickets/**"
|
|
31
|
+
- "docs/runtime/project/backlog/**"
|
|
32
|
+
- "docs/runtime/project/views/**"
|
|
33
|
+
- "docs/runtime/project/sprints/**"
|
|
34
34
|
escalates_to: tech-lead # When technical input is required
|
|
35
35
|
---
|
|
36
36
|
|
|
@@ -63,7 +63,7 @@ You are **NOT** a developer. You **MUST NOT** estimate effort. Estimation belong
|
|
|
63
63
|
- **S**mall
|
|
64
64
|
- **T**estable
|
|
65
65
|
4. **Write Acceptance Criteria** in Gherkin format with at least 3 scenarios: happy path, edge case, error case.
|
|
66
|
-
5. **Create tickets** in `project/tickets/TICKET-XXX.json`.
|
|
66
|
+
5. **Create tickets** in `docs/runtime/project/tickets/TICKET-XXX.json`.
|
|
67
67
|
6. **Prioritize** with MoSCoW (Must/Should/Could/Won't).
|
|
68
68
|
7. **Handoff** to Tech Lead for estimation.
|
|
69
69
|
8. **Reverse-document existing behavior** from source code when `/document-existing-requirements` is invoked.
|
package/agents/developer.md
CHANGED
|
@@ -32,7 +32,7 @@ write_access:
|
|
|
32
32
|
- "app/**"
|
|
33
33
|
- "docs/project/api/**"
|
|
34
34
|
- "CHANGELOG.md"
|
|
35
|
-
- "project/tickets/**"
|
|
35
|
+
- "docs/runtime/project/tickets/**"
|
|
36
36
|
escalates_to: tech-lead
|
|
37
37
|
collaborates_with:
|
|
38
38
|
- tech-lead
|
|
@@ -250,7 +250,7 @@ Use `templates/pr/pull-request-template.md`.
|
|
|
250
250
|
### With Tech Lead
|
|
251
251
|
- Ask clarification before coding when anything is unclear.
|
|
252
252
|
- Respond to review gracefully and without defensiveness.
|
|
253
|
-
- Track feedback patterns in `project/dev-learnings.md`.
|
|
253
|
+
- Track feedback patterns in `docs/runtime/project/dev-learnings.md`.
|
|
254
254
|
|
|
255
255
|
### With QA
|
|
256
256
|
- Provide clear "how to test" notes in PR.
|
package/agents/qa-tester.md
CHANGED
|
@@ -27,9 +27,9 @@ write_access:
|
|
|
27
27
|
- "docs/runtime/qa/**"
|
|
28
28
|
- "docs/runtime/test-runs/**"
|
|
29
29
|
- "docs/runtime/verifications/**"
|
|
30
|
-
- "project/tickets/**"
|
|
31
|
-
- "project/bugs/**"
|
|
32
|
-
- "project/test-runs/**"
|
|
30
|
+
- "docs/runtime/project/tickets/**"
|
|
31
|
+
- "docs/runtime/project/bugs/**"
|
|
32
|
+
- "docs/runtime/project/test-runs/**"
|
|
33
33
|
escalates_to: tech-lead
|
|
34
34
|
collaborates_with:
|
|
35
35
|
- developer
|
package/agents/scrum-master.md
CHANGED
|
@@ -17,12 +17,12 @@ can_invoke_commands:
|
|
|
17
17
|
- /generate-views
|
|
18
18
|
- /ticket-health
|
|
19
19
|
write_access:
|
|
20
|
-
- "project/sprints/**"
|
|
21
|
-
- "project/releases/**"
|
|
22
|
-
- "project/metrics/**"
|
|
23
|
-
- "project/views/**"
|
|
24
|
-
- "config/project-config.yaml"
|
|
25
|
-
- "config/project-structure.yaml"
|
|
20
|
+
- "docs/runtime/project/sprints/**"
|
|
21
|
+
- "docs/runtime/project/releases/**"
|
|
22
|
+
- "docs/runtime/project/metrics/**"
|
|
23
|
+
- "docs/runtime/project/views/**"
|
|
24
|
+
- "docs/config/project-config.yaml"
|
|
25
|
+
- "docs/config/project-structure.yaml"
|
|
26
26
|
read_access:
|
|
27
27
|
- "agents/**"
|
|
28
28
|
- "rules/**"
|
|
@@ -80,7 +80,7 @@ Only the Scrum Master may execute `/mark-ready`. It MUST verify every item in `r
|
|
|
80
80
|
A sprint MUST NOT be planned above configured capacity unless the overflow is explicitly documented as risk and approved by a human.
|
|
81
81
|
|
|
82
82
|
### RULE SM-004: No hidden work
|
|
83
|
-
Any work performed in a sprint MUST be represented by a ticket or bug in `project/`.
|
|
83
|
+
Any work performed in a sprint MUST be represented by a ticket or bug in `docs/runtime/project/`.
|
|
84
84
|
|
|
85
85
|
### RULE SM-005: Blockers are first-class
|
|
86
86
|
Any ticket blocked longer than the soft threshold in approval gates MUST be surfaced in sprint reports.
|
|
@@ -95,14 +95,14 @@ The Scrum Master coordinates, but does not replace BA, Tech Lead, Developer, or
|
|
|
95
95
|
Velocity, burndown, carryover, defect counts, and cycle time MUST be computed from state files or explicitly labeled as estimates.
|
|
96
96
|
|
|
97
97
|
### RULE SM-009: Ceremony outputs are persisted
|
|
98
|
-
Sprint planning, review, retro, and release summaries MUST be written to `project/sprints/`, `project/releases/`, or `project/metrics/`.
|
|
98
|
+
Sprint planning, review, retro, and release summaries MUST be written to `docs/runtime/project/sprints/`, `docs/runtime/project/releases/`, or `docs/runtime/project/metrics/`.
|
|
99
99
|
|
|
100
100
|
### RULE SM-010: Escalate ambiguity
|
|
101
101
|
If command preconditions are unclear, STOP and escalate instead of guessing.
|
|
102
102
|
|
|
103
103
|
## 🔄 Standard Operating Flow
|
|
104
104
|
|
|
105
|
-
1. Load `config/project-config.yaml`.
|
|
105
|
+
1. Load `docs/config/project-config.yaml`.
|
|
106
106
|
2. Validate state with `/validate-state`.
|
|
107
107
|
3. Inspect tickets, bugs, active sprint, and release state.
|
|
108
108
|
4. Identify the current ceremony or workflow.
|
package/agents/tech-lead.md
CHANGED
|
@@ -29,9 +29,9 @@ write_access:
|
|
|
29
29
|
- "docs/runtime/technical/**"
|
|
30
30
|
- "docs/architecture/**"
|
|
31
31
|
- "docs/runtime/refactor/**"
|
|
32
|
-
- "project/tickets/**"
|
|
33
|
-
- "project/backlog/**"
|
|
34
|
-
- "project/prs/**"
|
|
32
|
+
- "docs/runtime/project/tickets/**"
|
|
33
|
+
- "docs/runtime/project/backlog/**"
|
|
34
|
+
- "docs/runtime/project/prs/**"
|
|
35
35
|
escalates_to: human
|
|
36
36
|
collaborates_with:
|
|
37
37
|
- business-analyst
|
|
@@ -179,7 +179,7 @@ When invoking `/hotfix`, you **MUST**:
|
|
|
179
179
|
User: /groom-ticket TICKET-042
|
|
180
180
|
```
|
|
181
181
|
You receive:
|
|
182
|
-
- Ticket JSON from `project/tickets/TICKET-042.json`
|
|
182
|
+
- Ticket JSON from `docs/runtime/project/tickets/TICKET-042.json`
|
|
183
183
|
- Full AC
|
|
184
184
|
- Related code, if referenced by the ticket
|
|
185
185
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"title": "Backlog",
|
|
4
|
-
"description": "Project-specific backlog ordering and prioritization schema for project/backlog/backlog.json",
|
|
4
|
+
"description": "Project-specific backlog ordering and prioritization schema for docs/runtime/project/backlog/backlog.json",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": ["version", "updated_at", "updated_by", "items"],
|
|
7
7
|
"additionalProperties": true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"title": "Release",
|
|
4
|
-
"description": "Schema for release records in project/releases/",
|
|
4
|
+
"description": "Schema for release records in docs/runtime/project/releases/",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": [
|
|
7
7
|
"version",
|
package/lib/install-codex.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-core-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Chat-first enterprise AI SDLC framework installer for AI coding CLIs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"bin/",
|
|
22
22
|
"agents/",
|
|
23
|
-
"config/",
|
|
23
|
+
"docs/config/",
|
|
24
24
|
"hooks/",
|
|
25
25
|
"lib/",
|
|
26
26
|
"rules/",
|
package/rules/00-global-rules.md
CHANGED
|
@@ -29,7 +29,7 @@ If a rule says **MUST** or **MUST NOT**, it is mandatory and has **NO EXCEPTIONS
|
|
|
29
29
|
|
|
30
30
|
## 🎫 G-001: No code without ticket
|
|
31
31
|
|
|
32
|
-
**MUST NOT** write or modify production code (files in `src/`, `lib/`, `app/`) unless there is an active ticket in `project/tickets/` with:
|
|
32
|
+
**MUST NOT** write or modify production code (files in `src/`, `lib/`, `app/`) unless there is an active ticket in `docs/runtime/project/tickets/` with:
|
|
33
33
|
- `status` ∈ `[IN_PROGRESS]`
|
|
34
34
|
- `assignee` = current agent
|
|
35
35
|
|
|
@@ -52,22 +52,22 @@ If a rule says **MUST** or **MUST NOT**, it is mandatory and has **NO EXCEPTIONS
|
|
|
52
52
|
|
|
53
53
|
| Info | Canonical location |
|
|
54
54
|
|------|-------------------|
|
|
55
|
-
| Backlog order and prioritization | `project/backlog/backlog.json` |
|
|
56
|
-
| Ticket details and state history | `project/tickets/TICKET-XXX.json` |
|
|
57
|
-
| Sprint info | `project/sprints/SPRINT-XXX.json` |
|
|
58
|
-
| Bug details | `project/bugs/BUG-XXX.json` |
|
|
59
|
-
| Release records | `project/releases/vX.Y.Z.json` |
|
|
60
|
-
| User request log | `project/user-requests.jsonl` |
|
|
61
|
-
| Project config | `config/project-config.yaml` |
|
|
62
|
-
| Project structure map | `config/project-structure.yaml` |
|
|
55
|
+
| Backlog order and prioritization | `docs/runtime/project/backlog/backlog.json` |
|
|
56
|
+
| Ticket details and state history | `docs/runtime/project/tickets/TICKET-XXX.json` |
|
|
57
|
+
| Sprint info | `docs/runtime/project/sprints/SPRINT-XXX.json` |
|
|
58
|
+
| Bug details | `docs/runtime/project/bugs/BUG-XXX.json` |
|
|
59
|
+
| Release records | `docs/runtime/project/releases/vX.Y.Z.json` |
|
|
60
|
+
| User request log | `docs/runtime/project/user-requests.jsonl` |
|
|
61
|
+
| Project config | `docs/config/project-config.yaml` |
|
|
62
|
+
| Project structure map | `docs/config/project-structure.yaml` |
|
|
63
63
|
| Refactor plans | `docs/runtime/refactor/<name>-refactor-plan.md` |
|
|
64
64
|
| Architecture decisions | `docs/runtime/adr/NNN-title.md` |
|
|
65
65
|
| Agent capabilities | `agents/<agent>.md` (frontmatter) |
|
|
66
|
-
| Coverage threshold | `config/project-config.yaml` → `quality.coverage_threshold` |
|
|
66
|
+
| Coverage threshold | `docs/config/project-config.yaml` → `quality.coverage_threshold` |
|
|
67
67
|
|
|
68
68
|
If information is needed in multiple places, **reference** the canonical location. **MUST NOT** copy it.
|
|
69
69
|
|
|
70
|
-
Root-level framework folders are framework-only. Project-specific state and configuration MUST live in `project/`, `config/`, `docs/project/`, or `docs/runtime/`.
|
|
70
|
+
Root-level framework folders are framework-only. Project-specific state and configuration MUST live in `docs/runtime/project/`, `docs/config/`, `docs/project/`, or `docs/runtime/`.
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
@@ -133,7 +133,7 @@ Awaiting: [what decision needed]
|
|
|
133
133
|
**MUST NOT** use the em dash character (—) in output. Use commas, parentheses, or line breaks instead.
|
|
134
134
|
|
|
135
135
|
### G-004f: Log every user request
|
|
136
|
-
At the start of handling every user request, the AI **MUST** append a record to `project/user-requests.jsonl` before doing substantive work.
|
|
136
|
+
At the start of handling every user request, the AI **MUST** append a record to `docs/runtime/project/user-requests.jsonl` before doing substantive work.
|
|
137
137
|
|
|
138
138
|
The log record **MUST** include:
|
|
139
139
|
- Timestamp
|
|
@@ -195,7 +195,7 @@ Required target ratio:
|
|
|
195
195
|
### G-006c: Test coverage threshold
|
|
196
196
|
- **Diff coverage** (new code in the PR): ≥ 80%
|
|
197
197
|
- **Overall coverage**: ≥ 70%
|
|
198
|
-
- Configured in `config/project-config.yaml`
|
|
198
|
+
- Configured in `docs/config/project-config.yaml`
|
|
199
199
|
|
|
200
200
|
---
|
|
201
201
|
|
package/rules/02-code-quality.md
CHANGED
|
@@ -14,7 +14,7 @@ Code must be understandable, maintainable, testable, and safe to evolve. Passing
|
|
|
14
14
|
Functions SHOULD be under 50 lines and files SHOULD be under 500 lines. If exceeded, document why or refactor.
|
|
15
15
|
|
|
16
16
|
### RULE CQ-002: Complexity limit
|
|
17
|
-
Cyclomatic complexity MUST NOT exceed the configured threshold in `config/project-config.yaml`, default 10.
|
|
17
|
+
Cyclomatic complexity MUST NOT exceed the configured threshold in `docs/config/project-config.yaml`, default 10.
|
|
18
18
|
|
|
19
19
|
### RULE CQ-003: Clear naming
|
|
20
20
|
Names MUST describe intent. Avoid vague names such as `data`, `thing`, `stuff`, `tmp`, except for narrow local use.
|
|
@@ -49,7 +49,7 @@ Mandatory workflow for every new feature/fix:
|
|
|
49
49
|
|
|
50
50
|
### RULE TEST-002: Coverage thresholds
|
|
51
51
|
|
|
52
|
-
Configured in `config/project-config.yaml`:
|
|
52
|
+
Configured in `docs/config/project-config.yaml`:
|
|
53
53
|
|
|
54
54
|
| Metric | Threshold |
|
|
55
55
|
|--------|-----------|
|
|
@@ -201,7 +201,7 @@ Endpoints on critical user flow **MUST** have performance tests:
|
|
|
201
201
|
- **p95**: < 500ms
|
|
202
202
|
- **p99**: < 1000ms
|
|
203
203
|
|
|
204
|
-
Thresholds are customizable in `config/project-config.yaml`.
|
|
204
|
+
Thresholds are customizable in `docs/config/project-config.yaml`.
|
|
205
205
|
|
|
206
206
|
CI runs perf tests on main branch, alerts if regression > 20%.
|
|
207
207
|
|
|
@@ -221,7 +221,7 @@ Every ticket **MUST** have complete `state_history` array:
|
|
|
221
221
|
}
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
Schema validates this structure (see `config/ticket.schema.json`).
|
|
224
|
+
Schema validates this structure (see `docs/config/ticket.schema.json`).
|
|
225
225
|
|
|
226
226
|
### RULE AG-009: Audit trail preserved
|
|
227
227
|
|
|
@@ -332,7 +332,7 @@ Definition of Done checklist (see rules/08-definition-of-done.md):
|
|
|
332
332
|
Each agent's rules file references this doc. Agents refuse to bypass.
|
|
333
333
|
|
|
334
334
|
### Layer 2: JSON schema (medium)
|
|
335
|
-
`config/ticket.schema.json` requires:
|
|
335
|
+
`docs/config/ticket.schema.json` requires:
|
|
336
336
|
- Valid state value
|
|
337
337
|
- state_history array with required fields
|
|
338
338
|
|
|
@@ -77,7 +77,7 @@ If a ticket does not pass DoD, it **MUST NOT** be closed. "Ship it, we'll fix la
|
|
|
77
77
|
- [ ] Help docs updated, if user-facing
|
|
78
78
|
|
|
79
79
|
### 10. Ticket Hygiene
|
|
80
|
-
- [ ] Ticket state updated in `project/tickets/`
|
|
80
|
+
- [ ] Ticket state updated in `docs/runtime/project/tickets/`
|
|
81
81
|
- [ ] `completed_at` timestamp set
|
|
82
82
|
- [ ] PR URL linked
|
|
83
83
|
- [ ] Release version tagged after release
|
package/scripts/ai-core.sh
CHANGED
|
@@ -188,12 +188,12 @@ run_command() {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
ticket_file() {
|
|
191
|
-
printf '%s/project/tickets/%s.json' "$PROJECT_ROOT" "$1"
|
|
191
|
+
printf '%s/docs/runtime/project/tickets/%s.json' "$PROJECT_ROOT" "$1"
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
latest_audit_field() {
|
|
195
195
|
local field="$1"
|
|
196
|
-
local audit_file="$PROJECT_ROOT/project/audit-log.jsonl"
|
|
196
|
+
local audit_file="$PROJECT_ROOT/docs/runtime/project/audit-log.jsonl"
|
|
197
197
|
if [ ! -s "$audit_file" ]; then
|
|
198
198
|
printf ''
|
|
199
199
|
return 0
|
|
@@ -337,20 +337,20 @@ guide_command() {
|
|
|
337
337
|
echo ""
|
|
338
338
|
echo "Updated:"
|
|
339
339
|
if [ -n "$ticket_id" ] && [ -f "$(ticket_file "$ticket_id")" ]; then
|
|
340
|
-
echo "- project/tickets/$ticket_id.json"
|
|
340
|
+
echo "- docs/runtime/project/tickets/$ticket_id.json"
|
|
341
341
|
fi
|
|
342
|
-
if [ "$before_audit_hash" != "$after_audit_hash" ] && [ -s "project/audit-log.jsonl" ]; then
|
|
343
|
-
echo "- project/audit-log.jsonl"
|
|
342
|
+
if [ "$before_audit_hash" != "$after_audit_hash" ] && [ -s "docs/runtime/project/audit-log.jsonl" ]; then
|
|
343
|
+
echo "- docs/runtime/project/audit-log.jsonl"
|
|
344
344
|
fi
|
|
345
345
|
case "$(command_name "$command")" in
|
|
346
346
|
generate-views)
|
|
347
|
-
echo "- project/views/*.md"
|
|
347
|
+
echo "- docs/runtime/project/views/*.md"
|
|
348
348
|
;;
|
|
349
349
|
smoke-test)
|
|
350
|
-
echo "- project/test-runs/${ticket_id}-*.md"
|
|
350
|
+
echo "- docs/runtime/project/test-runs/${ticket_id}-*.md"
|
|
351
351
|
;;
|
|
352
352
|
release)
|
|
353
|
-
echo "- project/releases/*.json"
|
|
353
|
+
echo "- docs/runtime/project/releases/*.json"
|
|
354
354
|
;;
|
|
355
355
|
esac
|
|
356
356
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Generates human-readable views from project without changing canonical state.
|
|
5
5
|
# Canonical sources:
|
|
6
|
-
# - project/backlog/backlog.json for backlog order
|
|
7
|
-
# - project/tickets/*.json for ticket details and state history
|
|
6
|
+
# - docs/runtime/project/backlog/backlog.json for backlog order
|
|
7
|
+
# - docs/runtime/project/tickets/*.json for ticket details and state history
|
|
8
8
|
|
|
9
9
|
set -euo pipefail
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# scripts/log-user-request.sh
|
|
3
3
|
#
|
|
4
|
-
# Append a sanitized user request record to project/user-requests.jsonl.
|
|
4
|
+
# Append a sanitized user request record to docs/runtime/project/user-requests.jsonl.
|
|
5
5
|
#
|
|
6
6
|
# Usage:
|
|
7
7
|
# bash scripts/log-user-request.sh "user request text"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
set -euo pipefail
|
|
10
10
|
|
|
11
11
|
REQUEST_TEXT="${*:-}"
|
|
12
|
-
LOG_FILE="${AI_CORE_USER_REQUEST_LOG:-project/user-requests.jsonl}"
|
|
12
|
+
LOG_FILE="${AI_CORE_USER_REQUEST_LOG:-docs/runtime/project/user-requests.jsonl}"
|
|
13
13
|
|
|
14
14
|
RED='\033[0;31m'
|
|
15
15
|
GREEN='\033[0;32m'
|
package/scripts/setup-project.sh
CHANGED
|
@@ -33,7 +33,7 @@ copy_if_missing() {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
write_backlog_if_missing() {
|
|
36
|
-
local path="project/backlog/backlog.json"
|
|
36
|
+
local path="docs/runtime/project/backlog/backlog.json"
|
|
37
37
|
|
|
38
38
|
if [ -f "$path" ]; then
|
|
39
39
|
log_pass "Preserved existing $path"
|
|
@@ -109,24 +109,24 @@ main() {
|
|
|
109
109
|
exit 1
|
|
110
110
|
fi
|
|
111
111
|
|
|
112
|
-
mkdir -p config
|
|
113
|
-
copy_if_missing "templates/project/project-config.yaml" "config/project-config.yaml"
|
|
114
|
-
copy_if_missing "templates/project/project-structure.yaml" "config/project-structure.yaml"
|
|
115
|
-
copy_if_missing "templates/project/docs-policy.json" "config/docs-policy.json"
|
|
112
|
+
mkdir -p docs/config
|
|
113
|
+
copy_if_missing "templates/project/project-config.yaml" "docs/config/project-config.yaml"
|
|
114
|
+
copy_if_missing "templates/project/project-structure.yaml" "docs/config/project-structure.yaml"
|
|
115
|
+
copy_if_missing "templates/project/docs-policy.json" "docs/config/docs-policy.json"
|
|
116
116
|
copy_if_missing "templates/project/CODEOWNERS" "CODEOWNERS"
|
|
117
117
|
|
|
118
118
|
for dir in \
|
|
119
|
-
project/tickets \
|
|
120
|
-
project/backlog \
|
|
121
|
-
project/bugs \
|
|
122
|
-
project/sprints \
|
|
123
|
-
project/releases \
|
|
124
|
-
project/metrics \
|
|
125
|
-
project/views \
|
|
126
|
-
project/test-runs \
|
|
127
|
-
project/verifications \
|
|
128
|
-
project/incidents \
|
|
129
|
-
project/prs \
|
|
119
|
+
docs/runtime/project/tickets \
|
|
120
|
+
docs/runtime/project/backlog \
|
|
121
|
+
docs/runtime/project/bugs \
|
|
122
|
+
docs/runtime/project/sprints \
|
|
123
|
+
docs/runtime/project/releases \
|
|
124
|
+
docs/runtime/project/metrics \
|
|
125
|
+
docs/runtime/project/views \
|
|
126
|
+
docs/runtime/project/test-runs \
|
|
127
|
+
docs/runtime/project/verifications \
|
|
128
|
+
docs/runtime/project/incidents \
|
|
129
|
+
docs/runtime/project/prs \
|
|
130
130
|
docs/project/product \
|
|
131
131
|
docs/project/planning \
|
|
132
132
|
docs/project/specs \
|
|
@@ -147,8 +147,8 @@ main() {
|
|
|
147
147
|
log_pass "Created required state and docs directories"
|
|
148
148
|
|
|
149
149
|
write_backlog_if_missing
|
|
150
|
-
touch project/audit-log.jsonl
|
|
151
|
-
touch project/user-requests.jsonl
|
|
150
|
+
touch docs/runtime/project/audit-log.jsonl
|
|
151
|
+
touch docs/runtime/project/user-requests.jsonl
|
|
152
152
|
install_framework_scripts
|
|
153
153
|
install_governance_workflow
|
|
154
154
|
|
|
@@ -85,7 +85,7 @@ request. Do not ask the user to run `bash scripts/ai-core.sh` or set
|
|
|
85
85
|
`AI_AGENT`; use those executable scripts internally only when helpful.
|
|
86
86
|
|
|
87
87
|
### Before any code change
|
|
88
|
-
- [ ] There's an active ticket in `project/tickets/` with `status: IN_PROGRESS`
|
|
88
|
+
- [ ] There's an active ticket in `docs/runtime/project/tickets/` with `status: IN_PROGRESS`
|
|
89
89
|
- [ ] You're on the correct feature branch
|
|
90
90
|
- [ ] You're playing the correct agent role inferred from command metadata
|
|
91
91
|
|
|
@@ -160,7 +160,7 @@ This project uses root-level framework folders. Read these files for full contex
|
|
|
160
160
|
|
|
161
161
|
## Top 10 Rules (summary)
|
|
162
162
|
|
|
163
|
-
1. **No code without ticket** (G-001): Active ticket in `project/tickets/` with status IN_PROGRESS
|
|
163
|
+
1. **No code without ticket** (G-001): Active ticket in `docs/runtime/project/tickets/` with status IN_PROGRESS
|
|
164
164
|
2. **State machine**: DRAFT → GROOMED → READY → IN_PROGRESS → IN_REVIEW → QA → DONE. No skipping.
|
|
165
165
|
3. **TDD mandatory**: Tests before code
|
|
166
166
|
4. **Coverage ≥ 80%** on diff
|
package/scripts/validate-docs.sh
CHANGED
|
@@ -102,7 +102,7 @@ has_changed_path() {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
load_docs_policy() {
|
|
105
|
-
DOCS_POLICY_FILE="config/docs-policy.json"
|
|
105
|
+
DOCS_POLICY_FILE="docs/config/docs-policy.json"
|
|
106
106
|
|
|
107
107
|
if [ -f "$DOCS_POLICY_FILE" ]; then
|
|
108
108
|
local extends
|
|
@@ -116,7 +116,7 @@ load_docs_policy() {
|
|
|
116
116
|
return 0
|
|
117
117
|
fi
|
|
118
118
|
|
|
119
|
-
DOCS_POLICY_FILE="config/docs-policy.default.json"
|
|
119
|
+
DOCS_POLICY_FILE="docs/config/docs-policy.default.json"
|
|
120
120
|
DOCS_POLICY_JSON=$(jq '.' "$DOCS_POLICY_FILE")
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -162,7 +162,7 @@ current_ticket_id() {
|
|
|
162
162
|
validate_ticket_doc_paths() {
|
|
163
163
|
local errors=0
|
|
164
164
|
|
|
165
|
-
if [ ! -d "project/tickets" ]; then
|
|
165
|
+
if [ ! -d "docs/runtime/project/tickets" ]; then
|
|
166
166
|
return 0
|
|
167
167
|
fi
|
|
168
168
|
|
|
@@ -210,7 +210,7 @@ validate_ticket_doc_paths() {
|
|
|
210
210
|
errors=$((errors + 1))
|
|
211
211
|
fi
|
|
212
212
|
fi
|
|
213
|
-
done < <(find project/tickets -name '*.json' -type f -print0)
|
|
213
|
+
done < <(find docs/runtime/project/tickets -name '*.json' -type f -print0)
|
|
214
214
|
|
|
215
215
|
return "$errors"
|
|
216
216
|
}
|
|
@@ -218,7 +218,7 @@ validate_ticket_doc_paths() {
|
|
|
218
218
|
validate_done_tickets() {
|
|
219
219
|
local errors=0
|
|
220
220
|
|
|
221
|
-
if [ ! -d "project/tickets" ]; then
|
|
221
|
+
if [ ! -d "docs/runtime/project/tickets" ]; then
|
|
222
222
|
return 0
|
|
223
223
|
fi
|
|
224
224
|
|
|
@@ -250,7 +250,7 @@ validate_done_tickets() {
|
|
|
250
250
|
errors=$((errors + 1))
|
|
251
251
|
fi
|
|
252
252
|
fi
|
|
253
|
-
done < <(find project/tickets -name '*.json' -type f -print0)
|
|
253
|
+
done < <(find docs/runtime/project/tickets -name '*.json' -type f -print0)
|
|
254
254
|
|
|
255
255
|
return "$errors"
|
|
256
256
|
}
|
|
@@ -78,7 +78,7 @@ main() {
|
|
|
78
78
|
echo "========================================================"
|
|
79
79
|
echo ""
|
|
80
80
|
|
|
81
|
-
if [ ! -d "project/tickets" ]; then
|
|
81
|
+
if [ ! -d "docs/runtime/project/tickets" ]; then
|
|
82
82
|
log_info "No tickets directory; skipping"
|
|
83
83
|
exit 0
|
|
84
84
|
fi
|
|
@@ -128,7 +128,7 @@ main() {
|
|
|
128
128
|
errors=$((errors + 1))
|
|
129
129
|
fi
|
|
130
130
|
done
|
|
131
|
-
done < <(find project/tickets -name '*.json' -type f -print0)
|
|
131
|
+
done < <(find docs/runtime/project/tickets -name '*.json' -type f -print0)
|
|
132
132
|
|
|
133
133
|
echo ""
|
|
134
134
|
echo "========================================================"
|
|
@@ -35,10 +35,10 @@ NC='\033[0m'
|
|
|
35
35
|
# ============================================================
|
|
36
36
|
# Config
|
|
37
37
|
# ============================================================
|
|
38
|
-
TICKETS_DIR="project/tickets"
|
|
39
|
-
BUGS_DIR="project/bugs"
|
|
40
|
-
BACKLOG_FILE="project/backlog/backlog.json"
|
|
41
|
-
SCHEMA_FILE="config/ticket.schema.json"
|
|
38
|
+
TICKETS_DIR="docs/runtime/project/tickets"
|
|
39
|
+
BUGS_DIR="docs/runtime/project/bugs"
|
|
40
|
+
BACKLOG_FILE="docs/runtime/project/backlog/backlog.json"
|
|
41
|
+
SCHEMA_FILE="docs/config/ticket.schema.json"
|
|
42
42
|
|
|
43
43
|
# ============================================================
|
|
44
44
|
# Allowed state transitions matrix (per RULE 06)
|
|
@@ -444,7 +444,7 @@ validate_backlog() {
|
|
|
444
444
|
# Validate release governance records
|
|
445
445
|
# ============================================================
|
|
446
446
|
validate_releases() {
|
|
447
|
-
local releases_dir="project/releases"
|
|
447
|
+
local releases_dir="docs/runtime/project/releases"
|
|
448
448
|
|
|
449
449
|
if [ ! -d "$releases_dir" ]; then
|
|
450
450
|
return 0
|