From b2447cff480d4176a6cf13a0bef2554f7d3e4c5b Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Tue, 7 Apr 2026 11:15:42 -0700 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20Tier=201=20backlog=20batch=20?= =?UTF-8?q?=E2=80=94=204=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - #212: Add Two-Failures Rule to operational-constraints (rule 8), fix duplicate rule 7 numbering - #215: Add decision-log ADR format with manifest entry - #155 (F-003): Bump cli/specs/design.md version from 0.3.0 to 0.6.1, add revision history entry - #113: Add Label Group Summaries section to specification-drift taxonomy for token-efficient cross-reference context Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- cli/specs/design.md | 5 +- formats/decision-log.md | 96 +++++++++++++++++++ manifest.yaml | 8 ++ .../guardrails/operational-constraints.md | 16 +++- taxonomies/specification-drift.md | 22 +++++ 5 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 formats/decision-log.md diff --git a/cli/specs/design.md b/cli/specs/design.md index a9623fd..e9ff5be 100644 --- a/cli/specs/design.md +++ b/cli/specs/design.md @@ -1,8 +1,8 @@ --- title: "PromptKit CLI — Design Specification" project: "PromptKit CLI (@alan-jowett/promptkit)" -version: "0.3.0" -date: "2025-07-17" +version: "0.6.1" +date: "2026-04-07" status: draft related: - requirements: cli/specs/requirements.md @@ -17,6 +17,7 @@ related: |-----|------|--------|-------------| | 0.1 | 2025-07-17 | Spec-extraction-workflow | Initial draft extracted from source code | | 0.2 | 2025-07-18 | Engineering-workflow Phase 2 | Removed assemble.js module design (§2.2), manifest.js module design (§2.3), assembly pipeline data flow (§3.1). Updated cli.js design for two commands with inline manifest parsing. Updated module structure, dependency graph, command flow, interface contracts, dependencies. Resolved GAP-001 through GAP-007, GAP-009, GAP-011. | +| 0.6.1 | 2026-04-07 | Maintenance audit (F-003) | Bumped version to match requirements.md and package.json. No design changes — version alignment only. | --- diff --git a/formats/decision-log.md b/formats/decision-log.md new file mode 100644 index 0000000..18ea405 --- /dev/null +++ b/formats/decision-log.md @@ -0,0 +1,96 @@ + + + +--- +name: decision-log +type: format +description: > + Lightweight architectural decision record (ADR) format. Records + significant design decisions with context, options considered, + rationale, and consequences. Agent-consumable and human-readable. +produces: decision-log +--- + +# Format: Decision Log + +The output MUST be a decision log document with one or more decision +entries in the following structure. Each entry records a single +significant design decision. Decisions are appended chronologically. + +If a section has no content, state "None identified" — never omit +a section. + +## Document Structure + +```markdown +# Decision Log — {{project-or-component-name}} + +## Decision: [Title] + +**Date**: YYYY-MM-DD +**Status**: Proposed | Accepted | Deprecated | Superseded by [Decision Title] +**Deciders**: [who made or approved this decision] + +### Context + +What situation, problem, or requirement prompted this decision? Include +relevant constraints, forces, and prior art. Be specific enough that a +reader unfamiliar with the project history can understand why a decision +was needed. + +### Options Considered + +| Option | Pros | Cons | +|--------|------|------| +| Option A — [name] | [advantages] | [disadvantages] | +| Option B — [name] | [advantages] | [disadvantages] | +| Option C — [name] | [advantages] | [disadvantages] | + +### Decision + +State the chosen option clearly and unambiguously. + +### Rationale + +Why was this option chosen over the alternatives? Reference specific +constraints, evidence, benchmarks, or principles that drove the choice. +Distinguish between "we chose this because X" and "we chose this +despite Y" — both are important. + +### Consequences + +What follows from this decision? Include: + +- **Positive**: What becomes easier, simpler, or more reliable. +- **Negative**: What becomes harder, constrained, or deferred. +- **Neutral**: What changes but is neither better nor worse. +- **Follow-up actions**: Work items, future decisions, or reversibility + notes created by this decision. +``` + +## Structural Rules + +1. **One decision per entry.** Do not bundle multiple decisions. +2. **Chronological order.** New decisions are appended at the end. +3. **Immutable once accepted.** Do not edit accepted decisions — instead, + add a new decision that supersedes the old one and update the old + entry's Status to `Superseded by [new title]`. +4. **Options table is mandatory.** Even if the decision seems obvious, + document at least one alternative considered (including "do nothing"). +5. **Consequences must include negatives.** Every decision has tradeoffs. + If no negative consequences are identified, the analysis is incomplete. + +## When to Record a Decision + +Record a decision when: + +- It affects the system's architecture, API surface, or data model. +- It constrains future choices (technology selection, protocol choice). +- It was debated — multiple reasonable options existed. +- A future contributor might ask "why was it done this way?" + +Do NOT record decisions about: + +- Routine implementation choices with no architectural impact. +- Style or formatting preferences (these belong in coding standards). +- Temporary workarounds (these belong in issue trackers). diff --git a/manifest.yaml b/manifest.yaml index d186add..e1ce15e 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -777,6 +777,14 @@ formats: motivation with Before/After content, traceability matrix, and invariant impact assessment. Domain-agnostic. + - name: decision-log + path: formats/decision-log.md + produces: decision-log + description: > + Lightweight architectural decision record (ADR) format. Records + significant design decisions with context, options considered, + rationale, and consequences. Agent-consumable and human-readable. + - name: presentation-kit path: formats/presentation-kit.md produces: presentation-kit diff --git a/protocols/guardrails/operational-constraints.md b/protocols/guardrails/operational-constraints.md index 32b9ba1..cb295f4 100644 --- a/protocols/guardrails/operational-constraints.md +++ b/protocols/guardrails/operational-constraints.md @@ -109,7 +109,21 @@ If your environment supports parallel or delegated execution: - Each work stream should produce a structured artifact that can be independently verified. -### 7. Coverage Documentation +### 8. Two-Failures Rule + +If the same approach fails twice, **stop and switch strategies**. Do not +retry a failing method with minor variations — this consumes context and +tool capacity in a futile loop. After two failures of the same approach: + +1. Reassess your assumptions about the problem. +2. Try a fundamentally different strategy (different tool, different + algorithm, different decomposition). +3. If no alternative is apparent, ask the user for guidance. + +This rule applies to tool usage, debugging approaches, search strategies, +and any repeated action that is not producing progress. + +### 9. Coverage Documentation Every analysis MUST include a coverage statement: diff --git a/taxonomies/specification-drift.md b/taxonomies/specification-drift.md index 6578ab9..0901501 100644 --- a/taxonomies/specification-drift.md +++ b/taxonomies/specification-drift.md @@ -23,6 +23,28 @@ Use these labels to classify findings when auditing requirements, design, and validation documents for consistency and completeness. Every finding MUST use exactly one label from this taxonomy. +## Label Group Summaries + +When only a subset of labels is applicable to a given audit type, use +these summaries for cross-reference context. The primary label group +(determined by the audit template) uses full definitions below; non-primary +groups use these summaries to preserve semantic context without consuming +prompt tokens. + +- **D1–D7 (Traceability)**: Document-level drift — untraced requirements, + untested requirements, orphaned design decisions, orphaned test cases, + assumption drift between documents, constraint violations in design, + and acceptance criteria mismatches between test plans and requirements. +- **D8–D10 (Code Compliance)**: Code-to-spec drift — unimplemented + requirements, undocumented behavior in source code, and constraint + violations in implementation. +- **D11–D13 (Test Compliance)**: Test-to-plan drift — unimplemented test + cases, untested acceptance criteria, and assertion mismatches between + test code and validation plans. +- **D14–D16 (Integration)**: Cross-component drift — unspecified + integration flows, interface contract mismatches between components, + and untested integration paths. + ## Labels ### D1_UNTRACED_REQUIREMENT From 1480561854cbc6cab8862b3ca2b9e9256a96ae2d Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Tue, 7 Apr 2026 11:43:19 -0700 Subject: [PATCH 2/2] Standardize 'Superseded by' placeholder naming Use consistent placeholder '[Decision Title]' in both the document structure template (line 31) and the structural rules (rule 3). Previously used '[new title]' in rule 3. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- formats/decision-log.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formats/decision-log.md b/formats/decision-log.md index 18ea405..c3f33b9 100644 --- a/formats/decision-log.md +++ b/formats/decision-log.md @@ -74,7 +74,7 @@ What follows from this decision? Include: 2. **Chronological order.** New decisions are appended at the end. 3. **Immutable once accepted.** Do not edit accepted decisions — instead, add a new decision that supersedes the old one and update the old - entry's Status to `Superseded by [new title]`. + entry's Status to `Superseded by [Decision Title]`. 4. **Options table is mandatory.** Even if the decision seems obvious, document at least one alternative considered (including "do nothing"). 5. **Consequences must include negatives.** Every decision has tradeoffs.