Skip to content

Attach process instructions to seeded recurring tasks #74

Description

@alexeygrigorev

Attach process instructions to seeded recurring tasks

Status: in progress
Tags: bug, work-engine, portal, process-docs, P0
Depends on: #70, #73
Blocks: #71 final V1 cutover acceptance

Scope

Seeded production recurring tasks must be actionable with process context. The two Sunday/daily launch tasks are visible in Operations Home after #73, but they still show as blocking process-quality findings because generated tasks have neither instructionDocId nor instructionsUrl.

This issue updates the recurring seed/generation path so:

  • Baseline recurring configs can carry task instruction context such as instructionDocId, instructionsUrl, systems, and proof metadata where appropriate.
  • Future recurring task generation copies those fields into generated task records.
  • The production deploy seed step repairs already-generated recurring tasks for existing configs, idempotently, so today’s tasks stop showing as missing-instruction blockers after deploy.

Use in-repo process docs where available. For the current launch tasks:

  • Invite people to Slack from Airtable should point to sop.community.book-of-the-week.invite-people-to-slack-from-the-airtable-form.
  • Create new Trello cards and review existing ones should at minimum point to a relevant Trello SOP or fallback instructionsUrl so the operator can open process context. If no exact SOP exists, use the closest existing Trello process doc and leave a clear comment/test expectation that this is a V1 launch fallback.

Acceptance Criteria

  • Baseline recurring configs include process instruction context for the two currently generated production tasks.
  • generateRecurringTasks copies recurring config instruction context into newly generated tasks.
  • Re-running seed-recurring.ts repairs existing generated recurring tasks that are missing instruction context, without creating duplicates or overwriting unrelated operator-created tasks.
  • Seed/cron tests prove generated recurring tasks have instruction context and that repair is idempotent.
  • Production smoke after deploy verifies the two seeded Today tasks are visible and no longer appear as missing-instruction process blockers.

Test Scenarios

Scenario: Future recurring tasks inherit process docs

Given: baseline recurring configs are seeded.
When: cron generates due recurring tasks.
Then: generated tasks for Slack invites and Trello review have instructionDocId or instructionsUrl plus relevant systems metadata.

Scenario: Existing production tasks are repaired

Given: recurring tasks already exist for a seeded config and are missing process instruction fields.
When: seed-recurring.ts runs again during deploy.
Then: those existing recurring tasks receive the config instruction context and no duplicate tasks are created.

Scenario: Process quality remains honest

Given: a task still lacks instructions.
When: Operations Home builds process-quality findings.
Then: it can still report that blocker. This issue should fix the seeded recurring tasks, not disable process-quality checks.

Required Verification

  • NODE_ENV=test SKIP_AUTH=true node --import tsx --test tests/seed-recurring.test.ts
  • npm --prefix work-engine run typecheck
  • Focused frontend/process-quality test if needed to prove blocker removal logic.
  • After push/deploy, production browser/API smoke for /work Today and Process Quality.

Out of Scope

  • Curating perfect long-term SOPs for every recurring task.
  • Removing process-quality blockers globally.
  • Real Trello import or Telegram/assistant human gates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Must havebugSomething is brokenportalShared portal shell and UXprocess-docsSOPs, templates, references, playbookstestingTests and QAwork-engineDataTasks task execution engine

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions