product-spec 0.4.0 → 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.
- package/CHANGELOG.md +8 -0
- package/README.md +10 -10
- package/assets/claude/commands/product-spec-align.md +4 -4
- package/assets/claude/commands/product-spec-domain.md +6 -6
- package/assets/claude/commands/product-spec-faq.md +5 -5
- package/assets/claude/commands/product-spec-narrative.md +6 -6
- package/assets/claude/commands/product-spec-press.md +5 -5
- package/assets/claude/commands/product-spec-roadmap.md +5 -5
- package/assets/codex/commands/product-spec-align.md +4 -4
- package/assets/codex/commands/product-spec-domain.md +5 -5
- package/assets/codex/commands/product-spec-faq.md +5 -5
- package/assets/codex/commands/product-spec-narrative.md +5 -5
- package/assets/codex/commands/product-spec-press.md +5 -5
- package/assets/codex/commands/product-spec-roadmap.md +5 -5
- package/assets/product/templates/current-truth-template.md +1 -1
- package/assets/product/templates/domain-template.md +1 -1
- package/assets/product/templates/faq-template.md +1 -1
- package/assets/product/templates/narrative-template.md +1 -1
- package/assets/product/templates/press-template.md +1 -1
- package/assets/product/templates/requirements-template.md +1 -1
- package/assets/product/templates/roadmap-template.md +1 -1
- package/dist/core/assets/registry.d.ts +4 -0
- package/dist/core/assets/registry.js +5 -1
- package/dist/core/assets/registry.js.map +1 -1
- package/dist/core/orchestration/add.js +1 -0
- package/dist/core/orchestration/add.js.map +1 -1
- package/dist/core/orchestration/check.js +28 -2
- package/dist/core/orchestration/check.js.map +1 -1
- package/dist/core/orchestration/shared-assets.d.ts +6 -0
- package/dist/core/orchestration/shared-assets.js +41 -2
- package/dist/core/orchestration/shared-assets.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.4.1] - 2026-03-30
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- New installs now place managed product docs and shared templates under `product/` instead of `/.product/`
|
|
12
|
+
- `product-spec add` now migrates an existing root `/.product/` directory to `product/` when no conflicting `product/` directory already exists
|
|
13
|
+
- Health checks and packaged assistant assets now guide users toward `product/` consistently
|
|
14
|
+
|
|
7
15
|
## [0.4.0] - 2026-03-30
|
|
8
16
|
|
|
9
17
|
### Added
|
package/README.md
CHANGED
|
@@ -92,19 +92,19 @@ After adding an integration, use the installed slash commands inside the assista
|
|
|
92
92
|
|
|
93
93
|
## How It Works
|
|
94
94
|
|
|
95
|
-
product-spec creates a
|
|
95
|
+
product-spec creates a `product/` folder in your project that maintains a living view of the product across releases. Primary documents stay focused on the current state of thinking, while companion history documents preserve notable changes over time.
|
|
96
96
|
|
|
97
97
|
### Documents
|
|
98
98
|
|
|
99
99
|
| File | Purpose |
|
|
100
100
|
|------|---------|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
101
|
+
| `product/domain.md` | Industry context, target users, terminology, competitive landscape |
|
|
102
|
+
| `product/press.md` | Current press release and customer-facing promise |
|
|
103
|
+
| `product/faq.md` | Current external and internal FAQs that challenge the promise |
|
|
104
|
+
| `product/narrative.md` | Durable internal story: customer, tension, future state, and principles |
|
|
105
|
+
| `product/roadmap.md` | Forward-looking sequencing of bets, phases, and dependencies |
|
|
106
|
+
| `product/current-truth.md` | Maintained current-state product specification grounded by alignment |
|
|
107
|
+
| `product/history/*.md` | Companion history files for key product artifacts |
|
|
108
108
|
|
|
109
109
|
### Workflow
|
|
110
110
|
|
|
@@ -119,7 +119,7 @@ product-spec creates a `.product/` folder in your project that maintains a livin
|
|
|
119
119
|
4. `/product-spec-narrative` turns the promise and challenge into a durable internal product story.
|
|
120
120
|
5. `/product-spec-roadmap` sequences future bets and dependencies without replacing current truth.
|
|
121
121
|
6. `/speckit.specify` hands off the next bet to spec-kit for engineering specifications.
|
|
122
|
-
7. `/product-spec-align` reconciles product docs with the evolving engineering scope and maintains
|
|
122
|
+
7. `/product-spec-align` reconciles product docs with the evolving engineering scope and maintains `product/current-truth.md`.
|
|
123
123
|
|
|
124
124
|
## Key Concepts
|
|
125
125
|
|
|
@@ -129,7 +129,7 @@ product-spec creates a `.product/` folder in your project that maintains a livin
|
|
|
129
129
|
|
|
130
130
|
### Companion History
|
|
131
131
|
|
|
132
|
-
Primary product docs stay focused on the current state. Companion files under
|
|
132
|
+
Primary product docs stay focused on the current state. Companion files under `product/history/` preserve important prior decisions, revisions, and reasoning.
|
|
133
133
|
|
|
134
134
|
### Working Backwards
|
|
135
135
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Reconcile the
|
|
2
|
+
description: Reconcile the product folder with changes made in .specify specs — update product-facing docs and maintain current truth.
|
|
3
3
|
handoffs:
|
|
4
4
|
- label: Update Press Release
|
|
5
5
|
agent: product-spec-press
|
|
@@ -25,13 +25,13 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
25
25
|
|
|
26
26
|
## Outline
|
|
27
27
|
|
|
28
|
-
You are reconciling the product documents in
|
|
28
|
+
You are reconciling the product documents in `product/` with the engineering specifications in `.specify/`.
|
|
29
29
|
|
|
30
30
|
### Pre-Execution
|
|
31
31
|
|
|
32
|
-
1. Load
|
|
32
|
+
1. Load `product/domain.md`, `product/press.md`, `product/faq.md`, `product/narrative.md`, `product/roadmap.md`, and `product/current-truth.md` when present.
|
|
33
33
|
2. Discover all `spec.md` files under `.specify/`.
|
|
34
|
-
3. Use
|
|
34
|
+
3. Use `product/templates/current-truth-template.md` if `current-truth.md` does not yet exist.
|
|
35
35
|
|
|
36
36
|
### Execution Flow
|
|
37
37
|
|
|
@@ -16,19 +16,19 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
16
16
|
|
|
17
17
|
## Outline
|
|
18
18
|
|
|
19
|
-
You are creating or updating the domain knowledge document at
|
|
19
|
+
You are creating or updating the domain knowledge document at `product/domain.md`. This document captures the industry context, problem space, target users, terminology, and competitive landscape that inform all product decisions.
|
|
20
20
|
|
|
21
21
|
### Pre-Execution
|
|
22
22
|
|
|
23
|
-
1. **Ensure
|
|
24
|
-
2. **Check for existing domain doc**: Read
|
|
23
|
+
1. **Ensure `product/` exists**: If the `product/` directory does not exist, create it.
|
|
24
|
+
2. **Check for existing domain doc**: Read `product/domain.md` if it exists.
|
|
25
25
|
- If it exists and has content beyond the template, this is an **update** — preserve existing content and merge new information.
|
|
26
|
-
- If it does not exist, load
|
|
27
|
-
3. **Load related artifacts when present**: Read
|
|
26
|
+
- If it does not exist, load `product/templates/domain-template.md` as the starting structure.
|
|
27
|
+
3. **Load related artifacts when present**: Read `product/press.md`, `product/faq.md`, `product/narrative.md`, and `product/current-truth.md` when they exist so the domain stays aligned with the rest of the product record.
|
|
28
28
|
|
|
29
29
|
### Execution Flow
|
|
30
30
|
|
|
31
31
|
1. **Parse user input**: The text after `/product-spec-domain` is the domain context the user wants to capture.
|
|
32
|
-
2. Create or update
|
|
32
|
+
2. Create or update `product/domain.md` using the domain template's shared structure for current context, assumptions, key decisions, related artifacts, and references to companion history.
|
|
33
33
|
3. Preserve useful current-state content and direct older historical material into the companion history document when appropriate.
|
|
34
34
|
4. Suggest `/product-spec-press` as the next step when appropriate.
|
|
@@ -19,14 +19,14 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the FAQ document at
|
|
22
|
+
You are creating or updating the FAQ document at `product/faq.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. Load
|
|
29
|
-
4. If
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/domain.md` and `product/press.md` when available.
|
|
28
|
+
3. Load `product/narrative.md`, `product/roadmap.md`, and `product/current-truth.md` when available so the FAQ work stays consistent with the rest of the product record.
|
|
29
|
+
4. If `product/faq.md` is missing, start from `product/templates/faq-template.md`.
|
|
30
30
|
|
|
31
31
|
### Execution Flow
|
|
32
32
|
|
|
@@ -19,18 +19,18 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the durable narrative document at
|
|
22
|
+
You are creating or updating the durable narrative document at `product/narrative.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. Load
|
|
29
|
-
4. If
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/domain.md`, `product/press.md`, and `product/faq.md` when available.
|
|
28
|
+
3. Load `product/roadmap.md` and `product/current-truth.md` when present so the narrative stays grounded.
|
|
29
|
+
4. If `product/narrative.md` does not exist, start from `product/templates/narrative-template.md`.
|
|
30
30
|
|
|
31
31
|
### Execution Flow
|
|
32
32
|
|
|
33
33
|
1. Use the supplied input plus the available product artifacts to explain the customer, the problem, the future state, and the product promise in a durable way.
|
|
34
|
-
2. Write or update
|
|
34
|
+
2. Write or update `product/narrative.md` using the shared structure for assumptions, key decisions, related artifacts, and companion history references.
|
|
35
35
|
3. Keep the main narrative focused on the current strategic story and move historical detail into the companion history document when appropriate.
|
|
36
36
|
4. Suggest `/product-spec-roadmap` as the next step when the story is ready to be sequenced into bets.
|
|
@@ -19,14 +19,14 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the press release document at
|
|
22
|
+
You are creating or updating the press release document at `product/press.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. Load
|
|
29
|
-
4. Read
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/domain.md` if it exists.
|
|
28
|
+
3. Load `product/faq.md`, `product/narrative.md`, and `product/current-truth.md` when present to keep the current press release aligned with the broader product record.
|
|
29
|
+
4. Read `product/press.md` if it exists; otherwise use `product/templates/press-template.md`.
|
|
30
30
|
|
|
31
31
|
### Execution Flow
|
|
32
32
|
|
|
@@ -19,17 +19,17 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the roadmap document at
|
|
22
|
+
You are creating or updating the roadmap document at `product/roadmap.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. If
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/narrative.md`, `product/faq.md`, `product/current-truth.md`, and any relevant specs when available.
|
|
28
|
+
3. If `product/roadmap.md` does not exist, start from `product/templates/roadmap-template.md`.
|
|
29
29
|
|
|
30
30
|
### Execution Flow
|
|
31
31
|
|
|
32
32
|
1. Use the narrative and supporting artifacts to organize work into phased customer outcomes, committed bets, exploratory work, and deferred opportunities.
|
|
33
|
-
2. Write or update
|
|
33
|
+
2. Write or update `product/roadmap.md` using the shared structure for assumptions, key decisions, related artifacts, and companion history references.
|
|
34
34
|
3. Keep the roadmap future-facing and do not let it replace the current-state role of `current-truth.md`.
|
|
35
35
|
4. Suggest `/speckit.specify` when the next bet is ready for engineering specification.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Reconcile the
|
|
2
|
+
description: Reconcile the product folder with changes made in .specify specs — update product-facing docs and maintain current truth.
|
|
3
3
|
handoffs:
|
|
4
4
|
- label: Update Press Release
|
|
5
5
|
agent: product-spec-press
|
|
@@ -25,13 +25,13 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
25
25
|
|
|
26
26
|
## Outline
|
|
27
27
|
|
|
28
|
-
You are reconciling
|
|
28
|
+
You are reconciling `product/` with `.specify/` specs so product-facing documents stay aligned with the engineering scope.
|
|
29
29
|
|
|
30
30
|
### Pre-Execution
|
|
31
31
|
|
|
32
|
-
1. Load
|
|
32
|
+
1. Load `product/domain.md`, `product/press.md`, `product/faq.md`, `product/narrative.md`, `product/roadmap.md`, and `product/current-truth.md` when present.
|
|
33
33
|
2. Discover relevant engineering specs and implementation outputs.
|
|
34
|
-
3. Use
|
|
34
|
+
3. Use `product/templates/current-truth-template.md` if `current-truth.md` does not yet exist.
|
|
35
35
|
|
|
36
36
|
### Execution Flow
|
|
37
37
|
|
|
@@ -16,16 +16,16 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
16
16
|
|
|
17
17
|
## Outline
|
|
18
18
|
|
|
19
|
-
You are creating or updating the domain knowledge document at
|
|
19
|
+
You are creating or updating the domain knowledge document at `product/domain.md`. This document captures the industry context, problem space, target users, terminology, and competitive landscape that inform all product decisions.
|
|
20
20
|
|
|
21
21
|
### Pre-Execution
|
|
22
22
|
|
|
23
|
-
1. Ensure
|
|
24
|
-
2. Read
|
|
25
|
-
3. Load
|
|
23
|
+
1. Ensure `product/` exists.
|
|
24
|
+
2. Read `product/domain.md` if it exists; otherwise start from `product/templates/domain-template.md`.
|
|
25
|
+
3. Load `product/press.md`, `product/faq.md`, `product/narrative.md`, and `product/current-truth.md` when present.
|
|
26
26
|
|
|
27
27
|
### Execution Flow
|
|
28
28
|
|
|
29
29
|
1. Use the user input as new market or customer context.
|
|
30
|
-
2. Update
|
|
30
|
+
2. Update `product/domain.md` with current context, assumptions, key decisions, related artifacts, and companion history references.
|
|
31
31
|
3. Preserve still-valid current-state content and suggest `/product-spec-press` as the next step.
|
|
@@ -19,14 +19,14 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the FAQ document at
|
|
22
|
+
You are creating or updating the FAQ document at `product/faq.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. Load
|
|
29
|
-
4. If
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/domain.md` and `product/press.md` when available.
|
|
28
|
+
3. Load `product/narrative.md`, `product/roadmap.md`, and `product/current-truth.md` when available so the FAQ work stays consistent with the rest of the product record.
|
|
29
|
+
4. If `product/faq.md` is missing, start from `product/templates/faq-template.md`.
|
|
30
30
|
|
|
31
31
|
### Execution Flow
|
|
32
32
|
|
|
@@ -19,16 +19,16 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the durable product narrative at
|
|
22
|
+
You are creating or updating the durable product narrative at `product/narrative.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. If
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/domain.md`, `product/press.md`, `product/faq.md`, `product/roadmap.md`, and `product/current-truth.md` when available.
|
|
28
|
+
3. If `product/narrative.md` is missing, start from `product/templates/narrative-template.md`.
|
|
29
29
|
|
|
30
30
|
### Execution Flow
|
|
31
31
|
|
|
32
32
|
1. Synthesize the available product artifacts into a durable internal story.
|
|
33
|
-
2. Update
|
|
33
|
+
2. Update `product/narrative.md` with current context, assumptions, key decisions, related artifacts, and history references.
|
|
34
34
|
3. Suggest `/product-spec-roadmap` when the narrative is ready to become a roadmap.
|
|
@@ -19,14 +19,14 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the press release document at
|
|
22
|
+
You are creating or updating the press release document at `product/press.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. Load
|
|
29
|
-
4. Read
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/domain.md` if it exists.
|
|
28
|
+
3. Load `product/faq.md`, `product/narrative.md`, and `product/current-truth.md` when present to keep the current press release aligned with the broader product record.
|
|
29
|
+
4. Read `product/press.md` if it exists; otherwise use `product/templates/press-template.md`.
|
|
30
30
|
|
|
31
31
|
### Execution Flow
|
|
32
32
|
|
|
@@ -19,16 +19,16 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
19
19
|
|
|
20
20
|
## Outline
|
|
21
21
|
|
|
22
|
-
You are creating or updating the roadmap document at
|
|
22
|
+
You are creating or updating the roadmap document at `product/roadmap.md`.
|
|
23
23
|
|
|
24
24
|
### Pre-Execution
|
|
25
25
|
|
|
26
|
-
1. Ensure
|
|
27
|
-
2. Load
|
|
28
|
-
3. If
|
|
26
|
+
1. Ensure `product/` exists.
|
|
27
|
+
2. Load `product/narrative.md`, `product/faq.md`, `product/current-truth.md`, and relevant specs when available.
|
|
28
|
+
3. If `product/roadmap.md` is missing, start from `product/templates/roadmap-template.md`.
|
|
29
29
|
|
|
30
30
|
### Execution Flow
|
|
31
31
|
|
|
32
32
|
1. Turn the narrative into phased, outcome-oriented bets.
|
|
33
|
-
2. Update
|
|
33
|
+
2. Update `product/roadmap.md` with assumptions, key decisions, related artifacts, and history references.
|
|
34
34
|
3. Keep the roadmap future-facing and suggest `/speckit.specify` when the next bet is ready.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Current Truth: [PROJECT_NAME]
|
|
2
2
|
|
|
3
3
|
**Last Updated**: [DATE]
|
|
4
|
-
**Companion History**: [
|
|
4
|
+
**Companion History**: [product/history/current-truth-history.md](product/history/current-truth-history.md)
|
|
5
5
|
|
|
6
6
|
## Product Summary
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Domain Knowledge: [PROJECT_NAME]
|
|
2
2
|
|
|
3
3
|
**Last Updated**: [DATE]
|
|
4
|
-
**Companion History**: [
|
|
4
|
+
**Companion History**: [product/history/domain-history.md](product/history/domain-history.md)
|
|
5
5
|
|
|
6
6
|
## Industry Context
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Frequently Asked Questions: [PROJECT_NAME]
|
|
2
2
|
|
|
3
3
|
**Last Updated**: [DATE]
|
|
4
|
-
**Companion History**: [
|
|
4
|
+
**Companion History**: [product/history/faq-history.md](product/history/faq-history.md)
|
|
5
5
|
|
|
6
6
|
## [RELEASE_NAME] — [TARGET_DATE] *(upcoming)*
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Product Narrative: [PROJECT_NAME]
|
|
2
2
|
|
|
3
3
|
**Last Updated**: [DATE]
|
|
4
|
-
**Companion History**: [
|
|
4
|
+
**Companion History**: [product/history/narrative-history.md](product/history/narrative-history.md)
|
|
5
5
|
|
|
6
6
|
## Customer
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Press Releases: [PROJECT_NAME]
|
|
2
2
|
|
|
3
3
|
**Last Updated**: [DATE]
|
|
4
|
-
**Companion History**: [
|
|
4
|
+
**Companion History**: [product/history/press-history.md](product/history/press-history.md)
|
|
5
5
|
|
|
6
6
|
<!--
|
|
7
7
|
Keep the main document focused on the active upcoming or current press release.
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
This template has been superseded by `current-truth-template.md`.
|
|
4
4
|
|
|
5
|
-
Use
|
|
5
|
+
Use `product/current-truth.md` as the living current-state product specification maintained by alignment work. Keep future sequencing and prioritization in `product/roadmap.md`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Product Roadmap: [PROJECT_NAME]
|
|
2
2
|
|
|
3
3
|
**Last Updated**: [DATE]
|
|
4
|
-
**Companion History**: [
|
|
4
|
+
**Companion History**: [product/history/roadmap-history.md](product/history/roadmap-history.md)
|
|
5
5
|
|
|
6
6
|
## Roadmap Summary
|
|
7
7
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { AssetCategory, AssistantTarget } from "../../types/index.js";
|
|
2
|
+
export declare const PRODUCT_DOCS_DIR = "product";
|
|
3
|
+
export declare const LEGACY_PRODUCT_DOCS_DIR = ".product";
|
|
4
|
+
export declare const PRODUCT_TEMPLATES_DIR = "product/templates";
|
|
5
|
+
export declare const LEGACY_PRODUCT_TEMPLATES_DIR = ".product/templates";
|
|
2
6
|
export interface AssetDefinition {
|
|
3
7
|
id: string;
|
|
4
8
|
category: AssetCategory;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export const PRODUCT_DOCS_DIR = "product";
|
|
2
|
+
export const LEGACY_PRODUCT_DOCS_DIR = ".product";
|
|
3
|
+
export const PRODUCT_TEMPLATES_DIR = `${PRODUCT_DOCS_DIR}/templates`;
|
|
4
|
+
export const LEGACY_PRODUCT_TEMPLATES_DIR = `${LEGACY_PRODUCT_DOCS_DIR}/templates`;
|
|
1
5
|
const assistantCommands = [
|
|
2
6
|
"product-spec-domain.md",
|
|
3
7
|
"product-spec-press.md",
|
|
@@ -38,7 +42,7 @@ function buildSharedAssets() {
|
|
|
38
42
|
}
|
|
39
43
|
function buildSharedAsset(fileName, category, subdir) {
|
|
40
44
|
const relativeDir = subdir ? `assets/product/templates/${subdir}` : "assets/product/templates";
|
|
41
|
-
const targetDir = subdir ?
|
|
45
|
+
const targetDir = subdir ? `${PRODUCT_TEMPLATES_DIR}/${subdir}` : PRODUCT_TEMPLATES_DIR;
|
|
42
46
|
return {
|
|
43
47
|
id: `shared/${fileName.replace(/\.md$/, "")}`,
|
|
44
48
|
category,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/assets/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../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AAC,CAAC,QAAQ,EAAE,EAAE,CACtD,gBAAgB,CAAC,QAAQ,EAAE,0BAA0B,EAAE,SAAS,CAAC,CAClE,CAAC;IAEF,OAAO,CAAC,GAAG,aAAa,EAAE,GAAG,aAAa,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,gBAAgB,CACvB,QAAgB,EAChB,QAAuB,EACvB,MAAe;IAEf,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,4BAA4B,MAAM,EAAE,CAAC,CAAC,CAAC,0BAA0B,CAAC;IAC/F,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,qBAAqB,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC;IAExF,OAAO;QACL,EAAE,EAAE,UAAU,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE;QAC7C,QAAQ;QACR,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,GAAG,WAAW,IAAI,QAAQ,EAAE;QACxC,UAAU,EAAE,GAAG,SAAS,IAAI,QAAQ,EAAE;KACvC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAA+C;IAChF,MAAM,EAAE,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IAC1D,KAAK,EAAE,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACxD,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,EAAE,CAAC;AAEvD,MAAM,UAAU,yBAAyB,CAAC,MAAuB;IAC/D,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -58,6 +58,7 @@ export async function runAdd(options) {
|
|
|
58
58
|
skippedTargets,
|
|
59
59
|
files,
|
|
60
60
|
notes: [
|
|
61
|
+
...sharedInstall.notes,
|
|
61
62
|
"Run `product-spec check` to validate the installed integrations.",
|
|
62
63
|
"Installed workflow: domain -> press -> faq -> narrative -> roadmap -> speckit* -> align -> current-truth."
|
|
63
64
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/core/orchestration/add.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,eAAe,EACf,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AASzD,SAAS,gBAAgB,CAAC,MAAuB,EAAE,MAAqB;IACtE,OAAO;QACL,MAAM;QACN,SAAS,EAAE,IAAI;QACf,MAAM;QACN,aAAa,EAAE,KAAK;KACrB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,OAAmB;IAC9C,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAChE,IAAI,QAAQ,GAAG,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACzH,QAAQ,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAEzD,MAAM,KAAK,GAA0B,EAAE,CAAC;IACxC,MAAM,cAAc,GAAsB,EAAE,CAAC;IAC7C,MAAM,cAAc,GAAsB,EAAE,CAAC;IAE7C,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;QACrC,MAAM,gBAAgB,GAAG,yB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S_DIR, PRODUCT_TEMPLATES_DIR, getTargetAssetDefinitions, sharedAssetRegistry } from "../assets/registry.js";
|
|
2
2
|
import { joinProjectPath, pathExists } from "../fs/project.js";
|
|
3
3
|
import { loadManifest } from "../state/manifest.js";
|
|
4
4
|
import { getAdapter, resolveTargets } from "./targets.js";
|
|
@@ -49,6 +49,32 @@ export async function runCheck(options) {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
const legacyProductDir = joinProjectPath(options.rootDir, LEGACY_PRODUCT_DOCS_DIR);
|
|
53
|
+
const productDir = joinProjectPath(options.rootDir, PRODUCT_DOCS_DIR);
|
|
54
|
+
const legacyTemplatesDir = joinProjectPath(options.rootDir, LEGACY_PRODUCT_TEMPLATES_DIR);
|
|
55
|
+
const productTemplatesDir = joinProjectPath(options.rootDir, PRODUCT_TEMPLATES_DIR);
|
|
56
|
+
const hasLegacyProductDir = await pathExists(legacyProductDir);
|
|
57
|
+
const hasProductDir = await pathExists(productDir);
|
|
58
|
+
const hasLegacyTemplatesDir = await pathExists(legacyTemplatesDir);
|
|
59
|
+
const hasProductTemplatesDir = await pathExists(productTemplatesDir);
|
|
60
|
+
if (hasLegacyProductDir) {
|
|
61
|
+
issues.push({
|
|
62
|
+
code: "LEGACY_PRODUCT_DIRECTORY",
|
|
63
|
+
severity: hasProductDir ? "warning" : "error",
|
|
64
|
+
message: hasProductDir
|
|
65
|
+
? "Legacy /.product directory still exists. product-spec now writes docs to /product."
|
|
66
|
+
: "Legacy /.product directory detected. product-spec now writes docs to /product.",
|
|
67
|
+
path: LEGACY_PRODUCT_DOCS_DIR
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (hasLegacyTemplatesDir && !hasProductTemplatesDir) {
|
|
71
|
+
issues.push({
|
|
72
|
+
code: "LEGACY_TEMPLATE_DIRECTORY",
|
|
73
|
+
severity: "warning",
|
|
74
|
+
message: "Shared templates are still stored in /.product/templates; rerun `product-spec add` to migrate them to /product/templates.",
|
|
75
|
+
path: LEGACY_PRODUCT_TEMPLATES_DIR
|
|
76
|
+
});
|
|
77
|
+
}
|
|
52
78
|
if (!manifest && presentCount > 0) {
|
|
53
79
|
issues.push({
|
|
54
80
|
code: "MANIFEST_MISSING",
|
|
@@ -66,7 +92,7 @@ export async function runCheck(options) {
|
|
|
66
92
|
? "No action needed."
|
|
67
93
|
: status === "missing"
|
|
68
94
|
? `Run \`product-spec add ${target}\` to install this integration.`
|
|
69
|
-
: `Run \`product-spec add ${target}\` to refresh managed files, then \`product-spec check ${target}\` again. The canonical workflow ends with \`current-truth.md\` maintained by \`align\`.`;
|
|
95
|
+
: `Run \`product-spec add ${target}\` to refresh managed files and migrate legacy /.product content into /product when possible, then \`product-spec check ${target}\` again. The canonical workflow ends with \`current-truth.md\` maintained by \`align\`.`;
|
|
70
96
|
reports.push({
|
|
71
97
|
target,
|
|
72
98
|
status,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/core/orchestration/check.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/core/orchestration/check.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAW1D,SAAS,cAAc,CACrB,mBAA2B,EAC3B,oBAA4B,EAC5B,iBAA0B,EAC1B,MAAqB;IAErB,IAAI,mBAAmB,KAAK,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpD,OAAO,SAAS,CAAC;IACnB,CAAC;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AA0B,MAAM,iCAAiC;gBACnE,CAAC,CAAC,0BAA0B,MAAM,2HAA2H,MAAM,0FAA0F,CAAC;QAEpQ,OAAO,CAAC,IAAI,CAAC;YACX,MAAM;YACN,MAAM;YACN,MAAM;YACN,iBAAiB;YACjB,eAAe;SAChB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -2,7 +2,13 @@ import type { AssetRecord, ManagedManifest, OperationFileResult } from "../../ty
|
|
|
2
2
|
interface SharedAssetInstallResult {
|
|
3
3
|
sharedAssets: AssetRecord[];
|
|
4
4
|
files: OperationFileResult[];
|
|
5
|
+
notes: string[];
|
|
5
6
|
}
|
|
6
7
|
export declare function installSharedAssets(rootDir: string, packageRoot: string): Promise<SharedAssetInstallResult>;
|
|
7
8
|
export declare function removeSharedAssets(rootDir: string, manifest: ManagedManifest): Promise<OperationFileResult[]>;
|
|
9
|
+
interface ProductDirectoryMigrationResult {
|
|
10
|
+
files: OperationFileResult[];
|
|
11
|
+
notes: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function migrateLegacyProductDirectory(rootDir: string): Promise<ProductDirectoryMigrationResult>;
|
|
8
14
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import {
|
|
2
|
+
import { rename } from "node:fs/promises";
|
|
3
|
+
import { LEGACY_PRODUCT_DOCS_DIR, LEGACY_PRODUCT_TEMPLATES_DIR, PRODUCT_DOCS_DIR, sharedAssetRegistry } from "../assets/registry.js";
|
|
3
4
|
import { assertInsideRoot, ensureDirectory, hashFile, joinProjectPath, pathExists, readText, removeIfExists, writeText } from "../fs/project.js";
|
|
4
5
|
export async function installSharedAssets(rootDir, packageRoot) {
|
|
6
|
+
const migration = await migrateLegacyProductDirectory(rootDir);
|
|
5
7
|
const sharedAssets = [];
|
|
6
8
|
const files = [];
|
|
7
9
|
for (const asset of sharedAssetRegistry) {
|
|
@@ -21,7 +23,11 @@ export async function installSharedAssets(rootDir, packageRoot) {
|
|
|
21
23
|
action: existed ? "updated" : "created"
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
|
-
return {
|
|
26
|
+
return {
|
|
27
|
+
sharedAssets,
|
|
28
|
+
files: [...migration.files, ...files],
|
|
29
|
+
notes: migration.notes
|
|
30
|
+
};
|
|
25
31
|
}
|
|
26
32
|
export async function removeSharedAssets(rootDir, manifest) {
|
|
27
33
|
const files = [];
|
|
@@ -36,4 +42,37 @@ export async function removeSharedAssets(rootDir, manifest) {
|
|
|
36
42
|
}
|
|
37
43
|
return files;
|
|
38
44
|
}
|
|
45
|
+
export async function migrateLegacyProductDirectory(rootDir) {
|
|
46
|
+
const legacyDir = joinProjectPath(rootDir, LEGACY_PRODUCT_DOCS_DIR);
|
|
47
|
+
const productDir = joinProjectPath(rootDir, PRODUCT_DOCS_DIR);
|
|
48
|
+
if (!(await pathExists(legacyDir))) {
|
|
49
|
+
return { files: [], notes: [] };
|
|
50
|
+
}
|
|
51
|
+
if (await pathExists(productDir)) {
|
|
52
|
+
const legacyTemplatesDir = joinProjectPath(rootDir, LEGACY_PRODUCT_TEMPLATES_DIR);
|
|
53
|
+
return {
|
|
54
|
+
files: [],
|
|
55
|
+
notes: [
|
|
56
|
+
await pathExists(legacyTemplatesDir)
|
|
57
|
+
? "Legacy /.product content still exists alongside /product. Existing /product content was left untouched; review and merge any remaining files manually."
|
|
58
|
+
: "Legacy /.product content still exists alongside /product. Existing /product content was left untouched."
|
|
59
|
+
]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
await ensureDirectory(path.dirname(productDir));
|
|
63
|
+
await rename(legacyDir, productDir);
|
|
64
|
+
return {
|
|
65
|
+
files: [
|
|
66
|
+
{
|
|
67
|
+
path: LEGACY_PRODUCT_DOCS_DIR,
|
|
68
|
+
action: "removed"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
path: PRODUCT_DOCS_DIR,
|
|
72
|
+
action: "created"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
notes: ["Migrated legacy /.product content to /product."]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
39
78
|
//# sourceMappingURL=shared-assets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-assets.js","sourceRoot":"","sources":["../../../src/core/orchestration/shared-assets.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"shared-assets.js","sourceRoot":"","sources":["../../../src/core/orchestration/shared-assets.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,eAAe,EACf,UAAU,EACV,QAAQ,EACR,cAAc,EACd,SAAS,EACV,MAAM,kBAAkB,CAAC;AAQ1B,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,OAAe,EACf,WAAmB;IAEnB,MAAM,SAAS,GAAG,MAAM,6BAA6B,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,YAAY,GAAkB,EAAE,CAAC;IACvC,MAAM,KAAK,GAA0B,EAAE,CAAC;IAExC,KAAK,MAAM,KAAK,IAAI,mBAAmB,EAAE,CAAC;QACxC,MAAM,UAAU,GAAG,eAAe,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAClE,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAC9D,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtC,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC;QAC7C,MAAM,eAA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