Skip to content

refactor(core): Redefine rule scope to activation model and unify descriptor activation - #17

Merged
dangaogit merged 15 commits into
mainfrom
feat/concept-alignment
Jul 3, 2026
Merged

dangaogit merged 15 commits into
mainfrom
feat/concept-alignment

Conversation

@dangaogit

Copy link
Copy Markdown
Owner

This pull request releases version 1.0.0-rc.12 and 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:

  • Unified Descriptor Activation: All descriptor types (rule, skill, tool, agent) now use a shared activation core (engine/activation/) with a single Activation vocabulary (always, path, semantic, manual) and a unified precedence invariant. Each kind gets an ActivationProfile for kind-specific placement, but activation logic is centralized and fail-closed.
  • One Guard Seam: The previously separate Hook, Guardrail, and ValidationRule interfaces are collapsed into a single HookPoint with a typed decision union, enforcing fail-closed guards at the type level and removing standalone guardrail interfaces.
  • Loop-Spine Observability: Engine observability is now aligned to the loop-step vocabulary, and obsolete phase events and dead pipeline/intent references are removed.
  • Fail-Closed Descriptor Loader: Unknown enum values (e.g., tool/agent sideEffect, skill trigger.type, rule kind) now error at load time instead of silently degrading.
  • Dead Intent-LLM Vocabulary Removed: Obsolete intent-LLM types and normalization inputs are deleted, and IntentTurnPolicyToolStrategy is renamed to HostPolicyToolStrategy.

Documentation and Terminology Updates:

  • Project status, release version, and feature tables in README.md are updated to reflect the new unified activation/guard seams and loop-spine model. [1] [2] [3]
  • Context and design docs (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.md records the above breaking changes and conceptual alignment for 1.0.0-rc.12, as well as the prior rc.11 rule activation fix.

dangaogit added 15 commits July 3, 2026 17:25
…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.
@dangaogit
dangaogit merged commit 8fb8976 into main Jul 3, 2026
2 checks passed
@dangaogit
dangaogit deleted the feat/concept-alignment branch July 3, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant