trace-decision starts only when an agent knows that its change overturns a decision

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
git, github-actions, shell
Domain
devtools

Research direction

Read the trace-decision skill at .agents/skills/trace-decision/SKILL.md, the references in AGENTS.md and CONTRIBUTING.md, and the collector at tools/trace-decision/collect.mjs. Compare the proposed CI and Git hook approaches, including the constraints and open decisions listed in the issue. Done means choosing and implementing an approach that surfaces relevant decisions to authors and reviewers while keeping output short and working across AI agent vendors.

Written by the indexing model from the issue text.

Description

type/feature
Problem to solve

The trace-decision skill starts when somebody asks for the reason for a decision or for an earlier version, or "before you overturn a decision" (the description in .agents/skills/trace-decision/SKILL.md, Skills in AGENTS.md, History in CONTRIBUTING.md). The last trigger needs the agent to know that its change overturns a decision. A change that removes or rewrites a line often does not look like that to its author. The agent then does not start the skill, and nothing shows the reason for the line before the review.

Example: an earlier version of #14 made a rule against reasons in the commit body. Text in the repo already expected those reasons there. Reviews found the conflict after the change was written (the Evidence line of abb7ff2).

A change must reach these goals:

  1. The author of a change learns the decisions behind the lines that the change removes or rewrites. This is also true when the author did not notice that the change overturns a decision.
  2. The reviewer sees the same facts.
  3. The output stays short, so that people and agents read it.
  4. It works with AI agents from any vendor.
Proposal

The means is not decided. Options:

Option When the author sees the facts Cost
A CI job on each pull request. For each line that the pull request removes or rewrites in the watched paths, the job runs tools/trace-decision/collect.mjs at the base commit and posts the output as a pull request comment After the pull request opens The workflow needs permission to write pull request comments. The collector reads the lines of the current checkout, so the job must check out the base commit. A large pull request needs a limit on the output
A local Git hook runs the same collection for the lines that a commit removes or rewrites Before the commit or the push It runs only in a clone that sets core.hooksPath. d55158a: "a clone that does not set core.hooksPath runs no hook"
A CI job asks an AI agent to rebuild the purpose of the lines and posts the result After the pull request opens Model cost, a vendor key in CI, and a risk of invented reasons

Also decide:

  • Which paths the job watches, for example docs/, .agents/skills/, CONTRIBUTING.md, AGENTS.md, .github/, or code with a comment that links a design section.
  • If the comment gives the full collector output, or only the decision fields of each commit with links.
  • If the job only comments, or also fails.
Version

17e73ed

More information
  • #39: the collector does not read the comments and reviews of an issue or a pull request. A job that uses the collector has the same gap.
  • #38 decides how a rule or a procedure step states its goal. When the rules state their goals, the output of this job shows them too.
Dominant language
Shell
Stars
1
Forks
0
Avg merge
6h 59m
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from c-w-z/commit-decision-record

All issues in c-w-z/commit-decision-record

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.