docs: expand report workflow case study
This commit is contained in:
@@ -8,7 +8,9 @@ remote OAuth, LLM calls, or provider quota.
|
||||
|
||||
- `input.md` — fixture notes.
|
||||
- `cap-input.json` — capability-call payload generated from the fixture notes.
|
||||
- `run-input.json` — workflow-run payload generated from the fixture notes.
|
||||
- `run-input.json` — workflow-run payload pointing at the fixture notes.
|
||||
- `workflow.plan.json` — three-node raw plan:
|
||||
`read_notes -> extract_report -> render_markdown_report`.
|
||||
- `ops.py` — Python source exposing `read_notes`, `extract_report`, and
|
||||
`render_markdown_report`.
|
||||
- `wf.config.json` — local server/client config using the `local.report` Python
|
||||
@@ -32,13 +34,11 @@ uv run wf --config examples/report_workflow/wf.config.json cap call local.report
|
||||
```
|
||||
|
||||
The full artifact/deployment/run path is covered by
|
||||
`tests/examples/test_report_workflow_example.py`. To exercise the same lifecycle
|
||||
manually through the CLI, use the source capability as the draft seed:
|
||||
`tests/examples/test_report_workflow_example.py`. To exercise the same
|
||||
three-node lifecycle manually through the CLI, import the raw plan:
|
||||
|
||||
```powershell
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft create-from-capability report_ws local.report.extract_report --name report_case_study --title "Report Case Study"
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft validate report_ws
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft save report_ws --artifact report_case_study --version 1 --title "Report Case Study" --binding local.report=local.report
|
||||
uv run wf --config examples/report_workflow/wf.config.json artifact create-from-plan examples/report_workflow/workflow.plan.json --artifact report_case_study --version 1 --title "Report Case Study" --outcome ok --binding local.report=local.report
|
||||
uv run wf --config examples/report_workflow/wf.config.json deploy save report_case_study.default --artifact report_case_study --version 1 --binding local.report=local.report
|
||||
uv run wf --config examples/report_workflow/wf.config.json deploy validate report_case_study.default
|
||||
uv run wf --config examples/report_workflow/wf.config.json run start report_case_study.default --input-file examples/report_workflow/run-input.json --trace-from 0 --trace-limit 5
|
||||
@@ -47,12 +47,29 @@ uv run wf --config examples/report_workflow/wf.config.json run inspect <run_id>
|
||||
uv run wf --config examples/report_workflow/wf.config.json run trace <run_id> --from 0 --limit 5
|
||||
```
|
||||
|
||||
Draft workspaces are still useful when an agent starts from one capability and
|
||||
edits toward a complete workflow:
|
||||
|
||||
```powershell
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft create-from-capability report_ws local.report.extract_report --name report_case_study --title "Report Case Study"
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft set-name report_ws --revision 1 --name report_case_study
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft set-input report_ws --revision 2 --step call --map input.text=text
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft set-output report_ws --revision 3 --step call --map title=state.title --map summary=state.summary
|
||||
uv run wf --config examples/report_workflow/wf.config.json draft validate report_ws
|
||||
```
|
||||
|
||||
`draft create-from-capability` is a best-effort bootstrapper. Focused commands
|
||||
cover common edits to existing draft fields; structural edits such as adding the
|
||||
`read_notes` and `render_markdown_report` steps use `draft patch`, or the raw
|
||||
plan import shown above.
|
||||
|
||||
The expected report includes:
|
||||
|
||||
- title: `Weekly Project Update`
|
||||
- three action items
|
||||
- at least one risk mentioning Google Drive MCP quota
|
||||
- followups for Markdown rendering and baseline comparison
|
||||
- rendered Markdown beginning with `# Weekly Project Update`
|
||||
|
||||
## Thesis Evidence
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"text": "# Weekly Project Update\n\nSummary:\nThe workflow platform demo is ready for a deterministic thesis case study. The\nteam wants a repeatable report that does not depend on remote OAuth, LLM output,\nor provider quotas.\n\nActions:\n- Alice | Prepare demo config | Friday\n- Bao | Run five agent attempts | Monday\n- Casey | Capture trace screenshots | Tuesday\n\nRisks:\n- Google Drive MCP quota is too low for regression evidence\n- Unbounded provider output can waste tokens\n\nFollowups:\n- Add optional Markdown renderer\n- Compare direct script baseline against workflow lifecycle\n"
|
||||
"path": "input.md"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"name": "report_case_study",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
"state_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"notes": {
|
||||
"type": "string",
|
||||
"reducer": "wf.std.replace"
|
||||
},
|
||||
"report": {
|
||||
"type": "object",
|
||||
"reducer": "wf.std.replace"
|
||||
},
|
||||
"markdown": {
|
||||
"type": "string",
|
||||
"reducer": "wf.std.replace"
|
||||
}
|
||||
}
|
||||
},
|
||||
"output_schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"report": {
|
||||
"type": "object"
|
||||
},
|
||||
"markdown": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"report",
|
||||
"markdown"
|
||||
]
|
||||
},
|
||||
"outcomes": [
|
||||
"ok"
|
||||
],
|
||||
"start": "read",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "read",
|
||||
"type": "node",
|
||||
"node": "local.report.read_notes",
|
||||
"input": [
|
||||
{
|
||||
"path": {
|
||||
"root": "input",
|
||||
"parts": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"root": "local",
|
||||
"parts": [
|
||||
"path"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": [
|
||||
{
|
||||
"source": {
|
||||
"root": "local",
|
||||
"parts": [
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"root": "state",
|
||||
"parts": [
|
||||
"notes"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "extract",
|
||||
"type": "node",
|
||||
"node": "local.report.extract_report",
|
||||
"input": [
|
||||
{
|
||||
"path": {
|
||||
"root": "state",
|
||||
"parts": [
|
||||
"notes"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"root": "local",
|
||||
"parts": [
|
||||
"text"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": [
|
||||
{
|
||||
"source": {
|
||||
"root": "local",
|
||||
"parts": []
|
||||
},
|
||||
"target": {
|
||||
"root": "state",
|
||||
"parts": [
|
||||
"report"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "render",
|
||||
"type": "node",
|
||||
"node": "local.report.render_markdown_report",
|
||||
"input": [
|
||||
{
|
||||
"path": {
|
||||
"root": "state",
|
||||
"parts": [
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"root": "local",
|
||||
"parts": [
|
||||
"report"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": [
|
||||
{
|
||||
"source": {
|
||||
"root": "local",
|
||||
"parts": [
|
||||
"markdown"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"root": "state",
|
||||
"parts": [
|
||||
"markdown"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"from": "read",
|
||||
"outcome": "ok",
|
||||
"to": "extract"
|
||||
},
|
||||
{
|
||||
"from": "extract",
|
||||
"outcome": "ok",
|
||||
"to": "render"
|
||||
},
|
||||
{
|
||||
"from": "render",
|
||||
"outcome": "ok",
|
||||
"to": "__end__"
|
||||
}
|
||||
],
|
||||
"output": [
|
||||
{
|
||||
"path": {
|
||||
"root": "state",
|
||||
"parts": [
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"root": "local",
|
||||
"parts": [
|
||||
"report"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": {
|
||||
"root": "state",
|
||||
"parts": [
|
||||
"markdown"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"root": "local",
|
||||
"parts": [
|
||||
"markdown"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user