this-is-enough 0.1.1 → 0.1.3

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.
package/AGENTS.md CHANGED
@@ -90,15 +90,15 @@ Run once when adopting this workflow in a new repository.
90
90
  - `reqs/INTERRUPT.md` must not exist at bootstrap completion
91
91
 
92
92
  4) First requirement starts only after bootstrap
93
- - create `REQ-*` through lifecycle section `A) Create New Requirement`
94
- - confirm via section `B) Confirm Requirement` (`full` or `mini` mode)
93
+ - create `REQ-*` through lifecycle section `A) Create New Requirement` (after first feedback gate)
94
+ - confirm via section `B) Confirm Requirement` (after codebase-informed second feedback gate, then `full` or `mini` mode)
95
95
 
96
96
  ---
97
97
 
98
98
  ## Status Model (Requirement-Level)
99
99
 
100
100
  Allowed statuses:
101
- - `DRAFT`: requirement exists and is being drafted (lock is active)
101
+ - `DRAFT`: requirement exists and is being drafted through layered feedback/specification (lock is active)
102
102
  - `ACTIVE`: confirmed and currently being executed (lock is active)
103
103
  - `PAUSED`: intentionally stopped to work on another requirement (lock not held)
104
104
  - `BLOCKED`: cannot progress due to external dependency (lock not held)
@@ -149,6 +149,9 @@ Definitions:
149
149
  - else announce no active requirement and that new creation is allowed
150
150
 
151
151
  5) Requirement confirmation rule
152
+ - Before roadmap creation, two feedback gates are mandatory:
153
+ - Gate 1 (alignment): summarize user request and receive explicit confirmation that understanding is correct
154
+ - Gate 2 (specification): after codebase exploration and requirement concretization, receive explicit confirmation again
152
155
  - Requirement is confirmed by one of:
153
156
  - Full mode: `ROADMAP.md` exists.
154
157
  - Mini mode: `REQUEST.md` contains a `Mini Roadmap` section and all criteria below are `yes/no`-exactly satisfied:
@@ -205,6 +208,12 @@ Architecture-impacting change criteria (MUST):
205
208
  - `reqs/INBOX.md` is for independent/external requests.
206
209
  - Do not mix them.
207
210
 
211
+ 10) Commit cadence rule
212
+ - Use phase cadence as default (not requirement-end only).
213
+ - Minimum: create at least one commit when completing each phase before marking that phase `DONE`.
214
+ - During phase execution, create checkpoint commits at meaningful progress boundaries (e.g., completed ordered tasks or stable validation checkpoints).
215
+ - Before pause/switch/interrupt transitions, make a checkpoint commit for resumability. If impossible, record reason explicitly in `VALIDATION_LOG.md`.
216
+
208
217
  ---
209
218
 
210
219
  ## Session Start Checklist (MUST)
@@ -266,30 +275,36 @@ Precondition:
266
275
  - `reqs/ACTIVE.md` does not exist
267
276
 
268
277
  Steps:
269
- 1. create `reqs/REQ-XXXX-<slug>/`
270
- 2. create `REQUEST.md`
271
- 3. create `STATUS.md` with status `DRAFT`
272
- 4. create `reqs/ACTIVE.md` pointing to this requirement with status `DRAFT`
273
- 5. if sourced from `reqs/INBOX.md`, update that item status to `promoted`
278
+ 1. summarize the incoming requirement in plain language and list assumptions/open points
279
+ 2. request user feedback and obtain explicit alignment confirmation (Gate 1)
280
+ 3. if alignment is rejected, revise summary and repeat steps 1-2
281
+ 4. create `reqs/REQ-XXXX-<slug>/`
282
+ 5. create `REQUEST.md` with aligned scope baseline from Gate 1
283
+ 6. create `STATUS.md` with status `DRAFT`
284
+ 7. create `reqs/ACTIVE.md` pointing to this requirement with status `DRAFT`
285
+ 8. if sourced from `reqs/INBOX.md`, update that item status to `promoted`
274
286
 
275
287
  ### B) Confirm Requirement (`DRAFT` -> `ACTIVE`)
276
288
  Trigger:
277
- - one of:
278
- - Full mode: `ROADMAP.md` created in active requirement
279
- - Mini mode: `REQUEST.md` includes `Mini Roadmap` and meets all Mini criteria
289
+ - active requirement is in `DRAFT` after Gate 1 alignment
280
290
 
281
291
  Steps:
