feat: add lda report workflow example
This commit is contained in:
@@ -0,0 +1,408 @@
|
||||
{
|
||||
"edges": [
|
||||
{
|
||||
"from": "read_docs",
|
||||
"outcome": "ok",
|
||||
"to": "analyze"
|
||||
},
|
||||
{
|
||||
"from": "analyze",
|
||||
"outcome": "ok",
|
||||
"to": "build_report"
|
||||
},
|
||||
{
|
||||
"from": "build_report",
|
||||
"outcome": "ok",
|
||||
"to": "draft_issues"
|
||||
},
|
||||
{
|
||||
"from": "draft_issues",
|
||||
"outcome": "ok",
|
||||
"to": "review_issues"
|
||||
},
|
||||
{
|
||||
"from": "review_issues",
|
||||
"outcome": "submitted",
|
||||
"to": "create_issues"
|
||||
},
|
||||
{
|
||||
"from": "review_issues",
|
||||
"outcome": "cancelled",
|
||||
"to": "revision_requested"
|
||||
},
|
||||
{
|
||||
"from": "create_issues",
|
||||
"outcome": "ok",
|
||||
"to": "finalise"
|
||||
},
|
||||
{
|
||||
"from": "finalise",
|
||||
"outcome": "ok",
|
||||
"to": "end_completed"
|
||||
},
|
||||
{
|
||||
"from": "revision_requested",
|
||||
"outcome": "ok",
|
||||
"to": "end_cancelled"
|
||||
}
|
||||
],
|
||||
"input_schema": {
|
||||
"properties": {
|
||||
"board_path": {
|
||||
"type": "string"
|
||||
},
|
||||
"selected_documents": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"selected_documents",
|
||||
"board_path"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"name": "lda_report_case_study",
|
||||
"nodes": [
|
||||
{
|
||||
"desc": null,
|
||||
"id": "read_docs",
|
||||
"input": [
|
||||
{
|
||||
"path": "input.selected_documents",
|
||||
"target": "names"
|
||||
}
|
||||
],
|
||||
"node": "local.lda_docs.read_documents",
|
||||
"output": [
|
||||
{
|
||||
"source": "documents",
|
||||
"target": "state.documents"
|
||||
}
|
||||
],
|
||||
"retry": null,
|
||||
"timeout_seconds": null,
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"desc": null,
|
||||
"id": "analyze",
|
||||
"input": [
|
||||
{
|
||||
"path": "state.documents",
|
||||
"target": "documents"
|
||||
}
|
||||
],
|
||||
"node": "local.lda_report.analyze_documents",
|
||||
"output": [
|
||||
{
|
||||
"source": "analysis",
|
||||
"target": "state.analysis"
|
||||
}
|
||||
],
|
||||
"retry": null,
|
||||
"timeout_seconds": null,
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"desc": null,
|
||||
"id": "build_report",
|
||||
"input": [
|
||||
{
|
||||
"path": "state.analysis",
|
||||
"target": "analysis"
|
||||
}
|
||||
],
|
||||
"node": "local.lda_report.build_report",
|
||||
"output": [
|
||||
{
|
||||
"source": "report",
|
||||
"target": "state.report"
|
||||
},
|
||||
{
|
||||
"source": "markdown",
|
||||
"target": "state.report_markdown"
|
||||
}
|
||||
],
|
||||
"retry": null,
|
||||
"timeout_seconds": null,
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"desc": null,
|
||||
"id": "draft_issues",
|
||||
"input": [
|
||||
{
|
||||
"path": "state.report",
|
||||
"target": "report"
|
||||
}
|
||||
],
|
||||
"node": "local.lda_report.create_issue_drafts",
|
||||
"output": [
|
||||
{
|
||||
"source": "issues",
|
||||
"target": "state.proposed_issues"
|
||||
}
|
||||
],
|
||||
"retry": null,
|
||||
"timeout_seconds": null,
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"id": "review_issues",
|
||||
"kind": "issue_review",
|
||||
"outcomes": [
|
||||
"submitted",
|
||||
"cancelled"
|
||||
],
|
||||
"request": [
|
||||
{
|
||||
"path": "state.report_markdown",
|
||||
"target": "report_markdown"
|
||||
},
|
||||
{
|
||||
"path": "state.proposed_issues",
|
||||
"target": "proposed_issues"
|
||||
}
|
||||
],
|
||||
"request_schema": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"proposed_issues": {
|
||||
"type": "array"
|
||||
},
|
||||
"report_markdown": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"report_markdown",
|
||||
"proposed_issues"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"resume": [
|
||||
{
|
||||
"source": "approved",
|
||||
"target": "state.approved"
|
||||
},
|
||||
{
|
||||
"source": "selected_issue_ids",
|
||||
"target": "state.selected_issue_ids"
|
||||
},
|
||||
{
|
||||
"source": "comment",
|
||||
"target": "state.approval_comment"
|
||||
}
|
||||
],
|
||||
"resume_schema": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"approved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"selected_issue_ids": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"approved",
|
||||
"selected_issue_ids"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"type": "interrupt"
|
||||
},
|
||||
{
|
||||
"desc": null,
|
||||
"id": "create_issues",
|
||||
"input": [
|
||||
{
|
||||
"path": "state.proposed_issues",
|
||||
"target": "issues"
|
||||
},
|
||||
{
|
||||
"path": "state.selected_issue_ids",
|
||||
"target": "selected_issue_ids"
|
||||
},
|
||||
{
|
||||
"path": "input.board_path",
|
||||
"target": "board_path"
|
||||
}
|
||||
],
|
||||
"node": "local.issue_board.create_issues",
|
||||
"output": [
|
||||
{
|
||||
"source": "created_issues",
|
||||
"target": "state.created_issues"
|
||||
}
|
||||
],
|
||||
"retry": null,
|
||||
"timeout_seconds": null,
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"desc": null,
|
||||
"id": "finalise",
|
||||
"input": [
|
||||
{
|
||||
"path": "state.report",
|
||||
"target": "report"
|
||||
},
|
||||
{
|
||||
"path": "state.created_issues",
|
||||
"target": "created_issues"
|
||||
},
|
||||
{
|
||||
"path": "state.approved",
|
||||
"target": "approved"
|
||||
},
|
||||
{
|
||||
"path": "state.selected_issue_ids",
|
||||
"target": "selected_issue_ids"
|
||||
},
|
||||
{
|
||||
"path": "state.approval_comment",
|
||||
"target": "comment"
|
||||
}
|
||||
],
|
||||
"node": "local.lda_report.finalise_report",
|
||||
"output": [
|
||||
{
|
||||
"source": "markdown",
|
||||
"target": "state.final_markdown"
|
||||
}
|
||||
],
|
||||
"retry": null,
|
||||
"timeout_seconds": null,
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"desc": null,
|
||||
"id": "revision_requested",
|
||||
"input": [
|
||||
{
|
||||
"path": "state.approval_comment",
|
||||
"target": "comment"
|
||||
}
|
||||
],
|
||||
"node": "local.lda_report.record_revision_request",
|
||||
"output": [
|
||||
{
|
||||
"source": "approved",
|
||||
"target": "state.approved"
|
||||
},
|
||||
{
|
||||
"source": "markdown",
|
||||
"target": "state.final_markdown"
|
||||
},
|
||||
{
|
||||
"source": "created_issues",
|
||||
"target": "state.created_issues"
|
||||
},
|
||||
{
|
||||
"source": "selected_issue_ids",
|
||||
"target": "state.selected_issue_ids"
|
||||
}
|
||||
],
|
||||
"retry": null,
|
||||
"timeout_seconds": null,
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"id": "end_completed",
|
||||
"outcome": "completed",
|
||||
"type": "end"
|
||||
},
|
||||
{
|
||||
"id": "end_cancelled",
|
||||
"outcome": "cancelled",
|
||||
"type": "end"
|
||||
}
|
||||
],
|
||||
"outcomes": [
|
||||
"completed",
|
||||
"cancelled"
|
||||
],
|
||||
"output": [
|
||||
{
|
||||
"path": "state.approved",
|
||||
"target": "approved"
|
||||
},
|
||||
{
|
||||
"path": "state.final_markdown",
|
||||
"target": "markdown"
|
||||
},
|
||||
{
|
||||
"path": "state.created_issues",
|
||||
"target": "created_issues"
|
||||
},
|
||||
{
|
||||
"path": "state.selected_issue_ids",
|
||||
"target": "selected_issue_ids"
|
||||
}
|
||||
],
|
||||
"output_schema": {
|
||||
"properties": {
|
||||
"approved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"created_issues": {
|
||||
"type": "array"
|
||||
},
|
||||
"markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"selected_issue_ids": {
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"type": "object"
|
||||
},
|
||||
"start": "read_docs",
|
||||
"state_schema": {
|
||||
"properties": {
|
||||
"analysis": {
|
||||
"type": "array"
|
||||
},
|
||||
"approval_comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"approved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"created_issues": {
|
||||
"type": "array"
|
||||
},
|
||||
"documents": {
|
||||
"type": "array"
|
||||
},
|
||||
"final_markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"proposed_issues": {
|
||||
"type": "array"
|
||||
},
|
||||
"report": {
|
||||
"type": "object"
|
||||
},
|
||||
"report_markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"selected_issue_ids": {
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user