Skip to content

Commit 116926e

Browse files
committed
Restructure sprint-report workflow to use skills
- Delete unused template commands (init, analyze, plan, execute, verify) and agent personas (architect, engineer, product-manager) - Create sprint-report skill with full analysis methodology extracted from the systemPrompt (metrics, anti-patterns, health rating, report structure, HTML template instructions) - Slim down ambient.json systemPrompt to role + navigation + skill entry point - Rewrite startupPrompt as agent directive per updated platform semantics - Delete FIELD_REFERENCE.md (documented fields the platform ignores) - Replace generic template README with sprint-report-specific docs - Update AMBIENT_JSON_SCHEMA.md: add skills as preferred pattern, remove agent orchestration guidance, fix file organization, remove stale local paths and references, trim redundant examples Made-with: Cursor
1 parent 631a725 commit 116926e

File tree

13 files changed

+245
-2523
lines changed

13 files changed

+245
-2523
lines changed

AMBIENT_JSON_SCHEMA.md

Lines changed: 53 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -80,63 +80,19 @@ interface AmbientConfig {
8080
**Should Include**:
8181

8282
1. **Role definition**: "You are a [role]..."
83-
2. **Available slash commands**: `/command` with descriptions
84-
3. **Workflow phases**: Step-by-step methodology
85-
4. **Output locations**: Where to write artifacts (e.g., `artifacts/specsmith/`)
86-
5. **Agent orchestration**: Which specialized agents to invoke and when
87-
6. **API integrations**: Instructions for Jira/GitHub/etc.
88-
7. **Best practices**: Conventions and quality standards
89-
8. **Error handling**: How to handle failures
83+
2. **Workspace navigation**: Standard file locations and tool selection rules
84+
3. **Workflow entry point**: Point to the skill(s) that contain the methodology (e.g., "Read and execute `.claude/skills/my-skill/SKILL.md`")
85+
4. **Output locations**: Where to write artifacts (e.g., `artifacts/my-workflow/`)
86+
5. **Error handling**: How to handle failures
9087

91-
**Example Structure**:
88+
**Note**: Keep the systemPrompt focused on role, navigation, and entry points. Move detailed methodology into `.claude/skills/` files. This keeps the ambient.json readable and makes the methodology easier to maintain. The agent already knows how to use tools, read files, and follow instructions — the systemPrompt just needs to tell it *what* to do and *where* things are.
9289

93-
```json
94-
"systemPrompt": "You are Specsmith, a spec-driven development assistant.
95-
96-
## Available Commands
97-
98-
- `/spec.interview` - Start interactive feature interview
99-
- `/spec.speedrun` - Quick planning mode
100-
- `/validate` - Validate implementation plan
101-
102-
## Workflow Phases
103-
104-
### Phase 1: Interview
105-
Conduct structured interview with user...
106-
107-
### Phase 2: Planning
108-
Generate implementation plan...
109-
110-
## Specialized Agents
111-
112-
Invoke these agents as needed:
113-
- **Quinn (Architect)**: System design and architecture
114-
- **Maya (Engineer)**: Implementation details
115-
- **Alex (QA)**: Testing strategy
90+
**Example**:
11691

117-
## Output Structure
118-
119-
All artifacts go in `artifacts/specsmith/`:
120-
- `interview-notes.md` - Interview Q&A
121-
- `PLAN.md` - Implementation plan
122-
- `validation-report.md` - Validation results
123-
124-
## Best Practices
125-
126-
1. Always validate user requirements
127-
2. Consider edge cases early
128-
3. Generate testable acceptance criteria
129-
..."
92+
```json
93+
"systemPrompt": "You are a Sprint Health Analyst.\n\nStandard file locations:\n- Skill: .claude/skills/sprint-report/SKILL.md\n- Template: templates/report.html\n- Outputs: artifacts/sprint-report/\n\nOnce the user provides context, read and execute the sprint-report skill."
13094
```
13195

132-
**Real-World Example** (from Specsmith):
133-
134-
- 5 workflow phases defined
135-
- 5 specialized agent personas (Quinn, Maya, Alex, Casey, Dana)
136-
- Multiple slash commands
137-
- Detailed artifact structure
138-
- ~3000+ characters
139-
14096
---
14197

14298
### `startupPrompt` (string, required)
@@ -146,18 +102,18 @@ All artifacts go in `artifacts/specsmith/`:
146102
**Guidelines**:
147103

148104
- Write as an instruction to the agent (e.g., "Greet the user and introduce yourself as...")
149-
- Tell the agent what information to include in its greeting (available commands, purpose, etc.)
105+
- Tell the agent what information to include in its greeting
150106
- Keep it concise -- 1-3 sentences directing the agent's behavior
151107
- Do NOT write it as a greeting the user would see directly
152108

153109
**Examples**:
154110

155111
```json
156-
"startupPrompt": "Greet the user and introduce yourself as a spec-driven development assistant. Mention the available commands (/spec.interview, /spec.speedrun, /validate) and suggest starting with /spec.interview."
112+
"startupPrompt": "Greet the user as a Sprint Health Analyst. Ask for their data source, team name, sprint details, audience, and preferred output format."
157113

158-
"startupPrompt": "Introduce yourself as a bug fix assistant. Briefly explain that you help triage, analyze, and fix bugs systematically. Mention the /fix command and ask the user to describe their bug."
114+
"startupPrompt": "Introduce yourself as a bug fix assistant. Ask the user to describe the bug or provide an issue URL."
159115

160-
"startupPrompt": "Greet the user and explain that you help collect user feedback through structured interviews. Mention Jira and GitHub integration and suggest using /interview to start."
116+
"startupPrompt": "Greet the user and explain that you help collect user feedback through structured interviews. Ask what product area they want to cover."
161117
```
162118

163119
---
@@ -220,29 +176,11 @@ workflow-repository/
220176
└── [other workflow files]
221177
```
222178

223-
### Loading Code
224-
225-
The platform loads ambient.json at startup:
226-
227-
**File**: `platform/components/runners/ambient-runner/ambient_runner/platform/config.py`
228-
229-
```python
230-
def load_ambient_config(cwd_path: str) -> dict:
231-
"""Load ambient.json configuration from workflow directory."""
232-
config_path = Path(cwd_path) / ".ambient" / "ambient.json"
233-
if not config_path.exists():
234-
return {}
235-
with open(config_path, 'r') as f:
236-
config = json.load(f)
237-
logger.info(f"Loaded ambient.json: name={config.get('name')}")
238-
return config
239-
```
240-
241-
### Usage
179+
### How the Platform Uses ambient.json
242180

243-
1. **System prompt injection** (`prompts.py`): `systemPrompt` is appended to the workspace context prompt
244-
2. **Startup directive** (`app.py`): `startupPrompt` sent to agent as hidden user message at session start
245-
3. **Workflow metadata API** (`content.py`): `name`, `description`, and other fields returned via `/content/workflow-metadata` endpoint
181+
1. **System prompt injection**: `systemPrompt` is appended to the workspace context prompt
182+
2. **Startup directive**: `startupPrompt` is sent to the agent as a hidden user message at session start
183+
3. **Workflow metadata API**: `name`, `description`, and other fields are returned via the `/content/workflow-metadata` endpoint
246184

247185
---
248186

@@ -285,31 +223,13 @@ def load_ambient_config(cwd_path: str) -> dict:
285223

286224
```json
287225
{
288-
"name": "Feature Planning Workflow",
289-
"description": "Plan features through structured interviews and generate implementation specs",
290-
"systemPrompt": "You are a feature planning assistant.\n\n## Commands\n- /interview - Start interview\n- /plan - Generate plan\n\n## Output\nWrite all artifacts to artifacts/planning/",
291-
"startupPrompt": "Greet the user and introduce yourself as a feature planning assistant. Mention the /interview and /plan commands and suggest starting with /interview.",
292-
"results": {
293-
"Interview Notes": "artifacts/planning/interview.md",
294-
"Implementation Plan": "artifacts/planning/plan.md"
295-
}
296-
}
297-
```
298-
299-
### Comprehensive Example (Specsmith-style)
300-
301-
```json
302-
{
303-
"name": "Specsmith Workflow",
304-
"description": "Transform feature ideas into implementation-ready plans through structured interviews with multi-agent collaboration",
305-
"systemPrompt": "You are Specsmith, a spec-driven development assistant...\n\n[Extensive system prompt with phases, agents, commands, output structure]\n\n## Phase 1: Interview\n...\n\n## Specialized Agents\n- Quinn (Architect)\n- Maya (Engineer)\n- Alex (QA)\n...",
306-
"startupPrompt": "Greet the user as Specsmith. Explain that you transform feature ideas into implementation-ready plans. List the commands: /spec.interview, /spec.speedrun, /validate. Suggest starting with /spec.interview.",
226+
"name": "Sprint Health Report",
227+
"description": "Generates sprint health reports from Jira data with risk ratings, anti-pattern detection, and coaching recommendations.",
228+
"systemPrompt": "You are a Sprint Health Analyst...\n\nWORKSPACE NAVIGATION:\n- Skill: .claude/skills/sprint-report/SKILL.md\n- Template: templates/report.html\n- Outputs: artifacts/sprint-report/\n\nWORKFLOW:\nOnce the user answers the startup questions, read and execute the sprint-report skill.",
229+
"startupPrompt": "Greet the user as a Sprint Health Analyst. Ask the intake questions: data source, team/sprint name, audience, output format, and whether they have historical data for comparison. List the default assumptions and ask the user to confirm or correct them.",
307230
"results": {
308-
"Interview Notes": "artifacts/specsmith/interview-notes.md",
309-
"Implementation Plan": "artifacts/specsmith/PLAN.md",
310-
"Validation Report": "artifacts/specsmith/validation-report.md",
311-
"Speedrun Summary": "artifacts/specsmith/speedrun-summary.md",
312-
"All Artifacts": "artifacts/specsmith/**/*"
231+
"Health Reports (Markdown)": "artifacts/sprint-report/**/*.md",
232+
"Health Reports (HTML)": "artifacts/sprint-report/**/*.html"
313233
}
314234
}
315235
```
@@ -321,13 +241,12 @@ def load_ambient_config(cwd_path: str) -> dict:
321241
### System Prompt Design
322242

323243
1. **Be specific about role**: Define exact persona and expertise
324-
2. **Document all commands**: List every `/command` with purpose
325-
3. **Define workflow phases**: Clear step-by-step methodology
326-
4. **Specify output locations**: Absolute paths for artifacts
327-
5. **Include agent orchestration**: When to invoke specialized agents
328-
6. **Add error handling**: How to recover from failures
329-
7. **Use markdown formatting**: Headers, lists, code blocks for readability
330-
8. **Add workspace navigation guidance**: Help Claude find files efficiently (see [WORKSPACE_NAVIGATION_GUIDELINES.md](WORKSPACE_NAVIGATION_GUIDELINES.md))
244+
2. **Add workspace navigation guidance**: Standard file locations and tool selection rules (see [WORKSPACE_NAVIGATION_GUIDELINES.md](WORKSPACE_NAVIGATION_GUIDELINES.md))
245+
3. **Point to skills**: For complex workflows, reference the skill file(s) that contain the methodology
246+
4. **Specify output locations**: Where artifacts are written (e.g., `artifacts/my-workflow/`)
247+
5. **Add error handling**: How to recover from failures
248+
6. **Use markdown formatting**: Headers, lists, code blocks for readability
249+
7. **Keep it focused**: Delegate detailed methodology to skills rather than cramming everything into the systemPrompt
331250

332251
### Startup Prompt Design
333252

@@ -348,14 +267,24 @@ def load_ambient_config(cwd_path: str) -> dict:
348267
workflow-repo/
349268
├── .ambient/
350269
│ └── ambient.json ← Configuration here
351-
├── artifacts/ ← Output location (in systemPrompt)
352-
│ └── workflow-name/
353-
│ ├── interview.md
354-
│ └── plan.md
270+
├── .claude/
271+
│ └── skills/ ← Skill definitions (preferred)
272+
│ └── my-skill/
273+
│ └── SKILL.md
274+
├── templates/ ← Optional templates
355275
├── README.md
356276
└── scripts/ ← Optional helper scripts
357277
```
358278

279+
At runtime, artifacts are written relative to the workspace root, not inside
280+
the workflow directory:
281+
282+
```text
283+
/workspace/sessions/{session}/
284+
├── workflows/my-workflow/ ← Workflow files loaded here
285+
└── artifacts/my-workflow/ ← Output goes here (sibling, not nested)
286+
```
287+
359288
---
360289

361290
## Common Mistakes
@@ -383,7 +312,7 @@ workflow-repo/
383312
```json
384313
{
385314
"systemPrompt": "You help with development"
386-
// Too generic - needs phases, commands, outputs
315+
// Too generic - needs role, file locations, entry point
387316
}
388317
```
389318

@@ -393,8 +322,8 @@ workflow-repo/
393322
{
394323
"name": "My Workflow",
395324
"description": "Detailed description of purpose",
396-
"systemPrompt": "You are [role].\n\n## Commands\n- /cmd\n\n## Phases\n1. Step one\n\n## Output\nartifacts/my-workflow/",
397-
"startupPrompt": "Greet the user, briefly describe your purpose, and suggest using /cmd to start.",
325+
"systemPrompt": "You are [role].\n\nFile locations:\n- Skill: .claude/skills/my-skill/SKILL.md\n- Outputs: artifacts/my-workflow/\n\nRead and execute the skill when the user provides context.",
326+
"startupPrompt": "Greet the user, briefly describe your purpose, and ask what they need help with.",
398327
"results": {
399328
"Output": "artifacts/my-workflow/**/*.md"
400329
}
@@ -412,24 +341,23 @@ workflow-repo/
412341
- Startup prompt execution: `platform/components/runners/ambient-runner/ambient_runner/app.py`
413342
- Workflow metadata API: `platform/components/runners/ambient-runner/ambient_runner/endpoints/content.py`
414343

415-
**Example Workflows**:
344+
**Example Workflows** (in this repository):
416345

417-
- `/Users/jeder/repos/workflows/workflows/specsmith-workflow/.ambient/ambient.json`
418-
- `/Users/jeder/repos/workflows/workflows/amber-interview/.ambient/ambient.json`
419-
- `/Users/jeder/repos/workflows/workflows/template-workflow/.ambient/ambient.json`
420-
- `/Users/jeder/repos/workflows/workflows/bugfix/.ambient/ambient.json`
421-
- `/Users/jeder/repos/workflows/workflows/triage/.ambient/ambient.json`
346+
- `workflows/bugfix/.ambient/ambient.json` — skill-based, multi-phase workflow
347+
- `workflows/sprint-report/.ambient/ambient.json` — skill-based, 1–2 turn workflow
348+
- `workflows/triage/.ambient/ambient.json` — command-based triage workflow
349+
- `workflows/template-workflow/.ambient/ambient.json` — minimal starter template
422350

423351
**Documentation**:
424352

425-
- Field reference: `workflows/template-workflow/FIELD_REFERENCE.md`
426-
- Platform docs: `github.com/ambient-code/platform`
353+
- Workflow development guide: [WORKFLOW_DEVELOPMENT_GUIDE.md](WORKFLOW_DEVELOPMENT_GUIDE.md)
354+
- Agent guidelines: [AGENTS.md](AGENTS.md)
427355

428356
---
429357

430358
## Summary
431359

432-
The `ambient.json` schema has 4 required fields and 1 optional field, keeping the format lightweight and portable. The `systemPrompt` field is where workflows become powerful -- a well-crafted systemPrompt can define complex multi-phase workflows with specialized agents, API integrations, and sophisticated output structures.
360+
The `ambient.json` schema has 4 required fields and 1 optional field, keeping the format lightweight and portable. For simple workflows, the `systemPrompt` can contain the full methodology inline. For complex workflows, keep the `systemPrompt` focused on role and navigation, and move detailed methodology into `.claude/skills/` files that the agent reads on demand.
433361

434362
**Minimum viable ambient.json**: 4 required string fields (`name`, `description`, `systemPrompt`, `startupPrompt`)
435363
**Optional**: `results` for documenting artifact locations (informational only)

0 commit comments

Comments
 (0)