You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/comment-system.md
+35-43Lines changed: 35 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,26 +5,27 @@ Audience: Beginners implementing CRAFT in repos
5
5
6
6
Note: This guide summarizes and operationalizes the official CRAFT Framework Specification’s comment system. When in doubt, the Spec is the source of truth.
7
7
8
-
1)What it is (and how to think about it)
8
+
What it is (and how to think about it)
9
9
10
-
The CRAFT Comment System is a lightweight markup you and the AI both use inside chats and project files to make instructions explicit, routable, and auditable. You write comments that start with #H->AI::... (human to AI), and the AI must respond with #AI->H::... in the most specific response type available. Think of it like structured headers for a conversation, not code.
10
+
The CRAFT Comment System is a lightweight markup you and the AI both use inside chats and project files to make instructions explicit, routable, and auditable.
11
+
You write comments that start with #H->AI::… (human → AI), and the AI must respond with #AI->H::… using the most specific response type available. Think of it like structured headers for a conversation, not code.
11
12
12
-
2)Why it’s useful
13
+
Why it’s useful
13
14
14
15
Eliminates ambiguity: Every instruction carries a clear intent (Directive, Context, Constraint, etc.).
15
16
16
17
Forces acknowledgments: The AI must acknowledge and act on each human comment type.
17
18
18
-
Enables QA: You can audit “who said what and why” across sessions and files.
19
+
Enables QA: You can audit who said what and why across sessions and files.
19
20
20
21
Pairs with persistence & handoff: Works with the four-file model so sessions stay aligned.
21
22
22
-
3)The two directions (syntax you’ll actually use)
23
+
The two directions (syntax you’ll actually use)
23
24
Human → AI (you write these)
24
25
25
26
Prefix your instruction with #H->AI::Type: and put your content in parentheses.
26
27
27
-
Common types you’ll use most:
28
+
Common types
28
29
29
30
#H->AI::Directive: (Do X now…)
30
31
@@ -54,13 +55,13 @@ AI → Human (the assistant must use these)
#AI->H::SecurityWarning: (Security block on recipes)
60
61
61
62
#AI->H::COM::Status: (Operations Manager tracking — must appear once per response)
62
63
63
-
4)Quick Start (60‑second setup)
64
+
Quick Start (60-second setup)
64
65
65
66
Copy this starter block into the top of any instruction you give the AI:
66
67
@@ -69,39 +70,41 @@ Copy this starter block into the top of any instruction you give the AI:
69
70
#H->AI::Structure: (Use headings + bullets, include one #AI->H::COM::Status at end)
70
71
71
72
73
+
Then:
74
+
72
75
Write your actual instruction using the types above.
73
76
74
-
Expect an acknowledgment (#AI->H::Note: or more specific) before content.
77
+
Expect an acknowledgment (#AI->H::Note: or a more specific response) before content.
75
78
76
79
Look for COM tracking at the bottom of every response:
77
80
#AI->H::COM::Status: (…status text…)
78
81
79
-
5)Must‑follow companion rules (you’ll see these in the Spec)
82
+
Must-follow companion rules (you’ll see these in the Spec)
80
83
81
84
Clarifying questions protocol:
82
-
Start every task with either “No questions. Ready.” or explicit #AI->H::RequiredQuestion: / #AI->H::OptionalQuestion:. This reduces back‑and‑forth and keeps scope tight.
85
+
Start every task with either “No questions. Ready.” or explicit #AI->H::RequiredQuestion: / #AI->H::OptionalQuestion:. This reduces back-and-forth and keeps scope tight.
83
86
84
87
Code inclusion rule:
85
-
If code is to be included in a response, the AI should first ask:
88
+
If code will be included, the AI should first ask:
86
89
#AI->H::Question: (I will be including code in my response. Should I proceed?)
87
90
If execution is simulated, the AI must prefix with “SIMULATION:”.
88
91
89
92
Content labeling:
90
93
Require the AI to mark speculative vs. factual content with:
91
94
92
-
#AI->H::SuggestedContent:(…) for speculative;
95
+
#AI->H::SuggestedContent:(…) for speculative
93
96
94
-
#AI->H::BestGuess::ConfidenceLevel:XX%:(…) for estimates;
97
+
#AI->H::BestGuess::ConfidenceLevel:XX%:(…) for estimates
95
98
96
99
Factual claims must include citations.
97
100
98
101
Citations:
99
-
Use APA-style references to CRAFT files in prose and include inline citation markers when referencing specific sections of the Spec (this doc includes those).
102
+
Use APA-style references to CRAFT files in prose and include inline citation markers when referencing specific sections of the Spec.
100
103
101
-
Recipe security (only for recipes):
102
-
If a recipe URL doesn’t match the allowed domain, the AI must block execution with #AI->H::SecurityWarning:. General web access is still allowed; this check is recipe‑specific.
104
+
Recipe security (recipes only):
105
+
If a recipe URL doesn’t match the allowed domain, the AI must block execution with #AI->H::SecurityWarning:. (General web access is still allowed; this check is recipe-specific.)
10)Minimal “starter prompt” (paste into new tasks)
198
+
Minimal “starter prompt” (paste into new tasks)
201
199
#H->AI::Directive: (Complete the requested task)
202
200
#H->AI::Context: (Use CRAFT comment system & COM tracking)
203
201
#H->AI::Constraint: (Be concise; cite any factual claims from the Spec)
204
202
#H->AI::Structure: (Headings + bullets; include one final #AI->H::COM::Status)
205
203
206
-
11)FAQ (fast answers)
204
+
FAQ (fast answers)
207
205
208
206
Do I always need COM tracking?
209
207
Yes—include one #AI->H::COM::Status: per AI response after initialization.
@@ -212,14 +210,8 @@ When should the AI ask questions vs. proceed?
212
210
Begin with either “No questions. Ready.” or use RequiredQuestion/OptionalQuestion to clarify.
213
211
214
212
Can I mix speculative and factual content?
215
-
Yes, but label speculative (#AI->H::SuggestedContent:) and estimates with confidence; cite factual claims.
216
-
217
-
12) License & source‑of‑truth
218
-
219
-
This project uses the Business Source License 1.1 (BSL 1.1) as attached with the four CRAFT files; non‑commercial use is allowed, commercial use requires a license; converts to Apache 2.0 on the date specified in the files. See the license header in the Spec for exact terms and conversion date.
220
-
221
-
13) References
213
+
Yes, but label speculative with #AI->H::SuggestedContent: and estimates with confidence; cite factual claims.
Copy this entire document into ./docs/comment-system.md in your repository.
217
+
This project uses the Business Source License 1.1 (BSL 1.1) as attached with the four CRAFT files; non-commercial use is allowed, commercial use requires a license; converts to Apache 2.0 on the date specified in the files. See the license header in the Spec for exact terms and conversion date.
0 commit comments