Skip to content

Commit 8363a14

Browse files
Alan-JowettAlan JowettCopilot
authored
fix: address high + medium priority audit findings from #234 (#237)
* fix: address high + medium priority audit findings from #234 High priority: - P3-001: Compress self-verification Rule 2 — replace restated content with cross-reference to anti-hallucination Rules 1-4 (~7,400 token savings) - P4-001: Decompose review-code abstraction check into 3 observable checks Medium — guardrail determinism (74x blast radius): - P4-005/P4-006: Replace 'reasonable conclusion' with 'stated chain of logical steps'; anchor 'low confidence' to ASSUMED premise count - P4-008: Operationalize 'structurally similar' as same headings, same item count (+-20%), same classification labels - P3-002/P1-001: Deduplicate 4-field coverage statement — self-verification Rule 3 now cross-references operational-constraints Rule 9 (~1,140 token savings) - P4-002/P4-003: Replace subjective maintainability checks with 4 readability indicators and 4 design violation checks Medium — structural: - P1-002: Update adversarial-falsification applicable_to to match actual template consumers - P1-003: Document 4 orphan protocols as user-composable with intended use cases - P1-004: Merge plan-implementation and plan-refactoring into single template with mode parameter Closes #234 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address PR review feedback on audit findings - self-verification: add epistemic label as explicit remediation option in Citation Audit (not just citation or removal) - applicable_to: revert 'composable' sentinel to '[]' per CONTRIBUTING.md convention (definition-of-done, input-clarity-gate, tool-reliability-defense, fixed-point-verification) - review-code: replace non-observable maintainability checks ('10-second scan', '3 unrelated concepts') with concrete, checkable criteria - plan-implementation: add explicit mode validation (only 'implementation' or 'refactoring'; default to 'implementation'), update input_contract type to include source-code for refactoring mode - docs: update CATALOG.md, README.md, getting-started.md to reference plan-implementation with mode=refactoring instead of deleted plan-refactoring template Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: align epistemic tag [ASSUMED] to canonical [ASSUMPTION] The anti-hallucination protocol uses [ASSUMPTION] as the inline tag for the ASSUMED category. Using [ASSUMED] here conflicted with the canonical tag set and introduced inconsistency within the same sentence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Alan Jowett <alan.jowett@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3cd5572 commit 8363a14

14 files changed

Lines changed: 226 additions & 242 deletions

CATALOG.md

Lines changed: 10 additions & 11 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,11 @@ personas, analysis protocols, and task templates.
569569
| `discover-tests-for-changes` | Find relevant tests for local code changes |
570570
| `scaffold-test-project` | Scaffold test project with build and runner setup |
571571

572-
**Planning** (2 templates):
572+
**Planning** (1 template):
573573

574574
| Name | Description |
575575
|------|-------------|
576-
| `plan-implementation` | Implementation task breakdown with dependencies |
577-
| `plan-refactoring` | Safe, incremental refactoring plan |
576+
| `plan-implementation` | Implementation task breakdown with dependencies. Use `mode=refactoring` for safe, incremental refactoring plans. |
578577

579578
**Agent Authoring** (1 template):
580579

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ For the full composition model and assembly internals, see the
9393
| Write requirements | `author-requirements-doc` | software-architect |
9494
| Design a system | `author-design-doc` | software-architect |
9595
| Plan implementation | `plan-implementation` | software-architect |
96-
| Plan a refactoring | `plan-refactoring` | software-architect |
96+
| Plan a refactoring | `plan-implementation` (mode=refactoring) | software-architect |
9797
| Create a test plan | `author-validation-plan` | software-architect |
9898
| Audit for security | `investigate-security` | security-auditor |
9999
| Set up CI/CD | `author-pipeline` | devops-engineer |

manifest.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,16 +1522,9 @@ templates:
15221522
path: templates/plan-implementation.md
15231523
description: >
15241524
Decompose a project into an actionable implementation plan
1525-
with tasks, dependencies, and risk assessment.
1526-
persona: software-architect
1527-
protocols: [anti-hallucination, self-verification]
1528-
format: implementation-plan
1529-
1530-
- name: plan-refactoring
1531-
path: templates/plan-refactoring.md
1532-
description: >
1533-
Plan a safe, incremental refactoring with step-by-step
1534-
changes that maintain correctness at each step.
1525+
with tasks, dependencies, and risk assessment. Supports two
1526+
modes: "implementation" (new feature/project) and "refactoring"
1527+
(safe, incremental transformation of existing code).
15351528
persona: software-architect
15361529
protocols: [anti-hallucination, self-verification]
15371530
format: implementation-plan

protocols/guardrails/adversarial-falsification.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ description: >
99
Requires the reviewer to attempt to disprove every candidate finding before
1010
reporting it, reject known-safe patterns, and resist premature summarization.
1111
applicable_to:
12-
- review-code
13-
- investigate-bug
14-
- investigate-security
1512
- exhaustive-bug-hunt
13+
- engineering-workflow
14+
- maintenance-workflow
15+
- spec-extraction-workflow
16+
- audit-spec-alignment
17+
- audit-implementation-alignment
1618
---
1719

1820
# Protocol: Adversarial Falsification

protocols/guardrails/anti-hallucination.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ fabrication and enforce intellectual honesty.
2323
Every claim in your output MUST be categorized as one of:
2424

