Skip to content

triage:welcome uses unprefixed task names and fails in consumer Taskfile namespace #1577

@MScottAdams

Description

@MScottAdams

Summary

task triage:welcome -- --onboard fails in a consumer install when the framework Taskfile is included under a namespace (for example deft:). The welcome script shells out to unprefixed task names, but the consumer-visible tasks are namespaced.

Observed in deftai/cartograph after upgrading to Deft Directive v0.44.0.

Observed

From the consumer repo root, the documented/onboarded command was run via the installed include surface:

task deft:triage:welcome -- --onboard

The flow reached phase 3, then failed because the Python script invoked an unprefixed task:

[3/6] Running `task triage:bootstrap`...
task: Task "triage:bootstrap" does not exist
  ! `task triage:bootstrap` exited 200; see stderr above.

It later reached phase 6 and failed similarly:

[6/6] Final state:
task: Task "triage:summary" does not exist
task: Failed to run task "deft:triage:welcome": task: Failed to run task "deft:triage-welcome:welcome": exit status 2

In this consumer layout, the available task names are:

task deft:triage:bootstrap
task deft:triage:summary

The unprefixed names do not exist at the project root.

Impact

This is first-run friction for the new session-start/onboarding flow:

  • The command partially mutates policy state before failing.
  • The operator is left with an incomplete bootstrap and no final summary.
  • In the Cartograph run, the scope/cap choices had to be corrected manually, then task deft:triage:bootstrap and task deft:triage:summary had to be run directly.

Expected

triage:welcome should resolve and call sibling tasks correctly from both framework-maintainer and consumer-installed layouts.

Possible fixes:

  • In scripts/triage_welcome.py, call the currently exposed namespace when running inside a consumer include, e.g. task deft:triage:bootstrap / task deft:triage:summary.
  • Or avoid shelling out through task for sibling phases and call the underlying Python functions/modules directly.
  • Or pass the task namespace into the script from the Taskfile wrapper and use that consistently.

Acceptance criteria

  • In a consumer project where .deft/core/Taskfile.yml is included under deft:, task deft:triage:welcome -- --onboard completes all six phases without task: Task "triage:*" does not exist.
  • In the Directive maintainer repo, the existing unprefixed task triage:welcome -- --onboard behavior continues to work.
  • Tests cover both direct/framework and consumer-namespaced Taskfile layouts.
  • The welcome flow does not partially mutate policy state and then fail solely because a sibling task was addressed through the wrong namespace.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    adoption-blockerOnboarding/docs defect that misleads new users through first install or first sessionbugSomething isn't workingtriageTriage workflow / cache hygiene / lifecycle reconciliation

    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