You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
action to open the process doc in the portal, not as a raw external URL
Add a lightweight frontend fallback for unresolved doc IDs: show the stable ID and a clear document-unavailable state without breaking the task panel.
Seed or update one V1 workflow/template fixture, preferably podcast because Design document registry IDs and resolver #5 seeded podcast stable IDs, so there is a real task with instructionDocId.
Acceptance Criteria
Template create/update APIs accept and persist sourceDocIds and new task definition doc-context fields.
Task create/update APIs accept and persist task-level instructionDocId, instructionStepId, phase, systems, and validation.
Template validation rejects malformed doc-context fields, such as non-string instructionDocId, non-string phase, non-array systems, or non-string/non-object validation payloads.
Bundle instantiation copies each task definition's doc-context fields onto the created task.
Existing templates/tasks using only instructionsUrl continue to work unchanged.
The portal task panel prefers instructionDocId, resolves it through the document registry, and renders a process-doc action that opens the resolved document in the portal.
If a task has only instructionsUrl, the existing external instructions link remains available.
If instructionDocId cannot be resolved, the task panel stays usable and clearly shows the unresolved stable ID.
Automated tests cover API persistence, validation, template-to-task copying, backward compatibility, and task-panel docs-in-context rendering.
Test Scenarios
Scenario: Template task links to a process doc by stable ID
Given: a template task definition has instructionDocId
When: the template is saved
Then: the API response includes the same instructionDocId and does not require a raw instructionsUrl.
Given: a template task definition includes instructionDocId, instructionStepId, phase, systems, and validation
When: an operator starts a bundle from that template
Then: each created task includes the same doc-context fields.
Scenario: Operator opens instructions from a task
Given: a task has a resolvable instructionDocId
When: the operator opens the task panel
Then: the panel shows the resolved process doc title and an action to open that doc in the portal.
Scenario: Legacy instruction URL still works
Given: a task has instructionsUrl and no instructionDocId
When: the operator opens the task panel
Then: the current external Open instructions link is still shown.
Scenario: Broken doc ID does not break task execution
Given: a task has instructionDocId: "missing.doc"
When: the operator opens the task panel
Then: the panel shows an unresolved-doc state and still allows normal task actions.
Out of Scope
Migrating every DataTasks Google Doc URL to registry IDs.
Cleaning all process-doc frontmatter or adding stable IDs to every doc.
Building a full template-from-doc importer.
Creating the complete podcast workflow.
Deep workflow editor UX for choosing docs from a picker.
Replacing instructionsUrl entirely.
Moving work-engine storage into the Python backend.
Add Task-To-Process-Doc Links
Status: pending
Tags:
enhancement,process-docs,work-engine,backend,frontend,data,P0Depends on: #5
Blocks: first end-to-end workflow issues that need task-to-SOP navigation
Scope
Ship a V1 link between work execution records and process docs using the document registry delivered in #5.
Implement the smallest useful slice:
sourceDocIdson templatestaskDefinitions[].instructionDocIdtaskDefinitions[].instructionStepIdtaskDefinitions[].phasetaskDefinitions[].systemstaskDefinitions[].validationinstructionsUrlbackward compatible, but preferinstructionDocIdwhen both exist.instructionDocIdthrough the Design document registry IDs and resolver #5 docs registry/resolver and show docs-in-context:instructionDocId.Acceptance Criteria
sourceDocIdsand new task definition doc-context fields.instructionDocId,instructionStepId,phase,systems, andvalidation.instructionDocId, non-stringphase, non-arraysystems, or non-string/non-object validation payloads.instructionsUrlcontinue to work unchanged.instructionDocId, resolves it through the document registry, and renders a process-doc action that opens the resolved document in the portal.instructionsUrl, the existing external instructions link remains available.instructionDocIdcannot be resolved, the task panel stays usable and clearly shows the unresolved stable ID.Test Scenarios
Scenario: Template task links to a process doc by stable ID
Given: a template task definition has
instructionDocIdWhen: the template is saved
Then: the API response includes the same
instructionDocIdand does not require a rawinstructionsUrl.Scenario: Bundle instantiation preserves doc context
Given: a template task definition includes
instructionDocId,instructionStepId,phase,systems, andvalidationWhen: an operator starts a bundle from that template
Then: each created task includes the same doc-context fields.
Scenario: Operator opens instructions from a task
Given: a task has a resolvable
instructionDocIdWhen: the operator opens the task panel
Then: the panel shows the resolved process doc title and an action to open that doc in the portal.
Scenario: Legacy instruction URL still works
Given: a task has
instructionsUrland noinstructionDocIdWhen: the operator opens the task panel
Then: the current external Open instructions link is still shown.
Scenario: Broken doc ID does not break task execution
Given: a task has
instructionDocId: "missing.doc"When: the operator opens the task panel
Then: the panel shows an unresolved-doc state and still allows normal task actions.
Out of Scope
instructionsUrlentirely.