feat(ask): hence/plan-IMPL-011-continuation #12

Open
hugooconnor wants to merge 29 commits from hence/plan-IMPL-011-continuation into main
hugooconnor commented 2026-03-03 11:03:47 +00:00 (Migrated from codeberg.org)

Implements SPEC-011 “ask primitive” end-to-end without introducing any new SPL form.
ask-* remains a convention over existing (given ...), (meta ...), and (normally ...) forms.

What Changed

  • Added ask-convention validation in hence plan validate:
    • Requires question, for-task, and provides metadata on ask facts.
    • Verifies referenced task exists.
    • Verifies at least one rule derives pending-question-*.
    • Avoids false undefined-literal warnings for answer facts listed in provides.
  • Added pending-question extraction and waiting-for-human derivation:
    • hence plan status now shows pending questions (human + JSON).
    • Task supervision now includes waiting_for_human when relevant.
  • Added board integration for human waiting state:
    • New WAITING kanban bucket.
    • JSON board includes waiting tasks and associated question text.
    • Waiting tasks are excluded from normal state buckets (ready, etc.).
  • Added ask-aware hence query describe behavior:
    • ask-* labels render as structured ask objects.
    • Shows open/closed state based on pending-question-* derivation.
  • Added top-level inbox workflow:
    • hence inbox [file] [--json]
    • hence inbox answer [file] [--answer TEXT] [--yes] [--json]
    • hence plan inbox alias wired to same behavior.
  • Implemented inbox answer context assembly:
    • plan/task metadata, question note, expected facts, show-facts, recent findings from claims.
  • Added NL->SPL transform provider support:
    • New config setting: [settings] transform_provider.
    • Provider resolution prefers CLI --agent when it maps to a provider, then config fallback.
  • Added question lifecycle hooks:
    • New events: post-question, post-question-closed.
    • Supervisor diff-check triggers hooks when pending question set changes.
    • Added question-specific env vars (HENCE_QUESTION*, HENCE_PLAN_TOKEN, HENCE_TIMESTAMP).
  • Improved inbox error semantics:
    • Unknown ask label in plan: distinct failure (not found in plan).
    • Known label but not currently pending: separate failure (not currently pending).

Tests

  • Added new ask fixtures for valid/invalid convention and pending/partial/answered states.
  • Expanded integration coverage for:
    • validate ask convention,
    • pending derivation/status JSON,
    • waiting bucket behavior in board,
    • inbox listing + answer flow,
    • ask describe open/closed behavior.
  • Added/updated unit tests around config merge/parsing and question hook diff logic.

Docs

  • Updated README and command reference for:
    • inbox commands,
    • ask/waiting behavior,
    • XDG config/data paths,
    • transform_provider,
    • question lifecycle hooks and env vars.

Note

  • Branch also includes updates to .hence workflow artifact files (context-manifest, eval-result) from implementation tracking.
Implements SPEC-011 “ask primitive” end-to-end without introducing any new SPL form. ask-* remains a convention over existing (given ...), (meta ...), and (normally ...) forms. ## What Changed - Added ask-convention validation in hence plan validate: - Requires question, for-task, and provides metadata on ask facts. - Verifies referenced task exists. - Verifies at least one rule derives pending-question-*. - Avoids false undefined-literal warnings for answer facts listed in provides. - Added pending-question extraction and waiting-for-human derivation: - hence plan status now shows pending questions (human + JSON). - Task supervision now includes waiting_for_human when relevant. - Added board integration for human waiting state: - New WAITING kanban bucket. - JSON board includes waiting tasks and associated question text. - Waiting tasks are excluded from normal state buckets (ready, etc.). - Added ask-aware hence query describe behavior: - ask-* labels render as structured ask objects. - Shows open/closed state based on pending-question-* derivation. - Added top-level inbox workflow: - hence inbox [file] [--json] - hence inbox answer <label> [file] [--answer TEXT] [--yes] [--json] - hence plan inbox alias wired to same behavior. - Implemented inbox answer context assembly: - plan/task metadata, question note, expected facts, show-facts, recent findings from claims. - Added NL->SPL transform provider support: - New config setting: [settings] transform_provider. - Provider resolution prefers CLI --agent when it maps to a provider, then config fallback. - Added question lifecycle hooks: - New events: post-question, post-question-closed. - Supervisor diff-check triggers hooks when pending question set changes. - Added question-specific env vars (HENCE_QUESTION*, HENCE_PLAN_TOKEN, HENCE_TIMESTAMP). - Improved inbox error semantics: - Unknown ask label in plan: distinct failure (not found in plan). - Known label but not currently pending: separate failure (not currently pending). ## Tests - Added new ask fixtures for valid/invalid convention and pending/partial/answered states. - Expanded integration coverage for: - validate ask convention, - pending derivation/status JSON, - waiting bucket behavior in board, - inbox listing + answer flow, - ask describe open/closed behavior. - Added/updated unit tests around config merge/parsing and question hook diff logic. ## Docs - Updated README and command reference for: - inbox commands, - ask/waiting behavior, - XDG config/data paths, - transform_provider, - question lifecycle hooks and env vars. ## Note - Branch also includes updates to .hence workflow artifact files (context-manifest, eval-result) from implementation tracking.
This pull request has changes conflicting with the target branch.
  • .hence/context-manifest.json
  • .hence/eval-result.json
  • docs/llm-guide.html
  • plans/IMPL-011-ask-primitive.spl
  • src/commands/board/json.rs
  • src/commands/board/kanban.rs
  • src/commands/board/mod.rs
  • src/main.rs
  • src/task.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin hence/plan-IMPL-011-continuation:hence/plan-IMPL-011-continuation
git switch hence/plan-IMPL-011-continuation

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff hence/plan-IMPL-011-continuation
git switch hence/plan-IMPL-011-continuation
git rebase main
git switch main
git merge --ff-only hence/plan-IMPL-011-continuation
git switch hence/plan-IMPL-011-continuation
git rebase main
git switch main
git merge --no-ff hence/plan-IMPL-011-continuation
git switch main
git merge --squash hence/plan-IMPL-011-continuation
git switch main
git merge --ff-only hence/plan-IMPL-011-continuation
git switch main
git merge hence/plan-IMPL-011-continuation
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
anuna-research/hence!12
No description provided.