devflow-kit 3.4.0 → 3.6.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 +127 -0
- package/README.md +12 -8
- package/dist/agents/code.md +39 -182
- package/dist/agents/{diagnose.md → debug.md} +4 -4
- package/dist/agents/design.md +0 -1
- package/dist/agents/fix.md +165 -0
- package/dist/agents/git.md +31 -693
- package/dist/agents/{scrutinize.md → harden.md} +9 -6
- package/dist/agents/knowledge.md +8 -2
- package/dist/agents/refactor.md +133 -0
- package/dist/agents/research.md +6 -0
- package/dist/agents/review.md +0 -4
- package/dist/agents/skim.md +4 -0
- package/dist/agents/triage.md +8 -1
- package/dist/cli/agents-view/render.js +1 -1
- package/dist/cli/commands/behavior-prompts.js +77 -0
- package/dist/cli/commands/behavior.js +123 -0
- package/dist/cli/commands/flags.js +8 -2
- package/dist/cli/commands/init-seed.js +7 -3
- package/dist/cli/commands/init.js +75 -8
- package/dist/cli/commands/learning.js +12 -12
- package/dist/cli/commands/legacy-hooks.js +1 -1
- package/dist/cli/commands/rules.js +16 -0
- package/dist/cli/commands/tracker.js +112 -15
- package/dist/cli/commands/uninstall.js +111 -5
- package/dist/cli.js +2 -0
- package/dist/commands/bug-analysis.md +22 -18
- package/dist/commands/code-review.md +25 -29
- package/dist/commands/debug.md +36 -15
- package/dist/commands/dynamic-build.md +64 -78
- package/dist/commands/dynamic-plan.md +18 -14
- package/dist/commands/dynamic-profile.md +8 -6
- package/dist/commands/dynamic-tickets.md +19 -15
- package/dist/commands/explore.md +14 -14
- package/dist/commands/implement.md +122 -225
- package/dist/commands/plan.md +32 -47
- package/dist/commands/release.md +12 -7
- package/dist/commands/research.md +26 -15
- package/dist/commands/resolve.md +53 -92
- package/dist/commands/self-review.md +42 -42
- package/dist/core/agent-frontmatter.js +101 -0
- package/dist/core/agent-models.js +47 -11
- package/dist/core/compliance-compose.js +6 -4
- package/dist/core/{learning-tuning-config.js → curate-tuning-config.js} +14 -14
- package/dist/core/feature-switch.js +23 -2
- package/dist/core/flags.js +111 -0
- package/dist/core/learning-queue-cleanup.js +1 -1
- package/dist/core/manifest.js +11 -3
- package/dist/core/mds-variants.js +68 -26
- package/dist/core/migrations.js +63 -44
- package/dist/core/plugins.js +49 -70
- package/dist/core/project-paths.js +3 -7
- package/dist/core/proxy-log.js +1 -1
- package/dist/core/proxy-state.js +1 -1
- package/dist/core/tracker.js +120 -2
- package/dist/hud/codex-usage.js +247 -0
- package/dist/hud/components/codex-quota.js +37 -0
- package/dist/hud/components/usage-quota.js +1 -1
- package/dist/hud/config.js +1 -0
- package/dist/hud/index.js +16 -3
- package/dist/hud/render.js +3 -1
- package/dist/learning-off/agents/code.md +37 -180
- package/dist/learning-off/agents/{diagnose.md → debug.md} +4 -4
- package/dist/learning-off/agents/design.md +0 -1
- package/dist/learning-off/agents/fix.md +161 -0
- package/dist/learning-off/agents/{scrutinize.md → harden.md} +9 -6
- package/dist/learning-off/agents/knowledge.md +8 -2
- package/dist/learning-off/agents/refactor.md +129 -0
- package/dist/learning-off/agents/research.md +6 -0
- package/dist/learning-off/agents/review.md +0 -4
- package/dist/learning-off/agents/skim.md +4 -0
- package/dist/learning-off/agents/triage.md +8 -1
- package/dist/learning-off/commands/bug-analysis.md +12 -12
- package/dist/learning-off/commands/code-review.md +14 -22
- package/dist/learning-off/commands/debug.md +24 -8
- package/dist/learning-off/commands/dynamic-build.md +58 -74
- package/dist/learning-off/commands/dynamic-plan.md +12 -10
- package/dist/learning-off/commands/dynamic-profile.md +2 -2
- package/dist/learning-off/commands/dynamic-tickets.md +13 -11
- package/dist/learning-off/commands/explore.md +3 -7
- package/dist/learning-off/commands/implement.md +110 -217
- package/dist/learning-off/commands/plan.md +21 -39
- package/dist/learning-off/commands/release.md +7 -4
- package/dist/learning-off/commands/research.md +16 -9
- package/dist/learning-off/commands/resolve.md +42 -85
- package/dist/learning-off/commands/self-review.md +30 -34
- package/dist/skills/git/references/learn-conventions.md +27 -3
- package/dist/skills/git/references/pr/check-ci-status.md +19 -0
- package/dist/skills/git/references/pr/check-merge-readiness.md +21 -0
- package/dist/skills/git/references/pr/fetch-review-threads.md +30 -0
- package/dist/skills/git/references/pr/post-resolution-summary.md +18 -0
- package/dist/skills/git/references/pr/post-review-summary.md +20 -0
- package/dist/skills/git/references/pr/resolve-review-threads.md +28 -4
- package/dist/skills/git/references/pr/update-pr-evidence.md +17 -6
- package/dist/skills/git/references/pr/validate-branch.md +26 -0
- package/dist/skills/git/references/tracker/github/associate-release.md +24 -0
- package/dist/skills/git/references/tracker/github/backlink-shipped-issues.md +31 -1
- package/dist/skills/git/references/tracker/github/create-release.md +30 -1
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +89 -2
- package/dist/skills/git/references/tracker/github/ensure-traceable-issue.md +16 -1
- package/dist/skills/git/references/tracker/github/fetch-issue.md +36 -1
- package/dist/skills/git/references/tracker/github/fetch-issues-batch.md +47 -1
- package/dist/skills/git/references/tracker/github/gather-release-evidence.md +25 -0
- package/dist/skills/git/references/tracker/github/manage-debt.md +21 -1
- package/dist/skills/git/references/tracker/github/post-wave-report.md +15 -1
- package/dist/skills/git/references/tracker/github/setup-task.md +41 -1
- package/dist/skills/git/references/tracker/jira/associate-release.md +24 -0
- package/dist/skills/git/references/tracker/jira/backlink-shipped-issues.md +31 -1
- package/dist/skills/git/references/tracker/jira/create-release.md +30 -1
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +89 -2
- package/dist/skills/git/references/tracker/jira/ensure-traceable-issue.md +16 -1
- package/dist/skills/git/references/tracker/jira/fetch-issue.md +36 -1
- package/dist/skills/git/references/tracker/jira/fetch-issues-batch.md +47 -1
- package/dist/skills/git/references/tracker/jira/gather-release-evidence.md +25 -0
- package/dist/skills/git/references/tracker/jira/manage-debt.md +21 -1
- package/dist/skills/git/references/tracker/jira/post-wave-report.md +15 -1
- package/dist/skills/git/references/tracker/jira/setup-task.md +41 -1
- package/dist/skills/git/references/tracker/linear/associate-release.md +24 -0
- package/dist/skills/git/references/tracker/linear/backlink-shipped-issues.md +31 -1
- package/dist/skills/git/references/tracker/linear/create-release.md +30 -1
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +89 -2
- package/dist/skills/git/references/tracker/linear/ensure-traceable-issue.md +16 -1
- package/dist/skills/git/references/tracker/linear/fetch-issue.md +36 -1
- package/dist/skills/git/references/tracker/linear/fetch-issues-batch.md +47 -1
- package/dist/skills/git/references/tracker/linear/gather-release-evidence.md +25 -0
- package/dist/skills/git/references/tracker/linear/manage-debt.md +21 -1
- package/dist/skills/git/references/tracker/linear/post-wave-report.md +15 -1
- package/dist/skills/git/references/tracker/linear/setup-task.md +41 -1
- package/dist/targets/claude-code/agent-type-owner.js +164 -0
- package/dist/targets/claude-code/behavior-install.js +111 -0
- package/dist/targets/claude-code/installer.js +177 -77
- package/dist/targets/claude-code/learning-install.js +9 -1
- package/dist/targets/claude-code/tracker-install.js +33 -16
- package/dist/targets/claude-code/tracker-servers.js +107 -0
- package/package.json +4 -3
- package/src/assets/agents/_partials/_code.mds +109 -0
- package/src/assets/agents/code.mds +18 -222
- package/src/assets/agents/{learning.md → curate.md} +22 -72
- package/src/assets/agents/{diagnose.mds → debug.mds} +4 -4
- package/src/assets/agents/design.mds +0 -1
- package/src/assets/agents/evaluate.md +11 -5
- package/src/assets/agents/explore.md +58 -0
- package/src/assets/agents/fix.mds +113 -0
- package/src/assets/agents/git.mds +31 -693
- package/src/assets/agents/{scrutinize.mds → harden.mds} +9 -6
- package/src/assets/agents/knowledge.mds +8 -2
- package/src/assets/agents/{simplify.md → polish.md} +7 -4
- package/src/assets/agents/refactor.mds +81 -0
- package/src/assets/agents/research.mds +6 -0
- package/src/assets/agents/review.mds +0 -4
- package/src/assets/agents/skim.mds +4 -0
- package/src/assets/agents/synthesize.md +26 -352
- package/src/assets/agents/test.md +10 -2
- package/src/assets/agents/tracker.md +20 -7
- package/src/assets/agents/triage.mds +8 -1
- package/src/assets/agents/validate.md +5 -0
- package/src/assets/commands/_partials/_compliance.mds +36 -0
- package/src/assets/commands/_partials/_decisions.mds +26 -6
- package/src/assets/commands/_partials/_engine.mds +17 -17
- package/src/assets/commands/_partials/_evidence_policy.mds +0 -17
- package/src/assets/commands/_partials/_knowledge.mds +14 -9
- package/src/assets/commands/_partials/_preamble.mds +5 -3
- package/src/assets/commands/_partials/_roster.mds +6 -5
- package/src/assets/commands/_partials/_wave.mds +2 -2
- package/src/assets/commands/bug-analysis.mds +10 -10
- package/src/assets/commands/code-review.mds +12 -22
- package/src/assets/commands/debug.mds +24 -2
- package/src/assets/commands/dynamic-build.mds +34 -51
- package/src/assets/commands/dynamic-plan.mds +4 -3
- package/src/assets/commands/dynamic-tickets.mds +5 -4
- package/src/assets/commands/explore.mds +1 -1
- package/src/assets/commands/implement.mds +108 -201
- package/src/assets/commands/plan.mds +19 -44
- package/src/assets/commands/release.mds +8 -3
- package/src/assets/commands/research.mds +14 -7
- package/src/assets/commands/resolve.mds +37 -82
- package/src/assets/commands/self-review.mds +27 -27
- package/src/assets/mds/.mdsroot +4 -0
- package/src/assets/mds/git/_ops.mds +383 -0
- package/src/assets/mds/git/_ops_pr.mds +201 -0
- package/src/assets/mds/git/_ops_steps.mds +147 -0
- package/src/assets/mds/git/_pr.mds +45 -50
- package/src/assets/mds/git/_references.mds +6 -3
- package/src/assets/mds/tracker/_common.mds +5 -5
- package/src/assets/mds/tracker/_contract.mds +4 -3
- package/src/assets/mds/tracker/_github.mds +60 -14
- package/src/assets/mds/tracker/_jira.mds +60 -14
- package/src/assets/mds/tracker/_linear.mds +60 -14
- package/src/assets/mds/tracker/_steps.mds +10 -9
- package/src/assets/rules/behavior.md +6 -0
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +5 -3
- package/src/assets/scripts/hooks/capture-prompt +1 -1
- package/src/assets/scripts/hooks/capture-question +1 -1
- package/src/assets/scripts/hooks/capture-turn +1 -1
- package/src/assets/scripts/hooks/json-helper.cjs +2 -2
- package/src/assets/scripts/hooks/lib/learning-store.cjs +1 -1
- package/src/assets/scripts/hooks/lib/project-paths.cjs +4 -10
- package/src/assets/scripts/hooks/preamble +1 -1
- package/src/assets/scripts/hooks/session-start-context +58 -45
- package/src/assets/scripts/verify-evidence.cjs +726 -9
- package/src/assets/skills/agent-references/SKILL.md +37 -0
- package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +35 -0
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +15 -0
- package/src/assets/skills/agent-references/references/curate/maintain.md +71 -0
- package/src/assets/skills/agent-references/references/synthesize/bug-analysis.md +71 -0
- package/src/assets/skills/agent-references/references/synthesize/design.md +36 -0
- package/src/assets/skills/agent-references/references/synthesize/exploration.md +38 -0
- package/src/assets/skills/agent-references/references/synthesize/planning.md +60 -0
- package/src/assets/skills/agent-references/references/synthesize/research.md +61 -0
- package/src/assets/skills/agent-references/references/synthesize/review.md +76 -0
- package/src/assets/skills/apply-decisions/SKILL.md +6 -4
- package/src/assets/skills/compliance/SKILL.md +1 -1
- package/src/assets/skills/docs-framework/SKILL.md +81 -84
- package/src/assets/skills/docs-framework/references/patterns.md +14 -25
- package/src/assets/skills/docs-framework/references/violations.md +7 -7
- package/src/assets/skills/gap-analysis/SKILL.md +0 -16
- package/src/assets/skills/gap-analysis/references/compliance.md +19 -0
- package/src/assets/skills/qa/SKILL.md +1 -1
- package/src/assets/skills/quality-gates/SKILL.md +7 -7
- package/src/assets/skills/quality-gates/references/report-template.md +7 -7
- package/dist/skills/git/references/pr/ensure-pr-ready.md +0 -24
|
@@ -7,60 +7,58 @@ allowed-tools: Read, Bash, Glob
|
|
|
7
7
|
|
|
8
8
|
# Documentation Framework
|
|
9
9
|
|
|
10
|
-
The canonical source for
|
|
10
|
+
The canonical source for what Devflow names under `.devflow/docs/`. A command that writes or looks up a doc path follows it, and the one place a command differs is stated here as an exception, never left implicit.
|
|
11
11
|
|
|
12
12
|
## Iron Law
|
|
13
13
|
|
|
14
14
|
> **ALL ARTIFACTS FOLLOW NAMING CONVENTIONS**
|
|
15
15
|
>
|
|
16
|
-
>
|
|
17
|
-
>
|
|
18
|
-
>
|
|
16
|
+
> A run directory is `YYYY-MM-DD_HHMM` in local time; a second run in the same minute takes
|
|
17
|
+
> seconds (`YYYY-MM-DD_HHMMSS`). Branch slugs replace `/` with `-`. Topic slugs are lowercase
|
|
18
|
+
> alphanumeric with single dashes, at most 50 characters. The exceptions are the ones listed
|
|
19
|
+
> under Naming Conventions, and no others. Inconsistent naming breaks tooling, searching, and
|
|
20
|
+
> automation. Follow the pattern or fix the pattern for everyone.
|
|
19
21
|
|
|
20
22
|
---
|
|
21
23
|
|
|
22
24
|
## Directory Structure
|
|
23
25
|
|
|
24
|
-
All generated documentation lives under `.devflow/docs/`
|
|
26
|
+
All generated documentation lives under `.devflow/docs/` at the checkout's toplevel:
|
|
25
27
|
|
|
26
28
|
```
|
|
27
29
|
.devflow/docs/
|
|
28
|
-
├── reviews/{branch-slug}/ #
|
|
29
|
-
│ ├── .last-review-head # HEAD SHA of last completed review (
|
|
30
|
-
│
|
|
31
|
-
│
|
|
32
|
-
│
|
|
33
|
-
│
|
|
34
|
-
│
|
|
35
|
-
│
|
|
36
|
-
|
|
37
|
-
├──
|
|
38
|
-
│
|
|
39
|
-
│
|
|
40
|
-
│ ├── {focus}.md # Analyzer report (e.g., security.md, functional.md)
|
|
30
|
+
├── reviews/{branch-slug}/ # /code-review, per branch
|
|
31
|
+
│ ├── .last-review-head # HEAD SHA of the last completed review (incremental)
|
|
32
|
+
│ └── {timestamp}/ # one directory per review
|
|
33
|
+
│ ├── {focus}.md # Review agent report (security.md, architecture.md, ...)
|
|
34
|
+
│ ├── review-summary.md # Synthesize agent output
|
|
35
|
+
│ ├── resolution-summary.md # /resolve
|
|
36
|
+
│ ├── evidence.md # /resolve: appended test-plan claims
|
|
37
|
+
│ └── stale-plan.md # /resolve: stale test-plan lines
|
|
38
|
+
├── bug-analysis/{branch-slug}/ # /bug-analysis, per branch
|
|
39
|
+
│ ├── .last-analysis-head # HEAD SHA of the last analysis (incremental)
|
|
40
|
+
│ └── {timestamp}/
|
|
41
|
+
│ ├── {focus}.md # Debug agent report
|
|
41
42
|
│ ├── static-findings.md # Raw static analysis tool output
|
|
42
43
|
│ ├── bug-analysis-summary.md # Synthesize agent output
|
|
43
|
-
│ └── resolution-summary.md #
|
|
44
|
-
├──
|
|
45
|
-
│
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
│
|
|
49
|
-
│
|
|
50
|
-
├──
|
|
51
|
-
│ └── {
|
|
52
|
-
│
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
│
|
|
56
|
-
│
|
|
57
|
-
├──
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
└── swarm/ # Swarm operation state
|
|
62
|
-
├── state.json
|
|
63
|
-
└── plans/
|
|
44
|
+
│ └── resolution-summary.md # /resolve (evidence.md and stale-plan.md as in reviews)
|
|
45
|
+
├── research/{topic-slug}/{timestamp}/ # /research
|
|
46
|
+
│ ├── {type}.md # Research agent output (codebase.md, external.md, ...)
|
|
47
|
+
│ └── research-summary.md # Synthesize agent output
|
|
48
|
+
├── design/
|
|
49
|
+
│ ├── {ISSUE_ID}-{topic-slug}.{timestamp}.md # /plan, one issue
|
|
50
|
+
│ ├── multi-{topic-slug}.{timestamp}.md # /plan, several issues (frontmatter issue: pending)
|
|
51
|
+
│ ├── {topic-slug}.{timestamp}.md # /plan, no issue
|
|
52
|
+
│ └── {slug}/{timestamp}/ # /dynamic-plan run
|
|
53
|
+
│ ├── {ticket-slug}-plan.md # one plan per ticket
|
|
54
|
+
│ └── DECISIONS-NEEDED.md
|
|
55
|
+
├── tickets/{slug}/{timestamp}/ # /dynamic-tickets
|
|
56
|
+
│ ├── {ticket-slug}.md
|
|
57
|
+
│ └── tracking-issue.md
|
|
58
|
+
├── waves/{slug}/{timestamp}/wave-report.md # /dynamic-build
|
|
59
|
+
├── handoff-{branch-slug}.md # Code agent phase handoff; deleted once the PR exists
|
|
60
|
+
├── evidence-{branch-slug}.md # /implement test plan and claims; stays after the PR
|
|
61
|
+
└── evidence-wave-{slug}.md # /dynamic-build wave test plan and claims
|
|
64
62
|
|
|
65
63
|
.devflow/memory/
|
|
66
64
|
├── WORKING-MEMORY.md # Auto-maintained by Stop hook (overwritten)
|
|
@@ -71,47 +69,56 @@ All generated documentation lives under `.devflow/docs/` in the project root:
|
|
|
71
69
|
└── pitfalls.md # Known pitfalls (PF-NNN format)
|
|
72
70
|
```
|
|
73
71
|
|
|
74
|
-
`{ISSUE_ID}`
|
|
72
|
+
`{ISSUE_ID}` is the filesystem-safe issue identifier the Git agent emits as `- **Issue ID**:` under `### Handoff Values`. A multi-issue batch fetch returns none, which is why that variant is named `multi-`.
|
|
75
73
|
|
|
76
74
|
---
|
|
77
75
|
|
|
78
76
|
## Naming Conventions
|
|
79
77
|
|
|
80
78
|
### Timestamps
|
|
81
|
-
|
|
79
|
+
|
|
80
|
+
`YYYY-MM-DD_HHMM`, local time (sortable, readable), computed once per run and reused for every path of that run:
|
|
82
81
|
```bash
|
|
83
82
|
TIMESTAMP=$(date +%Y-%m-%d_%H%M) # Example: 2025-12-26_1430
|
|
84
83
|
```
|
|
84
|
+
- **Same-minute collision.** `/code-review`, `/bug-analysis` and `/research` create their run directory themselves: when it already exists, the second run appends seconds (`2025-12-26_143005`). It sorts after its minute, so newest-first listings stay correct.
|
|
85
|
+
- **Workflow runs** (`tickets/`, `design/{slug}/`, `waves/`) are stamped in local time by the workflow that creates them and take no collision suffix: a second run in the same minute writes into the first's directory.
|
|
86
|
+
- A design document's timestamp is the suffix before `.md`, so a listing sorts by that suffix, not by the leading `{ISSUE_ID}`.
|
|
85
87
|
|
|
86
88
|
### Branch Slugs
|
|
87
|
-
|
|
89
|
+
|
|
90
|
+
The branch name with every `/` replaced by `-`; case, dots and underscores are kept. A detached HEAD has no name and uses `standalone`:
|
|
88
91
|
```bash
|
|
89
|
-
BRANCH_SLUG=$(git branch --show-current 2>/dev/null | sed 's/\//-/g'
|
|
92
|
+
BRANCH_SLUG=$(b=$(git branch --show-current 2>/dev/null); echo "${b:-standalone}" | sed 's/\//-/g')
|
|
90
93
|
```
|
|
94
|
+
A slug builds a path or reaches a shell only when it matches `^[A-Za-z0-9._-]{1,200}$`. Every command derives `{branch_slug}` (the underscore spelling in `handoff-*` and `evidence-*`) this way, from the branch the work is on.
|
|
91
95
|
|
|
92
96
|
### Topic Slugs
|
|
93
|
-
|
|
97
|
+
|
|
98
|
+
One rule for every topic and initiative `{slug}`: lowercase; each run of characters outside `a-z0-9` becomes one `-`; leading and trailing `-` are trimmed; at most 50 characters (trim again after the cut); `untitled` when nothing is left:
|
|
94
99
|
```bash
|
|
95
|
-
TOPIC_SLUG=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' |
|
|
100
|
+
TOPIC_SLUG=$(s=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+//; s/-+$//' | cut -c1-50 | sed -E 's/-+$//'); echo "${s:-untitled}")
|
|
96
101
|
```
|
|
102
|
+
`/plan` and `/research` take `{topic-slug}` from it. `/dynamic-tickets` uses it for the initiative `{slug}`, and `/dynamic-plan` reuses the `{slug}` of the ticket set it plans (`wave` for any other source).
|
|
103
|
+
|
|
104
|
+
### Exceptions
|
|
105
|
+
|
|
106
|
+
- **`{ticket-slug}`** (`tickets/…/{ticket-slug}.md`, `design/…/{ticket-slug}-plan.md`): the ticket title lowercased with each run outside `a-z0-9` as one `-`, nothing trimmed and no length cap. `/dynamic-tickets` matches a ticket file by this name when it amends the ticket, so trimming would rename a file its own amend phase already wrote.
|
|
107
|
+
- **Wave `{slug}`** (`waves/`, `evidence-wave-{slug}.md`): the part of the integration branch after `wave/`, at most 60 characters, not derived by the topic rule. It makes `evidence-wave-{slug}.md` the `evidence-{branch-slug}.md` of the branch `wave/{slug}`.
|
|
97
108
|
|
|
98
109
|
### File Naming Patterns
|
|
99
110
|
|
|
100
111
|
| Type | Pattern | Example |
|
|
101
112
|
|------|---------|---------|
|
|
102
113
|
| Special indexes | `UPPERCASE.md` | `WORKING-MEMORY.md`, `INDEX.md` |
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
| Resolution summary | `resolution-summary.md` in timestamped dir | `2025-12-26_1430/resolution-summary.md` |
|
|
106
|
-
| Review head marker | `.last-review-head` | Plain text file with SHA |
|
|
114
|
+
| Reports and summaries | `{focus}.md`, `review-summary.md`, `bug-analysis-summary.md`, `research-summary.md`, `static-findings.md`, `resolution-summary.md` in the run directory | `2025-12-26_1430/security.md` |
|
|
115
|
+
| Head markers | `.last-review-head`, `.last-analysis-head` | Plain text file with SHA |
|
|
107
116
|
| Status logs | `{timestamp}.md` | `2025-12-26_1430.md` |
|
|
108
117
|
| Design documents | `{ISSUE_ID}-{topic-slug}.{timestamp}.md` | `42-jwt-auth.2026-04-07_1430.md` |
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
| Static findings | `static-findings.md` in timestamped dir | `2025-12-26_1430/static-findings.md` |
|
|
114
|
-
| Analysis head marker | `.last-analysis-head` | Plain text file with SHA |
|
|
118
|
+
| Design (several issues) | `multi-{topic-slug}.{timestamp}.md` | `multi-jwt-auth.2026-04-07_1430.md` |
|
|
119
|
+
| Design (no issue) | `{topic-slug}.{timestamp}.md` | `jwt-auth.2026-04-07_1430.md` |
|
|
120
|
+
| Per-ticket plan | `{ticket-slug}-plan.md` in `design/{slug}/{timestamp}/` | `design/wave/2026-04-07_1430/add-login-plan.md` |
|
|
121
|
+
| Handoff, evidence | `handoff-{branch-slug}.md`, `evidence-{branch-slug}.md`, `evidence-wave-{slug}.md` | `evidence-feat-jwt-auth.md` |
|
|
115
122
|
|
|
116
123
|
---
|
|
117
124
|
|
|
@@ -121,8 +128,9 @@ Define these inline, in the Bash call that needs them, for consistent naming. `.
|
|
|
121
128
|
|
|
122
129
|
```bash
|
|
123
130
|
get_timestamp() { date +%Y-%m-%d_%H%M; }
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
get_run_stamp() { local t; t=$(get_timestamp); [ -e "$1/$t" ] && t=$(date +%Y-%m-%d_%H%M%S); echo "$t"; } # $1: parent of the run directory
|
|
132
|
+
get_branch_slug() { local b; b=$(git branch --show-current 2>/dev/null); echo "${b:-standalone}" | sed 's/\//-/g'; }
|
|
133
|
+
get_topic_slug() { local s; s=$(echo "$1" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+//; s/-+$//' | cut -c1-50 | sed -E 's/-+$//'); echo "${s:-untitled}"; }
|
|
126
134
|
get_docs_root() { git rev-parse --show-toplevel 2>/dev/null || pwd; }
|
|
127
135
|
ensure_docs_dir() { mkdir -p "$(get_docs_root)/.devflow/docs/$1"; }
|
|
128
136
|
```
|
|
@@ -131,38 +139,29 @@ ensure_docs_dir() { mkdir -p "$(get_docs_root)/.devflow/docs/$1"; }
|
|
|
131
139
|
|
|
132
140
|
## Agent Persistence Rules
|
|
133
141
|
|
|
134
|
-
###
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
| Working Memory | `.devflow/memory/WORKING-MEMORY.md` | Overwrites (auto-maintained by Stop hook) |
|
|
143
|
-
| Decisions | `.devflow/learning/decisions.md` | Rendered from `decisions-ledger.jsonl` (active ADR-NNN entries in full; inactive ones listed in its Inactive table) |
|
|
144
|
-
| Pitfalls | `.devflow/learning/pitfalls.md` | Rendered from `decisions-ledger.jsonl` (active PF-NNN entries in full; inactive ones listed in its Inactive table) |
|
|
145
|
-
| Design agent (via /plan) | `.devflow/docs/design/{ISSUE_ID}-{topic-slug}.{timestamp}.md` | Creates new design artifact |
|
|
146
|
-
| Research agent | `.devflow/docs/research/{topic-slug}/{timestamp}/{type}.md` | Creates new in timestamped dir |
|
|
147
|
-
| Synthesize agent (research) | `.devflow/docs/research/{topic-slug}/{timestamp}/research-summary.md` | Creates new in timestamped dir |
|
|
148
|
-
| Diagnose agent | `.devflow/docs/bug-analysis/{branch-slug}/{timestamp}/{focus}.md` | Creates new in timestamped dir |
|
|
149
|
-
| Synthesize agent (bug-analysis) | `.devflow/docs/bug-analysis/{branch-slug}/{timestamp}/bug-analysis-summary.md` | Creates new in timestamped dir |
|
|
150
|
-
| Bug-analysis cmd | `.devflow/docs/bug-analysis/{branch-slug}/.last-analysis-head` | Overwrites with HEAD SHA |
|
|
142
|
+
### Who Writes What
|
|
143
|
+
|
|
144
|
+
- **Reviews**: the Review agents and the Synthesize agent (review mode) write into `reviews/{branch-slug}/{timestamp}/`; `/resolve` adds `resolution-summary.md` (Phase 5); `/code-review` overwrites `.last-review-head` with the HEAD SHA.
|
|
145
|
+
- **Bug analysis**: the Debug agents and the Synthesize agent (bug-analysis mode) write into `bug-analysis/{branch-slug}/{timestamp}/`; `/bug-analysis` overwrites `.last-analysis-head` with the HEAD SHA.
|
|
146
|
+
- **Research**: the Research agents write `{type}.md`, and the Synthesize agent (research mode) writes `research-summary.md` through `RESEARCH_BASE_DIR`, both into `research/{topic-slug}/{timestamp}/`.
|
|
147
|
+
- **Design**: `/plan` writes the design document; `/dynamic-plan` writes `design/{slug}/{timestamp}/`, `/dynamic-tickets` `tickets/{slug}/{timestamp}/`, `/dynamic-build` `waves/{slug}/{timestamp}/` and `evidence-wave-{slug}.md`.
|
|
148
|
+
- **Handoff and evidence**: `/implement` writes `evidence-{branch-slug}.md`, which stays after the PR, and the handoff file, to which each Code agent appends one phase section and which is deleted once the PR exists.
|
|
149
|
+
- **Memory and learning**: the Stop hook overwrites `.devflow/memory/WORKING-MEMORY.md`; `decisions.md` and `pitfalls.md` are rendered from `decisions-ledger.jsonl` (active entries in full, inactive ones in an Inactive table).
|
|
151
150
|
|
|
152
151
|
### Agents That Don't Persist
|
|
153
152
|
|
|
154
153
|
- Git (fetch-issue: read-only, post-review-summary: consolidated review comment only)
|
|
155
|
-
- Code agent (commits to git
|
|
154
|
+
- Code agent (commits to git; its only file is the handoff section it appends when `HANDOFF_FILE` is given)
|
|
156
155
|
|
|
157
156
|
---
|
|
158
157
|
|
|
159
158
|
## Implementation Checklist
|
|
160
159
|
|
|
161
|
-
When creating or modifying persisting agents:
|
|
160
|
+
When creating or modifying persisting agents or commands:
|
|
162
161
|
|
|
163
|
-
- [ ] Use
|
|
164
|
-
- [ ]
|
|
165
|
-
- [ ]
|
|
162
|
+
- [ ] Use the run-directory timestamp (`YYYY-MM-DD_HHMM`, local time, seconds on a same-minute collision)
|
|
163
|
+
- [ ] Derive the branch slug (replace `/` with `-`) and gate it before it builds a path
|
|
164
|
+
- [ ] Derive topic slugs with the one rule (lowercase, single dashes, at most 50)
|
|
166
165
|
- [ ] Create directory with `mkdir -p .devflow/docs/{subdir}`
|
|
167
166
|
- [ ] Document output location in agent's final message
|
|
168
167
|
- [ ] Follow special file naming (UPPERCASE for indexes)
|
|
@@ -174,12 +173,10 @@ When creating or modifying persisting agents:
|
|
|
174
173
|
## Integration
|
|
175
174
|
|
|
176
175
|
This framework is used by:
|
|
177
|
-
-
|
|
178
|
-
- **
|
|
176
|
+
- **`/plan` and `/research`**: load it at the step that names the document, and build the path by its rules
|
|
177
|
+
- **Commands that hand paths to agents** (`/code-review`, `/bug-analysis`, `/implement`, `/resolve`, the `/dynamic-*` commands): follow it, with the exceptions above
|
|
179
178
|
- **Working Memory hooks**: Auto-maintains `.devflow/memory/WORKING-MEMORY.md`
|
|
180
|
-
- **
|
|
181
|
-
|
|
182
|
-
All persisting agents should load this skill to ensure consistent documentation.
|
|
179
|
+
- **Curate agent**: background LLM agent (spawned via the session-start directive) promotes observations to ADRs/PFs via `assign-anchor`, which renders `decisions.md` / `pitfalls.md`
|
|
183
180
|
|
|
184
181
|
---
|
|
185
182
|
|
|
@@ -19,11 +19,8 @@ Correct patterns for Devflow documentation artifacts with templates and helper f
|
|
|
19
19
|
│ └── {timestamp}/ # Incremental review
|
|
20
20
|
│ └── ...
|
|
21
21
|
├── design/ # Implementation plans
|
|
22
|
-
│
|
|
23
|
-
|
|
24
|
-
│ ├── {timestamp}.md
|
|
25
|
-
│ ├── compact/{timestamp}.md
|
|
26
|
-
│ └── INDEX.md
|
|
22
|
+
│ ├── {ISSUE_ID}-{topic-slug}.{timestamp}.md # /plan (multi-{topic-slug} / {topic-slug} without an issue)
|
|
23
|
+
│ └── {slug}/{timestamp}/ # /dynamic-plan: {ticket-slug}-plan.md, DECISIONS-NEEDED.md
|
|
27
24
|
└── CATCH_UP.md # Latest summary (overwritten)
|
|
28
25
|
```
|
|
29
26
|
|
|
@@ -32,8 +29,6 @@ Correct patterns for Devflow documentation artifacts with templates and helper f
|
|
|
32
29
|
**Minimal (new project):**
|
|
33
30
|
```
|
|
34
31
|
.devflow/docs/
|
|
35
|
-
├── status/
|
|
36
|
-
│ └── INDEX.md
|
|
37
32
|
└── CATCH_UP.md
|
|
38
33
|
```
|
|
39
34
|
|
|
@@ -51,9 +46,6 @@ Correct patterns for Devflow documentation artifacts with templates and helper f
|
|
|
51
46
|
│ ├── regression.md
|
|
52
47
|
│ ├── tests.md
|
|
53
48
|
│ └── review-summary.md
|
|
54
|
-
├── status/
|
|
55
|
-
│ ├── 2025-01-05_1430.md
|
|
56
|
-
│ └── INDEX.md
|
|
57
49
|
└── CATCH_UP.md
|
|
58
50
|
```
|
|
59
51
|
|
|
@@ -71,8 +63,6 @@ Correct patterns for Devflow documentation artifacts with templates and helper f
|
|
|
71
63
|
│ ├── security.md
|
|
72
64
|
│ ├── ...
|
|
73
65
|
│ └── review-summary.md
|
|
74
|
-
├── status/
|
|
75
|
-
│ └── INDEX.md
|
|
76
66
|
└── CATCH_UP.md
|
|
77
67
|
```
|
|
78
68
|
|
|
@@ -89,7 +79,7 @@ Format: `YYYY-MM-DD_HHMM` (sortable, readable)
|
|
|
89
79
|
TIMESTAMP=$(date +%Y-%m-%d_%H%M)
|
|
90
80
|
# Output: 2025-01-05_1430
|
|
91
81
|
|
|
92
|
-
# With seconds (
|
|
82
|
+
# With seconds (a run directory that already exists: a second run in the same minute)
|
|
93
83
|
TIMESTAMP_SEC=$(date +%Y-%m-%d_%H%M%S)
|
|
94
84
|
# Output: 2025-01-05_143025
|
|
95
85
|
```
|
|
@@ -99,7 +89,7 @@ TIMESTAMP_SEC=$(date +%Y-%m-%d_%H%M%S)
|
|
|
99
89
|
Replace `/` with `-`, provide fallback for detached HEAD.
|
|
100
90
|
|
|
101
91
|
```bash
|
|
102
|
-
BRANCH_SLUG=$(git branch --show-current 2>/dev/null | sed 's/\//-/g'
|
|
92
|
+
BRANCH_SLUG=$(b=$(git branch --show-current 2>/dev/null); echo "${b:-standalone}" | sed 's/\//-/g')
|
|
103
93
|
|
|
104
94
|
# Examples:
|
|
105
95
|
# feature/auth -> feature-auth
|
|
@@ -111,15 +101,15 @@ BRANCH_SLUG=$(git branch --show-current 2>/dev/null | sed 's/\//-/g' || echo "st
|
|
|
111
101
|
|
|
112
102
|
### Topic Slugs
|
|
113
103
|
|
|
114
|
-
Lowercase,
|
|
104
|
+
Lowercase, each run of characters outside `a-z0-9` becomes one dash, no leading or trailing dash, max 50 chars, `untitled` when nothing is left.
|
|
115
105
|
|
|
116
106
|
```bash
|
|
117
|
-
TOPIC_SLUG=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' |
|
|
107
|
+
TOPIC_SLUG=$(s=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+//; s/-+$//' | cut -c1-50 | sed -E 's/-+$//'); echo "${s:-untitled}")
|
|
118
108
|
|
|
119
109
|
# Examples:
|
|
120
110
|
# "JWT Authentication" -> jwt-authentication
|
|
121
111
|
# "Fix User Login Bug" -> fix-user-login-bug
|
|
122
|
-
# "OAuth 2.0 Integration" -> oauth-
|
|
112
|
+
# "OAuth 2.0 Integration" -> oauth-2-0-integration
|
|
123
113
|
# "Database Migration v2" -> database-migration-v2
|
|
124
114
|
```
|
|
125
115
|
|
|
@@ -171,12 +161,11 @@ get_branch_slug() {
|
|
|
171
161
|
|
|
172
162
|
# Convert topic to slug format
|
|
173
163
|
get_topic_slug() {
|
|
174
|
-
local
|
|
175
|
-
echo "$
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
cut -c1-50
|
|
164
|
+
local slug
|
|
165
|
+
slug=$(echo "$1" | tr '[:upper:]' '[:lower:]' | \
|
|
166
|
+
sed -E 's/[^a-z0-9]+/-/g; s/^-+//; s/-+$//' | \
|
|
167
|
+
cut -c1-50 | sed -E 's/-+$//')
|
|
168
|
+
echo "${slug:-untitled}"
|
|
180
169
|
}
|
|
181
170
|
|
|
182
171
|
# The checkout's toplevel, else the working directory outside git
|
|
@@ -351,11 +340,11 @@ get_branch_slug # Returns: standalone
|
|
|
351
340
|
|
|
352
341
|
### Special Characters in Topics
|
|
353
342
|
|
|
354
|
-
|
|
343
|
+
Every run of special characters becomes one dash:
|
|
355
344
|
|
|
356
345
|
```bash
|
|
357
346
|
get_topic_slug "Bug: User can't login (v2.0)"
|
|
358
|
-
# Returns: bug-user-
|
|
347
|
+
# Returns: bug-user-can-t-login-v2-0
|
|
359
348
|
```
|
|
360
349
|
|
|
361
350
|
### Long Topic Names
|
|
@@ -13,9 +13,9 @@ Common violations of documentation conventions with detection patterns and fixes
|
|
|
13
13
|
| Unsanitized branch slug | `feature/auth` | `feature-auth` | Replace `/` with `-` |
|
|
14
14
|
| Wrong case for artifacts | `Status-2025-01-05.md` | `2025-01-05_1430.md` | Use lowercase except special indexes |
|
|
15
15
|
| Wrong case for indexes | `index.md` | `INDEX.md` | UPPERCASE for special indexes |
|
|
16
|
-
| Files outside .docs | `docs/status.md` | `.devflow/docs/
|
|
16
|
+
| Files outside .docs | `docs/status.md` | `.devflow/docs/reviews/feat-auth/2025-01-05_1430/review-summary.md` | Use `.devflow/docs/` root |
|
|
17
17
|
| Missing INDEX.md | Status files without index | Create `INDEX.md` | Every directory needs index |
|
|
18
|
-
| Special chars in slug | `oauth-2.0-auth` | `oauth-
|
|
18
|
+
| Special chars in slug | `oauth-2.0-auth` | `oauth-2-0-auth` | Replace each non-alphanumeric run with one `-` |
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
@@ -34,7 +34,7 @@ project/
|
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
.devflow/docs/
|
|
37
|
-
├── logs/ # Should be
|
|
37
|
+
├── logs/ # Should be reviews/{branch-slug}/
|
|
38
38
|
├── reports/ # Should be reviews/{branch-slug}/
|
|
39
39
|
└── notes.md # Should be in appropriate subdir
|
|
40
40
|
```
|
|
@@ -90,8 +90,8 @@ BRANCH_SLUG=$(git branch --show-current | sed 's/\//-/g')
|
|
|
90
90
|
BRANCH_SLUG=$(git branch --show-current)
|
|
91
91
|
# Result: empty string -> broken path
|
|
92
92
|
|
|
93
|
-
# RIGHT - with fallback
|
|
94
|
-
BRANCH_SLUG=$(git branch --show-current 2>/dev/null | sed 's/\//-/g'
|
|
93
|
+
# RIGHT - with fallback (the fallback goes before the sed: a pipeline's status is sed's)
|
|
94
|
+
BRANCH_SLUG=$(b=$(git branch --show-current 2>/dev/null); echo "${b:-standalone}" | sed 's/\//-/g')
|
|
95
95
|
# Result: (detached HEAD) -> standalone
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -106,8 +106,8 @@ BRANCH_SLUG=$(git branch --show-current 2>/dev/null | sed 's/\//-/g' || echo "st
|
|
|
106
106
|
TOPIC="Bug: Can't login (v2.0)"
|
|
107
107
|
SLUG="Bug:-Can't-login-(v2.0)"
|
|
108
108
|
|
|
109
|
-
# RIGHT -
|
|
110
|
-
SLUG="bug-
|
|
109
|
+
# RIGHT - special runs normalized to one dash
|
|
110
|
+
SLUG="bug-can-t-login-v2-0"
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
### Not Truncating Long Names
|
|
@@ -103,22 +103,6 @@ Detect ordering constraints and shared resource conflicts across issues.
|
|
|
103
103
|
|
|
104
104
|
**Evidence trigger:** Any issue that references state, contracts, or resources that may be in flux due to another issue in the batch.
|
|
105
105
|
|
|
106
|
-
### 7. Compliance (when the compliance lens is on)
|
|
107
|
-
|
|
108
|
-
Detect regulatory gaps that security doesn't cover. Load `devflow:compliance` before analyzing, then `references/{id}.md` only for the ids in `COMPLIANCE_FRAMEWORKS` (`none`: generic controls only).
|
|
109
|
-
|
|
110
|
-
**Detection patterns:**
|
|
111
|
-
- Missing audit trails on regulated mutations — writes to financial records, PHI, PCI-scoped data without durable logging
|
|
112
|
-
- PII flows without retention/erasure specification — data collected but deletion/expiry policy absent
|
|
113
|
-
- Missing encryption requirements — regulated data at rest or in transit without specified encryption control
|
|
114
|
-
- Sensitive data in observability — PII or credentials leaking into logs, traces, or metrics
|
|
115
|
-
- IaC exposure — infrastructure definitions without required security controls (open ports, unencrypted storage, missing IAM boundaries)
|
|
116
|
-
- Self-approval flows — change requires segregation of duties (SOX/SOC 2 CC8.1) but single-actor path exists in the design
|
|
117
|
-
|
|
118
|
-
**Explicit scope note:** Do NOT duplicate §3 Security's checks (secrets, injection, authZ). Compliance focus is on regulatory control requirements — retention periods, erasure rights, audit completeness, and segregation of duties — not general application security.
|
|
119
|
-
|
|
120
|
-
**Evidence trigger:** Any regulated-data flow or infrastructure element in the design that does not specify a required control (retention policy, encryption spec, audit log destination, approval workflow).
|
|
121
|
-
|
|
122
106
|
---
|
|
123
107
|
|
|
124
108
|
## Extended References
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Gap Analysis: Compliance Focus
|
|
2
|
+
|
|
3
|
+
The compliance focus's detection patterns. D-COMPLIANCE-INJECT: the `Design` agent's preload does not carry them. The `/plan` compliance-focus spawn names this file and the agent Reads it by path, so a lens-off run never loads it.
|
|
4
|
+
|
|
5
|
+
## Compliance (when the compliance lens is on)
|
|
6
|
+
|
|
7
|
+
Detect regulatory gaps that security doesn't cover. Load `devflow:compliance` before analyzing, then the compliance skill's `references/{id}.md` only for the ids the spawn's compliance directive names (`none`: generic controls only).
|
|
8
|
+
|
|
9
|
+
**Detection patterns:**
|
|
10
|
+
- Missing audit trails on regulated mutations — writes to financial records, PHI, PCI-scoped data without durable logging
|
|
11
|
+
- PII flows without retention/erasure specification — data collected but deletion/expiry policy absent
|
|
12
|
+
- Missing encryption requirements — regulated data at rest or in transit without specified encryption control
|
|
13
|
+
- Sensitive data in observability — PII or credentials leaking into logs, traces, or metrics
|
|
14
|
+
- IaC exposure — infrastructure definitions without required security controls (open ports, unencrypted storage, missing IAM boundaries)
|
|
15
|
+
- Self-approval flows — change requires segregation of duties (SOX/SOC 2 CC8.1) but single-actor path exists in the design
|
|
16
|
+
|
|
17
|
+
**Explicit scope note:** Do NOT duplicate §3 Security's checks (secrets, injection, authZ). Compliance focus is on regulatory control requirements — retention periods, erasure rights, audit completeness, and segregation of duties — not general application security.
|
|
18
|
+
|
|
19
|
+
**Evidence trigger:** Any regulated-data flow or infrastructure element in the design that does not specify a required control (retention policy, encryption spec, audit log destination, approval workflow).
|
|
@@ -109,7 +109,7 @@ When implementation includes web-facing changes (.tsx, .jsx, .html, routes, page
|
|
|
109
109
|
|
|
110
110
|
| Level | Meaning | Action |
|
|
111
111
|
|-------|---------|--------|
|
|
112
|
-
| **BLOCKING** | Acceptance criterion violated — feature does not work as requested | Report FAIL —
|
|
112
|
+
| **BLOCKING** | Acceptance criterion violated — feature does not work as requested | Report FAIL — Fix agent must fix |
|
|
113
113
|
| **WARNING** | Edge case concern — feature works but edge behavior is unexpected | Report PASS with warnings — note for improvement |
|
|
114
114
|
|
|
115
115
|
---
|
|
@@ -7,7 +7,7 @@ allowed-tools: Read, Grep, Glob, Edit, Write, Bash
|
|
|
7
7
|
|
|
8
8
|
# Self-Review Framework
|
|
9
9
|
|
|
10
|
-
Systematic self-review for the
|
|
10
|
+
Systematic self-review for the Harden agent. Evaluate implementation against 9 pillars. **Fix issues, don't just report them.**
|
|
11
11
|
|
|
12
12
|
Based on [Google Engineering Practices](https://google.github.io/eng-practices/review/reviewer/looking-for.html).
|
|
13
13
|
|
|
@@ -26,7 +26,7 @@ Based on [Google Engineering Practices](https://google.github.io/eng-practices/r
|
|
|
26
26
|
|----------|--------|---------|
|
|
27
27
|
| **P0** | MUST fix | Design, Functionality, Security |
|
|
28
28
|
| **P1** | SHOULD fix | Complexity, Error Handling, Tests |
|
|
29
|
-
| **P2** | FIX if straightforward | Documentation (Naming and Consistency belong to the
|
|
29
|
+
| **P2** | FIX if straightforward | Documentation (Naming and Consistency belong to the Polish agent: report them as SKIP) |
|
|
30
30
|
|
|
31
31
|
### P0 - Design
|
|
32
32
|
Does the implementation fit the architecture? Follows existing patterns, respects layer boundaries, dependencies injected.
|
|
@@ -49,7 +49,7 @@ Errors handled explicitly? No swallowed exceptions, helpful messages, resources
|
|
|
49
49
|
New code tested? Covers happy path, errors, edges. Tests behavior, not implementation.
|
|
50
50
|
|
|
51
51
|
### P2 - Naming and Consistency
|
|
52
|
-
Owned by the
|
|
52
|
+
Owned by the Polish agent, which applies the project's naming and style standards. Report both as SKIP; do not judge or fix them here.
|
|
53
53
|
|
|
54
54
|
### P2 - Documentation
|
|
55
55
|
Will others understand? Complex logic commented, public APIs documented, no outdated comments.
|
|
@@ -96,7 +96,7 @@ Check Design, Functionality, Security. If issues found and fixable, fix immediat
|
|
|
96
96
|
Check Complexity, Error Handling, Tests. Fix issues found.
|
|
97
97
|
|
|
98
98
|
### Step 4: Evaluate P2 Pillars
|
|
99
|
-
Check Documentation and fix it if straightforward. Naming and Consistency are the
|
|
99
|
+
Check Documentation and fix it if straightforward. Naming and Consistency are the Polish agent's: SKIP.
|
|
100
100
|
|
|
101
101
|
### Step 5: Generate Report
|
|
102
102
|
Document status of each pillar, fixes applied, and overall readiness.
|
|
@@ -119,8 +119,8 @@ Document status of each pillar, fixes applied, and overall readiness.
|
|
|
119
119
|
- Tests: PASS/FIXED
|
|
120
120
|
|
|
121
121
|
### P2 Pillars
|
|
122
|
-
- Naming: SKIP (
|
|
123
|
-
- Consistency: SKIP (
|
|
122
|
+
- Naming: SKIP (Polish agent)
|
|
123
|
+
- Consistency: SKIP (Polish agent)
|
|
124
124
|
- Documentation: PASS/FIXED
|
|
125
125
|
|
|
126
126
|
### Summary
|
|
@@ -144,6 +144,6 @@ For complete report templates and examples:
|
|
|
144
144
|
## Integration
|
|
145
145
|
|
|
146
146
|
Used by:
|
|
147
|
-
- **
|
|
147
|
+
- **Harden agent**: Dedicated self-review in fresh context after the Code agent completes
|
|
148
148
|
|
|
149
149
|
The self-review ensures implementations meet quality standards before external review, catching issues early.
|
|
@@ -48,8 +48,8 @@ Use this template when generating your self-review report.
|
|
|
48
48
|
|
|
49
49
|
| Pillar | Status | Notes |
|
|
50
50
|
|--------|--------|-------|
|
|
51
|
-
| Naming | SKIP |
|
|
52
|
-
| Consistency | SKIP |
|
|
51
|
+
| Naming | SKIP | Polish agent |
|
|
52
|
+
| Consistency | SKIP | Polish agent |
|
|
53
53
|
| Documentation | PASS/FIXED | {details if fixed} |
|
|
54
54
|
|
|
55
55
|
**Fixes Applied** (if any):
|
|
@@ -109,8 +109,8 @@ Add user profile update endpoint
|
|
|
109
109
|
|
|
110
110
|
| Pillar | Status | Notes |
|
|
111
111
|
|--------|--------|-------|
|
|
112
|
-
| Naming | SKIP |
|
|
113
|
-
| Consistency | SKIP |
|
|
112
|
+
| Naming | SKIP | Polish agent |
|
|
113
|
+
| Consistency | SKIP | Polish agent |
|
|
114
114
|
| Documentation | PASS | JSDoc on public methods |
|
|
115
115
|
|
|
116
116
|
---
|
|
@@ -169,8 +169,8 @@ Implement order cancellation flow
|
|
|
169
169
|
|
|
170
170
|
| Pillar | Status | Notes |
|
|
171
171
|
|--------|--------|-------|
|
|
172
|
-
| Naming | SKIP |
|
|
173
|
-
| Consistency | SKIP |
|
|
172
|
+
| Naming | SKIP | Polish agent |
|
|
173
|
+
| Consistency | SKIP | Polish agent |
|
|
174
174
|
| Documentation | FIXED | Added JSDoc explaining cancellation rules |
|
|
175
175
|
|
|
176
176
|
**Fixes Applied**:
|
|
@@ -237,7 +237,7 @@ before implementing refund feature.
|
|
|
237
237
|
|--------|--------|------------------------|
|
|
238
238
|
| PASS | No issues found for this pillar | No change was needed |
|
|
239
239
|
| FIXED | Issue found and resolved | Fixes were committed and every P0 and P1 is fixed |
|
|
240
|
-
| SKIP | Naming and Consistency only - owned by the
|
|
240
|
+
| SKIP | Naming and Consistency only - owned by the Polish agent | - |
|
|
241
241
|
| BLOCKED | Cannot fix - requires escalation | A P0 cannot be fixed in scope |
|
|
242
242
|
|
|
243
243
|
---
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
## Operation: ensure-pr-ready
|
|
2
|
-
|
|
3
|
-
Load for `ensure-pr-ready` under every tracker provider.
|
|
4
|
-
|
|
5
|
-
**PR mechanics held here:** every step but step 4b's tracker half, which is the provider reference's.
|
|
6
|
-
|
|
7
|
-
### Process
|
|
8
|
-
|
|
9
|
-
1. Verify on feature branch (not main/master/develop/integration/trunk/release/*/staging/production) - error if not
|
|
10
|
-
2. Check for uncommitted changes - if any, create atomic commit using `devflow:git` patterns
|
|
11
|
-
3. Check if branch pushed to remote - if not, push with `-u` flag. If that push is refused and the branch's open PR is cross-repository with maintainer edits off (`gh pr view --json isCrossRepository,maintainerCanModify`), emit `TRACEABILITY: DEGRADED (cannot push to fork)` and go to 4a (4a–4c edit only the PR).
|
|
12
|
-
4a. Check if PR exists - if not, create PR using guidance from (in priority order): (a) `PR_DESCRIPTION_GUIDANCE` if given and not `(none)`, (b) generated from branch context. Compose the PR body via the `devflow:git` template to `$DEVFLOW_BODY_RAW` (a D11 sink: it publishes at repo visibility), then append the caller blocks. Apply the Comment-sink scrub (D11) — a failed one posts neither block; on success: `gh pr create … --body-file "$DEVFLOW_BODY"`.
|
|
13
|
-
- **Caller blocks**, in order: `PR_WAVE_BLOCK` (`check wave`), then `PR_TEST_PLAN_BLOCK` (`check block`), each when given and not `(none)`. Write it byte for byte to a fresh `mktemp` file with the Write tool, never via a shell string, and run `node "$HOME/.devflow/scripts/verify-evidence.cjs" check <wave|block> <file>; echo "exit=$?"`. Only `exit=0` admits it, verbatim; else omit it, never repaired or partly pasted, and emit `TRACEABILITY: DEGRADED (wave block does not match its grammar)` or `TRACEABILITY: DEGRADED (test-plan block does not match its grammar)` with steps 4b/4c's lines. An admitted wave block is the body's only `## Related Issues`: skip 4b.
|
|
14
|
-
4c. Retitle, only when `APPLY_CONVENTIONS` is `true`: if the PR title breaks the convention in the PR Titles section of `.devflow/conventions.md`, retitle it; skip silently when that file is absent. Two rules, because the title derives from third-party PR titles:
|
|
15
|
-
- **Validate before use.** Skip the retitle (leave the PR title as-is, no error) if the composed title contains any of `` $ ` \ " ' ; | & < > `` or a newline.
|
|
16
|
-
- **Pass as argv, never as command text.** Bind it to a shell variable and pass that variable: `gh pr edit {PR_NUMBER} --title "$DEVFLOW_PR_TITLE"`. Never interpolate it: `$(...)`, backticks and `${...}` all expand inside double quotes.
|
|
17
|
-
|
|
18
|
-
On any 4xx/5xx from `gh pr edit`: emit `TRACEABILITY: DEGRADED ({reason})` and continue — a failed retitle never blocks the PR.
|
|
19
|
-
5. Get base branch from PR
|
|
20
|
-
6. Derive branch-slug (replace `/` with `-`)
|
|
21
|
-
|
|
22
|
-
### Step 4b's PR-host half
|
|
23
|
-
|
|
24
|
-
The provider reference's step 4b publishes its section only through this: find the open PR with `gh pr list --head {branch} --state open --limit 1`; compose the existing body plus the `## Related Issues` section to `$DEVFLOW_BODY_RAW` — the existing body is third-party-editable, so never interpolate it into a command string; apply the Comment-sink scrub (D11); on success: `gh pr edit {PR_NUMBER} --body-file "$DEVFLOW_BODY"`.
|