this-is-enough 0.1.2 → 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 +18 -6
- package/README.md +2 -0
- package/bin/cli.js +32 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -208,6 +208,12 @@ Architecture-impacting change criteria (MUST):
|
|
|
208
208
|
- `reqs/INBOX.md` is for independent/external requests.
|
|
209
209
|
- Do not mix them.
|
|
210
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
|
+
|
|
211
217
|
---
|
|
212
218
|
|
|
213
219
|
## Session Start Checklist (MUST)
|
|
@@ -298,6 +304,7 @@ For each `PHASE-XX`:
|
|
|
298
304
|
1. write `phases/PHASE-XX/PLAN.md` with ordered tasks, validation checklist, exit criteria
|
|
299
305
|
2. implement according to plan
|
|
300
306
|
3. append evidence to `phases/PHASE-XX/VALIDATION_LOG.md`
|
|
307
|
+
4. create checkpoint commits at meaningful progress boundaries
|
|
301
308
|
|
|
302
309
|
### D) Complete Phase (2 required + 2 conditional)
|
|
303
310
|
A phase is `DONE` only when all required checks pass:
|
|
@@ -305,15 +312,17 @@ A phase is `DONE` only when all required checks pass:
|
|
|
305
312
|
2. `STATUS.md` and `reqs/ACTIVE.md` are updated
|
|
306
313
|
3. if architecture-impacting changes occurred, ADR is added/updated in `docs/adr/`
|
|
307
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`
|
|
308
316
|
|
|
309
317
|
### E) Pause or Block Current Requirement
|
|
310
318
|
Use when scope split or dependency wait occurs.
|
|
311
319
|
|
|
312
320
|
Steps:
|
|
313
321
|
1. write checkpoint summary in current `VALIDATION_LOG.md`
|
|
314
|
-
2.
|
|
315
|
-
3.
|
|
316
|
-
4.
|
|
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
|
|
317
326
|
|
|
318
327
|
### F) Switch to Another Requirement
|
|
319
328
|
Precondition:
|
|
@@ -354,9 +363,10 @@ Precondition:
|
|
|
354
363
|
|
|
355
364
|
Steps:
|
|
356
365
|
1. append a short checkpoint in current phase `VALIDATION_LOG.md`
|
|
357
|
-
2. create
|
|
358
|
-
3.
|
|
359
|
-
4.
|
|
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
|
|
360
370
|
|
|
361
371
|
### J) Close Urgent Interrupt (Archive + Resume)
|
|
362
372
|
Precondition:
|
|
@@ -554,3 +564,5 @@ ADR metadata for selective lookup (required for new ADRs):
|
|
|
554
564
|
- do not leave `reqs/INTERRUPT.md` after interrupt close; archive it to `reqs/interrupts/`
|
|
555
565
|
- do not duplicate interrupt detail logs in requirement `VALIDATION_LOG.md`; store details only in interrupt record
|
|
556
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);
|