Repository navigation
refactor(core): Redefine rule scope to activation model and unify descriptor activation - #17
Merged
Merged
Conversation
…not lifecycle)
A rule's only product is prompt text, so its "scope" should answer *when the
text enters the prompt* — not name a lifecycle stage. The old
`RuleScope = turnStart | preLLM | turnStop | *` conflated rule (prompt) with
hook (lifecycle action): only `preLLM`/`*` were ever consumed (prompt assembly),
while turnStart/turnStop enforcement is already owned by Guardrail +
ValidationRule + HookPoint and never read RuleDescriptor.content.
Replace it with an activation model mirroring industry rule systems
(Cursor/Copilot/Continue/Cline). No backward compatibility kept.
- types: `RuleDescriptor.scope: RuleScope[]` -> `activation: RuleActivation`
(`always | manual | semantic | { path, globs }`); remove `RuleScope`.
- prompt/assembler: drop lifecycle `phase`; filter rules by activation via
caller-provided deterministic inputs (`explicitRuleNames` / `contextFilePaths`
/ `semanticActiveRuleNames`), fail-closed when absent.
- types/scope: add `SessionScope.explicitRuleNames` (symmetric with skills).
- engine: forward `explicitRuleNames`; stop passing `phase` to the assembler.
- registry/loader: parse `activation` frontmatter, fail-closed on unknown mode
or `path` without non-empty globs.
- migrate built-in extension rules, CLI templates, fixtures to `activation`.
- docs/CONTEXT/CHANGELOG updated; bump workspace to 1.0.0-rc.11 + sync lockfile.
Ubiquitous-language entries for the unified activation seam decided in the concept-alignment audit (generalizes Rule Activation across all four descriptor kinds; per-kind Placement Adapter behind the shared core). Also reconcile Subagent Dispatch dual-role and drop a stale scope reference.
…IntentTurnPolicyToolStrategy to HostPolicyToolStrategy
Unified Descriptor Activation seam (rule migrated + tool/skill/agent profiles), one guard seam (Hook/Guardrail/ValidationRule), loop-spine observability alignment, fail-closed descriptor loader, and removal of dead intent-LLM turn-policy vocabulary. See CHANGELOG rc.12.
Bring README, design docs, and guides in sync with RuleActivation, the unified HookAction guard seam, loop_step_enter/exit observability, and removed EngineDependencies.guardrails; update CLI/OTel consumers and stale code comments accordingly.
Replace "6-phase outer skeleton" as the public-facing model with loop spine and loop-lifecycle vocabulary; keep EnginePhase as an internal module mapping note only.
Regenerate the lockfile so workspace package versions match the rc.12 bumps and release-artifacts validation passes.
…e 1.61.1 Bump the catalog pin and runner image to v1.61.1 with Chromium revision 1228 so release-artifacts validation matches the installed browsers.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request releases version
1.0.0-rc.12and introduces a major conceptual alignment across the codebase, generalizing the rule activation fix from the previous release to all core descriptor types (rules, skills, tools, agents). It unifies activation logic, collapses guard interfaces, aligns observability to the loop-spine, enforces fail-closed loading for unknown enums, and removes obsolete intent-LLM vocabulary. Documentation and project status are updated to reflect these changes.Core Concept Alignment and Breaking Changes:
engine/activation/) with a singleActivationvocabulary (always,path,semantic,manual) and a unified precedence invariant. Each kind gets anActivationProfilefor kind-specific placement, but activation logic is centralized and fail-closed.Hook,Guardrail, andValidationRuleinterfaces are collapsed into a singleHookPointwith a typed decision union, enforcing fail-closed guards at the type level and removing standalone guardrail interfaces.sideEffect, skilltrigger.type, rulekind) now error at load time instead of silently degrading.IntentTurnPolicyToolStrategyis renamed toHostPolicyToolStrategy.Documentation and Terminology Updates:
README.mdare updated to reflect the new unified activation/guard seams and loop-spine model. [1] [2] [3]CONTEXT.md) are revised to use the new activation vocabulary, clarify the distinction between activation and placement, and update descriptions of rule/skill/tool/agent activation, prompt assembly, and subagent dispatch. [1] [2] [3]Changelog:
CHANGELOG.mdrecords the above breaking changes and conceptual alignment for1.0.0-rc.12, as well as the priorrc.11rule activation fix.