Skip to content

Commit 5646c2e

Browse files
kreneskypAgent IXclaude
authored
feat(archetype): add Feedback archetype for cockpit review threads (#7)
A transient review-thread artifact the filament-ide cockpit writes under ~/.ix and an agent reads to refine — the first-class home for what was previously an unspecified feedback format. - frontmatter schema: status (open/addressed/resolved), kind (comment/triage), optional decision (Fix/Dismiss/Defer), and an anchor with text-primary / block-fallback resolution (W3C-style quote+prefix/suffix, falling back to a structural requirementId/headingPath+blockIndex; reader orphans on total miss) - manifest artifact_type + feedback doc_kind; references/found_in links - ## Comment body (required), ## Resolution (optional); skeleton + example Worktree-only; not deployed to ~/.ix and no release. Module tests pass. Co-authored-by: Agent IX <agent@agent-ix.dev> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8a73cea commit 5646c2e

4 files changed

Lines changed: 197 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
id: FB-001
3+
title: "Bound the project root the main process may open"
4+
type: Feedback
5+
status: open
6+
kind: triage
7+
decision: Fix
8+
anchor:
9+
artifact: "spec/functional/FR-001-open-project-enumerate-artifacts.md"
10+
text:
11+
quote: "the system SHALL enumerate the Quoin artifacts beneath it"
12+
prefix: "When the user selects a local project root, "
13+
suffix: " — spec artifacts"
14+
block:
15+
requirementId: "FR-001"
16+
headingPath: ["FR-001", "Description"]
17+
blockIndex: 0
18+
relationships:
19+
- target: ix://agent-ix/filament-ide/FR-001
20+
type: references
21+
---
22+
# [FB-001] Bound the project root the main process may open
23+
24+
## Comment
25+
26+
Add a constraint that the main process rejects a project root that resolves —
27+
after symlink expansion — outside an allowed base directory, closing the
28+
path-traversal gap raised in the scope-boundary review. The enumeration itself is
29+
fine; the missing piece is bounding which roots may be opened in the first place.
30+
31+
## Resolution
32+
33+
Pending — to be filled when the FR is updated with the bounding constraint.

spec_artifacts_process/manifest.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ grammars:
5858
- test-matrix
5959
- standard
6060
- finding
61+
- feedback
6162
artifact_types:
6263
- name: ADR
6364
grammar_ref: process-artifacts
@@ -143,6 +144,23 @@ artifact_types:
143144
- references
144145
examples: []
145146
lint_rules_ref: []
147+
- name: Feedback
148+
grammar_ref: process-artifacts
149+
frontmatter_schema_ref: schemas/feedback-frontmatter.schema.json
150+
defaults:
151+
id_pattern: FB-{next:03d}
152+
allowed_links:
153+
- references
154+
- found_in
155+
examples: []
156+
lint_rules_ref: []
157+
body_extraction:
158+
yield_pattern:
159+
match:
160+
comment:
161+
from: section_body
162+
after_heading: Comment
163+
required: true
146164
- name: TestMatrix
147165
grammar_ref: process-artifacts
148166
frontmatter_schema_ref: schemas/testmatrix-frontmatter.schema.json
@@ -170,6 +188,7 @@ doc_kinds:
170188
- test-matrix
171189
- standard
172190
- finding
191+
- feedback
173192
object_types:
174193
- name: standard
175194
data_schema:
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"type": "object",
4+
"required": [
5+
"id",
6+
"title",
7+
"type",
8+
"status",
9+
"kind",
10+
"anchor"
11+
],
12+
"additionalProperties": true,
13+
"properties": {
14+
"id": {
15+
"type": "string",
16+
"pattern": "^[A-Z]{2,4}-[0-9]+$"
17+
},
18+
"title": {
19+
"type": "string",
20+
"minLength": 1
21+
},
22+
"type": {
23+
"const": "Feedback"
24+
},
25+
"status": {
26+
"description": "Human review-thread lifecycle. Anchor resolution (anchored/drifted/orphaned) is computed at load time and not stored here.",
27+
"enum": ["open", "addressed", "resolved"]
28+
},
29+
"kind": {
30+
"description": "A free-form passage comment, or a decision on a review finding.",
31+
"enum": ["comment", "triage"]
32+
},
33+
"decision": {
34+
"description": "Required meaning only when kind is 'triage'.",
35+
"enum": ["Fix", "Dismiss", "Defer"]
36+
},
37+
"anchor": {
38+
"description": "Where this feedback attaches. Resolution is text-primary, block-fallback: prefer the exact text selector; if the quote is gone, fall back to the structural block; if the block is gone, the app marks the thread orphaned (never silently re-points).",
39+
"type": "object",
40+
"required": ["artifact"],
41+
"additionalProperties": true,
42+
"properties": {
43+
"artifact": {
44+
"description": "The artifact this feedback is anchored in — a repo-relative path or an ix:// reference.",
45+
"type": "string",
46+
"minLength": 1
47+
},
48+
"text": {
49+
"description": "PRIMARY selector — the exact selected text plus a little surrounding context for disambiguation (W3C TextQuoteSelector style).",
50+
"type": "object",
51+
"required": ["quote"],
52+
"additionalProperties": true,
53+
"properties": {
54+
"quote": { "type": "string", "minLength": 1 },
55+
"prefix": { "type": "string" },
56+
"suffix": { "type": "string" }
57+
}
58+
},
59+
"block": {
60+
"description": "FALLBACK selector — a structural locator that survives prose rewrites. At least one of its fields should be present.",
61+
"type": "object",
62+
"additionalProperties": true,
63+
"properties": {
64+
"requirementId": {
65+
"description": "The owning requirement or acceptance-criterion id, e.g. FR-003 or FR-003-AC-2.",
66+
"type": "string"
67+
},
68+
"headingPath": {
69+
"description": "Ordered heading trail to the block, e.g. [\"FR-003\", \"Description\"].",
70+
"type": "array",
71+
"items": { "type": "string" }
72+
},
73+
"blockIndex": {
74+
"description": "Zero-based index of the block within its section.",
75+
"type": "integer",
76+
"minimum": 0
77+
}
78+
}
79+
}
80+
}
81+
},
82+
"object": {
83+
"type": "string"
84+
},
85+
"relationships": {
86+
"type": "array",
87+
"items": {
88+
"type": "object",
89+
"required": ["target", "type"],
90+
"additionalProperties": false,
91+
"properties": {
92+
"target": { "type": "string", "pattern": "^ix://" },
93+
"type": { "type": "string" },
94+
"cardinality": { "type": "string" }
95+
}
96+
}
97+
}
98+
}
99+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
id: FB-001
3+
title: "<short summary of the feedback>"
4+
type: Feedback
5+
status: open
6+
kind: comment
7+
anchor:
8+
artifact: "spec/functional/FR-003-validate-spec-in-renderer.md"
9+
text:
10+
quote: "<the exact selected text>"
11+
prefix: "<a few characters before the selection>"
12+
suffix: "<a few characters after the selection>"
13+
block:
14+
requirementId: "FR-003-AC-2"
15+
headingPath: ["FR-003", "Acceptance Criteria"]
16+
blockIndex: 0
17+
relationships:
18+
- target: ix://agent-ix/example/FR-003
19+
type: references
20+
---
21+
<!-- Feedback authoring skeleton (spec-artifacts-process). A transient review
22+
thread the cockpit writes under ~/.ix and an agent reads to refine.
23+
Contract (validated by `quire validate`):
24+
- Frontmatter: type: Feedback; id matches ^[A-Z]{2,4}-[0-9]+$ (e.g. FB-001);
25+
status ∈ open|addressed|resolved; kind ∈ comment|triage;
26+
decision ∈ Fix|Dismiss|Defer (meaningful only when kind: triage);
27+
anchor.artifact required.
28+
- Anchor resolution is text-primary, block-fallback: prefer anchor.text.quote
29+
(with prefix/suffix for disambiguation); if the quote is gone, fall back to
30+
anchor.block (requirementId / headingPath+blockIndex); if the block is gone
31+
too, the reader marks the thread orphaned — it never silently re-points.
32+
- REQUIRED body (level 2): ## Comment — the reviewer's comment, or for a triage
33+
decision the "how to fix" guidance.
34+
- OPTIONAL body (level 2): ## Resolution — what changed, or why dismissed/deferred.
35+
- relationships: a `references` edge to the requirement/finding this targets. -->
36+
# [FB-001] <short summary of the feedback>
37+
38+
## Comment
39+
40+
<The reviewer's comment. For a triage decision (kind: triage) this is the
41+
"how to fix" guidance that tells the agent exactly what to do.>
42+
43+
## Resolution
44+
45+
<Optional — filled when the thread is addressed or resolved: what changed in the
46+
artifact, or why the finding was dismissed or deferred.>

0 commit comments

Comments
 (0)