@tpmjs/tools-decision-record-adr
Create an Architecture Decision Record (ADR) from structured input. Follows the standard ADR format with title, status, context, decision, and consequences. Useful for documenting important technical and architectural decisions.
Test @tpmjs/tools-decision-record-adr (decisionRecordADRTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-decision-record-adrpnpm add @tpmjs/tools-decision-record-adryarn add @tpmjs/tools-decision-record-adrbun add @tpmjs/tools-decision-record-adrdeno add npm:@tpmjs/tools-decision-record-adrimport { decisionRecordADRTool } from '@tpmjs/tools-decision-record-adr';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { decisionRecordADRTool } from '@tpmjs/tools-decision-record-adr';
const result = await generateText({
model: openai('gpt-4o'),
tools: { decisionRecordADRTool },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
titlestringTitle of the decision (e.g., "Use PostgreSQL for primary database")
contextstringContext and background information that led to this decision. What forces are at play?
decisionstringThe decision that was made. What are we going to do?
consequencesarrayArray of consequences (both positive and negative). What becomes easier or harder?
Schema extracted: 1/1/2026, 8:17:58 AM
Create Architecture Decision Records (ADR) from structured input following industry standards.
npm install @tpmjs/tools-decision-record-adr
import { decisionRecordADRTool } from '@tpmjs/tools-decision-record-adr'; const result = await decisionRecordADRTool.execute({ title: 'Use PostgreSQL for primary database', context: `We need to choose a database for our new application. Requirements include: ACID compliance, strong consistency, support for complex queries, and good TypeScript integration. Team has experience with both SQL and NoSQL databases.`, decision: `We will use PostgreSQL as our primary database with Prisma as the ORM. This provides strong typing, migrations, and excellent developer experience.`, consequences: [ 'Better type safety with Prisma client', 'Strong consistency guarantees for critical data', 'Team needs to learn Prisma migrations', 'Increased complexity for horizontal scaling', 'Excellent JSON support for flexible schemas', ], }); console.log(result.adr); // # Use PostgreSQL for primary database // // **Status:** Accepted // // **Date:** 2025-12-31 // // **Filename:** `use-postgresql-for-primary-database.md` // // ## Context // // We need to choose a database for our new application... // // ## Decision // // We will use PostgreSQL as our primary database... // // ## Consequences // // ### Positive // // - Better type safety with Prisma client // - Strong consistency guarantees for critical data // - Excellent JSON support for flexible schemas // // ### Negative // // - Team needs to learn Prisma migrations // - Increased complexity for horizontal scaling console.log(result.date); // '2025-12-31' console.log(result.status); // 'Accepted'
decisionRecordADRTool.execute(input)Creates an Architecture Decision Record (ADR) following the standard template.
title (string, required): Title of the decisioncontext (string, required): Context and background for the decisiondecision (string, required): The decision that was madeconsequences (string[], required): Array of consequences (positive and negative)Returns a Promise<DecisionRecord> with:
adr (string): The formatted ADR in markdowndate (string): Date the ADR was created (YYYY-MM-DD)status (string): Status of the decision (default: "Accepted")The tool generates ADRs with this structure:
MIT
Downloads/month
0
Quality Score