devflow-kit 3.8.0 → 3.9.0
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/CHANGELOG.md +120 -0
- package/README.md +5 -5
- package/dist/agents/code.md +4 -4
- package/dist/agents/fix.md +1 -1
- package/dist/agents/git.md +2 -2
- package/dist/agents/skim.md +1 -1
- package/dist/agents/triage.md +7 -0
- package/dist/cli/commands/curation.js +67 -16
- package/dist/cli/commands/gate-level-prompts.js +8 -6
- package/dist/cli/commands/gates.js +5 -4
- package/dist/cli/commands/init.js +8 -7
- package/dist/cli/commands/memory.js +59 -12
- package/dist/cli/commands/uninstall.js +77 -9
- package/dist/commands/bug-analysis.md +2 -2
- package/dist/commands/code-review.md +11 -11
- package/dist/commands/debug.md +2 -2
- package/dist/commands/dynamic-build.md +2 -2
- package/dist/commands/dynamic-plan.md +2 -2
- package/dist/commands/dynamic-profile.md +2 -2
- package/dist/commands/dynamic-tickets.md +2 -2
- package/dist/commands/explore.md +2 -2
- package/dist/commands/implement.md +2 -2
- package/dist/commands/plan.md +2 -2
- package/dist/commands/release.md +2 -2
- package/dist/commands/research.md +2 -2
- package/dist/commands/resolve.md +16 -16
- package/dist/commands/self-review.md +2 -2
- package/dist/core/area-pause-notice.js +44 -0
- package/dist/core/curation-move-skip.js +4 -5
- package/dist/core/curation-queue-cleanup.js +6 -5
- package/dist/core/curation-store.js +1 -0
- package/dist/core/evidence-policy.js +10 -8
- package/dist/core/plugins.js +4 -4
- package/dist/core/tracked-areas.js +138 -14
- package/dist/curation-off/agents/code.md +4 -4
- package/dist/curation-off/agents/fix.md +1 -1
- package/dist/curation-off/agents/triage.md +7 -0
- package/dist/curation-off/commands/code-review.md +11 -11
- package/dist/curation-off/commands/debug.md +2 -2
- package/dist/curation-off/commands/dynamic-build.md +2 -2
- package/dist/curation-off/commands/explore.md +2 -2
- package/dist/curation-off/commands/implement.md +2 -2
- package/dist/curation-off/commands/plan.md +2 -2
- package/dist/curation-off/commands/resolve.md +16 -16
- package/dist/curation-off/commands/self-review.md +2 -2
- package/dist/hud/components/curation-counts.js +27 -0
- package/dist/skills/git/references/pr/post-resolution-summary.md +12 -11
- package/dist/skills/git/references/pr/post-review-summary.md +12 -11
- package/dist/skills/git/references/pr/update-pr-evidence.md +2 -2
- package/dist/skills/git/references/publication-gate.md +6 -7
- package/dist/skills/git/references/tracker/github/manage-debt.md +6 -2
- package/dist/skills/git/references/tracker/jira/manage-debt.md +6 -2
- package/dist/skills/git/references/tracker/linear/manage-debt.md +6 -2
- package/package.json +1 -1
- package/src/assets/agents/code.mds +4 -4
- package/src/assets/agents/evaluate.md +6 -12
- package/src/assets/agents/fix.mds +1 -1
- package/src/assets/agents/git.mds +2 -2
- package/src/assets/agents/skim.mds +1 -1
- package/src/assets/agents/triage.mds +7 -0
- package/src/assets/agents/validate.md +20 -27
- package/src/assets/commands/_partials/_decisions.mds +10 -8
- package/src/assets/commands/_partials/_settings.mds +2 -2
- package/src/assets/commands/code-review.mds +9 -9
- package/src/assets/commands/resolve.mds +14 -14
- package/src/assets/mds/git/_ops.mds +6 -1
- package/src/assets/mds/git/_ops_pr.mds +20 -10
- package/src/assets/mds/git/_ops_steps.mds +10 -0
- package/src/assets/mds/git/_pr.mds +14 -14
- package/src/assets/mds/git/_references.mds +6 -7
- package/src/assets/mds/tracker/_github.mds +1 -4
- package/src/assets/mds/tracker/_jira.mds +1 -4
- package/src/assets/mds/tracker/_linear.mds +1 -4
- package/src/assets/scripts/ci-wait.cjs +389 -92
- package/src/assets/scripts/hooks/background-memory-update +79 -1
- package/src/assets/scripts/hooks/json-helper.cjs +44 -2
- package/src/assets/scripts/hooks/lib/curation-store.cjs +82 -20
- package/src/assets/scripts/hooks/lib/render-decisions.cjs +9 -1
- package/src/assets/scripts/hooks/lib/tracked-areas.cjs +226 -33
- package/src/assets/scripts/hooks/memory-permission +10 -2
- package/src/assets/scripts/hooks/memory-worker +11 -0
- package/src/assets/scripts/hooks/pre-compact-memory +11 -0
- package/src/assets/scripts/hooks/queue-append +218 -1
- package/src/assets/scripts/hooks/session-start-context +89 -37
- package/src/assets/scripts/hooks/session-start-memory +39 -0
- package/src/assets/scripts/pr-evidence.cjs +5 -2
- package/src/assets/scripts/resolve-settings.cjs +244 -30
- package/src/assets/scripts/verify-evidence.cjs +307 -75
- package/src/assets/skills/agent-references/SKILL.md +7 -1
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +6 -4
- package/src/assets/skills/agent-references/references/commands/resolve-levels.md +3 -2
- package/src/assets/skills/agent-references/references/synthesize/review.md +4 -4
- package/src/assets/skills/agent-references/references/triage/severity-tiers.md +43 -0
- package/src/assets/skills/agent-references/references/validate/passed-alone.md +14 -0
|
@@ -28,12 +28,16 @@ one file, so they are readable from the operation's section alone:
|
|
|
28
28
|
|
|
29
29
|
- the two summary operations' sentence naming `references/publication-gate.md`
|
|
30
30
|
(D10's scope property [DR-20](i) is asserted over the references that name it);
|
|
31
|
+
- the two summary operations' private-sections rule;
|
|
31
32
|
- `post-resolution-summary`'s non-reproduction clause (Principle 8's containment
|
|
32
33
|
obligation, readable from the operation's OWN section);
|
|
33
34
|
- `resolve-review-threads`' step 3, the D9 gate application, between steps 2 and 4
|
|
34
35
|
(the D9 predicate has one authority, and `references/decision-markers.md` is where
|
|
35
36
|
the reference tree states it).
|
|
36
37
|
|
|
38
|
+
The two summary operations carry no `PR mechanics held here` line. The review
|
|
39
|
+
operation's cap line holds the 422 reason for both operations.
|
|
40
|
+
|
|
37
41
|
`ensure-pr-ready` is not here. It is a tracker operation as well, so its one
|
|
38
42
|
reference per provider holds the PR skeleton (`_ops_steps.mds`) and the provider's step 4b
|
|
39
43
|
together; see `tracker/_github.mds`, `_jira.mds` and `_linear.mds`.
|
|
@@ -82,30 +86,28 @@ Load for `validate-branch` under every tracker provider.
|
|
|
82
86
|
|
|
83
87
|
Load for `post-review-summary` under every tracker provider.
|
|
84
88
|
|
|
85
|
-
**PR mechanics held here:** the author-filtered marker dedup, the visibility probe, the FULL/STUB compose templates with the 60000-character cap, and the scrub-then-post call.
|
|
86
|
-
|
|
87
89
|
### Process
|
|
88
90
|
|
|
89
|
-
1. Check for existing comment with this run's marker (author-filtered
|
|
91
|
+
1. Check for existing comment with this run's marker (author-filtered, so a third party's copy of the marker cannot suppress it):
|
|
90
92
|
- Fetch viewer login: `gh api user --jq '.login'` → store as VIEWER_LOGIN
|
|
91
93
|
- `gh pr view {PR_NUMBER} --json comments --jq '[.comments[] | select(.author.login == "'"$VIEWER_LOGIN"'")] | .[].body'`
|
|
92
94
|
- Search for `<!-- devflow:review-summary cycle:{CYCLE_NUMBER} ts:{REVIEW_TIMESTAMP}` in the viewer-authored comment bodies only (full pair match)
|
|
93
95
|
- If found: skip — report `Skipped: already posted for cycle {CYCLE_NUMBER} ts:{REVIEW_TIMESTAMP}`
|
|
94
96
|
2. Load `references/publication-gate.md` and resolve `REVIEW_PUBLICATION` by its step 2; `off` ends the op without posting.
|
|
95
97
|
3. Probe (if mode not yet determined): `gh repo view --json visibility --jq '.visibility'`, case-insensitive. `PRIVATE`/`INTERNAL` → FULL; `PUBLIC` → `STUB (public repository)`; empty output, an error or any other value → `STUB (visibility undeterminable)`. **Fail-closed: on any error or unrecognised value, treat as PUBLIC (mode STUB).**
|
|
96
|
-
4. Read `REVIEW_SUMMARY_PATH`
|
|
98
|
+
4. Read `REVIEW_SUMMARY_PATH` (repo-relative) under `WORKTREE_PATH` (else cwd); strip it (above).
|
|
97
99
|
5. Compose body:
|
|
98
100
|
- **FULL mode:**
|
|
99
101
|
```
|
|
100
102
|
<!-- devflow:review-summary cycle:{CYCLE_NUMBER} ts:{REVIEW_TIMESTAMP} -->
|
|
101
103
|
## Code Review — Cycle {CYCLE_NUMBER}
|
|
102
104
|
|
|
103
|
-
{
|
|
105
|
+
{stripped review-summary.md}
|
|
104
106
|
|
|
105
107
|
---
|
|
106
108
|
*Posted by [devflow](https://github.com/dean0x/devflow) · cycle {CYCLE_NUMBER}*
|
|
107
109
|
```
|
|
108
|
-
- **STUB mode** (
|
|
110
|
+
- **STUB mode** (stripped text only; excluded: all but the counts table):
|
|
109
111
|
```
|
|
110
112
|
<!-- devflow:review-summary cycle:{CYCLE_NUMBER} ts:{REVIEW_TIMESTAMP} -->
|
|
111
113
|
## Code Review — Cycle {CYCLE_NUMBER}
|
|
@@ -214,28 +216,26 @@ unexplained unresolved threads.
|
|
|
214
216
|
|
|
215
217
|
Load for `post-resolution-summary` under every tracker provider.
|
|
216
218
|
|
|
217
|
-
**PR mechanics held here:** the author-filtered marker dedup, the visibility probe, the FULL/STUB compose templates with the 60000-character cap, and the scrub-then-post call.
|
|
218
|
-
|
|
219
219
|
### Process
|
|
220
220
|
|
|
221
|
-
1. Check for existing marker (author-filtered
|
|
221
|
+
1. Check for an existing marker (author-filtered, so a third party's copy of it cannot suppress devflow's comment):
|
|
222
222
|
- Fetch viewer login: `gh api user --jq '.login'` → store as VIEWER_LOGIN
|
|
223
223
|
- `gh pr view {PR_NUMBER} --json comments --jq '[.comments[] | select(.author.login == "'"$VIEWER_LOGIN"'")] | .[].body'`
|
|
224
224
|
- Search the viewer-authored bodies only for the exact key `<!-- devflow:resolution-summary ts:{RESOLUTION_TS} -->`
|
|
225
225
|
- If found: skip — report `Skipped: already posted for ts:{RESOLUTION_TS}`
|
|
226
226
|
2. Load `references/publication-gate.md` and resolve `REVIEW_PUBLICATION` by its step 2; `off` ends the op without posting.
|
|
227
227
|
3. Probe (if mode not yet determined): `gh repo view --json visibility --jq '.visibility'`, case-insensitive. `PRIVATE`/`INTERNAL` → FULL; `PUBLIC` → `STUB (public repository)`; empty output, an error or any other value → `STUB (visibility undeterminable)`. **Fail-closed: on any error or unrecognised value, treat as PUBLIC (mode STUB).**
|
|
228
|
-
4. Read `RESOLUTION_SUMMARY_PATH`
|
|
228
|
+
4. Read `RESOLUTION_SUMMARY_PATH` (repo-relative) under `WORKTREE_PATH` (else cwd); strip it (above).
|
|
229
229
|
5. Compose body (where `{TS}` = `RESOLUTION_TS`):
|
|
230
230
|
- **FULL mode:**
|
|
231
231
|
```
|
|
232
232
|
<!-- devflow:resolution-summary ts:{TS} -->
|
|
233
|
-
{
|
|
233
|
+
{stripped resolution-summary.md}
|
|
234
234
|
|
|
235
235
|
---
|
|
236
236
|
*Posted by [devflow](https://github.com/dean0x/devflow)*
|
|
237
237
|
```
|
|
238
|
-
- **STUB mode** (excluded:
|
|
238
|
+
- **STUB mode** (stripped text only; excluded: all but the counts table):
|
|
239
239
|
```
|
|
240
240
|
<!-- devflow:resolution-summary ts:{TS} -->
|
|
241
241
|
## Resolution Summary
|
|
@@ -247,7 +247,7 @@ Load for `post-resolution-summary` under every tracker provider.
|
|
|
247
247
|
Full report: {RESOLUTION_SUMMARY_PATH} (not committed; ask the author)
|
|
248
248
|
*Posted by [devflow](https://github.com/dean0x/devflow)*
|
|
249
249
|
```
|
|
250
|
-
Cap body at 60000 characters
|
|
250
|
+
Cap body at 60000 characters; truncate lowest-value sections first (Suggestions, then Pre-existing), keeping the counts table and every Blocking entry; end with `…truncated — full report in the local review artifact {RESOLUTION_SUMMARY_PATH} (not committed; ask the author)`.
|
|
251
251
|
6. Write body to `$DEVFLOW_BODY_RAW`; apply the Comment-sink scrub (D11) — non-zero exit or missing script → DO NOT POST. Re-check the 60000-char cap on the scrubbed body (redaction may grow it; truncate at a line boundary below 59,800 chars, keeping the truncation pointer sentence; if truncation fires here: emit `NOTE: body exceeded 60k after redaction — truncated/stub posted` in op output and prepend that notice to the body). Post: `gh pr comment {PR_NUMBER} --body-file "$DEVFLOW_BODY"`.
|
|
252
252
|
7. On 5xx: retry once. If still 5xx: `TRACEABILITY: DEGRADED (5xx on post-resolution-summary)`, warn, return.
|
|
253
253
|
@end
|
|
@@ -301,7 +301,7 @@ Load for `update-pr-evidence` under every tracker provider.
|
|
|
301
301
|
1. From `WORKTREE_PATH` (else cwd), run `node "$HOME/.devflow/scripts/verify-evidence.cjs" publish --pr {PR_NUMBER}; echo "exit=$?"`, adding `--publication {REVIEW_PUBLICATION}` only when that is `auto`, `full`, `off` or `stub`, and `--evidence "{EVIDENCE_FILE}"` when given — only a value matching `^[A-Za-z0-9._/-]{1,255}$` reaches the shell; any other is a failed run. Set the Bash `timeout` to 180000.
|
|
302
302
|
2. Print the script's stdout and nothing else. On exit 0 it is the `## PR Evidence` block: the heading, the line `EVIDENCE pr:<n> head:<sha> total:<n> VERIFIED-CI:<n> ATTESTED-LOCAL:<n> UNVERIFIED:<n> STALE:<n> FAILED:<n> INDETERMINATE:<n> stale:<ids|none> exceptions:<kinds|none> approval:<yes|no|unchecked> key:<hex> posted:<yes|no|n/a> body:<same|changed>`, and the `**Body**:` / `**Comment**:` line, then one `TRACEABILITY: DEGRADED ({reason})` line for each part that degraded, such as `DEGRADED (concurrent edit)` (the body edit then reads `SKIPPED`), `DEGRADED (body read-back mismatch)` or `DEGRADED (redaction unavailable)`: a body the script cannot scrub is never posted. On exit 2 it is `TRACEABILITY: DEGRADED (evidence unavailable)`. Any other exit, or empty stdout, is a failed run: emit that same line.
|
|
303
303
|
|
|
304
|
-
Run nothing else: the script makes the one PR read, the compare-and-swap body edit, its read-back and the
|
|
304
|
+
Run nothing else: the script makes the one PR read, the compare-and-swap body edit, its read-back and the evidence comment itself, edited in place when the viewer's own is the newest evidence comment, and posts nothing it could not scrub.
|
|
305
305
|
@end
|
|
306
306
|
|
|
307
307
|
<!-- op: validate-branch -->
|
|
@@ -104,15 +104,14 @@ When `.devflow/conventions.md` already exists the operation returns
|
|
|
104
104
|
|
|
105
105
|
Applies to **`post-review-summary` and `post-resolution-summary` only.** No other op probes repo visibility.
|
|
106
106
|
|
|
107
|
-
**Step order
|
|
108
|
-
1. Dedup check (D7/D8 marker
|
|
107
|
+
**Step order:**
|
|
108
|
+
1. Dedup check (D7/D8 marker; stays first).
|
|
109
109
|
2. Resolve `REVIEW_PUBLICATION` input: `off` → report `**Publication**: OFF (publication disabled by config)`, op ends without posting. `full` → mode FULL, skip probe. `auto` or absent/unrecognised → probe.
|
|
110
110
|
- `stub` (never unrecognised) → mode STUB, skip probe; report `STUB (evidence policy)`.
|
|
111
|
-
3. Probe once: `gh repo view --json visibility --jq '.visibility'
|
|
112
|
-
4. Compose body (
|
|
113
|
-
5. Scrub per D11 (both modes
|
|
114
|
-
6.
|
|
115
|
-
7. Post; 5xx retry-once (unchanged).
|
|
111
|
+
3. Probe once: `gh repo view --json visibility --jq '.visibility'`, case-insensitive. `PRIVATE` or `INTERNAL` → mode FULL; anything else → mode STUB. **Fail-closed rule: on any error or unrecognised value, treat as PUBLIC (mode STUB).**
|
|
112
|
+
4. Compose body (defined per op).
|
|
113
|
+
5. Scrub per D11 (both modes), then re-check the 60000-char cap **after** the scrub.
|
|
114
|
+
6. Post; 5xx retry-once.
|
|
116
115
|
@end
|
|
117
116
|
|
|
118
117
|
@define trust_rule():
|
|
@@ -152,10 +152,7 @@ Load when the resolved tracker provider is `github` and the operation is `manage
|
|
|
152
152
|
|
|
153
153
|
1. Find or create "Tech Debt Backlog" issue with `tech-debt` label
|
|
154
154
|
2. Check issue body size; archive if > 60000 chars (per devflow:git)
|
|
155
|
-
|
|
156
|
-
- `## Fix Separately` entries from `{REVIEW_DIR}/resolution-summary.md` (FIX_SEPARATE from Triage agent)
|
|
157
|
-
- `## Deferred to Tech Debt` entries from `{REVIEW_DIR}/resolution-summary.md` (TECH_DEBT from Triage agent)
|
|
158
|
-
- Pre-existing issues (Category 3) from review reports
|
|
155
|
+
{{opsteps.manage_debt_step_3()}}
|
|
159
156
|
4. Deduplicate against existing items using semantic matching
|
|
160
157
|
5. Remove items that have been fixed (verify in codebase)
|
|
161
158
|
6. Compose updated issue body to `$DEVFLOW_BODY_RAW`; apply the Comment-sink scrub (D11) and post via `gh issue edit {number} --body-file "$DEVFLOW_BODY"`
|
|
@@ -177,10 +177,7 @@ Load when the resolved tracker provider is `jira` and the operation is `manage-d
|
|
|
177
177
|
|
|
178
178
|
1. Find or create the rolling "Tech Debt Backlog" item. `## Tech Debt` defaults to a **single rolling item**, so this operation looks for exactly one: use the *search* capability once with a structured filter over the resolved project and the tech-debt label. Absent ⇒ create it with the *create issue* capability, using only the field names `## Required Fields` allows.
|
|
179
179
|
2. Check the item's description length against the `{{comment_cap()}}`-character cap; archive when it is over.
|
|
180
|
-
|
|
181
|
-
- `## Fix Separately` entries from `{REVIEW_DIR}/resolution-summary.md` (FIX_SEPARATE from Triage agent)
|
|
182
|
-
- `## Deferred to Tech Debt` entries from `{REVIEW_DIR}/resolution-summary.md` (TECH_DEBT from Triage agent)
|
|
183
|
-
- Pre-existing issues (Category 3) from review reports
|
|
180
|
+
{{opsteps.manage_debt_step_3()}}
|
|
184
181
|
4. Deduplicate against existing items using semantic matching.
|
|
185
182
|
5. Remove items that have been fixed (verify in codebase).
|
|
186
183
|
6. Compose the updated description and post it through the gate in `### Posting gate` below, using the *update description* capability.
|
|
@@ -215,10 +215,7 @@ Load when the resolved tracker provider is `linear` and the operation is `manage
|
|
|
215
215
|
|
|
216
216
|
1. Find or create the rolling "Tech Debt Backlog" item. `## Tech Debt` defaults to a **single rolling item**, so this operation looks for exactly one: use the *search* capability once with a structured filter over the resolved team and the tech-debt label. Absent ⇒ create it with the *create issue* capability, using only the field names `## Required Fields` allows.
|
|
217
217
|
2. Check the item's description length against the `{{comment_cap()}}`-character cap; archive when it is over.
|
|
218
|
-
|
|
219
|
-
- `## Fix Separately` entries from `{REVIEW_DIR}/resolution-summary.md` (FIX_SEPARATE from Triage agent)
|
|
220
|
-
- `## Deferred to Tech Debt` entries from `{REVIEW_DIR}/resolution-summary.md` (TECH_DEBT from Triage agent)
|
|
221
|
-
- Pre-existing issues (Category 3) from review reports
|
|
218
|
+
{{opsteps.manage_debt_step_3()}}
|
|
222
219
|
4. Deduplicate against existing items using semantic matching.
|
|
223
220
|
5. Remove items that have been fixed (verify in codebase).
|
|
224
221
|
6. Compose the updated description and post it through the gate in `### Posting gate` below, using the *update description* capability.
|