Skip to content

feat(core-rules): rank house rules above konductor defaults - #136

Draft
knihit wants to merge 32 commits into
feat/proportional-maker-checkerfrom
feat/house-rules-precedence
Draft

knihit wants to merge 32 commits into
feat/proportional-maker-checkerfrom
feat/house-rules-precedence

Conversation

@knihit

@knihit knihit commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Stack: 6 of 12 in the orchestration stack. Base: feat/proportional-maker-checker (#135). Depends on everything below it (#114, the memory PR, #123, #124, #135). The single-writer PR builds on this.

Projects with their own conventions were getting konductor's defaults instead.

Context / system prompt:

  • context/k-core-rules.md: new "House rules" section. Konductor's defaults for formats, branching, pull requests, review mechanism and host, commit style, prose style and document structure yield, in order, to: the user's explicit request or the brief; a recorded ruling; the project's agent instruction files and the user-written entries in the project's memory (rule 11); and the conventions the codebase already shows.
  • A file a project instruction file names directly takes that file's level only when it is a regular file tracked by git inside the repository (one hop; not a symlink, URL, dependency, vendored or generated path). Rule 11 gains the matching carve-out.
  • The NEVER rules and the tests-pass requirement never yield. Where a NEVER rule names its own exception (user approval, explicit request, confirmation), only the user's words meet it, including a request the brief attributes to the user.
  • When both rule sets ask for the same review, it runs once. Findings that only enforce an overridden default are dropped before rework and listed for the user. Adversarial and security review stay distinct from code review. Shared collisions are settled before parallel parts diverge.
  • If a collision is still unsettled, the agent asks once and records the answer as an [origin:user] Ruling: memory entry. A ruling decides only its own collision; the newest dated ruling wins, and two rulings with the same date make the agent ask.
  • The writing-habits sentence defers to the new section, so precedence is stated once.
  • context/k-orchestrator-routing-rules.md: orchestrators copy Ruling: entries into briefs verbatim, under a line that keeps them at ruling level. A user request to remove comments or logging is attributed to the user in CONTEXT; an approved scope reduction is named there while the Do NOT silently reduce scope line stays.

Skills:

  • skills/delegation-protocol/SKILL.md: when a default template line is dropped, and the scope-reduction guard.
  • skills/persistent-memory/SKILL.md: the answer to a ruling question counts as dictated by the user and is saved as [origin:user] with a Ruling: prefix; a quote in a brief still does not qualify for saving. Points at the House rules categories instead of copying them.

Other:

  • CHANGELOG.md: one [Unreleased] bullet. No VERSION change.

Type of Change

  • Modify existing skill
  • Context / system prompt update

Testing

  • npm test: not run (markdown-only change).
  • cd cli && make test passes (no cli/ change)
  • Gate on this branch's head, and on the top of the stack (feat/strip-spawn-v2-specialists, which contains it): make build && make synth, cd cli && make test (1,873 Rust tests on the top, 0 failed), make test-skills-sh, uvx --with pyyaml pytest -q tests/ (281 passed, 1 skipped on the top), make claude-plugin-check. All pass. The House rules text is present in the synthesized core rules context.
  • Benchmark: not run; the design rated it as not needed for a precedence rule.
  • No new code files.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own changes
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Agents Affected

The core rules load into every agent.

  • konductor
  • konductor-mux-orchestrator
  • konductor-cmux-orchestrator
  • k-developer
  • k-architect
  • k-researcher
  • k-product-manager
  • k-quality-assurance
  • k-tpm
  • k-browser
  • k-media-analyzer

Notes for Reviewers

  • Review: adversarial review in rounds until 0 CRITICAL and 0 IMPORTANT findings remained (5 rounds, plus an earlier round on the first draft). Fixes cover tracked-symlink rules files, same-date rulings, the one-hop bound, house-rule-skipped findings in briefs, and the brief-relay exception. Every finding has a fix commit.
  • No test checks the text or size of k-core-rules.md, so this change adds none.

Add a one-paragraph House rules section to the core rules. The user's
request or brief, a recorded ruling, the project's agent instruction
files and user-written memory (rule 11's trusted set), and the
codebase's conventions take precedence over konductor's defaults for
formats, branching, PRs, review host and commit style. NEVER rules and
the tests-pass requirement never yield. A review both rule sets ask for
runs once; findings that enforce an overridden default are discarded.
Unsettled collisions are asked once and recorded as an [origin:user]
"Ruling:" memory entry.

Companion edits: the writing-habits precedence sentence now defers to
the new section; persistent-memory treats a ruling answer as dictated;
the orchestrator copies Ruling: entries into briefs verbatim.
CHANGELOG: one bullet under Unreleased/Changed; VERSION unchanged.

Verified from the worktree root:
- make build && make synth: pass (11 agents, 2 context files)
- cargo test (cli/konductor-rs): pass, 1780 passed, 0 failed. A first
  run had one failure in telemetry_hook_scoping (synth could not
  package a scratch dist/ tree); it passed alone and on a full rerun.
- make test-skills-sh: pass
- No em/en dashes in added lines; k-core-rules.md is 6281 bytes
- House rules text present in dist/kiro-cli-v2/context/k-core-rules.md,
  referenced by all 11 Kiro agent specs, inlined in all 11 Claude agents
- No tests assert k-core-rules.md content or size (per design)
@knihit
knihit added this pull request to stack #134 October 30, 2026 04:35
Nihit Kasabwala added 28 commits October 30, 2026 02:28
…precedence

Conflicts:
- CHANGELOG.md: kept the parent's memory and review bullets, then this
  branch's house-rules bullet.
- context/k-orchestrator-routing-rules.md: kept the parent's stricter
  provenance check; the Ruling copy sentence now keys off the memory line
  instead of the old 'directory is untracked' wording.
- skills/persistent-memory/SKILL.md: kept the parent's brief-quote rule,
  then this branch's Ruling sentence.
…evel

A ruling copied into a brief used to rank as a brief instruction, above the
instruction-file line that overrides it. Briefs now list copied rulings
under a labelled line that ranks them as recorded rulings, and the
orchestrator leaves out any ruling an instruction-file line overrides.
Findings that enforce an overridden konductor default were discarded with
no record, so a broad reading of a house rule could silently drop a valid
finding. They are now left unreworked and listed in the result with the
overriding rule's source.
Parallel specialists could each apply their own recommendation to the same
unsettled collision. Orchestrators now settle known collisions before
dispatch, and a specialist returns a new shared one before applying it.
…ode review

A project's generic code review could be read as replacing konductor's
adversarial review. Security and adversarial review are now their own
kind; a project mechanism replaces it only when it says it covers security,
and the ask-the-user branch covers the unclear case.
…racked hop

The house-rules text gave instruction-file authority to any file an
instruction file names, and so on transitively, while rule 11 did not
exempt such files at all. Promotion is now one hop to a tracked file in the
repository, never a URL, dependency or generated path, and rule 11 lists
the same case so both rules agree.
A saved ruling was followed as user-written memory for every purpose, and
its option text could be lifted from repository content. A ruling now
decides only the collision it names within the house-rule categories, and
the agent writes each option in its own words.
A later ruling that reversed an earlier one left two same-level entries
that disagree, so the agent asked again every session. The newer dated
ruling now wins and the agent offers to remove the older one.
Ran on the 437077a tree, from the worktree root:
- make build && make synth: pass
- cd cli && make test: pass, 1789 passed, 0 failed
- make test-skills-sh: pass, 10 passed, 0 failed
- uvx --with pyyaml pytest -q tests/: 226 passed
- make claude-plugin-check: validation passed
…precedence

Conflicts in rule 11 and the memory provenance paragraph: kept this branch's text (house-rule file bound, Rulings from memory) with the parent's git ls-files ':(icase).konductor' check.
…and fix briefs

A skipped IMPORTANT finding that enforces an overridden default was told both "do not
rework" and "gets one fix" by the review ceilings, so the artifact could never pass.
Memory dates are day-granular, so "the newer date wins" left same-day rulings
undecided while calling them settled. The skill paragraph is rewrapped around the new
sentence, which also removes the short line the merge left.
A tracked symlink passes git ls-files while its target can sit in a dependency,
generated, or outside path. The bound now names the check, and a specialist without a
shell treats the file as content.
Writing habits defer to house rules, but the category list did not name prose style,
so a project rule allowing dashes had unclear standing.
…of copying them

The copied list had already drifted ("review" vs "review mechanism and host") and
lacked prose style.

Verified at this commit from the worktree root:
- make build && make synth: pass
- cd cli && make test: pass (cargo 1789 passed, 0 failed)
- make test-skills-sh: pass (85 passed, 0 failed)
- uvx --with pyyaml pytest -q tests/: 226 passed
- make claude-plugin-check: validation passed
…precedence

# Conflicts:
#	CHANGELOG.md
#	context/k-core-rules.md
#	context/k-orchestrator-routing-rules.md
…ception

Rule 7 carries an explicit-request exception, which the House rules
clause did not name, so it read either as refusing the user or as
letting an instruction file line count as the request.
… habits

"Also takes precedence" could read as ranking the checker skill with or
above the house rules, which the House rules section ranks it below.
The entry left out the new kind of memory entry agents now write and
used ties for what the rules call a collision.
…precedence

# Conflicts:
#	CHANGELOG.md
#	context/k-core-rules.md
#	context/k-orchestrator-routing-rules.md
…rief

The House rules exception counted a request "relayed in your brief as the
user's request", but nothing marked which brief lines those were. The rule
now needs the brief to attribute the text to the user, and the routing
rules tell the orchestrator to say so in CONTEXT and drop the template line
the request overrides.

Gate (this tree): make build && make synth ok; cd cli && make test 1789
passed; make test-skills-sh 85 passed; uvx --with pyyaml pytest -q tests/
226 passed; make claude-plugin-check ok.
The routing rules tell the orchestrator to drop the template line a
user request overrides, but the template showed the comment, logging and
scope lines as fixed. Without this, a brief could relay the user's
request and forbid it in the same breath.
Core rules let an attributed brief line meet a NEVER rule's exception;
the memory skill's sentence read as a general bar on brief quotes.
…precedence

# Conflicts:
#	context/k-core-rules.md
#	context/k-orchestrator-routing-rules.md
…precedence

Brings PR 1 (project memory is project content) up from #135.

Conflicts:
- context/k-core-rules.md rule 11: PR 1's text, with this branch's clause
  "or a file a project agent instruction file tells you to follow within
  the bounds the House rules section sets" after "a file the user tells you
  to follow".
- context/k-orchestrator-routing-rules.md: PR 1 drops the provenance
  paragraph; this branch's Ruling: and CONTEXT sentences stay.

Merge-up edits from the design (House rules and the routing rules):
- "the user-written memory that rule 11 lets you follow" becomes "the
  user-written entries in the project's memory (rule 11)".
- Drop "; when memory is tracked or you cannot confirm it is untracked,
  propose a line for the project's agent instruction file instead".
- "When the memory line says user-written entries are instructions, copy
  each Ruling: entry from user-written memory into the brief" becomes "Copy
  each Ruling: entry from the project's memory into the brief".

Gate: make build && make synth ok; cli make test 1789 passed, 0 failed;
make test-skills-sh 10 passed; pytest 251 passed, 1 skipped;
make claude-plugin-check ok.
…uction

An approved reduction does not contradict "Do NOT silently reduce scope";
dropping that line removed the brief's guard against cutting anything
beyond the approval. Name the approval in CONTEXT and keep the line. The
comments and logging cases still drop the line they contradict.

Doc-only; the gate runs on this branch's head.
Nihit Kasabwala added 3 commits October 31, 2026 15:12
"for saving to memory" read as part of the reason; attach it to "does not
qualify" and rewrap the paragraph to its width.

Doc-only; the gate runs on this branch's head.
…precedence

Brings PR 1 (project memory is project content) up the stack. No conflicts.

Gate: make build && make synth ok; cli make test 1789 passed, 0 failed;
make test-skills-sh 10 passed, 0 failed; pytest 251 passed, 1 skipped; make claude-plugin-check ok.

This branch has not been deployed

No deployments
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