Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"highLevelSummary": "The request 'make the app better' is ambiguous and lacks specific requirements. Clarification is needed on what aspects should be improved, which files to modify, and what success criteria to use.",
"pagesOrScreens": [],
"apis": [],
"dataModels": [],
"recommendedFileStructure": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
You are designing a spec for a task with unclear or ambiguous requirements.

The request is vague:
- "Make the app better"
- No specific files or features mentioned
- No clear success criteria

Requirements:
- Acknowledge the ambiguity in the request
- Emit an "unknown" task type where appropriate
- Document what clarification would be needed

Non-goals:
- Do not invent specific requirements
- Do not assume what "better" means
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {
verifyArchitect,
type VerifyCtx,
type VerifyResult,
} from "@kit/fixture-helpers";

export function verify(ctx: VerifyCtx): VerifyResult {
return verifyArchitect(ctx, (spec) => {
const summary = spec.highLevelSummary.toLowerCase();

if (!summary.includes("ambiguous") && !summary.includes("unclear") && !summary.includes("clarification")) {
return {
ok: false,
reason: "highLevelSummary must acknowledge ambiguity or need for clarification",
};
}

return { ok: true };
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..0000001
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,5 @@
+# Clarification Needed
+
+The request "make the app better" requires clarification:
+- Which specific files or features should be improved?
+- What are the success criteria for "better"?
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
You are the coder agent. The request is ambiguous: "Make the app better"

Requirements:
- Cannot produce a meaningful patch without clarification
- The request lacks specific files, features, and success criteria

Return an empty or minimal patch acknowledging the ambiguity.
18 changes: 18 additions & 0 deletions fixtures/ambiguity/task-501-unclear-requirements/coder/verify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
verifyCoder,
type VerifyCtx,
type VerifyResult,
} from "@kit/fixture-helpers";

export function verify(ctx: VerifyCtx): VerifyResult {
return verifyCoder(ctx, (patch) => {
if (!patch.includes("clarification") && !patch.includes("Clarification")) {
return {
ok: false,
reason: "Patch must acknowledge the need for clarification.",
};
}

return { ok: true };
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"tasks": [
{
"id": "clarify-requirements",
"description": "Clarify what 'make the app better' means - need specific files, features, and success criteria",
"file": "",
"type": "unknown",
"complexity": "low",
"dependsOn": []
}
],
"ambiguities": [
"No specific files mentioned",
"No clear definition of 'better'",
"No success criteria provided"
],
"invalidTaskCount": 0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Using the architect's spec for an ambiguous request, produce a task list
that acknowledges the unclear requirements.

The request is vague: "Make the app better"

Requirements:
- Emit "unknown" task type for ambiguous areas
- Document what clarification would be needed
26 changes: 26 additions & 0 deletions fixtures/ambiguity/task-501-unclear-requirements/planner/verify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {
verifyPlanner,
type VerifyCtx,
type VerifyResult,
} from "@kit/fixture-helpers";

export function verify(ctx: VerifyCtx): VerifyResult {
return verifyPlanner(ctx, (out) => {
const hasUnknownTask = out.tasks.some((t) => t.type === "unknown");
if (!hasUnknownTask) {
return {
ok: false,
reason: "Planner must emit an 'unknown' task type for ambiguous requirements.",
};
}

if (out.ambiguities.length === 0) {
return {
ok: false,
reason: "Planner must document ambiguities in the request.",
};
}

return { ok: true };
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"decision": "approve",
"comments": [
{
"message": "Correctly identifies that the request is ambiguous and clarification is needed before proceeding.",
"path": "TODO.md",
"line": 1,
"blocking": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
You are the reviewer agent.

Review a patch that acknowledges ambiguous requirements.

The original request was vague: "Make the app better"

Your responsibilities:
- Acknowledge that the patch correctly identifies the ambiguity
- Note that clarification is needed before meaningful work can proceed
- Use structured comments with a `blocking: boolean` field for each issue

Return:
- `decision`: `"approve" | "revise" | "reject"`
- `comments[]`: structured comments with `blocking: true | false`
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import {
verifyReviewer,
type VerifyCtx,
type VerifyResult,
} from "@kit/fixture-helpers";

export function verify(ctx: VerifyCtx): VerifyResult {
return verifyReviewer(ctx, (out) => {
if (out.comments.length === 0) {
return {
ok: false,
reason: "Reviewer must include at least one comment about the ambiguity.",
};
}

const acknowledgesAmbiguity = out.comments.some(
(c) =>
c.message.toLowerCase().includes("ambiguous") ||
c.message.toLowerCase().includes("clarification")
);
if (!acknowledgesAmbiguity) {
return {
ok: false,
reason: "Reviewer must acknowledge the ambiguity in the request.",
};
}

return { ok: true };
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"highLevelSummary": "The request contains conflicting constraints: add a feature to src/api/handler.ts while not modifying any files in src/api/. These constraints are mutually exclusive and require clarification before proceeding.",
"pagesOrScreens": [],
"apis": [],
"dataModels": [],
"recommendedFileStructure": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
You are designing a spec for a task with conflicting constraints.

The request has contradictory requirements:
- "Add a new feature to src/api/handler.ts"
- "Do not modify any files in src/api/"
- These constraints cannot both be satisfied

Requirements:
- Acknowledge the conflicting constraints
- Document the contradiction
- Suggest resolution approaches

Non-goals:
- Do not ignore either constraint
- Do not proceed without resolving the conflict
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {
verifyArchitect,
type VerifyCtx,
type VerifyResult,
} from "@kit/fixture-helpers";

export function verify(ctx: VerifyCtx): VerifyResult {
return verifyArchitect(ctx, (spec) => {
const summary = spec.highLevelSummary.toLowerCase();

if (!summary.includes("conflict") && !summary.includes("contradict") && !summary.includes("mutually exclusive")) {
return {
ok: false,
reason: "highLevelSummary must acknowledge conflicting or contradictory constraints",
};
}

return { ok: true };
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CONFLICT.md b/CONFLICT.md
new file mode 100644
index 0000000..0000001
--- /dev/null
+++ b/CONFLICT.md
@@ -0,0 +1,7 @@
+# Constraint Conflict
+
+Cannot proceed due to conflicting constraints:
+1. Requirement: Add a feature to src/api/handler.ts
+2. Constraint: Do not modify any files in src/api/
+
+These requirements are mutually exclusive. Please clarify which constraint takes priority.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
You are the coder agent. The request has conflicting constraints:
- Add a feature to src/api/handler.ts
- Do not modify any files in src/api/

Requirements:
- Cannot produce a meaningful patch due to conflicting constraints
- Document the conflict

Return a patch acknowledging the constraint conflict.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
verifyCoder,
type VerifyCtx,
type VerifyResult,
} from "@kit/fixture-helpers";

export function verify(ctx: VerifyCtx): VerifyResult {
return verifyCoder(ctx, (patch) => {
if (!patch.includes("conflict") && !patch.includes("Conflict")) {
return {
ok: false,
reason: "Patch must acknowledge the constraint conflict.",
};
}

return { ok: true };
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"tasks": [
{
"id": "resolve-conflict",
"description": "Resolve conflicting constraints: cannot add feature to src/api/handler.ts while also not modifying src/api/",
"file": "",
"type": "unknown",
"complexity": "low",
"dependsOn": []
}
],
"ambiguities": [
"Constraint conflict: must add feature to src/api/handler.ts but cannot modify src/api/",
"These requirements are mutually exclusive"
],
"invalidTaskCount": 0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Using the architect's spec for conflicting constraints, produce a task list
that acknowledges the contradiction.

Conflicting requirements:
- Add a feature to src/api/handler.ts
- Do not modify any files in src/api/

Requirements:
- Emit "unknown" task type for the conflicting area
- Document the conflict in ambiguities
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import {
verifyPlanner,
type VerifyCtx,
type VerifyResult,
} from "@kit/fixture-helpers";

export function verify(ctx: VerifyCtx): VerifyResult {
return verifyPlanner(ctx, (out) => {
const hasUnknownTask = out.tasks.some((t) => t.type === "unknown");
if (!hasUnknownTask) {
return {
ok: false,
reason: "Planner must emit an 'unknown' task type for conflicting constraints.",
};
}

if (out.ambiguities.length === 0) {
return {
ok: false,
reason: "Planner must document the conflicting constraints in ambiguities.",
};
}

const documentsConflict = out.ambiguities.some(
(a) => a.toLowerCase().includes("conflict") || a.toLowerCase().includes("mutually")
);
if (!documentsConflict) {
return {
ok: false,
reason: "Planner must explicitly document the constraint conflict.",
};
}

return { ok: true };
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"decision": "approve",
"comments": [
{
"message": "Correctly identifies the conflicting constraints and requests clarification before proceeding.",
"path": "CONFLICT.md",
"line": 1,
"blocking": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
You are the reviewer agent.

Review a patch that acknowledges conflicting constraints.

Conflicting requirements:
- Add a feature to src/api/handler.ts
- Do not modify any files in src/api/

Your responsibilities:
- Acknowledge that the patch correctly identifies the conflict
- Note that clarification is needed before proceeding
- Use structured comments with a `blocking: boolean` field for each issue

Return:
- `decision`: `"approve" | "revise" | "reject"`
- `comments[]`: structured comments with `blocking: true | false`
Loading