282
- 1. choose confirmation mode (`full` or `mini`)
283
- 2. if `full`: create `ROADMAP.md` (phases, goals, acceptance)
284
- 3. if `mini`: add `Mini Roadmap` in `REQUEST.md` (tasks + acceptance + criteria flags)
285
- 4. update `STATUS.md` to `ACTIVE` and record `roadmap_mode: full|mini`
286
- 5. update `reqs/ACTIVE.md` to `ACTIVE`
292
+ 1. perform deep codebase exploration for the requirement scope
293
+ 2. map impacted components/files, constraints, risks, and validation approach in `REQUEST.md`
294
+ 3. present the codebase-informed requirement specification to user and obtain explicit confirmation (Gate 2)
295
+ 4. if Gate 2 feedback requests changes, iterate steps 1-3 until confirmed
296
+ 5. choose confirmation mode (`full` or `mini`)
297
+ 6. if `full`: create `ROADMAP.md` (phases, goals, acceptance)
298
+ 7. if `mini`: add `Mini Roadmap` in `REQUEST.md` (tasks + acceptance + criteria flags)
299
+ 8. update `STATUS.md` to `ACTIVE` and record `roadmap_mode: full|mini`
300
+ 9. update `reqs/ACTIVE.md` to `ACTIVE`
287
301
 
288
302
  ### C) Execute Phase (loop)
289
303
  For each `PHASE-XX`:
290
304
  1. write `phases/PHASE-XX/PLAN.md` with ordered tasks, validation checklist, exit criteria
291
305
  2. implement according to plan
292
306
  3. append evidence to `phases/PHASE-XX/VALIDATION_LOG.md`
307
+ 4. create checkpoint commits at meaningful progress boundaries
293
308
 
294
309
  ### D) Complete Phase (2 required + 2 conditional)
295
310
  A phase is `DONE` only when all required checks pass:
@@ -297,15 +312,17 @@ A phase is `DONE` only when all required checks pass:
297
312
  2. `STATUS.md` and `reqs/ACTIVE.md` are updated
298
313
  3. if architecture-impacting changes occurred, ADR is added/updated in `docs/adr/`
299
314
  4. if architecture-impacting changes occurred, `ARCHITECTURE.md` reflects the current design
315
+ 5. at least one phase-related commit exists before phase is marked `DONE`
300
316
 
301
317
  ### E) Pause or Block Current Requirement
302
318
  Use when scope split or dependency wait occurs.
303
319
 
304
320
  Steps:
305
321
  1. write checkpoint summary in current `VALIDATION_LOG.md`
306
- 2. update `STATUS.md` to `PAUSED` or `BLOCKED`
307
- 3. fill inactive-state record fields (`changed_at`, `reason`, `resume_condition`, `next_action`)
308
- 4. remove `reqs/ACTIVE.md` to unlock
322
+ 2. create a resumable checkpoint commit (or record why not possible in `VALIDATION_LOG.md`)
323
+ 3. update `STATUS.md` to `PAUSED` or `BLOCKED`
324
+ 4. fill inactive-state record fields (`changed_at`, `reason`, `resume_condition`, `next_action`)
325
+ 5. remove `reqs/ACTIVE.md` to unlock
309
326
 
310
327
  ### F) Switch to Another Requirement
311
328
  Precondition:
@@ -346,9 +363,10 @@ Precondition:
346
363
 
347
364
  Steps:
348
365
  1. append a short checkpoint in current phase `VALIDATION_LOG.md`
349
- 2. create `reqs/INTERRUPT.md` with interrupt metadata and narrow scope
350
- 3. execute only interrupt scope and record validation evidence in `reqs/INTERRUPT.md`
351
- 4. if scope exceeds timebox or becomes non-urgent, close interrupt and move work to normal pause/switch + `REQ-*` flow
366
+ 2. create a checkpoint commit before leaving current requirement context (or record why not possible in `VALIDATION_LOG.md`)
367
+ 3. create `reqs/INTERRUPT.md` with interrupt metadata and narrow scope
368
+ 4. execute only interrupt scope and record validation evidence in `reqs/INTERRUPT.md`
369
+ 5. if scope exceeds timebox or becomes non-urgent, close interrupt and move work to normal pause/switch + `REQ-*` flow
352
370
 
353
371
  ### J) Close Urgent Interrupt (Archive + Resume)
354
372
  Precondition:
@@ -526,6 +544,8 @@ ADR metadata for selective lookup (required for new ADRs):
526
544
 
527
545
  ## Prohibitions (MUST NOT)
528
546
  - do not create a new requirement while `reqs/ACTIVE.md` exists (except the explicit interrupt exception path)
547
+ - do not create `REQ-*`/`REQUEST.md` before Gate 1 alignment feedback is explicitly confirmed by user
548
+ - do not create `ROADMAP.md` or `REQUEST.md` Mini Roadmap before Gate 2 codebase-informed feedback is explicitly confirmed by user
529
549
  - do not treat requirement as confirmed without either:
530
550
  - `ROADMAP.md` (full mode), or
531
551
  - valid `REQUEST.md` Mini Roadmap that satisfies all Mini criteria (mini mode)
@@ -544,3 +564,5 @@ ADR metadata for selective lookup (required for new ADRs):
544
564
  - do not leave `reqs/INTERRUPT.md` after interrupt close; archive it to `reqs/interrupts/`
545
565
  - do not duplicate interrupt detail logs in requirement `VALIDATION_LOG.md`; store details only in interrupt record
546
566
  - do not switch requirements without writing pause/block checkpoint + inactive-state record
