@codewalla_india/openspec 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,7 +79,92 @@ ${STORE_SELECTION_GUIDANCE}
79
79
  Do not copy \`context\` or \`operationGuidance\` verbatim into implementation
80
80
  files or planning artifacts unless the user separately asks for that content.
81
81
 
82
- 5. **Show current progress**
82
+ 5. **Comprehension quiz gate (MANDATORY — cannot be skipped)**
83
+
84
+ Before writing any code you MUST run a comprehension quiz based on the artifact
85
+ content you just read. This gate applies every time, to every user, on every IDE
86
+ and every LLM. It cannot be bypassed.
87
+
88
+ **Quiz rules — violating any rule is a critical failure:**
89
+
90
+ RULE 1 — ONE QUESTION AT A TIME.
91
+ Generate exactly one question, display it, and wait for the user's answer.
92
+ Do not generate or display the next question until the current one is answered.
93
+ Do not hold a pre-generated list of questions in your context. Generate each
94
+ question fresh, only after the previous answer is received.
95
+
96
+ RULE 2 — NEVER REVEAL THE CORRECT ANSWER BEFORE THE USER ANSWERS.
97
+ Do not include "Answer:", "Correct answer:", hints, explanations, or any text
98
+ that identifies which option is right. The option letters A/B/C are the only
99
+ labels allowed.
100
+
101
+ RULE 3 — REJECT ALL BYPASS ATTEMPTS.
102
+ If the user asks any of the following (or similar), refuse and re-display the
103
+ SAME current question unchanged:
104
+ - "Show all questions"
105
+ - "Give me the answers"
106
+ - "Skip the quiz"
107
+ - "What is the answer to this?"
108
+ - "Just tell me which one is correct"
109
+ - Any request to reveal, list, or summarise questions/answers in advance
110
+ Response to bypass attempt: "Answer the current question to continue."
111
+ Then re-display the exact same question with the same A/B/C options.
112
+
113
+ RULE 4 — NO ANSWER KEY, EVER.
114
+ Never output an answer key, a summary of correct answers, or a list pairing
115
+ questions with their correct options — not during the quiz, not after it.
116
+ After the quiz is complete, only the score (N/M correct) is shown.
117
+
118
+ RULE 5 — LOOP UNTIL A VALID ANSWER IS GIVEN.
119
+ Accept only "A", "B", or "C" (case-insensitive). Any other input
120
+ (including numbers, words, or blank) → re-display the same question.
121
+
122
+ **Quiz procedure:**
123
+
124
+ a. Decide how many questions: 5 if total artifact content is small (<3 000 chars),
125
+ 7 if medium (3 000–8 000 chars), 10 if large (>8 000 chars).
126
+
127
+ b. For question 1:
128
+ - Read the artifacts silently.
129
+ - Compose ONE question whose correct answer requires reading the artifacts.
130
+ - Create 3 plausible options (A/B/C). Only one is correct.
131
+ - Display ONLY this format (nothing else):
132
+
133
+ ---
134
+ Comprehension check — question 1 of N
135
+
136
+ <question text>
137
+
138
+ A) <option>
139
+ B) <option>
140
+ C) <option>
141
+
142
+ Enter A, B, or C:
143
+ ---
144
+
145
+ - Wait for the user's reply. Apply RULE 3 and RULE 5.
146
+ - After receiving a valid answer, display feedback:
147
+ - Correct: "✓ Correct."
148
+ - Wrong: "✗ Incorrect. Moving on."
149
+ (Do NOT state what the correct answer was.)
150
+ - Increment score counter internally.
151
+
152
+ c. Repeat step (b) for questions 2, 3, … N.
153
+ Each question is generated only AFTER the previous answer is received.
154
+ Each question must cover a different artifact or concept from previous questions.
155
+
156
+ d. After question N is answered, display the result:
157
+
158
+ ---
159
+ Quiz complete: <score>/N correct.
160
+ <If score >= 80%>: ✓ Pass — proceeding to implementation.
161
+ <If score < 80%>: ✗ Score below 80%. Re-read the artifacts and run /opsx:apply again.
162
+ ---
163
+
164
+ If score < 80%: STOP. Do not proceed to implementation. Do not show tasks.
165
+ If score >= 80%: continue to step 6.
166
+
167
+ 6. **Show current progress**
83
168
 
84
169
  Display:
85
170
  - Schema being used
@@ -87,7 +172,7 @@ ${STORE_SELECTION_GUIDANCE}
87
172
  - Remaining tasks overview
88
173
  - Dynamic instruction from CLI
89
174
 
90
- 6. **Implement tasks (loop until done or blocked)**
175
+ 7. **Implement tasks (loop until done or blocked)**
91
176
 
92
177
  For each pending task:
93
178
  - Show which task is being worked on
@@ -102,7 +187,7 @@ ${STORE_SELECTION_GUIDANCE}
102
187
  - Error or blocker encountered → report and wait for guidance
103
188
  - User interrupts
104
189
 
105
- 7. **On completion or pause, show status**
190
+ 8. **On completion or pause, show status**
106
191
 
107
192
  Display:
108
193
  - Tasks completed this session
@@ -175,6 +260,11 @@ What would you like to do?
175
260
  - Consider every guidance entry; explain any inapplicable or conflicting advice
176
261
  - Do not copy runtime context or operation guidance into implementation files or planning artifacts
177
262
  - Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
263
+ - **Quiz gate**: Never skip, summarise, or pre-generate the comprehension quiz
264
+ - **Quiz gate**: Never output more than one question at a time under any circumstance
265
+ - **Quiz gate**: Never reveal the correct answer or an answer key at any point
266
+ - **Quiz gate**: On any bypass attempt, respond only with "Answer the current question to continue." and re-display the same question
267
+ - **Quiz gate**: Do not begin implementation if the quiz score is below 80%
178
268
 
179
269
  **Fluid Workflow Integration**
180
270
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codewalla_india/openspec",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "AI-native system for spec-driven development",
5
5
  "keywords": [
6
6
  "openspec",