update_adr_status
Change the lifecycle status of an Architecture Decision Record (ADR) from Proposed to Accepted, Deprecated, or Superseded to track decision evolution.
Instructions
Update the status of an ADR: Proposed → Accepted → Deprecated → Superseded
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adr_id | Yes | ADR ID to update | |
| status | Yes | New status | |
| superseded_by | No | ID of the replacing ADR (required when status is Superseded) |
Implementation Reference
- index.js:100-121 (handler)The 'update_adr_status' tool registration and handler implementation in the MCP server.
server.registerTool('update_adr_status', { description: 'Update the status of an ADR: Proposed → Accepted → Deprecated → Superseded', inputSchema: { adr_id: z.number().describe('ADR ID to update'), status: z.enum(['Proposed', 'Accepted', 'Deprecated', 'Superseded']).describe('New status'), superseded_by: z.number().optional().describe('ID of the replacing ADR (required when status is Superseded)'), }, }, async ({ adr_id, status, superseded_by }) => { const adr = getADR(adr_id); if (!adr) throw new Error(`ADR ${adr_id} not found`); if (status === 'Superseded' && !superseded_by) { throw new Error('superseded_by is required when setting status to Superseded'); } updateADRStatus(adr_id, status, superseded_by ?? null); const updated = { ...adr, status, superseded_by: superseded_by ?? null }; exportADRFile(adr_id, updated, adr.session_id); const note = superseded_by ? ` (superseded by ADR-${superseded_by})` : ''; return { content: [{ type: 'text', text: `ADR-${adr_id} updated to "${status}"${note}` }] }; }); - db.js:72-75 (helper)The database helper function 'updateADRStatus' that performs the SQL update.
export function updateADRStatus(id, status, superseded_by = null) { db.prepare('UPDATE adrs SET status = ?, superseded_by = ? WHERE id = ?') .run(status, superseded_by, id); }