Skip to content

feat: add additional-context-priority component#93

Open
danielsuguimoto wants to merge 1 commit intokompassdev:mainfrom
danielsuguimoto:additional-context-precedence
Open

feat: add additional-context-priority component#93
danielsuguimoto wants to merge 1 commit intokompassdev:mainfrom
danielsuguimoto:additional-context-precedence

Conversation

@danielsuguimoto
Copy link
Copy Markdown
Contributor

Ticket

SKIPPED

Summary

Introduces a new reusable component (additional-context-priority) that establishes a clear precedence rule: when user-provided <additional-context> conflicts with a command's built-in guidance, <additional-context> takes priority — unless that would violate system, developer, repository, or tool safety rules. The component is included across all 20 bundled commands to ensure consistent behavior.

Motivation

Previously, there was no explicit instruction telling commands how to handle conflicts between <additional-context> and their built-in guidance. This could lead to inconsistent behavior where some commands would ignore user overrides. This change codifies the precedence rule in a single component and applies it uniformly.

Changes

New component

  • packages/core/components/additional-context-priority.md — two-line partial that declares the override rule and fallback behavior

Command templates

  • Added <%~ include("@additional-context-priority") %> to the ## Additional Context section of every command under packages/core/commands/: ask, commit, commit-and-push, dev, learn, merge, pr/create, pr/fix, pr/review, review, rmslop, ship, skill/create, skill/optimize, ticket/ask, ticket/create, ticket/dev, ticket/plan, ticket/plan-and-sync, and todo

Generated OpenCode output

  • Synced packages/opencode/.opencode/commands/ with the rendered component lines

Config & schema

  • packages/core/lib/config.ts — registered the component in DEFAULT_COMPONENT_NAMES, KompassConfig interface, and defaultComponentPaths
  • kompass.schema.json — added additional-context-priority to component properties and enum arrays
  • kompass.jsonc, packages/core/kompass.jsonc, packages/opencode/kompass.jsonc — enabled the component

Documentation

  • AGENTS.md — added a command-authoring guideline about explicitly stating <additional-context> override precedence

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