5
1
Fork
You've already forked hence
0

feat/plugin-extensibility #7

Merged
hugooconnor merged 8 commits from feat/plugin-extensibility into main 2026年02月19日 00:13:45 +01:00
  • Add plugin extensibility system (SPEC-008) with 6 extension points: lifecycle hooks, custom validators, external commands, custom providers, board formatters, and post-plan-complete hook

    • Hooks run scripts from .hence/hooks/ and ~/.hence/hooks/ after claim/complete/block/unblock/assert events, with timeout and disable-via-config support
    • Custom validators in .hence/validators/ output JSON diagnostics that integrate into hence validate (promoted to errors with --strict)
    • External commands follow git-style hence-{name} discovery from PATH
    • Custom providers defined in config.toml extend the spawn provider registry
    • Board formatter plugins receive JSON on stdin via --format
    • TOML config system with global/local merge (~/.hence/config.toml + .hence/config.toml)
    • 52 new tests (32 unit + 20 integration) covering all 6 plugin contracts (CON-001 through CON-006)

    Test plan

    • cargo fmt --check — clean
    • cargo clippy -- -D warnings — clean (including clippy 1.93 collapsible_if)
    • cargo test — 303 tests pass (251 existing + 52 new), zero failures
- Add plugin extensibility system (SPEC-008) with 6 extension points: lifecycle hooks, custom validators, external commands, custom providers, board formatters, and post-plan-complete hook - Hooks run scripts from .hence/hooks/ and ~/.hence/hooks/ after claim/complete/block/unblock/assert events, with timeout and disable-via-config support - Custom validators in .hence/validators/ output JSON diagnostics that integrate into hence validate (promoted to errors with --strict) - External commands follow git-style hence-{name} discovery from PATH - Custom providers defined in config.toml extend the spawn provider registry - Board formatter plugins receive JSON on stdin via --format <name> - TOML config system with global/local merge (~/.hence/config.toml + .hence/config.toml) - 52 new tests (32 unit + 20 integration) covering all 6 plugin contracts (CON-001 through CON-006) Test plan - cargo fmt --check — clean - cargo clippy -- -D warnings — clean (including clippy 1.93 collapsible_if) - cargo test — 303 tests pass (251 existing + 52 new), zero failures
Implements git-style plugin architecture for hence CLI:
- External commands: any `hence-{name}` executable in PATH becomes a subcommand
- Config system: TOML config at ~/.hence/config.toml and .hence/config.toml
- Custom providers: register agent providers via config, merged with built-in registry
- Lifecycle hooks: post-claim/complete/block/unblock/assert scripts with timeout
- Custom validators: executable scripts in validators/ dirs, JSON diagnostic output
- Formatter plugins: `--format` flag on board pipes JSON to hence-board-{format}
All 251 existing tests pass. Zero warnings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
docs: add Plugins section to README
Some checks failed
ci/woodpecker/push/ci Pipeline failed
b9c362f93d
Document plugin extensibility: external commands, config.toml,
custom providers, lifecycle hooks, custom validators, and
board formatter plugins. Update architecture diagram.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: resolve rustfmt and clippy issues
Some checks failed
ci/woodpecker/push/ci Pipeline failed
431b12f6ec
- Format all new files with cargo fmt
- Allow clippy::enum_variant_names on HookEvent (Post prefix is semantic)
- Replace single-arm match with if-let in validators
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
docs: remove unsupported DFL format section from README
Some checks failed
ci/woodpecker/push/ci Pipeline failed
08c535b428
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: add post-plan-complete lifecycle hook
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ae2a84bdee
Fires when `hence complete` finishes the last task in a plan. Re-reasons
after completion to check if all tasks are done, then triggers hooks in
.hence/hooks/post-plan-complete and ~/.hence/hooks/post-plan-complete.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
docs: add post-plan-complete hook to spec and plan
Some checks failed
ci/woodpecker/push/ci Pipeline failed
d11cdffed3
Update SPEC-008 REQ-005, CON-004, and TEST-005 to document the
post-plan-complete lifecycle hook. Update IMPL-008 task metadata
to reflect the new hook point.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
test: add 52 plugin extensibility tests (CON-001 through CON-006)
Some checks failed
ci/woodpecker/push/ci Pipeline failed
4799883bee
Unit tests for config merge (hooks, timeout, plugin_path), hook event
mappings and disable logic, validator output parsing, plugin discovery
(prefix, permissions, dedup), and custom provider conversion. Integration
tests for all 6 hook lifecycle events, post-plan-complete ordering,
validator diagnostics with --strict, external commands with arg/exit-code
forwarding, and board formatter plugins.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: collapse nested if statements for clippy 1.93
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
8a51e098b3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hugooconnor deleted branch feat/plugin-extensibility 2026年02月19日 00:13:46 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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/hence!7
Reference in a new issue
anuna/hence
No description provided.
Delete branch "feat/plugin-extensibility"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?