frontier-os-app-builder 1.0.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 +92 -0
- package/agents/fos-executor.md +460 -0
- package/agents/fos-plan-checker.md +386 -0
- package/agents/fos-planner.md +416 -0
- package/agents/fos-researcher.md +358 -0
- package/agents/fos-verifier.md +491 -0
- package/bin/fos-tools.cjs +794 -0
- package/bin/install.js +234 -0
- package/commands/fos/add-feature.md +29 -0
- package/commands/fos/discuss.md +31 -0
- package/commands/fos/execute.md +35 -0
- package/commands/fos/new-app.md +39 -0
- package/commands/fos/new-milestone.md +28 -0
- package/commands/fos/next.md +29 -0
- package/commands/fos/plan.md +37 -0
- package/commands/fos/ship.md +29 -0
- package/commands/fos/status.md +22 -0
- package/package.json +30 -0
- package/references/app-patterns.md +501 -0
- package/references/deployment.md +395 -0
- package/references/module-inference.md +349 -0
- package/references/sdk-surface.md +1622 -0
- package/references/verification-rules.md +404 -0
- package/templates/app/gitignore +25 -0
- package/templates/app/index.css +111 -0
- package/templates/app/index.html +19 -0
- package/templates/app/layout.tsx +45 -0
- package/templates/app/main-router.tsx +17 -0
- package/templates/app/main-simple.tsx +19 -0
- package/templates/app/package.json +36 -0
- package/templates/app/postcss.config.js +5 -0
- package/templates/app/router.tsx +22 -0
- package/templates/app/sdk-context.tsx +33 -0
- package/templates/app/test-setup.ts +19 -0
- package/templates/app/tsconfig.json +22 -0
- package/templates/app/vercel.json +127 -0
- package/templates/app/vite.config.ts +15 -0
- package/templates/state/context.md +248 -0
- package/templates/state/manifest.json +11 -0
- package/templates/state/plan.md +187 -0
- package/templates/state/project.md +118 -0
- package/templates/state/requirements.md +133 -0
- package/templates/state/roadmap.md +129 -0
- package/templates/state/state.md +131 -0
- package/templates/state/summary.md +273 -0
- package/workflows/add-feature.md +234 -0
- package/workflows/discuss.md +310 -0
- package/workflows/execute-plan.md +222 -0
- package/workflows/execute.md +338 -0
- package/workflows/new-app.md +331 -0
- package/workflows/new-milestone.md +258 -0
- package/workflows/next.md +157 -0
- package/workflows/plan.md +310 -0
- package/workflows/ship.md +296 -0
- package/workflows/status.md +145 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# PROJECT.md Template
|
|
2
|
+
|
|
3
|
+
Template for `.frontier-app/PROJECT.md` — the living app context document.
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# {{APP_NAME}}
|
|
9
|
+
|
|
10
|
+
## What This Is
|
|
11
|
+
|
|
12
|
+
{{APP_DESCRIPTION}}
|
|
13
|
+
|
|
14
|
+
[2-3 sentences. What does this app do and who is it for within the Frontier ecosystem?
|
|
15
|
+
Use the user's language and framing. Update whenever reality drifts from this description.]
|
|
16
|
+
|
|
17
|
+
## Core Value
|
|
18
|
+
|
|
19
|
+
[The ONE thing that matters most. If everything else fails, this must work.
|
|
20
|
+
One sentence that drives prioritization when tradeoffs arise.]
|
|
21
|
+
|
|
22
|
+
## SDK Modules
|
|
23
|
+
|
|
24
|
+
| Module | Why Needed | Key APIs |
|
|
25
|
+
|--------|-----------|----------|
|
|
26
|
+
| [Module] | [What it enables for this app] | [Primary methods used] |
|
|
27
|
+
|
|
28
|
+
[Only modules this app actually uses. Each must have a clear reason.
|
|
29
|
+
Common modules: Events, Wallet, Identity, Storage, Notifications, Social, Commerce.]
|
|
30
|
+
|
|
31
|
+
## Target Users
|
|
32
|
+
|
|
33
|
+
[Who uses this app? Be specific to the Frontier ecosystem.
|
|
34
|
+
- Primary users: [Who and what they want]
|
|
35
|
+
- Secondary users: [If applicable]
|
|
36
|
+
- Non-users: [Who this is NOT for — prevents scope creep]]
|
|
37
|
+
|
|
38
|
+
## Constraints
|
|
39
|
+
|
|
40
|
+
These are hard limits on all implementation choices:
|
|
41
|
+
|
|
42
|
+
- **Runtime**: Runs inside Frontier OS iframe — no direct DOM access to parent, postMessage communication only
|
|
43
|
+
- **Theme**: Dark theme mandatory — must match Frontier OS visual language
|
|
44
|
+
- **SDK**: All platform features via `@frontiertower/frontier-sdk` — no direct API calls to Frontier services
|
|
45
|
+
- **Auth**: Identity provided by Frontier OS — no custom auth flows
|
|
46
|
+
- **CORS**: All external API calls must handle CORS (app runs in iframe on different origin)
|
|
47
|
+
- **Standalone**: Must detect iframe vs standalone and degrade gracefully
|
|
48
|
+
- **[App-specific]**: [What] — [Why]
|
|
49
|
+
|
|
50
|
+
## Key Decisions
|
|
51
|
+
|
|
52
|
+
<!-- Decisions that constrain future work. Add throughout project lifecycle. -->
|
|
53
|
+
|
|
54
|
+
| Decision | Rationale | Outcome |
|
|
55
|
+
|----------|-----------|---------|
|
|
56
|
+
| [Choice] | [Why] | [Pending] |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
*Last updated: {{DATE}} after {{TRIGGER}}*
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<guidelines>
|
|
65
|
+
|
|
66
|
+
**What This Is:**
|
|
67
|
+
- Current accurate description of the app
|
|
68
|
+
- 2-3 sentences capturing what it does and who it's for
|
|
69
|
+
- Use the user's words and framing
|
|
70
|
+
- Update when the app evolves beyond this description
|
|
71
|
+
|
|
72
|
+
**Core Value:**
|
|
73
|
+
- The single most important thing this app does
|
|
74
|
+
- Everything else can fail; this cannot
|
|
75
|
+
- Drives prioritization when tradeoffs arise
|
|
76
|
+
- Rarely changes; if it does, it's a significant pivot
|
|
77
|
+
|
|
78
|
+
**SDK Modules:**
|
|
79
|
+
- Only list modules the app actually uses
|
|
80
|
+
- Each module must have a clear reason (not "might need later")
|
|
81
|
+
- Key APIs column helps planner and executor know which methods to use
|
|
82
|
+
- Updated when new modules are added or removed during development
|
|
83
|
+
|
|
84
|
+
**Target Users:**
|
|
85
|
+
- Specific to Frontier ecosystem (members, operators, admins)
|
|
86
|
+
- Include non-users to prevent scope creep
|
|
87
|
+
- Informs UX decisions throughout development
|
|
88
|
+
|
|
89
|
+
**Constraints:**
|
|
90
|
+
- The first 6 constraints are ALWAYS present for every Frontier OS app
|
|
91
|
+
- App-specific constraints added during /fos:new-app
|
|
92
|
+
- Include the "why" — constraints without rationale get questioned
|
|
93
|
+
|
|
94
|
+
**Key Decisions:**
|
|
95
|
+
- Significant choices that affect future work
|
|
96
|
+
- Added during /fos:discuss phases
|
|
97
|
+
- Track outcome when known:
|
|
98
|
+
- Good — decision proved correct
|
|
99
|
+
- Revisit — decision may need reconsideration
|
|
100
|
+
- Pending — too early to evaluate
|
|
101
|
+
|
|
102
|
+
</guidelines>
|
|
103
|
+
|
|
104
|
+
<evolution>
|
|
105
|
+
|
|
106
|
+
**After each phase transition:**
|
|
107
|
+
1. SDK modules still accurate? Update if new modules needed or old ones dropped
|
|
108
|
+
2. Decisions to log? Add to Key Decisions
|
|
109
|
+
3. "What This Is" still accurate? Update if drifted
|
|
110
|
+
4. Constraints changed? (rare — usually only app-specific ones)
|
|
111
|
+
|
|
112
|
+
**After each milestone:**
|
|
113
|
+
1. Full review of all sections
|
|
114
|
+
2. Core Value check — still the right priority?
|
|
115
|
+
3. Target Users check — did the audience shift?
|
|
116
|
+
4. SDK Modules audit — any unused modules to remove?
|
|
117
|
+
|
|
118
|
+
</evolution>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Requirements Template
|
|
2
|
+
|
|
3
|
+
Template for `.frontier-app/REQUIREMENTS.md` — checkable requirements that define "done."
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Requirements: {{APP_NAME}}
|
|
9
|
+
|
|
10
|
+
**Defined:** {{DATE}}
|
|
11
|
+
**Core Value:** [from PROJECT.md]
|
|
12
|
+
|
|
13
|
+
## {{MILESTONE_VERSION}} Requirements
|
|
14
|
+
|
|
15
|
+
Requirements for this milestone. Each maps to roadmap phases.
|
|
16
|
+
|
|
17
|
+
### Platform Integration (Standard)
|
|
18
|
+
|
|
19
|
+
Every Frontier OS app ships with these. Non-negotiable.
|
|
20
|
+
|
|
21
|
+
- [ ] **PLAT-01**: App detects iframe context and adjusts behavior accordingly
|
|
22
|
+
- [ ] **PLAT-02**: App renders correctly in standalone mode as fallback
|
|
23
|
+
- [ ] **PLAT-03**: App uses dark theme matching Frontier OS visual language
|
|
24
|
+
- [ ] **PLAT-04**: All external API calls handle CORS correctly
|
|
25
|
+
- [ ] **PLAT-05**: SdkProvider wraps the entire app, SDK initializes on mount
|
|
26
|
+
|
|
27
|
+
### [Feature Category 1]
|
|
28
|
+
|
|
29
|
+
- [ ] **REQ-01**: [Requirement description — user-centric, testable, atomic]
|
|
30
|
+
- [ ] **REQ-02**: [Requirement description]
|
|
31
|
+
- [ ] **REQ-03**: [Requirement description]
|
|
32
|
+
|
|
33
|
+
### [Feature Category 2]
|
|
34
|
+
|
|
35
|
+
- [ ] **REQ-04**: [Requirement description]
|
|
36
|
+
- [ ] **REQ-05**: [Requirement description]
|
|
37
|
+
|
|
38
|
+
### [Feature Category N]
|
|
39
|
+
|
|
40
|
+
- [ ] **REQ-NN**: [Requirement description]
|
|
41
|
+
|
|
42
|
+
## Future Milestone Requirements
|
|
43
|
+
|
|
44
|
+
Deferred to a later milestone. Tracked but not in current roadmap.
|
|
45
|
+
|
|
46
|
+
### [Category]
|
|
47
|
+
|
|
48
|
+
- **REQ-XX**: [Requirement description]
|
|
49
|
+
- **REQ-YY**: [Requirement description]
|
|
50
|
+
|
|
51
|
+
## Out of Scope
|
|
52
|
+
|
|
53
|
+
Explicitly excluded. Documented to prevent scope creep.
|
|
54
|
+
|
|
55
|
+
| Feature | Reason |
|
|
56
|
+
|---------|--------|
|
|
57
|
+
| Custom auth flows | Identity provided by Frontier OS |
|
|
58
|
+
| Direct API calls to Frontier services | Must use SDK — no bypassing the access layer |
|
|
59
|
+
| [Feature] | [Why excluded] |
|
|
60
|
+
|
|
61
|
+
## Traceability
|
|
62
|
+
|
|
63
|
+
Which phases cover which requirements. Updated during roadmap creation.
|
|
64
|
+
|
|
65
|
+
| Requirement | Phase | Status |
|
|
66
|
+
|-------------|-------|--------|
|
|
67
|
+
| PLAT-01 | Phase 1 | Pending |
|
|
68
|
+
| PLAT-02 | Phase 1 | Pending |
|
|
69
|
+
| PLAT-03 | Phase 1 | Pending |
|
|
70
|
+
| PLAT-04 | Phase 1 | Pending |
|
|
71
|
+
| PLAT-05 | Phase 1 | Pending |
|
|
72
|
+
| REQ-01 | Phase [N] | Pending |
|
|
73
|
+
|
|
74
|
+
**Coverage:**
|
|
75
|
+
- Total requirements: [X]
|
|
76
|
+
- Mapped to phases: [Y]
|
|
77
|
+
- Unmapped: [Z]
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
*Requirements defined: {{DATE}}*
|
|
81
|
+
*Last updated: {{DATE}} after {{TRIGGER}}*
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<guidelines>
|
|
87
|
+
|
|
88
|
+
**Standard Platform Requirements:**
|
|
89
|
+
- PLAT-01 through PLAT-05 are ALWAYS included for every Frontier OS app
|
|
90
|
+
- They always map to Phase 1 (Scaffold + SDK Core)
|
|
91
|
+
- They are non-negotiable — an app without these cannot run in Frontier OS
|
|
92
|
+
|
|
93
|
+
**Requirement Format:**
|
|
94
|
+
- ID: `[CATEGORY]-[NUMBER]` (REQ-01, WALL-02, EVNT-03)
|
|
95
|
+
- Description: User-centric, testable, atomic
|
|
96
|
+
- Checkbox: Only for current milestone requirements (future milestones are not yet actionable)
|
|
97
|
+
|
|
98
|
+
**Categories:**
|
|
99
|
+
- Derive from the app's feature areas
|
|
100
|
+
- Keep consistent with SDK module names where applicable
|
|
101
|
+
- PLAT = platform integration (always first, always standard)
|
|
102
|
+
|
|
103
|
+
**Out of Scope:**
|
|
104
|
+
- The first two exclusions (custom auth, direct API calls) are ALWAYS present
|
|
105
|
+
- Add app-specific exclusions during /fos:new-app
|
|
106
|
+
- Include reasoning to prevent re-adding later
|
|
107
|
+
|
|
108
|
+
**Traceability:**
|
|
109
|
+
- PLAT requirements always map to Phase 1
|
|
110
|
+
- Feature requirements map to subsequent phases
|
|
111
|
+
- Updated during roadmap creation and after each phase completes
|
|
112
|
+
|
|
113
|
+
**Status Values:**
|
|
114
|
+
- Pending: Not started
|
|
115
|
+
- In Progress: Phase is active
|
|
116
|
+
- Complete: Requirement verified
|
|
117
|
+
- Blocked: Waiting on external factor
|
|
118
|
+
|
|
119
|
+
</guidelines>
|
|
120
|
+
|
|
121
|
+
<evolution>
|
|
122
|
+
|
|
123
|
+
**After each phase completes:**
|
|
124
|
+
1. Mark covered requirements as Complete
|
|
125
|
+
2. Update traceability status
|
|
126
|
+
3. Note any requirements that changed scope
|
|
127
|
+
|
|
128
|
+
**After roadmap updates:**
|
|
129
|
+
1. Verify all current milestone requirements are mapped
|
|
130
|
+
2. Add new requirements if scope expanded
|
|
131
|
+
3. Move requirements to future milestone or out of scope if descoped
|
|
132
|
+
|
|
133
|
+
</evolution>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Roadmap Template
|
|
2
|
+
|
|
3
|
+
Template for `.frontier-app/ROADMAP.md` — the phased build plan.
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Roadmap: {{APP_NAME}}
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
[One paragraph describing the journey from scaffold to shipped app.
|
|
13
|
+
What makes this app worth building and what does the finished product look like?]
|
|
14
|
+
|
|
15
|
+
## {{MILESTONE_VERSION}} Phases
|
|
16
|
+
|
|
17
|
+
- [ ] **Phase 1: Scaffold + SDK Core** — Project setup, SdkProvider, iframe detection, dark theme, standalone fallback
|
|
18
|
+
- [ ] **Phase 2: [Feature Name]** — [One-line description]
|
|
19
|
+
- [ ] **Phase 3: [Feature Name]** — [One-line description]
|
|
20
|
+
- [ ] **Phase N: [Feature Name]** — [One-line description]
|
|
21
|
+
|
|
22
|
+
## Phase Details
|
|
23
|
+
|
|
24
|
+
### Phase 1: Scaffold + SDK Core
|
|
25
|
+
**Goal**: Working app shell with SDK connected, running in iframe and standalone
|
|
26
|
+
**Depends on**: Nothing (always first)
|
|
27
|
+
**Requirements**: PLAT-01, PLAT-02, PLAT-03, PLAT-04, PLAT-05
|
|
28
|
+
**Success Criteria** (what must be TRUE):
|
|
29
|
+
1. App renders inside Frontier OS iframe without errors
|
|
30
|
+
2. App detects standalone mode and shows appropriate fallback UI
|
|
31
|
+
3. Dark theme applied — no white backgrounds, no light-mode artifacts
|
|
32
|
+
4. SdkProvider initializes and useSdk() returns a valid SDK instance
|
|
33
|
+
5. Dev server runs on assigned port with HMR working
|
|
34
|
+
**Plans**: 1 plan
|
|
35
|
+
|
|
36
|
+
Plans:
|
|
37
|
+
- [ ] 01-01: Vite + React scaffold, SdkProvider, iframe detection, dark theme, dev config
|
|
38
|
+
|
|
39
|
+
### Phase 2: [Feature Name]
|
|
40
|
+
**Goal**: [What this phase delivers — one sentence]
|
|
41
|
+
**Depends on**: Phase 1
|
|
42
|
+
**Requirements**: [REQ-01, REQ-02, REQ-03]
|
|
43
|
+
**Success Criteria** (what must be TRUE):
|
|
44
|
+
1. [Observable behavior from user perspective]
|
|
45
|
+
2. [Observable behavior from user perspective]
|
|
46
|
+
3. [Observable behavior from user perspective]
|
|
47
|
+
**Plans**: [Number of plans or TBD]
|
|
48
|
+
|
|
49
|
+
Plans:
|
|
50
|
+
- [ ] 02-01: [Brief description of first plan]
|
|
51
|
+
- [ ] 02-02: [Brief description of second plan]
|
|
52
|
+
|
|
53
|
+
### Phase N: [Feature Name]
|
|
54
|
+
**Goal**: [What this phase delivers]
|
|
55
|
+
**Depends on**: Phase [N-1]
|
|
56
|
+
**Requirements**: [REQ-XX, REQ-YY]
|
|
57
|
+
**Success Criteria** (what must be TRUE):
|
|
58
|
+
1. [Observable behavior from user perspective]
|
|
59
|
+
2. [Observable behavior from user perspective]
|
|
60
|
+
**Plans**: [Number of plans or TBD]
|
|
61
|
+
|
|
62
|
+
Plans:
|
|
63
|
+
- [ ] NN-01: [Brief description]
|
|
64
|
+
|
|
65
|
+
## Progress
|
|
66
|
+
|
|
67
|
+
| Phase | Plans Complete | Status | Completed |
|
|
68
|
+
|-------|----------------|--------|-----------|
|
|
69
|
+
| 1. Scaffold + SDK Core | 0/1 | Not started | - |
|
|
70
|
+
| 2. [Name] | 0/N | Not started | - |
|
|
71
|
+
| N. [Name] | 0/N | Not started | - |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
*Roadmap created: {{DATE}}*
|
|
75
|
+
*Last updated: {{DATE}} after {{TRIGGER}}*
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<guidelines>
|
|
81
|
+
|
|
82
|
+
**Phase 1 is always the same:**
|
|
83
|
+
- "Scaffold + SDK Core" — never skip, never rename
|
|
84
|
+
- Covers all PLAT-* requirements
|
|
85
|
+
- Always 1 plan (the scaffold is well-defined)
|
|
86
|
+
- Success criteria are standardized (see template)
|
|
87
|
+
- Uses templates from `templates/app/` directory
|
|
88
|
+
|
|
89
|
+
**Phase structure:**
|
|
90
|
+
- Phase 1: Scaffold (always)
|
|
91
|
+
- Phases 2-N: Feature phases (from requirements)
|
|
92
|
+
- Keep to 3-6 total phases for v1 — ship fast
|
|
93
|
+
- Each phase delivers something coherent and testable
|
|
94
|
+
|
|
95
|
+
**Success criteria:**
|
|
96
|
+
- 2-5 observable behaviors per phase
|
|
97
|
+
- Written from user perspective ("User can..." or "[Thing] works")
|
|
98
|
+
- Cross-checked against requirements during creation
|
|
99
|
+
- Flow downstream to `must_haves` in PLAN.md
|
|
100
|
+
- Verified after execution
|
|
101
|
+
|
|
102
|
+
**Plans within phases:**
|
|
103
|
+
- Phase 1 always has 1 plan
|
|
104
|
+
- Feature phases have 1-3 plans depending on complexity
|
|
105
|
+
- Plans use naming: {phase}-{plan}-PLAN.md (e.g., 02-01-PLAN.md)
|
|
106
|
+
- Plan count can be "TBD" initially, refined during /fos:plan
|
|
107
|
+
|
|
108
|
+
**Progress tracking:**
|
|
109
|
+
- Updated after each plan completes
|
|
110
|
+
- Status values: Not started, In progress, Complete, Deferred
|
|
111
|
+
|
|
112
|
+
</guidelines>
|
|
113
|
+
|
|
114
|
+
<frontier_specifics>
|
|
115
|
+
|
|
116
|
+
**Phase 1 always generates from templates:**
|
|
117
|
+
- `templates/app/vite.config.ts` → configured with app's dev port
|
|
118
|
+
- `templates/app/sdk-context.tsx` → SdkProvider + useSdk hook
|
|
119
|
+
- `templates/app/layout.tsx` → dark theme shell with iframe detection
|
|
120
|
+
- `templates/app/main-simple.tsx` or `main-router.tsx` → entry point
|
|
121
|
+
- `templates/app/tsconfig.json` → TypeScript config
|
|
122
|
+
- `templates/app/postcss.config.js` → Tailwind setup
|
|
123
|
+
|
|
124
|
+
**Feature phases should reference SDK modules:**
|
|
125
|
+
- If a phase uses Events module, note it in the goal
|
|
126
|
+
- If a phase uses Wallet module, note it in the goal
|
|
127
|
+
- This helps the planner know which SDK APIs to use
|
|
128
|
+
|
|
129
|
+
</frontier_specifics>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# State Template
|
|
2
|
+
|
|
3
|
+
Template for `.frontier-app/STATE.md` — the app's living memory that bridges `/clear` boundaries.
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
---
|
|
9
|
+
milestone: {{MILESTONE_VERSION}}
|
|
10
|
+
phase: {{CURRENT_PHASE}}
|
|
11
|
+
plan: {{CURRENT_PLAN}}
|
|
12
|
+
status: {{STATUS}}
|
|
13
|
+
next_action: {{NEXT_ACTION}}
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# App State
|
|
17
|
+
|
|
18
|
+
## Current Position
|
|
19
|
+
|
|
20
|
+
Phase: [X] of [Y] ([Phase name])
|
|
21
|
+
Plan: [A] of [B] in current phase
|
|
22
|
+
Status: [Ready to discuss / Discussing / Ready to plan / Planning / Ready to execute / Executing / Phase complete]
|
|
23
|
+
Last activity: [YYYY-MM-DD] — [What happened]
|
|
24
|
+
|
|
25
|
+
Progress: [░░░░░░░░░░] 0%
|
|
26
|
+
|
|
27
|
+
## App Reference
|
|
28
|
+
|
|
29
|
+
See: .frontier-app/PROJECT.md (updated [date])
|
|
30
|
+
|
|
31
|
+
**App:** [App name]
|
|
32
|
+
**Core value:** [One-liner from PROJECT.md]
|
|
33
|
+
**SDK Modules:** [Comma-separated list of active modules]
|
|
34
|
+
**Dev port:** [Port number]
|
|
35
|
+
|
|
36
|
+
## Recent Decisions
|
|
37
|
+
|
|
38
|
+
Decisions affecting current work (full log in PROJECT.md):
|
|
39
|
+
|
|
40
|
+
- [Phase X]: [Decision summary]
|
|
41
|
+
|
|
42
|
+
## Blockers
|
|
43
|
+
|
|
44
|
+
[Issues that affect current or future work]
|
|
45
|
+
|
|
46
|
+
None yet.
|
|
47
|
+
|
|
48
|
+
## Metrics
|
|
49
|
+
|
|
50
|
+
**Velocity:**
|
|
51
|
+
- Plans completed: [N]
|
|
52
|
+
- Average duration: [X] min
|
|
53
|
+
|
|
54
|
+
**By Phase:**
|
|
55
|
+
|
|
56
|
+
| Phase | Plans | Avg/Plan |
|
|
57
|
+
|-------|-------|----------|
|
|
58
|
+
| - | - | - |
|
|
59
|
+
|
|
60
|
+
## Session Continuity
|
|
61
|
+
|
|
62
|
+
Last session: [YYYY-MM-DD HH:MM]
|
|
63
|
+
Stopped at: [Description of last completed action]
|
|
64
|
+
Next command: [/fos:discuss N, /fos:plan N, /fos:execute N, /fos:ship]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<purpose>
|
|
70
|
+
|
|
71
|
+
STATE.md is the app's short-term memory spanning all phases and sessions.
|
|
72
|
+
|
|
73
|
+
**Problem it solves:** After `/clear`, Claude has no memory. STATE.md is read first by every /fos: command to know where the project stands.
|
|
74
|
+
|
|
75
|
+
**Solution:** A single, small file (under 100 lines) that:
|
|
76
|
+
- Is read first in every workflow
|
|
77
|
+
- Is updated after every significant action
|
|
78
|
+
- Contains digest of accumulated context
|
|
79
|
+
- Tells Claude exactly what command to run next
|
|
80
|
+
|
|
81
|
+
</purpose>
|
|
82
|
+
|
|
83
|
+
<frontmatter>
|
|
84
|
+
|
|
85
|
+
The YAML frontmatter enables machine parsing by workflows:
|
|
86
|
+
|
|
87
|
+
| Field | Values | Purpose |
|
|
88
|
+
|-------|--------|---------|
|
|
89
|
+
| `milestone` | v1, v2, ... | Current milestone version |
|
|
90
|
+
| `phase` | 1, 2, 3, ... | Current phase number |
|
|
91
|
+
| `plan` | 01, 02, ... | Current plan within phase |
|
|
92
|
+
| `status` | ready-to-discuss, discussing, ready-to-plan, planning, ready-to-execute, executing, phase-complete, milestone-complete | Machine-readable state |
|
|
93
|
+
| `next_action` | /fos:discuss N, /fos:plan N, /fos:execute N, /fos:ship | Exact command to run next |
|
|
94
|
+
|
|
95
|
+
</frontmatter>
|
|
96
|
+
|
|
97
|
+
<lifecycle>
|
|
98
|
+
|
|
99
|
+
**Creation:** After ROADMAP.md is created during /fos:new-app
|
|
100
|
+
- Reference PROJECT.md for app context
|
|
101
|
+
- Initialize empty sections
|
|
102
|
+
- Set position to "Phase 1 ready to discuss"
|
|
103
|
+
- Set next_action to "/fos:discuss 1"
|
|
104
|
+
|
|
105
|
+
**Reading:** First step of EVERY /fos: command
|
|
106
|
+
- /fos:discuss — know which phase to discuss
|
|
107
|
+
- /fos:plan — know which phase to plan, read recent decisions
|
|
108
|
+
- /fos:execute — know current position, which plan to run
|
|
109
|
+
- /fos:status — present full state to user
|
|
110
|
+
- /fos:next — read next_action and route
|
|
111
|
+
|
|
112
|
+
**Writing:** After every significant action
|
|
113
|
+
- After discuss: Update status, log decisions, set next_action to /fos:plan
|
|
114
|
+
- After plan: Update status, set next_action to /fos:execute
|
|
115
|
+
- After execute: Update position, metrics, set next_action
|
|
116
|
+
- After phase complete: Advance phase, update progress bar
|
|
117
|
+
|
|
118
|
+
</lifecycle>
|
|
119
|
+
|
|
120
|
+
<size_constraint>
|
|
121
|
+
|
|
122
|
+
Keep STATE.md under 100 lines.
|
|
123
|
+
|
|
124
|
+
It's a DIGEST, not an archive. If accumulated context grows too large:
|
|
125
|
+
- Keep only 3-5 recent decisions (full log in PROJECT.md)
|
|
126
|
+
- Keep only active blockers, remove resolved ones
|
|
127
|
+
- Metrics are summary only — details in SUMMARY.md files
|
|
128
|
+
|
|
129
|
+
The goal is "read once, know where we are" — if it's too long, that fails.
|
|
130
|
+
|
|
131
|
+
</size_constraint>
|