567
+ - do not mark a phase `DONE` without at least one phase-related commit
568
+ - do not pause/switch/open interrupt with uncommitted transition-critical changes unless the reason is explicitly recorded in `VALIDATION_LOG.md`
package/README.md CHANGED
@@ -55,6 +55,7 @@ node /path/to/this-is-enough/bin/cli.js init --mode existing --cwd /path/to/repo
55
55
  - `--dry-run` (변경 예정만 출력)
56
56
  - `--force` (기존 파일 덮어쓰기, `AGENTS.md`는 차이가 있으면 `--force` 없이도 백업 후 갱신)
57
57
  - `--yes` (호환용, 기본이 이미 non-interactive)
58
+ - `.gitignore`에 `reqs/*` 규칙이 없으면 자동 추가
58
59
 
59
60
  ### `doctor`
60
61
 
@@ -94,6 +95,7 @@ node /path/to/this-is-enough/bin/cli.js upgrade --cwd /path/to/repo
94
95
  - 누락된 `docs/adr`, `reqs`, `reqs/interrupts` 생성
95
96
  - 누락된 `ARCHITECTURE.md`, `reqs/INBOX.md` 생성
96
97
  - `AGENTS.md`가 다르면 백업(`AGENTS.md.bak.<timestamp>`) 후 갱신
98
+ - `.gitignore`에 `reqs/*` 규칙이 없으면 자동 추가
97
99
 
98
100
  ## Installed Structure
99
101
 
package/bin/cli.js CHANGED
@@ -41,6 +41,7 @@ function resolveProjectPaths(cwd) {
41
41
  return {
42
42
  agentsPath: path.join(cwd, "AGENTS.md"),
43
43
  architecturePath: path.join(cwd, "ARCHITECTURE.md"),
44
+ gitignorePath: path.join(cwd, ".gitignore"),
44
45
  inboxPath: path.join(cwd, "reqs", "INBOX.md"),
45
46
  activePath: path.join(cwd, "reqs", "ACTIVE.md"),
46
47
  interruptPath: path.join(cwd, "reqs", "INTERRUPT.md"),
@@ -182,6 +183,35 @@ function syncCoreAgents(filePath, content, options, actions) {
182
183
  return { status: "replaced", backupPath };
183
184
  }
184
185
 
186
+ function ensureGitignoreReqsRule(filePath, options, actions) {
187
+ const rule = "reqs/*";
188
+ const ruleRegex = /^\s*reqs\/\*(\s+#.*)?\s*$/m;
189
+
190
+ if (!fs.existsSync(filePath)) {
191
+ actions.push(`create ${filePath} with ${rule}`);
192
+ if (!options.dryRun) {
193
+ fs.writeFileSync(filePath, `${rule}\n`, "utf8");
194
+ }
195
+ return;
196
+ }
197
+
198
+ const current = fs.readFileSync(filePath, "utf8");
199
+ if (ruleRegex.test(current)) {
200
+ actions.push(`skip existing ${rule} in ${filePath}`);
201
+ return;
202
+ }
203
+
204
+ const normalized = current.replace(/\r\n/g, "\n");
205
+ const nextContent = normalized.endsWith("\n")
206
+ ? `${normalized}${rule}\n`
207
+ : `${normalized}\n${rule}\n`;
208
+
209
+ actions.push(`append ${rule} to ${filePath}`);
210
+ if (!options.dryRun) {
211
+ fs.writeFileSync(filePath, nextContent, "utf8");
212
+ }
213
+ }
214
+
185
215
  function timestampForBackup() {
186
216
  const now = new Date();
187
217
  const p = (n) => String(n).padStart(2, "0");
@@ -220,6 +250,7 @@ function initProject(options) {
220
250
  ensureDir(dirPath, options, actions);
221
251
  }
222
252
 
253
+ ensureGitignoreReqsRule(paths.gitignorePath, options, actions);
223
254
  const agentsSyncResult = syncCoreAgents(paths.agentsPath, readTemplateAgents(), options, actions);
224
255
  writeFileIfNeeded(paths.architecturePath, ARCHITECTURE_TEMPLATE, options, actions);
225
256
  writeFileIfNeeded(paths.inboxPath, INBOX_TEMPLATE, options, actions);
@@ -407,6 +438,7 @@ function upgradeProject(options) {
407
438
  ensureDir(paths.adrDir, options, actions);
408
439
  ensureDir(paths.reqsDir, options, actions);
409
440
  ensureDir(paths.interruptsDir, options, actions);
441
+ ensureGitignoreReqsRule(paths.gitignorePath, options, actions);
410
442
 
411
443
  createFileIfMissing(paths.architecturePath, ARCHITECTURE_TEMPLATE, options, actions);
412
444
  createFileIfMissing(paths.inboxPath, INBOX_TEMPLATE, options, actions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "this-is-enough",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Install and bootstrap the ThisIsEnough AGENTS.md workflow.",
5
5
  "license": "MIT",
6
6
  "bin": {