@trieungoctam/speckit 0.3.6 → 0.4.1

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.
@@ -0,0 +1,149 @@
1
+ import { access, readFile } from "node:fs/promises";
2
+ import { join } from "node:path";
3
+ import { extractSection, resolveStory } from "./story.js";
4
+ export async function buildTeamReport(root, target) {
5
+ const story = await resolveStory(root, target);
6
+ if (!story) {
7
+ return {
8
+ status: "blocked",
9
+ roles: [],
10
+ blockers: [`Story not found: ${target}`],
11
+ warnings: [],
12
+ };
13
+ }
14
+ const evidence = await readEvidence(root, story.evidencePath);
15
+ const roles = [
16
+ productOwner(story.content),
17
+ analyst(story.content),
18
+ architect(story.content),
19
+ developer(story.content),
20
+ await qa(story.evidencePath, evidence),
21
+ reviewer(evidence),
22
+ ];
23
+ const blockers = roles.flatMap((role) => role.checks.filter((check) => !check.ok).map((check) => `${role.role}: ${check.name} - ${check.detail}`));
24
+ return {
25
+ status: blockers.length ? "blocked" : "ok",
26
+ story: {
27
+ id: story.id,
28
+ path: story.path,
29
+ title: story.title,
30
+ status: story.status,
31
+ evidencePath: story.evidencePath,
32
+ },
33
+ roles,
34
+ blockers,
35
+ warnings: story.status === "ready-for-dev" ? [] : [`Story status is ${story.status ?? "missing"}`],
36
+ };
37
+ }
38
+ function productOwner(content) {
39
+ return role("Product Owner", [
40
+ check("business-goal", sectionHasDetail(content, "Business Goal") || sectionHasDetail(content, "Intent"), "Business goal or intent is filled"),
41
+ check("priority", sectionHasValue(content, "Business Goal", "Priority"), "Priority is recorded"),
42
+ ]);
43
+ }
44
+ function analyst(content) {
45
+ return role("Analyst", [
46
+ check("acceptance-criteria", hasActionableAcceptanceCriteria(content), "Acceptance criteria are testable"),
47
+ check("edge-cases", sectionHasDetail(content, "Edge Cases") || sectionHasValue(content, "Dev Notes", "Edge cases"), "Edge cases are recorded"),
48
+ ]);
49
+ }
50
+ function architect(content) {
51
+ return role("Architect", [
52
+ check("implementation-scope", sectionHasDetail(content, "Implementation Scope"), "Implementation scope is recorded"),
53
+ check("risk-notes", sectionHasDetail(content, "Architecture Notes") || sectionHasValue(content, "Notes", "Risks"), "Constraints or risks are recorded"),
54
+ ]);
55
+ }
56
+ function developer(content) {
57
+ return role("Developer", [
58
+ check("dev-agent-record", sectionHasDetail(content, "Dev Agent Record"), "Dev Agent Record exists"),
59
+ check("file-list", subsectionHasDetail(content, "File List"), "File List has at least one entry"),
60
+ check("change-log", sectionHasDetail(content, "Change Log"), "Change Log is updated"),
61
+ ]);
62
+ }
63
+ async function qa(evidencePath, evidence) {
64
+ return role("QA/Test", [
65
+ check("evidence-link", Boolean(evidencePath), evidencePath ?? "Missing linked evidence file"),
66
+ check("evidence-file", Boolean(evidence), evidencePath ?? "Missing linked evidence file"),
67
+ check("red-evidence", evidence ? sectionHasDetail(evidence, "Red") : false, "Red evidence is recorded"),
68
+ check("green-evidence", evidence ? sectionHasDetail(evidence, "Green") : false, "Green evidence is recorded"),
69
+ check("refactor-evidence", evidence ? sectionHasDetail(evidence, "Refactor") : false, "Refactor validation is recorded"),
70
+ ]);
71
+ }
72
+ function reviewer(evidence) {
73
+ const checks = [
74
+ check("review-evidence", evidence ? sectionHasDetail(evidence, "Review Evidence") : false, "Review outcome is recorded"),
75
+ ];
76
+ const report = role("Reviewer/Lead", checks);
77
+ return report.status === "blocked" ? { ...report, status: "waiting" } : report;
78
+ }
79
+ function role(roleName, checks) {
80
+ return {
81
+ role: roleName,
82
+ status: checks.every((item) => item.ok) ? "ok" : "blocked",
83
+ checks,
84
+ };
85
+ }
86
+ function check(name, ok, detail) {
87
+ return { name, ok, detail };
88
+ }
89
+ function hasActionableAcceptanceCriteria(content) {
90
+ const criteria = extractSection(content, "Acceptance Criteria");
91
+ if (!criteria)
92
+ return false;
93
+ return /Given .+|When .+|Then .+|AC\d+:/i.test(criteria) && !criteria.includes("...");
94
+ }
95
+ function sectionHasValue(content, heading, label) {
96
+ const section = extractSection(content, heading);
97
+ if (!section)
98
+ return false;
99
+ const pattern = new RegExp(`${escapeRegExp(label)}:\\s*\\S+`, "i");
100
+ return pattern.test(section);
101
+ }
102
+ function sectionHasDetail(content, heading) {
103
+ const section = extractSection(content, heading);
104
+ if (!section)
105
+ return false;
106
+ return hasDetail(section);
107
+ }
108
+ function subsectionHasDetail(content, heading) {
109
+ const lines = content.split("\n");
110
+ const start = lines.findIndex((line) => /^#{2,3}\s+/.test(line) && line.replace(/^#{2,3}\s+/, "").trim().toLowerCase() === heading.toLowerCase());
111
+ if (start === -1)
112
+ return false;
113
+ const collected = [];
114
+ for (const line of lines.slice(start + 1)) {
115
+ if (/^#{2,3}\s+/.test(line))
116
+ break;
117
+ collected.push(line);
118
+ }
119
+ return hasDetail(collected.join("\n"));
120
+ }
121
+ function hasDetail(section) {
122
+ return section
123
+ .split("\n")
124
+ .map((line) => line.replace(/^[-*\s]+/, "").trim())
125
+ .filter((line) => line && !line.startsWith("###"))
126
+ .some((line) => {
127
+ if (line.includes("..."))
128
+ return false;
129
+ if (/^[A-Za-z -]+:\s*$/.test(line))
130
+ return false;
131
+ if (/^(Command|Result|Reviewer|Outcome|Follow-ups):\s*$/i.test(line))
132
+ return false;
133
+ return true;
134
+ });
135
+ }
136
+ async function readEvidence(root, evidencePath) {
137
+ if (!evidencePath)
138
+ return undefined;
139
+ try {
140
+ await access(join(root, evidencePath));
141
+ return await readFile(join(root, evidencePath), "utf8");
142
+ }
143
+ catch {
144
+ return undefined;
145
+ }
146
+ }
147
+ function escapeRegExp(value) {
148
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
149
+ }
@@ -0,0 +1,2 @@
1
+ import { ManagedFile } from "./managed-files.js";
2
+ export declare function teamFiles(): ManagedFile[];
@@ -0,0 +1,92 @@
1
+ import { markdown } from "./managed-files.js";
2
+ export function teamFiles() {
3
+ return [
4
+ {
5
+ path: ".speckit/team/roles.md",
6
+ content: markdown(`# Spec Team Roles
7
+
8
+ ## Purpose
9
+
10
+ Speckit maps team collaboration to owned artifacts. Roles do not imply separate people; one person can hold multiple roles, but every story must show which artifact is ready and which role is blocked.
11
+
12
+ ## Roles
13
+
14
+ | Role | Owns | Exit Signal |
15
+ | --- | --- | --- |
16
+ | Product Owner | business goal, priority, scope intent | story has clear business value |
17
+ | Analyst | acceptance criteria, edge cases, assumptions | story is testable |
18
+ | Architect | implementation scope, constraints, risks | dev can start without guessing |
19
+ | Developer | Dev Agent Record, File List, Change Log | implementation evidence is traceable |
20
+ | QA/Test | red, green, refactor evidence | behavior is validated |
21
+ | Reviewer/Lead | review evidence, approval, follow-ups | story can close |
22
+ `),
23
+ },
24
+ {
25
+ path: ".speckit/team/artifact-ownership.md",
26
+ content: markdown(`# Spec Artifact Ownership
27
+
28
+ ## Story Artifacts
29
+
30
+ - Product Owner owns \`Business Goal\`, \`Priority\`, and high-level intent.
31
+ - Analyst owns \`Acceptance Criteria\`, \`Edge Cases\`, and assumptions.
32
+ - Architect owns \`Implementation Scope\`, \`Architecture Notes\`, and risks.
33
+ - Developer owns \`Dev Agent Record\`, \`File List\`, and \`Change Log\`.
34
+ - QA/Test owns the linked TDD evidence file.
35
+ - Reviewer/Lead owns review outcome and closure readiness.
36
+
37
+ ## Rule
38
+
39
+ Do not move a story to the next gate by chat memory alone. Update the durable artifact first, then run \`speckit team status <story>\` or \`speckit team audit <story>\`.
40
+ `),
41
+ },
42
+ {
43
+ path: ".speckit/team/working-agreement.md",
44
+ content: markdown(`# Spec Working Agreement
45
+
46
+ ## Agreements
47
+
48
+ - One story is the unit of planning, implementation, review, and closure.
49
+ - Every implementation story must have a linked TDD evidence file.
50
+ - Agents and humans hand off through files, not conversation history.
51
+ - Graph commands stay robot-safe through Speckit wrappers.
52
+ - Review blocks closure when acceptance criteria, evidence, or file traceability are missing.
53
+ `),
54
+ },
55
+ {
56
+ path: ".speckit/team/review-gates.md",
57
+ content: markdown(`# Spec Review Gates
58
+
59
+ ## Gates
60
+
61
+ | Gate | Required Checks |
62
+ | --- | --- |
63
+ | shape | business goal, priority |
64
+ | ready | acceptance criteria, scope, context, graph sync |
65
+ | dev | Dev Agent Record, File List, Change Log |
66
+ | qa | red, green, refactor evidence |
67
+ | review | review outcome, follow-ups, unresolved risk |
68
+ | close | sync, compact summary, docs impact |
69
+
70
+ Run \`speckit team audit <story>\` before review and close.
71
+ `),
72
+ },
73
+ {
74
+ path: ".speckit/team/handoff-protocol.md",
75
+ content: markdown(`# Spec Handoff Protocol
76
+
77
+ ## Handoff Contract
78
+
79
+ Each handoff must include:
80
+
81
+ - Story path and current status.
82
+ - From role and to role.
83
+ - Current blockers and warnings.
84
+ - Files changed or expected files to inspect.
85
+ - Test evidence state.
86
+ - Next role checklist.
87
+
88
+ Use \`speckit team handoff <story> --from <role> --to <role>\` to generate a durable handoff.
89
+ `),
90
+ },
91
+ ];
92
+ }
@@ -1,2 +1,2 @@
1
- export declare const storyTemplate = "---\nstatus: draft\nevidence: .speckit/evidence/{{slug}}-tdd-evidence.md\ncontext: pending\nstory_key: {{slug}}\nac_count: 0\n---\n\n# Story: {{title}}\n\n## Intent\n{{intent}}\n\n## Acceptance Criteria\n- AC1: Given ...\n When ...\n Then ...\n\n## Implementation Scope\n- In scope:\n- Out of scope:\n- Files likely to read:\n- Files likely to modify:\n\n## Dev Notes\n- Existing patterns to reuse:\n- Architecture constraints:\n- Edge cases:\n- Previous-story learnings:\n\n## Tasks / Subtasks\n- [ ] Map acceptance criteria to tests.\n- [ ] RED: create or identify failing test.\n- [ ] GREEN: implement minimum passing change.\n- [ ] REFACTOR: improve design while tests stay green.\n- [ ] Update evidence, file list, and change log.\n\n## TDD Checklist\n- [ ] Test targets identified\n- [ ] Red evidence recorded\n- [ ] Green evidence recorded\n- [ ] Refactor validation recorded\n\n## Notes\n- Risks:\n- Dependencies:\n\n## Dev Agent Record\n### Test Intent\n\n### Debug Log\n\n### Completion Notes\n\n### File List\n\n## Change Log\n- {{date}}: Story drafted.\n\n## Spec Anti-Mistake Checklist\n- Reuse existing project patterns before adding new files.\n- Verify file locations before editing.\n- Do not introduce new libraries without explicit need.\n- Preserve existing behavior unless an acceptance criterion requires change.\n- Capture previous-story learnings if this continues prior work.\n- Do not mark any task complete without test or validation evidence.\n";
1
+ export declare const storyTemplate = "---\nstatus: draft\nevidence: .speckit/evidence/{{slug}}-tdd-evidence.md\ncontext: pending\nstory_key: {{slug}}\nac_count: 0\n---\n\n# Story: {{title}}\n\n## Intent\n{{intent}}\n\n## Business Goal\n- Goal:\n- Priority: medium\n- Success signal:\n\n## Acceptance Criteria\n- AC1: Given ...\n When ...\n Then ...\n\n## Edge Cases\n- Boundary:\n- Error path:\n- State transition:\n\n## Implementation Scope\n- In scope:\n- Out of scope:\n- Files likely to read:\n- Files likely to modify:\n\n## Architecture Notes\n- Constraints:\n- Integration points:\n- Risks:\n\n## Dev Notes\n- Existing patterns to reuse:\n- Architecture constraints:\n- Edge cases:\n- Previous-story learnings:\n\n## Tasks / Subtasks\n- [ ] Map acceptance criteria to tests.\n- [ ] RED: create or identify failing test.\n- [ ] GREEN: implement minimum passing change.\n- [ ] REFACTOR: improve design while tests stay green.\n- [ ] Update evidence, file list, and change log.\n\n## TDD Checklist\n- [ ] Test targets identified\n- [ ] Red evidence recorded\n- [ ] Green evidence recorded\n- [ ] Refactor validation recorded\n\n## Notes\n- Risks:\n- Dependencies:\n\n## Dev Agent Record\n### Test Intent\n\n### Debug Log\n\n### Completion Notes\n\n### File List\n\n## Change Log\n- {{date}}: Story drafted.\n\n## Spec Anti-Mistake Checklist\n- Reuse existing project patterns before adding new files.\n- Verify file locations before editing.\n- Do not introduce new libraries without explicit need.\n- Preserve existing behavior unless an acceptance criterion requires change.\n- Capture previous-story learnings if this continues prior work.\n- Do not mark any task complete without test or validation evidence.\n";
2
2
  export declare const tddEvidenceTemplate = "---\nstatus: missing\nstory: {{story}}\nphase: not-started\n---\n\n# TDD Evidence: {{story}}\n\n## Test Intent\n- Acceptance criteria covered:\n- Test files:\n- Command:\n\n## Red\n- Command:\n- Result:\n- Failing reason:\n\n## Green\n- Command:\n- Result:\n- Passing evidence:\n\n## Refactor\n- Command:\n- Result:\n- Regression evidence:\n\n## Review Evidence\n- Reviewer:\n- Outcome:\n- Follow-ups:\n";
@@ -11,17 +11,32 @@ ac_count: 0
11
11
  ## Intent
12
12
  {{intent}}
13
13
 
14
+ ## Business Goal
15
+ - Goal:
16
+ - Priority: medium
17
+ - Success signal:
18
+
14
19
  ## Acceptance Criteria
15
20
  - AC1: Given ...
16
21
  When ...
17
22
  Then ...
18
23
 
24
+ ## Edge Cases
25
+ - Boundary:
26
+ - Error path:
27
+ - State transition:
28
+
19
29
  ## Implementation Scope
20
30
  - In scope:
21
31
  - Out of scope:
22
32
  - Files likely to read:
23
33
  - Files likely to modify:
24
34
 
35
+ ## Architecture Notes
36
+ - Constraints:
37
+ - Integration points:
38
+ - Risks:
39
+
25
40
  ## Dev Notes
26
41
  - Existing patterns to reuse:
27
42
  - Architecture constraints:
package/docs/adapters.md CHANGED
@@ -14,6 +14,18 @@ Speckit compiles one workflow into native files for five IDEs.
14
14
 
15
15
  Generated files include the `speckit:managed` marker. Speckit updates managed files idempotently and skips unmanaged files unless `--force` is provided.
16
16
 
17
+ ## Shared Enterprise Contract
18
+
19
+ All adapters point agents back to the shared Speckit runtime:
20
+
21
+ - `.speckit/agents/super-agent.md`
22
+ - `.speckit/skills/catalog.md`
23
+ - `.speckit/team/*.md`
24
+ - `.speckit/context/current.md`
25
+ - `.speckit/context/subagent-handoff.md`
26
+
27
+ Adapters should not redefine team workflow rules independently. Update the shared generator and re-run `speckit init --enterprise --ide <name>` when the contract changes.
28
+
17
29
  ## Cursor Policy
18
30
 
19
31
  Cursor uses `.cursor/rules/*.mdc`. Speckit does not generate the legacy `.cursorrules` file.
@@ -5,5 +5,7 @@
5
5
  - Prefer deterministic file generation over runtime prompts.
6
6
  - Use `writeManagedFiles` for generated files so unmanaged user files are protected.
7
7
  - Keep adapter logic declarative: `name`, `displayName`, `outputPaths`, `render`.
8
+ - Keep enterprise evaluators artifact-based. Team status, audit, and score should inspect durable files instead of chat history.
9
+ - Keep public docs aligned with CLI help whenever a command is added.
8
10
  - Add tests for command behavior and adapter contracts before expanding implementation scope.
9
11
  - Do not invoke interactive external tools from automation paths.
@@ -4,9 +4,9 @@
4
4
 
5
5
  Speckit MVP is implemented and pushed to `git@github.com:trieungoctam/speckit.git` on `main`.
6
6
 
7
- Current package target: `@trieungoctam/speckit@0.3.5`.
7
+ Current package target: `@trieungoctam/speckit@0.4.0`.
8
8
 
9
- The CLI is npx-ready, generates Agile + TDD rules, creates workflow artifacts, supports five IDE adapters, wraps Beads Viewer safely, includes an enterprise harness, and has automated prompt/readiness/session tests plus CI.
9
+ The CLI is npx-ready, generates Agile + TDD rules, creates workflow artifacts, supports five IDE adapters, wraps Beads Viewer safely, includes an enterprise harness, and now exposes team-role workflow status, review-gate audit, handoff files, and runtime scoring.
10
10
 
11
11
  ## Milestones
12
12
 
@@ -20,17 +20,21 @@ The CLI is npx-ready, generates Agile + TDD rules, creates workflow artifacts, s
20
20
  | Beads integration | MVP Complete | `graph setup` prints install commands and prepares `.beads/beads.jsonl`; `next` and `graph triage/plan/insights` wrap BV robot mode; `sync` exports story metadata JSONL. |
21
21
  | Sprint automation | MVP Complete | `sprint plan` and `sprint next` select work from synced stories. |
22
22
  | Enterprise harness | MVP Complete | `init --enterprise` creates flow, tool-policy, and prompt harness files; `doctor --deep` verifies them. |
23
+ | Enterprise team workflow | Complete | `init --enterprise` creates `.speckit/team/*`; `team status`, `team audit`, and `team handoff` expose role-owned artifacts and review blockers. |
24
+ | Runtime scoring | Complete | `score` reports project or story workflow health across contract, team, session/context, graph, TDD, and review categories. |
23
25
  | Curated skill catalog | Complete | Speckit now generates focused phase skills, a schema, delegation statuses, and task hydration/sync-back guidance. |
24
26
  | Workflow contract validator | Complete | `speckit validate` and `doctor --deep` check phase order, core skills, router terms, run prompt terms, and adapter parity. |
25
27
  | Prompt architecture | Complete | Generated prompts now enforce artifact contracts, hard gates, common mistake prevention, TDD evidence, and review layers across adapters. |
26
28
  | Permission policy | MVP Complete | `.speckit/permissions.yaml` and `permissions audit` cover privacy files, heavy paths, destructive commands, and release commands. |
27
29
  | Validation | Complete | Build and `node:test` suite pass locally with flow contract gates. |
28
30
  | GitHub publish | Complete | Initial code pushed to `trieungoctam/speckit` at commit `7e5c582`; status docs follow-up in progress. |
29
- | npm package readiness | Ready | Package scoped as `@trieungoctam/speckit`; `npm pack --dry-run` passes. |
31
+ | npm package readiness | Ready | Package scoped as `@trieungoctam/speckit`; `npm pack --dry-run` passes for `0.4.0`. |
30
32
 
31
33
  ## Next Roadmap
32
34
 
35
+ - Add `score --threshold <n>` for CI gating after teams agree on rollout policy.
33
36
  - Add `review --deep` with multi-layer acceptance, edge-case, and production-readiness prompts.
34
37
  - Add graph drift and history correlation commands.
38
+ - Add lockfile and drift detection for generated Speckit contracts.
35
39
  - Add GitHub trusted publishing for npm releases.
36
40
  - Add snapshot tests for full adapter file contents.
@@ -6,9 +6,10 @@ Speckit works best as a repo-local standard, then as an organization template.
6
6
 
7
7
  1. Pilot in one service repository with `speckit init --ide all`.
8
8
  2. Require stories to include acceptance criteria and TDD evidence.
9
- 3. Add `speckit doctor` and project tests to CI.
10
- 4. Export stories with `speckit sync` for task graph visibility.
11
- 5. Roll the generated adapter pack into team templates.
9
+ 3. Require `speckit team status <story>` before implementation handoff.
10
+ 4. Add `speckit doctor`, `speckit validate`, `speckit score --json`, and project tests to CI.
11
+ 5. Export stories with `speckit sync` for task graph visibility.
12
+ 6. Roll the generated adapter pack into team templates.
12
13
 
13
14
  ## Governance Layers
14
15
 
@@ -16,12 +17,16 @@ Speckit works best as a repo-local standard, then as an organization template.
16
17
  | --- | --- | --- |
17
18
  | Company policy | Engineering leadership | `.speckit/rules/enterprise-safety.md` |
18
19
  | Team workflow | Tech lead | `.speckit/workflows/*.md` |
20
+ | Team roles | Product / engineering lead | `.speckit/team/*.md` |
19
21
  | Repo standard | Maintainers | `AGENTS.md`, `CLAUDE.md`, IDE config |
20
22
  | Story evidence | Implementer | `.speckit/evidence/*.md` |
23
+ | Review readiness | Reviewer / lead | `speckit team audit <story>` |
21
24
 
22
25
  ## Recommended Controls
23
26
 
24
27
  - Do not allow code stories to merge without red-green-refactor evidence.
25
28
  - Keep adapter output generated from Speckit instead of hand-maintaining per-IDE rules.
26
29
  - Treat `speckit doctor` warnings as rollout debt.
30
+ - Treat `speckit score` as the adoption health metric. Start non-blocking, then define a threshold after the pilot.
31
+ - Use `speckit team handoff` whenever work moves from development to QA or review.
27
32
  - Use Beads Viewer only through robot commands for non-interactive automation.
@@ -0,0 +1,131 @@
1
+ # Getting Started
2
+
3
+ This guide is the shortest path to reset a repository, install Speckit, and run one enterprise Agile + TDD story.
4
+
5
+ ## 1. Install Or Reinstall Runtime Files
6
+
7
+ Interactive setup:
8
+
9
+ ```bash
10
+ npx @trieungoctam/speckit@latest setup
11
+ ```
12
+
13
+ Recommended answers for enterprise use:
14
+
15
+ ```text
16
+ Setup mode: Enterprise Agile + TDD harness
17
+ IDE adapter: All supported IDEs
18
+ Overwrite unmanaged files if needed: yes
19
+ Run Beads Viewer setup after init: yes
20
+ ```
21
+
22
+ Scripted setup:
23
+
24
+ ```bash
25
+ npx @trieungoctam/speckit@latest init --enterprise --ide all --force
26
+ npx @trieungoctam/speckit@latest graph setup
27
+ ```
28
+
29
+ Use one adapter when a repo standardizes on one IDE:
30
+
31
+ ```bash
32
+ npx @trieungoctam/speckit@latest init --enterprise --ide cursor --force
33
+ ```
34
+
35
+ Supported adapter names:
36
+
37
+ - `claude-code`
38
+ - `codex`
39
+ - `antigravity`
40
+ - `opencode`
41
+ - `cursor`
42
+ - `all`
43
+
44
+ ## 2. Verify The Install
45
+
46
+ ```bash
47
+ speckit doctor --deep
48
+ speckit validate
49
+ speckit score
50
+ ```
51
+
52
+ Expected behavior:
53
+
54
+ - `doctor --deep` checks generated files and external tools.
55
+ - `validate` checks prompt, skill, adapter, and workflow contract alignment.
56
+ - `score` may be below 100 before a session, context, and graph sync exist. That is normal.
57
+
58
+ ## 3. Start Work
59
+
60
+ ```bash
61
+ speckit memory refresh
62
+ speckit session start "Add customer export"
63
+ speckit quick "Add customer export"
64
+ ```
65
+
66
+ `quick` prints two paths:
67
+
68
+ - `.speckit/stories/<story>.md`
69
+ - `.speckit/evidence/<story>-tdd-evidence.md`
70
+
71
+ Use the printed story path in the next commands.
72
+
73
+ ## 4. Prepare Context And Graph
74
+
75
+ ```bash
76
+ speckit context .speckit/stories/<story>.md
77
+ speckit sync
78
+ speckit ready .speckit/stories/<story>.md
79
+ ```
80
+
81
+ If `ready` is blocked, fix the reported story, context, evidence, or graph issue before implementation.
82
+
83
+ ## 5. Implement With TDD
84
+
85
+ ```bash
86
+ speckit run .speckit/stories/<story>.md
87
+ ```
88
+
89
+ Then follow the red-green-refactor loop:
90
+
91
+ ```bash
92
+ npm test
93
+ speckit session checkpoint --note "red evidence captured"
94
+ npm test
95
+ speckit session checkpoint --note "green evidence captured"
96
+ speckit session checkpoint --note "refactor validated"
97
+ ```
98
+
99
+ Update the story and evidence file with command summaries, changed files, and completion notes.
100
+
101
+ ## 6. Team Review Flow
102
+
103
+ ```bash
104
+ speckit team status .speckit/stories/<story>.md
105
+ speckit team handoff .speckit/stories/<story>.md --from dev --to qa
106
+ speckit team audit .speckit/stories/<story>.md
107
+ speckit score .speckit/stories/<story>.md
108
+ ```
109
+
110
+ Use `team status` to see which role-owned artifact is missing. Use `team audit` before review or close.
111
+
112
+ ## 7. Review And Close
113
+
114
+ ```bash
115
+ speckit review
116
+ speckit session compact
117
+ speckit close .speckit/stories/<story>.md
118
+ speckit sync
119
+ speckit validate
120
+ ```
121
+
122
+ ## Resetting Adapters
123
+
124
+ To remove generated IDE adapter files before reinstalling Speckit in a repository:
125
+
126
+ ```bash
127
+ rm -rf .claude CLAUDE.md .codex AGENTS.md .cursor .opencode opencode.json
128
+ npx @trieungoctam/speckit@latest setup
129
+ ```
130
+
131
+ This removes repo-local adapter files only. Do not remove global IDE configuration unless you intentionally want to affect every project on the machine.
@@ -5,11 +5,13 @@ Speckit owns the workflow contract for enterprise Agile + TDD development with a
5
5
  ## Speckit Owns
6
6
 
7
7
  - The `.speckit/` source of truth: config, rules, workflows, templates, generated artifacts.
8
- - The command surface: `init`, `doctor`, `validate`, `start`, `memory`, `permissions`, `session`, `shape`, `plan`, `context`, `quick`, `sync`, `triage`, `sprint`, `graph`, `next`, `ready`, `run`, `review`, `close`.
8
+ - The command surface: `init`, `doctor`, `validate`, `start`, `memory`, `permissions`, `session`, `team`, `score`, `shape`, `plan`, `context`, `quick`, `sync`, `triage`, `sprint`, `graph`, `next`, `ready`, `run`, `review`, `close`.
9
9
  - The skill catalog and super-agent routing contract for phase-specific agent behavior.
10
10
  - IDE-specific initialization that installs the shared Speckit runtime plus only the selected IDE adapter when `--ide <name>` is provided.
11
11
  - The long-session contract: project memory, active session state, checkpoints, compaction summaries, and resume handoffs.
12
12
  - The workflow validation contract: phase order, core skills, super-agent routing, run prompt terms, and installed adapter prompt parity.
13
+ - The enterprise team contract: Product Owner, Analyst, Architect, Developer, QA/Test, and Reviewer/Lead artifact ownership.
14
+ - The runtime score contract: project and story health across workflow, team, session/context, graph, TDD, and review categories.
13
15
  - The TDD gate: code stories require red, green, and refactor evidence.
14
16
  - The adapter compiler for Claude Code, Codex, Antigravity, OpenCode, and Cursor.
15
17
  - The safety policy for destructive commands, secrets, production access, and review readiness.
@@ -26,7 +28,24 @@ Speckit owns the workflow contract for enterprise Agile + TDD development with a
26
28
  ## State Model
27
29
 
28
30
  ```text
29
- intake -> session -> memory-ready -> shaped -> planned -> sprint-ready -> context-ready -> synced -> graph-triaged -> ready-for-dev -> tests-red -> checkpointed -> running -> tests-green -> refactor -> compacted -> review-ready -> closed
31
+ intake -> session -> memory-ready -> shaped -> planned -> sprint-ready -> context-ready -> synced -> graph-triaged -> team-status -> ready-for-dev -> tests-red -> checkpointed -> running -> tests-green -> refactor -> team-audit -> compacted -> review-ready -> closed
30
32
  ```
31
33
 
32
34
  Implementation starts only after `speckit ready <story>` passes. Review starts only after test evidence exists and the active session has a current checkpoint.
35
+
36
+ ## Team Artifact Model
37
+
38
+ | Role | Owned Artifact |
39
+ | --- | --- |
40
+ | Product Owner | `Business Goal`, priority, success signal |
41
+ | Analyst | `Acceptance Criteria`, `Edge Cases` |
42
+ | Architect | `Implementation Scope`, `Architecture Notes` |
43
+ | Developer | `Dev Agent Record`, `File List`, `Change Log` |
44
+ | QA/Test | linked TDD evidence red, green, refactor sections |
45
+ | Reviewer/Lead | `Review Evidence`, follow-ups, close readiness |
46
+
47
+ `speckit team status` reports current ownership gaps. `speckit team audit` enforces the review gate. `speckit team handoff` records role transfer.
48
+
49
+ ## Runtime Score Model
50
+
51
+ `speckit score` is a health signal, not a replacement for tests. It shows whether the project or story has enough durable workflow evidence to be understandable, reviewable, and handoff-ready.
@@ -1,5 +1,33 @@
1
1
  # Project Changelog
2
2
 
3
+ ## 0.4.1 - 2026-05-11
4
+
5
+ ### Changed
6
+
7
+ - Added `docs/getting-started.md` with setup, adapter reset, verification, one-story execution, team audit, score, and close steps.
8
+ - Updated README, use-case, team workflow, and release checklist guidance for reinstalling repo-local adapters through Speckit.
9
+ - Updated prompt quality tests so adapter prompt coverage is validated from generators instead of requiring checked-out adapter files after local reset.
10
+
11
+ ## 0.4.0 - 2026-05-11
12
+
13
+ ### Added
14
+
15
+ - Added the Enterprise Team Workflow layer with generated team role, artifact ownership, working agreement, review gate, and handoff protocol files.
16
+ - Added `speckit team status <story>` to show role-by-role artifact readiness for Product Owner, Analyst, Architect, Developer, QA/Test, and Reviewer/Lead.
17
+ - Added `speckit team audit <story> [--json]` for review-gate blocking checks that can run in CI.
18
+ - Added `speckit team handoff <story> --from <role> --to <role>` to create durable role handoff files.
19
+ - Added `speckit score [story] [--json]` to score project or story workflow health for enterprise demos and CI health reporting.
20
+
21
+ ### Changed
22
+
23
+ - Story templates and generated quick/plan stories now include business goal, priority, edge cases, implementation scope, architecture notes, Dev Agent Record, File List, and Change Log sections for team traceability.
24
+ - `.beads/` is ignored as runtime graph mirror state.
25
+ - README and use-case guides now include adapter reset, reinstall, verification, story execution, score, team audit, and close steps.
26
+
27
+ ### Quality
28
+
29
+ - Added enterprise team workflow tests for generated files, status, audit, and handoff behavior.
30
+
3
31
  ## 0.3.6 - 2026-05-11
4
32
 
5
33
  ### Added
@@ -6,12 +6,17 @@ Before publishing Speckit:
6
6
  - [x] `npm run lint` passes.
7
7
  - [x] `npm test` passes.
8
8
  - [x] `bin/speckit init --ide all` works in a temporary directory.
9
+ - [x] `speckit init --enterprise --ide all` creates `.speckit/team/*`.
10
+ - [x] `speckit team status|audit|handoff` has test coverage.
11
+ - [x] `speckit score [story] --json` has test coverage.
9
12
  - [x] `npm pack --dry-run` includes only package-safe files.
10
13
  - [x] `package.json` name is `@trieungoctam/speckit` and `publishConfig.access` is `public`.
11
14
  - [x] README uses `npx @trieungoctam/speckit@latest`.
15
+ - [x] Getting started guide covers setup, adapter reset, verification, one story, team audit, score, and close.
12
16
  - [x] Adapter output paths match `docs/adapters.md`.
13
17
  - [x] Cursor output uses `.cursor/rules/*.mdc`, not `.cursorrules`.
14
18
  - [x] `speckit next` only invokes `bv --robot-*`.
19
+ - [x] `.beads/` runtime mirror files are ignored by git.
15
20
  - [ ] License and attribution review is complete for Speckit, Speckit Method, and Beads Viewer inspiration.
16
21
  - [x] README quickstart is accurate.
17
22
  - [x] No secrets, local credentials, or generated private data are included.
@@ -29,6 +29,8 @@ Every phase must link to the next durable artifact.
29
29
  | context | story | context pack | story -> context |
30
30
  | sync | story | graph task | story -> task id |
31
31
  | run | task/story | TDD evidence | task -> evidence |
32
+ | team status | story + evidence | role readiness | role -> artifact |
33
+ | team audit | story + evidence | gate report | blocker -> owner |
32
34
  | review | diff + evidence | review checklist | evidence -> review |
33
35
  | close | review | changelog / graph close | review -> close |
34
36
 
@@ -51,6 +53,30 @@ All supported IDEs must receive the same Speckit policy:
51
53
  - Session/context instructions
52
54
  - Graph command safety
53
55
 
56
+ ## Team Gate
57
+
58
+ Enterprise stories must expose role-owned artifacts:
59
+
60
+ - Product Owner: business goal, priority, success signal.
61
+ - Analyst: testable acceptance criteria and edge cases.
62
+ - Architect: implementation scope, constraints, and risks.
63
+ - Developer: Dev Agent Record, File List, and Change Log.
64
+ - QA/Test: red, green, and refactor evidence.
65
+ - Reviewer/Lead: review outcome and follow-ups.
66
+
67
+ Run:
68
+
69
+ ```bash
70
+ speckit team status <story>
71
+ speckit team audit <story> --json
72
+ ```
73
+
74
+ ## Score Gate
75
+
76
+ `speckit score` gives a project-level health signal across workflow contract, team operating model, context/session, and graph sync. `speckit score <story>` gives a story-level signal across team readiness, developer trace, TDD evidence, and review gate.
77
+
78
+ Use score as a rollout metric first. Only turn it into a hard CI threshold after the team agrees on acceptable minimums.
79
+
54
80
  ## Release Gate
55
81
 
56
82
  Before release:
@@ -67,4 +93,5 @@ For enterprise releases:
67
93
  ```bash
68
94
  speckit init --enterprise --ide all
69
95
  speckit doctor --deep --json
96
+ speckit score --json
70
97
  ```