2525
- **KNOWN**: Directly stated in or derivable from the provided context.
26-
- **INFERRED**: A reasonable conclusion drawn from the context, with the
27-
reasoning chain made explicit.
26+
- **INFERRED**: A conclusion derived through a stated chain of logical steps
27+
from the context, with the reasoning chain made explicit.
2828
- **ASSUMED**: Not established by context. The assumption MUST be flagged
2929
with `[ASSUMPTION]` and a justification for why it is reasonable.
3030

@@ -45,8 +45,9 @@ additional context instead of proceeding.
4545

4646
- When multiple interpretations of a requirement or behavior are possible,
4747
enumerate them explicitly rather than choosing one silently.
48-
- When confidence in a conclusion is low, state: "Low confidence — this conclusion
49-
depends on [specific assumption]. Verify by [specific action]."
48+
- When a conclusion depends on 2 or more ASSUMED premises (per Rule 1), flag it
49+
explicitly: "Low confidence — this conclusion depends on [N] assumptions:
50+
[list each]. Verify by [specific action]."
5051

5152
### 4. Source Attribution
5253

protocols/guardrails/definition-of-done.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ description: >
1010
by requiring verification of functionality, tests, diagnostics, build
1111
health, regression safety, and plan alignment.
1212
applicable_to: []
13+
# User-composed protocol — not auto-included by any template.
14+
# Intended for: implementation planning, engineering workflows,
15+
# and any task where explicit completion criteria prevent premature
16+
# "done" declarations.
1317
---
1418

1519
# Protocol: Definition of Done

protocols/guardrails/input-clarity-gate.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ description: >
1111
natural language input and generates targeted clarifying questions
1212
instead of findings.
1313
applicable_to: []
14+
# User-composed protocol — not auto-included by any template.
15+
# Intended for: interactive templates and workflows where user-
16+
# provided natural language input must be validated for clarity
17+
# before task execution begins.
1418
---
1519

1620
# Protocol: Input Clarity Gate

protocols/guardrails/self-verification.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,13 @@ presenting it as final. Treat it as a pre-submission checklist.
3939

4040
### 2. Citation Audit
4141

42-
Every factual claim must use the epistemic categories defined in the
43-
`anti-hallucination` protocol (KNOWN / INFERRED / ASSUMED).
44-
45-
- Every factual claim in the output MUST be traceable to:
46-
- A specific location in the provided code or context, OR
47-
- An explicit `[ASSUMPTION]` or `[INFERRED]` label.
48-
- Scan the output for claims that lack citations. For each:
49-
- Add the citation if the source is identifiable.
50-
- Label as `[ASSUMPTION]` if not grounded in provided context.
51-
- Remove the claim if it cannot be supported or labeled.
52-
- **Zero uncited factual claims** is the target.
42+
Apply the epistemic labeling rules from the `anti-hallucination` protocol
43+
(Rules 1–4: KNOWN/INFERRED/ASSUMED classification, refusal to fabricate,
44+
uncertainty disclosure, source attribution). Scan the output for factual
45+
claims that lack epistemic labels or source citations, and remediate each:
46+
add the appropriate epistemic label (`[KNOWN]`, `[INFERRED]`, or
47+
`[ASSUMPTION]`), add the citation, or remove the claim. **Zero uncited factual
48+
claims** is the target.
5349

5450
### 3. Coverage Confirmation
5551

@@ -59,11 +55,9 @@ Every factual claim must use the epistemic categories defined in the
5955
but not covered in the output?
6056
- If any areas were intentionally excluded, document why in a
6157
"Limitations" or "Coverage" section.
62-
- State explicitly:
63-
- "**Examined**: [what was analyzed — directories, files, patterns]."
64-
- "**Method**: [how items were found — search queries, commands, scripts]."
65-
- "**Excluded**: [what was intentionally not examined, and why]."
66-
- "**Limitations**: [what could not be examined due to access, time, or context]."
58+
- Include the 4-field coverage statement defined in the
59+
`operational-constraints` protocol (Rule 9: Examined, Method,
60+
Excluded, Limitations).
6761

6862
### 4. Internal Consistency Check
6963

@@ -95,7 +89,9 @@ other directive text intended for LLM consumption, scan for language
9589
that introduces non-deterministic interpretation:
9690

9791
- [ ] Are all instructions specific enough that two different LLMs
98-
would produce structurally similar output?
92+
would produce output with the same section headings, the same
93+
number of items per section (±20%), and the same classification
94+
labels?
9995
- [ ] Are quantifiers concrete (specific counts or ranges, not
10096
"some" or "several")?
10197
- [ ] Are evaluation criteria observable (not subjective adjectives

protocols/guardrails/tool-reliability-defense.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ description: >
1010
confirmation. Addresses known failure modes in AI coding tools
1111
including edit corruption, rendering artifacts, and encoding errors.
1212
applicable_to: []
13+
# User-composed protocol — not auto-included by any template.
14+
# Intended for: agentic workflows and agent instruction authoring
15+
# where tool outputs (file edits, shell commands, search results)
16+
# must be independently verified before proceeding.
1317
---
1418

1519
# Protocol: Tool Reliability Defense

0 commit comments

Comments
 (0)