hadara 0.2.0-rc.1 → 0.2.0-rc.2
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/LICENSE +0 -0
- package/README.md +22 -14
- package/dist/cli/init.js +201 -20
- package/package.json +1 -1
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# HADARA
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="https://raw.githubusercontent.com/ictseoyoungmin/HADARA
|
|
4
|
+
<img src="https://raw.githubusercontent.com/ictseoyoungmin/HADARA/main/docs/assets/hadara_sub_right_name.png" alt="HADARA" width="720">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<img alt="Release candidate" src="https://img.shields.io/badge/release-0.2.0--rc.
|
|
8
|
+
<img alt="Release candidate" src="https://img.shields.io/badge/release-0.2.0--rc.2-blue">
|
|
9
9
|
<img alt="Node.js" src="https://img.shields.io/badge/node-%3E%3D22-brightgreen">
|
|
10
10
|
<img alt="License" src="https://img.shields.io/badge/license-MIT-lightgrey">
|
|
11
11
|
</p>
|
|
@@ -23,10 +23,10 @@ This repository is both the HADARA source checkout and the HADARA protocol works
|
|
|
23
23
|
The current source checkout targets:
|
|
24
24
|
|
|
25
25
|
```text
|
|
26
|
-
hadara@0.2.0-rc.
|
|
26
|
+
hadara@0.2.0-rc.2
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
T-
|
|
29
|
+
T-0282 refreshes the npm release-candidate source state for `0.2.0-rc.2` after the init scaffold protocol guidance follow-up. T-0275 published the previous `0.2.0-rc.1` RC after the installed-package recycle fixes.
|
|
30
30
|
|
|
31
31
|
Current publish boundaries:
|
|
32
32
|
|
|
@@ -35,10 +35,11 @@ Current publish boundaries:
|
|
|
35
35
|
| npm package | Primary release target. |
|
|
36
36
|
| `hadara@0.1.0-rc.0` | Published first RC. |
|
|
37
37
|
| `hadara@0.2.0-rc.0` | Superseded internal publish candidate after recycle findings. |
|
|
38
|
-
| `hadara@0.2.0-rc.1` | Current
|
|
38
|
+
| `hadara@0.2.0-rc.1` | Current published npm RC until rc.2 is operator-published. |
|
|
39
|
+
| `hadara@0.2.0-rc.2` | Current source version and next npm RC target. |
|
|
39
40
|
| GitHub Release | Secondary target, still approval-gated. |
|
|
40
41
|
| Docker image | Deferred. |
|
|
41
|
-
| PyPI/Python package |
|
|
42
|
+
| PyPI/Python package | `hadara==0.2.0rc1` published preview bridge. |
|
|
42
43
|
| Installer scripts / USB launchers | Deferred. |
|
|
43
44
|
|
|
44
45
|
No release command should publish, create a GitHub Release, build Docker images, upload artifacts, or load token values unless an operator explicitly approves the mutation path for the active release capsule.
|
|
@@ -50,7 +51,7 @@ Requires Node.js 22.
|
|
|
50
51
|
Install the current RC:
|
|
51
52
|
|
|
52
53
|
```bash
|
|
53
|
-
npm install -g hadara@0.2.0-rc.
|
|
54
|
+
npm install -g hadara@0.2.0-rc.2
|
|
54
55
|
hadara doctor --json
|
|
55
56
|
hadara task list --json
|
|
56
57
|
hadara tools list --json
|
|
@@ -59,11 +60,11 @@ hadara tools list --json
|
|
|
59
60
|
Run without a global install:
|
|
60
61
|
|
|
61
62
|
```bash
|
|
62
|
-
npx hadara@0.2.0-rc.
|
|
63
|
-
npx hadara@0.2.0-rc.
|
|
63
|
+
npx hadara@0.2.0-rc.2 doctor --json
|
|
64
|
+
npx hadara@0.2.0-rc.2 tools list --json
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
Previous published
|
|
67
|
+
Previous published RCs: `hadara@0.2.0-rc.1` and `hadara@0.1.0-rc.0` remain available on npm for comparison or rollback, but new installs should use the current RC after the operator publishes it.
|
|
67
68
|
|
|
68
69
|
## What HADARA Gives You
|
|
69
70
|
|
|
@@ -99,9 +100,9 @@ Task workflow:
|
|
|
99
100
|
hadara task next --json
|
|
100
101
|
hadara task create "implement a focused change" --json
|
|
101
102
|
hadara task status --task T-0001 --json
|
|
102
|
-
hadara task ready --task T-0001 --level done --json
|
|
103
103
|
hadara task finish --task T-0001 --json
|
|
104
104
|
hadara task finish --task T-0001 --execute --json
|
|
105
|
+
hadara task ready --task T-0001 --level done --json
|
|
105
106
|
hadara task close --task T-0001 --json
|
|
106
107
|
hadara task close --task T-0001 --execute --json
|
|
107
108
|
hadara task audit-close --task T-0001 --json
|
|
@@ -151,14 +152,17 @@ hadara task status --task T-XXXX --json
|
|
|
151
152
|
# Do the scoped work.
|
|
152
153
|
|
|
153
154
|
hadara evidence add-command --task T-XXXX --summary "..." --result passed --json
|
|
155
|
+
|
|
156
|
+
hadara task finish --task T-XXXX --json
|
|
157
|
+
hadara task finish --task T-XXXX --execute --json
|
|
158
|
+
|
|
159
|
+
# Finalize Task Capsule docs and tracked state docs before closing.
|
|
160
|
+
|
|
154
161
|
hadara task ready --task T-XXXX --level done --json
|
|
155
162
|
|
|
156
163
|
# Optional workflow compression / next action preview:
|
|
157
164
|
hadara task complete --task T-XXXX --json
|
|
158
165
|
|
|
159
|
-
hadara task finish --task T-XXXX --json
|
|
160
|
-
hadara task finish --task T-XXXX --execute --json
|
|
161
|
-
|
|
162
166
|
hadara task close --task T-XXXX --json
|
|
163
167
|
hadara task close --task T-XXXX --execute --json
|
|
164
168
|
|
|
@@ -175,6 +179,8 @@ Important distinctions:
|
|
|
175
179
|
| `task close --execute` | Appends close evidence only. |
|
|
176
180
|
| `task audit-close` | Read-only close proof audit. |
|
|
177
181
|
|
|
182
|
+
Before `task close --execute`, finish Task Capsule docs, acceptance/tests/handoff notes, evidence summaries, Task Board updates, and tracked state docs. After close execute, changing those close-source docs intentionally invalidates the previous close proof and requires rerunning ready/close/audit. Use stable wording for close results instead of pasting volatile close evidence ids into close-source docs.
|
|
183
|
+
|
|
178
184
|
## Initialize a Project
|
|
179
185
|
|
|
180
186
|
```bash
|
|
@@ -184,6 +190,8 @@ hadara init --profile standard
|
|
|
184
190
|
hadara init --profile governed
|
|
185
191
|
```
|
|
186
192
|
|
|
193
|
+
Every profile generates `docs/TASK_WORKFLOW_COMMANDS.md` so fresh projects get the current evidence, ready, finish, close, and audit-close loop.
|
|
194
|
+
|
|
187
195
|
| Profile | Use When |
|
|
188
196
|
|---|---|
|
|
189
197
|
| `basic` | Small project, only task/handoff discipline needed. |
|
package/dist/cli/init.js
CHANGED
|
@@ -14,9 +14,9 @@ const args_1 = require("./args");
|
|
|
14
14
|
const INIT_PROFILE_SPECS = {
|
|
15
15
|
basic: {
|
|
16
16
|
profile: 'basic',
|
|
17
|
-
generatedDocsDescription: 'Core session docs
|
|
17
|
+
generatedDocsDescription: 'Core session docs plus task workflow commands',
|
|
18
18
|
intendedUse: 'Small projects that need Task Capsules, evidence, and handoff discipline without planning overhead.',
|
|
19
|
-
specialNotes: 'SOP required reading references
|
|
19
|
+
specialNotes: 'SOP required reading references core docs, task workflow docs, and active Task Capsule docs.',
|
|
20
20
|
docs: {
|
|
21
21
|
architecture: false,
|
|
22
22
|
developmentSlices: false,
|
|
@@ -141,6 +141,7 @@ function createGeneratedScaffoldFiles(profile) {
|
|
|
141
141
|
{ path: 'docs/TASK_BOARD.md', content: '# TASK_BOARD\n\n| ID | Title | Status | Capsule | Notes |\n|---|---|---|---|---|\n' },
|
|
142
142
|
{ path: 'docs/AGENT_HANDOFF.md', content: createAgentHandoffDoc() },
|
|
143
143
|
{ path: 'docs/IMPLEMENTATION_SOP.md', content: createImplementationSopDoc(spec) },
|
|
144
|
+
{ path: 'docs/TASK_WORKFLOW_COMMANDS.md', content: createTaskWorkflowCommandsDoc() },
|
|
144
145
|
{ path: 'AGENTS.md', content: createAgentsDoc(spec) },
|
|
145
146
|
{ path: '.gitignore', content: createGitignoreDoc() }
|
|
146
147
|
];
|
|
@@ -163,7 +164,7 @@ function createGeneratedScaffoldFiles(profile) {
|
|
|
163
164
|
function createInitDoctorReport(projectRoot) {
|
|
164
165
|
const issues = [];
|
|
165
166
|
const actions = [];
|
|
166
|
-
const requiredCore = ['AGENTS.md', '.gitignore', 'docs/PROJECT_STATE.md', 'docs/AGENT_HANDOFF.md', 'docs/TASK_BOARD.md', 'docs/IMPLEMENTATION_SOP.md'];
|
|
167
|
+
const requiredCore = ['AGENTS.md', '.gitignore', 'docs/PROJECT_STATE.md', 'docs/AGENT_HANDOFF.md', 'docs/TASK_BOARD.md', 'docs/IMPLEMENTATION_SOP.md', 'docs/TASK_WORKFLOW_COMMANDS.md'];
|
|
167
168
|
for (const relativePath of requiredCore) {
|
|
168
169
|
if (!node_fs_1.default.existsSync(node_path_1.default.join(projectRoot, relativePath))) {
|
|
169
170
|
issues.push({ severity: 'error', code: 'INIT_CORE_DOC_MISSING', path: relativePath, message: `${relativePath} is missing from the init scaffold.` });
|
|
@@ -391,6 +392,7 @@ const CANONICAL_TABLE_HEADERS = {
|
|
|
391
392
|
'docs/AGENT_HANDOFF.md': ['| Area | State | Notes |', '| Task | Summary | Evidence |', '| Issue | Impact | Next Step |', '| Step | Reason | Done Evidence |', '| Check | Latest Evidence | Notes |', '| History Type | Path | When to Use |'],
|
|
392
393
|
'docs/TASK_BOARD.md': ['| ID | Title | Status | Capsule | Notes |'],
|
|
393
394
|
'docs/IMPLEMENTATION_SOP.md': ['| Document | When to Read | Purpose |', '| Profile | Scale | Generated Docs | Intended Use | Special Notes |', '| Document | Required Structure |'],
|
|
395
|
+
'docs/TASK_WORKFLOW_COMMANDS.md': ['| Command | Default Write Behavior | Notes |'],
|
|
394
396
|
'docs/ARCHITECTURE.md': ['| Field | Value |', '| Boundary | Rule | Notes |', '| Component | Path / Surface | Responsibility | Status |'],
|
|
395
397
|
'docs/DEVELOPMENT_SLICES.md': ['| Order | Slice | Capsule | Purpose | Done Evidence |'],
|
|
396
398
|
'docs/DECISIONS.md': ['| ID | Date | Decision | Status | Rationale | Evidence |'],
|
|
@@ -493,7 +495,8 @@ function sopRequiredReadingRowsForProfile(profile) {
|
|
|
493
495
|
['`docs/PROJECT_STATE.md`', 'Every session', 'Current product state and source-of-truth map.'],
|
|
494
496
|
['`docs/AGENT_HANDOFF.md`', 'Every session', 'Compact handoff and next recommended step.'],
|
|
495
497
|
['`docs/TASK_BOARD.md`', 'Every session', 'Work queue and task status.'],
|
|
496
|
-
['`docs/IMPLEMENTATION_SOP.md`', 'Every session', 'Local HADARA workflow rules and project-specific required-reading registry.']
|
|
498
|
+
['`docs/IMPLEMENTATION_SOP.md`', 'Every session', 'Local HADARA workflow rules and project-specific required-reading registry.'],
|
|
499
|
+
['`docs/TASK_WORKFLOW_COMMANDS.md`', 'Starting, finishing, closing, auditing, or explaining task workflow commands', 'Standard task loop, dry-run boundaries, and command `ok` semantics.']
|
|
497
500
|
];
|
|
498
501
|
if (profile === 'standard' || profile === 'governed') {
|
|
499
502
|
rows.push(['`docs/ARCHITECTURE.md`', 'Architecture, component, or boundary work', 'Current system shape and ownership boundaries.'], ['`docs/DEVELOPMENT_SLICES.md`', 'Starting, completing, or reclassifying slices', 'Roadmap ordering and completion evidence.'], ['`docs/DECISIONS.md`', 'Project-level decision work', 'Durable decisions that affect architecture or workflow.'], ['`docs/TEST_STRATEGY.md`', 'Validation planning or completion checks', 'Routine suites and special-case smoke boundaries.']);
|
|
@@ -508,7 +511,8 @@ function agentsRequiredReadingRowsForProfile(profile) {
|
|
|
508
511
|
{ document: '`docs/PROJECT_STATE.md`', when: 'Every session', purpose: 'Current product and capability state.' },
|
|
509
512
|
{ document: '`docs/AGENT_HANDOFF.md`', when: 'Every session', purpose: 'Compact continuation state.' },
|
|
510
513
|
{ document: '`docs/TASK_BOARD.md`', when: 'Every session', purpose: 'Current task queue and status.' },
|
|
511
|
-
{ document: '`docs/IMPLEMENTATION_SOP.md`', when: 'Every session', purpose: 'Local workflow and required-reading registry.' }
|
|
514
|
+
{ document: '`docs/IMPLEMENTATION_SOP.md`', when: 'Every session', purpose: 'Local workflow and required-reading registry.' },
|
|
515
|
+
{ document: '`docs/TASK_WORKFLOW_COMMANDS.md`', when: 'Starting, finishing, closing, auditing, or explaining task workflow commands', purpose: 'Standard task loop, dry-run boundaries, and command `ok` semantics.' }
|
|
512
516
|
];
|
|
513
517
|
if (profile === 'standard' || profile === 'governed') {
|
|
514
518
|
rows.push({ document: '`docs/ARCHITECTURE.md`', when: 'Architecture, component, or boundary work', purpose: 'Current system shape and ownership boundaries.' }, { document: '`docs/DEVELOPMENT_SLICES.md`', when: 'Starting, completing, or reclassifying a development slice', purpose: 'Roadmap ordering, prerequisites, and completion evidence.' }, { document: '`docs/DECISIONS.md`', when: 'Project-level decision work', purpose: 'Durable project decisions.' }, { document: '`docs/TEST_STRATEGY.md`', when: 'Validation planning or completion checks', purpose: 'Routine suites and special-case checks.' });
|
|
@@ -632,7 +636,7 @@ function inferProfileFromGeneratedDocs(projectRoot) {
|
|
|
632
636
|
return 'basic';
|
|
633
637
|
}
|
|
634
638
|
function requiredDocsForProfile(profile) {
|
|
635
|
-
const docs = ['docs/PROJECT_STATE.md', 'docs/AGENT_HANDOFF.md', 'docs/TASK_BOARD.md', 'docs/IMPLEMENTATION_SOP.md'];
|
|
639
|
+
const docs = ['docs/PROJECT_STATE.md', 'docs/AGENT_HANDOFF.md', 'docs/TASK_BOARD.md', 'docs/IMPLEMENTATION_SOP.md', 'docs/TASK_WORKFLOW_COMMANDS.md'];
|
|
636
640
|
if (profile === 'standard' || profile === 'governed') {
|
|
637
641
|
docs.push('docs/ARCHITECTURE.md', 'docs/DEVELOPMENT_SLICES.md', 'docs/DECISIONS.md', 'docs/TEST_STRATEGY.md');
|
|
638
642
|
}
|
|
@@ -765,7 +769,7 @@ function createAgentHandoffDoc() {
|
|
|
765
769
|
| Area | State | Notes |
|
|
766
770
|
|---|---|---|
|
|
767
771
|
| Scaffold | Initialized | HADARA protocol scaffold is initialized. |
|
|
768
|
-
| Required Reading | Pending | Read \`PROJECT_STATE\`, \`TASK_BOARD\`, and \`
|
|
772
|
+
| Required Reading | Pending | Read \`PROJECT_STATE\`, \`AGENT_HANDOFF\`, \`TASK_BOARD\`, \`IMPLEMENTATION_SOP\`, and \`TASK_WORKFLOW_COMMANDS\` before starting. |
|
|
769
773
|
|
|
770
774
|
## Last 3 Completed Tasks
|
|
771
775
|
|
|
@@ -843,7 +847,8 @@ function createImplementationSopDoc(spec) {
|
|
|
843
847
|
['`docs/PROJECT_STATE.md`', 'Every session', 'Current product state and source-of-truth map.'],
|
|
844
848
|
['`docs/AGENT_HANDOFF.md`', 'Every session', 'Compact handoff and next recommended step.'],
|
|
845
849
|
['`docs/TASK_BOARD.md`', 'Every session', 'Work queue and task status.'],
|
|
846
|
-
['`docs/IMPLEMENTATION_SOP.md`', 'Every session', 'Local HADARA workflow rules and project-specific required-reading registry.']
|
|
850
|
+
['`docs/IMPLEMENTATION_SOP.md`', 'Every session', 'Local HADARA workflow rules and project-specific required-reading registry.'],
|
|
851
|
+
['`docs/TASK_WORKFLOW_COMMANDS.md`', 'Starting, finishing, closing, auditing, or explaining task workflow commands', 'Standard task loop, dry-run boundaries, and command `ok` semantics.']
|
|
847
852
|
];
|
|
848
853
|
if (spec.docs.architecture) {
|
|
849
854
|
requiredReadingRows.push(['`docs/ARCHITECTURE.md`', 'Architecture, component, or boundary work', 'Current system shape and ownership boundaries.']);
|
|
@@ -872,7 +877,8 @@ function createImplementationSopDoc(spec) {
|
|
|
872
877
|
['`docs/PROJECT_STATE.md`', 'Product, Current Phase, Current Status, and Single Source of Truth sections.'],
|
|
873
878
|
['`docs/AGENT_HANDOFF.md`', 'Current State, Last 3 Completed Tasks, Current Known Problems, Next Recommended Step, Validation Baseline, and Historical Index sections.'],
|
|
874
879
|
['`docs/TASK_BOARD.md`', 'One task table with ID, Title, Status, Capsule, and Notes columns.'],
|
|
875
|
-
['`docs/IMPLEMENTATION_SOP.md`', 'Session Start, Required Reading, Init Profile Matrix, Scaffold Document Structure, Implementation, Validation, Session End, and Handoff Compaction sections.']
|
|
880
|
+
['`docs/IMPLEMENTATION_SOP.md`', 'Session Start, Required Reading, Project-Specific Documents, Init Profile Matrix, Scaffold Document Structure, Implementation, Standard Task Workflow Loop, Validation, Evidence Records, Session End, and Handoff Compaction sections.'],
|
|
881
|
+
['`docs/TASK_WORKFLOW_COMMANDS.md`', 'Standard Task Loop, Command Semantics, Non-Overlap Rules, and State Documents sections.']
|
|
876
882
|
];
|
|
877
883
|
if (spec.docs.architecture)
|
|
878
884
|
structureRows.push(['`docs/ARCHITECTURE.md`', 'Overview, Boundaries, and Current Components sections.']);
|
|
@@ -905,14 +911,23 @@ ${numberedList(sessionStart)}
|
|
|
905
911
|
|---|---|---|
|
|
906
912
|
${requiredReadingRows.map(formatTableRow).join('\n')}
|
|
907
913
|
|
|
908
|
-
|
|
914
|
+
## Project-Specific Documents
|
|
915
|
+
|
|
916
|
+
When adding project-specific specs, contracts, roadmap files, or human/agent operating notes, register them in the Required Reading table before expecting people or agents to rely on them. Each row must explain when to read the document and what decision or workflow boundary it owns.
|
|
917
|
+
|
|
918
|
+
\`\`\`bash
|
|
919
|
+
hadara init register-doc --path docs/specs/example.md --when "When changing example behavior" --purpose "Example behavior contract" --json
|
|
920
|
+
hadara init register-doc --path docs/specs/example.md --when "When changing example behavior" --purpose "Example behavior contract" --execute --json
|
|
921
|
+
\`\`\`
|
|
922
|
+
|
|
923
|
+
Use \`--require-exists\` when the document must already exist before registration. Keep local-only notes out of committed required reading unless they are intentionally part of the project handoff.
|
|
909
924
|
|
|
910
925
|
## Init Profile Matrix
|
|
911
926
|
|
|
912
927
|
| Profile | Scale | Generated Docs | Intended Use | Special Notes |
|
|
913
928
|
|---|---|---|---|---|
|
|
914
|
-
| \`basic\` | Small | Core session docs
|
|
915
|
-
| \`standard\` | Medium, default |
|
|
929
|
+
| \`basic\` | Small | Core session docs plus task workflow commands | Small projects that need Task Capsules, evidence, and handoff discipline without planning overhead. | SOP required reading references core docs, task workflow docs, and active Task Capsule docs. |
|
|
930
|
+
| \`standard\` | Medium, default | Basic docs plus planning, architecture, decision, and validation docs | Most multi-session projects that need roadmap slices and repeatable validation. | Optional integrations must be registered before agents rely on them. |
|
|
916
931
|
| \`governed\` | Heavy | Standard docs plus security, refactor log, and roadmap docs | Long-lived projects with stronger governance, security boundaries, refactor history, or roadmap-level planning. | Project-specific contracts still must be manually registered in Required Reading. |
|
|
917
932
|
|
|
918
933
|
## Scaffold Document Structure
|
|
@@ -932,12 +947,71 @@ Prefer tables for repeated records and \`##\`/\`###\` headings for durable secti
|
|
|
932
947
|
3. Make the smallest coherent change that satisfies acceptance criteria.
|
|
933
948
|
4. Update task-local docs when scope changes.
|
|
934
949
|
|
|
950
|
+
## Standard Task Workflow Loop
|
|
951
|
+
|
|
952
|
+
The authoritative command semantics live in \`docs/TASK_WORKFLOW_COMMANDS.md\`. For ordinary implementation capsules, use this loop:
|
|
953
|
+
|
|
954
|
+
\`\`\`bash
|
|
955
|
+
hadara task next --json
|
|
956
|
+
|
|
957
|
+
# If a matching capsule already exists:
|
|
958
|
+
hadara task status --task T-XXXX --json
|
|
959
|
+
|
|
960
|
+
# If no matching capsule exists, create one first:
|
|
961
|
+
hadara task create "task title" --json
|
|
962
|
+
hadara task status --task T-XXXX --json
|
|
963
|
+
|
|
964
|
+
# Do the scoped work.
|
|
965
|
+
|
|
966
|
+
hadara evidence add-command --task T-XXXX --summary "..." --result passed --json
|
|
967
|
+
|
|
968
|
+
hadara task finish --task T-XXXX --json
|
|
969
|
+
hadara task finish --task T-XXXX --execute --json
|
|
970
|
+
|
|
971
|
+
# Finalize Task Capsule docs and tracked state docs before closing.
|
|
972
|
+
|
|
973
|
+
hadara task ready --task T-XXXX --level done --json
|
|
974
|
+
|
|
975
|
+
# Optional workflow compression / next action preview:
|
|
976
|
+
hadara task complete --task T-XXXX --json
|
|
977
|
+
|
|
978
|
+
hadara task close --task T-XXXX --json
|
|
979
|
+
hadara task close --task T-XXXX --execute --json
|
|
980
|
+
|
|
981
|
+
hadara task audit-close --task T-XXXX --json
|
|
982
|
+
\`\`\`
|
|
983
|
+
|
|
984
|
+
| Command | Default Write Behavior | Notes |
|
|
985
|
+
|---|---|---|
|
|
986
|
+
| \`task next\` | Read-only | Recommends work; does not create tasks. |
|
|
987
|
+
| \`task status\` | Read-only | \`ok\` means report generation succeeded; readiness is in \`state.ready\`, \`summary.blockers\`, and \`issues\`. |
|
|
988
|
+
| \`evidence add-command\` | Write | Appends command-log evidence; does not execute shell commands. |
|
|
989
|
+
| \`task ready\` | Read-only | Checks readiness; does not mutate evidence or status docs. |
|
|
990
|
+
| \`task finish\` | Dry-run by default; writes only with \`--execute\` | Bounded to \`TASK.md\` and \`docs/TASK_BOARD.md\`. |
|
|
991
|
+
| \`task close\` | Dry-run by default; writes only with \`--execute\` | Bounded to close evidence append. |
|
|
992
|
+
| \`task audit-close\` | Read-only | Verifies close evidence after close. |
|
|
993
|
+
|
|
994
|
+
Before running \`task ready\` and \`task close\`, finish all close-source edits: Task Capsule docs, acceptance/tests/handoff notes, evidence summaries, \`docs/TASK_BOARD.md\`, and tracked state docs such as \`docs/PROJECT_STATE.md\`, \`docs/AGENT_HANDOFF.md\`, and roadmap/slice docs when they apply. After \`task close --execute --json\`, do not edit those close-source documents unless you intend to rerun \`task ready\`, \`task close\`, and \`task audit-close\`. Avoid writing volatile close evidence ids into close-source docs; use stable wording such as "close evidence appended; audit returned closed-valid".
|
|
995
|
+
|
|
935
996
|
## Validation
|
|
936
997
|
|
|
937
998
|
1. Run relevant tests.
|
|
938
|
-
2.
|
|
939
|
-
3.
|
|
940
|
-
4.
|
|
999
|
+
2. Record meaningful evidence in \`EVIDENCE.md\` and \`evidence.jsonl\`.
|
|
1000
|
+
3. Preview and execute \`hadara task finish --task <task-id> --json\` and \`hadara task finish --task <task-id> --execute --json\`.
|
|
1001
|
+
4. Finalize Task Capsule docs and tracked state docs before close so the close source hash remains stable.
|
|
1002
|
+
5. Run \`hadara task ready --task <task-id> --level done --json\` after finish and before close.
|
|
1003
|
+
6. Preview and execute \`hadara task close --task <task-id> --json\` and \`hadara task close --task <task-id> --execute --json\`, then run \`hadara task audit-close --task <task-id> --json\`.
|
|
1004
|
+
7. Add project-specific integration or deployment smoke checks only after those surfaces exist and are documented for this project.
|
|
1005
|
+
|
|
1006
|
+
\`task ready\` and \`task close\` include done-level Task Capsule validation. Use \`hadara harness validate --task <task-id> --level done --json\` directly when you need to debug capsule format or done-level validation failures.
|
|
1007
|
+
|
|
1008
|
+
## Evidence Records
|
|
1009
|
+
|
|
1010
|
+
1. Do not hand-edit Task Capsule \`evidence.jsonl\`.
|
|
1011
|
+
2. Append evidence through HADARA commands so schema, visibility, and artifact-safety checks run consistently.
|
|
1012
|
+
3. Record failed or blocked checks honestly. Do not replace them later with optimistic summaries; add newer evidence that explains the fix or residual risk.
|
|
1013
|
+
4. Use \`hadara evidence add-command --task <task-id> --summary <text> --result passed|failed|blocked|unknown --json\` for command results when no artifact file is attached.
|
|
1014
|
+
5. Use \`hadara evidence lint --task <task-id> --json\` when evidence drift is suspected or before close if evidence files were touched manually by mistake.
|
|
941
1015
|
|
|
942
1016
|
## Session End
|
|
943
1017
|
|
|
@@ -1042,8 +1116,18 @@ function createTestStrategyDoc() {
|
|
|
1042
1116
|
| Step | Check | Evidence Location |
|
|
1043
1117
|
|---|---|---|
|
|
1044
1118
|
| 1 | Run the relevant suite from the table above. | Task Capsule \`EVIDENCE.md\` |
|
|
1045
|
-
| 2 |
|
|
1046
|
-
| 3 |
|
|
1119
|
+
| 2 | Record meaningful evidence in the Task Capsule. | Task Capsule \`EVIDENCE.md\` and \`evidence.jsonl\` |
|
|
1120
|
+
| 3 | Preview and execute \`task finish\` to synchronize status bookkeeping. | Task Capsule \`TASK.md\` and \`docs/TASK_BOARD.md\` |
|
|
1121
|
+
| 4 | Finalize Task Capsule docs and tracked state docs before close. | Task Capsule docs and tracked state docs |
|
|
1122
|
+
| 5 | Run \`hadara task ready --task <task-id> --level done --json\` after finish and before close. | Task Capsule \`EVIDENCE.md\` and \`evidence.jsonl\` |
|
|
1123
|
+
| 6 | Preview and execute \`task close\`, then run \`task audit-close\`. | Task Capsule close evidence |
|
|
1124
|
+
|
|
1125
|
+
## Diagnostic Checks
|
|
1126
|
+
|
|
1127
|
+
| Check | Command | When To Use |
|
|
1128
|
+
|---|---|---|
|
|
1129
|
+
| Task Capsule format | \`hadara harness validate --task <task-id> --level done --json\` | \`task ready\` or \`task close\` reports done-level validation failures. |
|
|
1130
|
+
| Evidence index | \`hadara evidence lint --task <task-id> --json\` | Evidence files were touched manually by mistake or evidence drift is suspected. |
|
|
1047
1131
|
|
|
1048
1132
|
## Special-Case Checks
|
|
1049
1133
|
|
|
@@ -1072,14 +1156,94 @@ function createRoadmapDoc() {
|
|
|
1072
1156
|
|---|---|---|
|
|
1073
1157
|
`;
|
|
1074
1158
|
}
|
|
1159
|
+
function createTaskWorkflowCommandsDoc() {
|
|
1160
|
+
return `# TASK_WORKFLOW_COMMANDS
|
|
1161
|
+
|
|
1162
|
+
HADARA task workflow commands are split by responsibility. Similar-looking commands are not interchangeable: some only report state, some check readiness, some perform bounded bookkeeping writes, and some append close evidence.
|
|
1163
|
+
|
|
1164
|
+
## Standard Task Loop
|
|
1165
|
+
|
|
1166
|
+
Use this loop for ordinary implementation capsules:
|
|
1167
|
+
|
|
1168
|
+
\`\`\`bash
|
|
1169
|
+
hadara task next --json
|
|
1170
|
+
|
|
1171
|
+
# If a matching capsule already exists:
|
|
1172
|
+
hadara task status --task T-XXXX --json
|
|
1173
|
+
|
|
1174
|
+
# If no matching capsule exists, create one first:
|
|
1175
|
+
hadara task create "task title" --json
|
|
1176
|
+
hadara task status --task T-XXXX --json
|
|
1177
|
+
|
|
1178
|
+
# Do the scoped work.
|
|
1179
|
+
|
|
1180
|
+
hadara evidence add-command --task T-XXXX --summary "..." --result passed --json
|
|
1181
|
+
|
|
1182
|
+
hadara task finish --task T-XXXX --json
|
|
1183
|
+
hadara task finish --task T-XXXX --execute --json
|
|
1184
|
+
|
|
1185
|
+
# Finalize Task Capsule docs and tracked state docs before closing.
|
|
1186
|
+
|
|
1187
|
+
hadara task ready --task T-XXXX --level done --json
|
|
1188
|
+
|
|
1189
|
+
# Optional workflow compression / next action preview:
|
|
1190
|
+
hadara task complete --task T-XXXX --json
|
|
1191
|
+
|
|
1192
|
+
hadara task close --task T-XXXX --json
|
|
1193
|
+
hadara task close --task T-XXXX --execute --json
|
|
1194
|
+
|
|
1195
|
+
hadara task audit-close --task T-XXXX --json
|
|
1196
|
+
\`\`\`
|
|
1197
|
+
|
|
1198
|
+
\`task finish\`, \`task ready\`, and \`task close\` are intentionally separate. \`finish\` synchronizes bounded status bookkeeping first. \`ready\` then validates the Done-level state. \`close\` records close evidence after validation succeeds. \`audit-close\` checks the resulting close evidence after the write.
|
|
1199
|
+
|
|
1200
|
+
The close model has three separate phases: validation proves readiness, close records the proof, and audit checks the already-recorded close evidence. Close evidence is excluded from the current validation loop because it is appended after validation; requiring it as a same-run precondition would create a fixed-point loop.
|
|
1201
|
+
|
|
1202
|
+
\`task ready\` and \`task close\` include done-level Task Capsule validation. Use \`hadara harness validate --task T-XXXX --level done --json\` directly when debugging capsule format, status-history, acceptance, evidence, or handoff validation failures.
|
|
1203
|
+
|
|
1204
|
+
Before close, finish all close-source edits: Task Capsule docs, acceptance/tests/handoff notes, evidence summaries, \`docs/TASK_BOARD.md\`, and tracked state docs such as \`docs/PROJECT_STATE.md\`, \`docs/AGENT_HANDOFF.md\`, and roadmap/slice docs when they apply. After \`task close --execute --json\`, changing those documents changes the close source hash and requires rerunning \`task ready\`, \`task close\`, and \`task audit-close\`. Do not paste volatile close evidence ids into close-source docs; prefer stable wording such as "close evidence appended; audit returned closed-valid".
|
|
1205
|
+
|
|
1206
|
+
## Command Semantics
|
|
1207
|
+
|
|
1208
|
+
| Command | Default Write Behavior | Notes |
|
|
1209
|
+
|---|---|---|
|
|
1210
|
+
| \`task next\` | Read-only | Recommends work; does not create tasks. |
|
|
1211
|
+
| \`task status\` | Read-only | \`ok\` means report generation succeeded; readiness is in \`state.ready\`, \`summary.blockers\`, and \`issues\`. |
|
|
1212
|
+
| \`task create\` | Write | Creates a Draft Task Capsule and Task Board row. It does not imply the task is ready or done. |
|
|
1213
|
+
| \`evidence add-command\` | Write | Appends operator-supplied command-log evidence. It does not execute shell commands or capture stdout/stderr. |
|
|
1214
|
+
| \`task finish\` | Dry-run by default; writes only with \`--execute\` | Updates only \`TASK.md\` status bookkeeping and the matching \`docs/TASK_BOARD.md\` row. |
|
|
1215
|
+
| \`task ready\` | Read-only | Checks whether the task can satisfy the requested readiness level after finish. |
|
|
1216
|
+
| \`task complete\` | Read-only | Summarizes the current completion stage and next command; it does not execute lifecycle writes. |
|
|
1217
|
+
| \`task close\` | Dry-run by default; writes only with \`--execute\` | Appends only canonical close evidence after close preconditions pass. |
|
|
1218
|
+
| \`task audit-close\` | Read-only | Verifies close evidence after close. |
|
|
1219
|
+
|
|
1220
|
+
## Non-Overlap Rules
|
|
1221
|
+
|
|
1222
|
+
- \`task next\` chooses work; it does not create a capsule or infer completion.
|
|
1223
|
+
- \`task status\` is an operator console; \`ok: true\` means report generation succeeded, not that the task is ready.
|
|
1224
|
+
- \`task ready\` checks readiness; it does not write evidence or status.
|
|
1225
|
+
- \`harness validate\` is a direct diagnostic for Task Capsule structure and done-level gates; it is not a replacement for close evidence.
|
|
1226
|
+
- \`task complete\` is a read-only workflow compressor. It may report the next lifecycle command, but it must not execute finish, ready, close, or audit commands.
|
|
1227
|
+
- \`evidence add-command\` records an operator-supplied command result; it does not run the command.
|
|
1228
|
+
- \`task finish\` may update only the Task Capsule \`TASK.md\` status and matching \`docs/TASK_BOARD.md\` status/path row.
|
|
1229
|
+
- \`task close\` may append only close evidence. It must not update status docs, Task Board rows, handoff, Project State, roadmap docs, or arbitrary evidence.
|
|
1230
|
+
- After \`task close --execute --json\`, close-source document edits intentionally invalidate the previous close proof. Make those edits before close, or rerun ready/close/audit if the edit is unavoidable.
|
|
1231
|
+
- \`task audit-close\` is read-only and should be run after \`task close --execute --json\`.
|
|
1232
|
+
|
|
1233
|
+
## State Documents
|
|
1234
|
+
|
|
1235
|
+
\`task finish --execute --json\` deliberately does not update broad prose state. Operators still update \`docs/PROJECT_STATE.md\`, \`docs/AGENT_HANDOFF.md\`, and any roadmap/slice docs generated for the selected profile when the task changes project state.
|
|
1236
|
+
`;
|
|
1237
|
+
}
|
|
1075
1238
|
function createAgentsDoc(spec) {
|
|
1076
1239
|
const requiredReadingRows = [
|
|
1077
1240
|
['1', '`docs/PROJECT_STATE.md`', 'Every session', 'Current product and capability state.'],
|
|
1078
1241
|
['2', '`docs/AGENT_HANDOFF.md`', 'Every session', 'Compact continuation state.'],
|
|
1079
1242
|
['3', '`docs/TASK_BOARD.md`', 'Every session', 'Current task queue and status.'],
|
|
1080
|
-
['4', '`docs/IMPLEMENTATION_SOP.md`', 'Every session', 'Local workflow and required-reading registry.']
|
|
1243
|
+
['4', '`docs/IMPLEMENTATION_SOP.md`', 'Every session', 'Local workflow and required-reading registry.'],
|
|
1244
|
+
['5', '`docs/TASK_WORKFLOW_COMMANDS.md`', 'Starting, finishing, closing, auditing, or explaining task workflow commands', 'Standard task loop, dry-run boundaries, and command `ok` semantics.']
|
|
1081
1245
|
];
|
|
1082
|
-
let order =
|
|
1246
|
+
let order = 6;
|
|
1083
1247
|
if (spec.docs.architecture)
|
|
1084
1248
|
requiredReadingRows.push([String(order++), '`docs/ARCHITECTURE.md`', 'Architecture, component, or boundary work', 'Current system shape and ownership boundaries.']);
|
|
1085
1249
|
if (spec.docs.developmentSlices)
|
|
@@ -1099,7 +1263,8 @@ function createAgentsDoc(spec) {
|
|
|
1099
1263
|
const ruleRows = [
|
|
1100
1264
|
['Task boundary', 'Keep work inside one Task Capsule whenever possible.', 'Active Task Capsule'],
|
|
1101
1265
|
['Task creation', 'If no suitable capsule exists, create one with `hadara task create <title>`.', '`docs/TASK_BOARD.md`'],
|
|
1102
|
-
['Evidence', 'Do not mark work done without evidence.', '`EVIDENCE.md`, `evidence.jsonl`'],
|
|
1266
|
+
['Evidence', 'Do not mark work done without evidence. Do not hand-edit `evidence.jsonl`; record failed or blocked checks honestly instead of replacing them with optimistic summaries.', '`EVIDENCE.md`, `evidence.jsonl`'],
|
|
1267
|
+
['Task workflow', 'For task workflow commands, follow `docs/TASK_WORKFLOW_COMMANDS.md`: record evidence, preview and execute `task finish`, finalize close-source docs, run `task ready`, preview and execute `task close`, then run `task audit-close`.', 'Task Capsule evidence'],
|
|
1103
1268
|
['Safety', 'Do not execute dangerous commands without explicit user approval.', 'Task Capsule evidence'],
|
|
1104
1269
|
['Secrets', 'Do not write secrets, private logs, or machine-local state into committed files.', 'Changed-file review'],
|
|
1105
1270
|
['Store boundary', 'Preserve the portable/project store boundary.', spec.docs.architecture ? '`.gitignore`, `docs/ARCHITECTURE.md`' : '`.gitignore`'],
|
|
@@ -1143,6 +1308,22 @@ dist/
|
|
|
1143
1308
|
coverage/
|
|
1144
1309
|
*.log
|
|
1145
1310
|
|
|
1311
|
+
# Python and test artifacts
|
|
1312
|
+
__pycache__/
|
|
1313
|
+
*.py[cod]
|
|
1314
|
+
*$py.class
|
|
1315
|
+
.pytest_cache/
|
|
1316
|
+
.mypy_cache/
|
|
1317
|
+
.ruff_cache/
|
|
1318
|
+
.coverage
|
|
1319
|
+
htmlcov/
|
|
1320
|
+
.venv/
|
|
1321
|
+
venv/
|
|
1322
|
+
env/
|
|
1323
|
+
*.db
|
|
1324
|
+
*.sqlite
|
|
1325
|
+
*.sqlite3
|
|
1326
|
+
|
|
1146
1327
|
# HADARA local/private state
|
|
1147
1328
|
.hadara/local/
|
|
1148
1329
|
.hadara/tmp/
|