Skip to main content
Glama

twining_decide

Record development decisions with full rationale, alternatives considered, and traceability. Creates structured decision records and cross-posts to a shared blackboard for team coordination.

Instructions

Record a decision with full rationale, alternatives considered, and traceability. Creates a decision record and cross-posts to the blackboard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDecision domain (e.g., "architecture", "implementation", "testing")
scopeYesWhat part of the codebase this affects
summaryYesOne-line decision statement
contextYesSituation that prompted this decision
rationaleYesReasoning for the choice
constraintsNoWhat limited the options
alternativesNoAlternatives that were considered
depends_onNoIDs of prerequisite decisions
supersedesNoID of decision this replaces
confidenceNoConfidence level (default: "medium")
reversibleNoWhether this decision is easily reversible (default: true)
affected_filesNoFile paths affected by this decision
affected_symbolsNoFunction/class names affected
agent_idNoIdentifier for the deciding agent (default: "main")
commit_hashNoGit commit hash to associate with this decision

Implementation Reference

  • Tool registration for "twining_decide" in `src/tools/decision-tools.ts`. It takes a comprehensive input schema of decision details and calls the `engine.decide(args)` method to perform the action.
    server.registerTool(
      "twining_decide",
      {
        description:
          "Record a decision with full rationale, alternatives considered, and traceability. Creates a decision record and cross-posts to the blackboard.",
        inputSchema: {
          domain: z
            .string()
            .describe(
              'Decision domain (e.g., "architecture", "implementation", "testing")',
            ),
          scope: z
            .string()
            .describe("What part of the codebase this affects"),
          summary: z.string().describe("One-line decision statement"),
          context: z.string().describe("Situation that prompted this decision"),
          rationale: z.string().describe("Reasoning for the choice"),
          constraints: z
            .array(z.string())
            .optional()
            .describe("What limited the options"),
          alternatives: z
            .array(
              z.object({
                option: z.string().describe("Alternative option considered"),
                pros: z
                  .array(z.string())
                  .optional()
                  .describe("Advantages of this alternative"),
                cons: z
                  .array(z.string())
                  .optional()
                  .describe("Disadvantages of this alternative"),
                reason_rejected: z
                  .string()
                  .describe("Why this alternative was rejected"),
              }),
            )
            .optional()
            .describe("Alternatives that were considered"),
          depends_on: z
            .array(z.string())
            .optional()
            .describe("IDs of prerequisite decisions"),
          supersedes: z
            .string()
            .optional()
            .describe("ID of decision this replaces"),
          confidence: z
            .enum(["high", "medium", "low"])
            .optional()
            .describe('Confidence level (default: "medium")'),
          reversible: z
            .boolean()
            .optional()
            .describe("Whether this decision is easily reversible (default: true)"),
          affected_files: z
            .array(z.string())
            .optional()
            .describe("File paths affected by this decision"),
          affected_symbols: z
            .array(z.string())
            .optional()
            .describe("Function/class names affected"),
          agent_id: z
            .string()
            .optional()
            .describe('Identifier for the deciding agent (default: "main")'),
          commit_hash: z
            .string()
            .optional()
            .describe("Git commit hash to associate with this decision"),
        },
      },
      async (args) => {
        try {
          const result = await engine.decide(args);
          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",
          );
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daveangulo/twining-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server