twining_link_commit
Link git commit hashes to decisions for bidirectional traceability between code changes and documented rationale.
Instructions
Link a git commit hash to an existing decision. Enables bidirectional traceability between decisions and commits.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| decision_id | Yes | ID of the decision to link | |
| commit_hash | Yes | Git commit hash to link | |
| agent_id | No | ID of the agent performing the link |
Implementation Reference
- src/tools/decision-tools.ts:362-395 (handler)Registration and handler implementation of the "twining_link_commit" tool within the `registerDecisionTools` function. It calls the engine's `linkCommit` method.
// twining_link_commit — Link a git commit hash to an existing decision server.registerTool( "twining_link_commit", { description: "Link a git commit hash to an existing decision. Enables bidirectional traceability between decisions and commits.", inputSchema: { decision_id: z.string().describe("ID of the decision to link"), commit_hash: z.string().describe("Git commit hash to link"), agent_id: z .string() .optional() .describe("ID of the agent performing the link"), }, }, async (args) => { try { const result = await engine.linkCommit( args.decision_id, args.commit_hash, args.agent_id, ); return toolResult(result); } catch (e) { if (e instanceof TwiningError) { return toolError(e.message, e.code); } return toolError( e instanceof Error ? e.message : "Unknown error", "INTERNAL_ERROR", ); } }, );