engsys 1.0.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/LICENSE +21 -0
- package/README.md +202 -0
- package/core/agents/aaron.md +152 -0
- package/core/agents/bert.md +115 -0
- package/core/agents/isabelle.md +136 -0
- package/core/agents/jody.md +150 -0
- package/core/agents/leith.md +111 -0
- package/core/agents/marcelo.md +282 -0
- package/core/agents/melvin.md +101 -0
- package/core/agents/nyx.md +152 -0
- package/core/agents/otto.md +168 -0
- package/core/agents/patricia.md +283 -0
- package/core/commands/design-audit-local.md +155 -0
- package/core/commands/design-audit.md +235 -0
- package/core/commands/design-critique.md +96 -0
- package/core/commands/file-issue.md +22 -0
- package/core/commands/generate-project.md +45 -0
- package/core/commands/implement-issue.md +37 -0
- package/core/commands/implement-project.md +40 -0
- package/core/commands/naturalize.md +61 -0
- package/core/commands/pre-push.md +29 -0
- package/core/commands/prep-review-collect.md +130 -0
- package/core/commands/prep-review-finalize.md +121 -0
- package/core/commands/prep-review-publish.md +113 -0
- package/core/commands/prep-review.md +65 -0
- package/core/commands/project-closeout.md +25 -0
- package/core/skills/agentic-eval/SKILL.md +195 -0
- package/core/skills/chrome-devtools/SKILL.md +97 -0
- package/core/skills/code-review/SKILL.md +26 -0
- package/core/skills/gh-cli/SKILL.md +2202 -0
- package/core/skills/git-commit/SKILL.md +124 -0
- package/core/skills/git-workflow-agents/SKILL.md +462 -0
- package/core/skills/git-workflow-agents/reference.md +220 -0
- package/core/skills/github-actions/SKILL.md +190 -0
- package/core/skills/github-issues/SKILL.md +154 -0
- package/core/skills/llm-structured-outputs/SKILL.md +323 -0
- package/core/skills/llm-structured-outputs/references/provider-details.md +392 -0
- package/core/skills/pre-push/SKILL.md +115 -0
- package/core/skills/refactor/SKILL.md +645 -0
- package/core/skills/web-design-reviewer/SKILL.md +371 -0
- package/core/skills/webapp-testing/SKILL.md +127 -0
- package/core/skills/webapp-testing/test-helper.js +56 -0
- package/core/templates/CLAUDE.md.tmpl +98 -0
- package/core/templates/adr-template.md +67 -0
- package/core/templates/gh-issue-templates/bug.md +39 -0
- package/core/templates/gh-issue-templates/content.md +42 -0
- package/core/templates/gh-issue-templates/enhancement.md +36 -0
- package/core/templates/gh-issue-templates/feature.md +39 -0
- package/core/templates/gh-issue-templates/infrastructure.md +41 -0
- package/core/templates/post-edit-reminders.sh.tmpl +19 -0
- package/core/templates/settings.json.tmpl +90 -0
- package/core/templates/settings.local.json.tmpl +3 -0
- package/core/workflows/agent-implementation-workflow.md +346 -0
- package/core/workflows/generate-project.md +258 -0
- package/core/workflows/implement-project-workflow.md +190 -0
- package/core/workflows/issue-tracking.md +89 -0
- package/core/workflows/project-closeout-ceremony.md +77 -0
- package/core/workflows/review-workflow.md +266 -0
- package/engsys.config.example.yaml +46 -0
- package/install +202 -0
- package/lessons-library/README.md +80 -0
- package/lessons-library/async-callbacks-verify-liveness.md +15 -0
- package/lessons-library/change-isnt-done-until-every-surface-updated.md +15 -0
- package/lessons-library/claim-then-act-for-irreversible-ops.md +16 -0
- package/lessons-library/co-commit-entangled-work.md +15 -0
- package/lessons-library/dependabot-triage-playbook.md +17 -0
- package/lessons-library/deploy-by-digest-and-verify-the-running-revision.md +15 -0
- package/lessons-library/enforce-your-guarantee-at-your-boundary.md +16 -0
- package/lessons-library/gate-changes-on-measurement-not-vibes.md +15 -0
- package/lessons-library/iac-first-no-console-changes.md +15 -0
- package/lessons-library/independent-objective-review-gate.md +15 -0
- package/lessons-library/keep-an-immutable-source-of-truth.md +15 -0
- package/lessons-library/long-agent-runs-checkpoint-not-poll.md +15 -0
- package/lessons-library/model-identity-with-stable-ids-and-provenance.md +15 -0
- package/lessons-library/operator-choices-are-first-class.md +15 -0
- package/lessons-library/prefer-tool-enforced-structured-output.md +15 -0
- package/lessons-library/prove-causation-before-acting.md +15 -0
- package/lessons-library/re-read-state-before-acting.md +14 -0
- package/lessons-library/read-layer-tolerates-unbackfilled-rows.md +15 -0
- package/lessons-library/shell-safety-pipefail-and-validate-before-teardown.md +14 -0
- package/lessons-library/shift-correctness-left-and-distrust-false-greens.md +15 -0
- package/lessons-library/stray-control-bytes-hide-changes.md +14 -0
- package/lessons-library/tests-can-assert-the-bug.md +15 -0
- package/lessons-library/verify-ground-truth-not-reports.md +15 -0
- package/lessons-library/worktrees-need-bootstrap-from-origin-main.md +15 -0
- package/lib/commands.js +356 -0
- package/lib/generate-team-avatars.mjs +251 -0
- package/lib/manifest.js +155 -0
- package/lib/render.js +135 -0
- package/lib/selftest.js +90 -0
- package/lib/util.js +89 -0
- package/lib/yaml.js +156 -0
- package/optional-agents/gary.md +86 -0
- package/optional-agents/jos.md +136 -0
- package/optional-agents/sandy.md +101 -0
- package/optional-agents/steve.md +161 -0
- package/package.json +43 -0
- package/stacks/cloud/aws/claude.fragment.md +17 -0
- package/stacks/cloud/aws/settings.fragment.json +39 -0
- package/stacks/cloud/aws/skills/aws-deployment-preflight/SKILL.md +165 -0
- package/stacks/cloud/aws/skills/cloud-architecture-aws/SKILL.md +265 -0
- package/stacks/cloud/azure/claude.fragment.md +17 -0
- package/stacks/cloud/azure/settings.fragment.json +45 -0
- package/stacks/cloud/azure/skills/azure-deployment-preflight/SKILL.md +175 -0
- package/stacks/cloud/azure/skills/cloud-architecture-azure/SKILL.md +211 -0
- package/stacks/cloud/cloudflare/claude.fragment.md +21 -0
- package/stacks/cloud/cloudflare/settings.fragment.json +31 -0
- package/stacks/cloud/cloudflare/skills/cloud-architecture-cloudflare/SKILL.md +294 -0
- package/stacks/cloud/cloudflare/skills/cloudflare-deployment-preflight/SKILL.md +175 -0
- package/stacks/cloud/gcp/claude.fragment.md +17 -0
- package/stacks/cloud/gcp/settings.fragment.json +40 -0
- package/stacks/cloud/gcp/skills/cloud-architecture-gcp/SKILL.md +208 -0
- package/stacks/cloud/gcp/skills/gcp-deployment-preflight/SKILL.md +137 -0
- package/stacks/db/mongo/skills/mongo-conventions/SKILL.md +96 -0
- package/stacks/db/prisma/claude.fragment.md +49 -0
- package/stacks/db/prisma/skills/docker-database-package-copy/SKILL.md +44 -0
- package/stacks/db/prisma/skills/prisma-conventions/SKILL.md +37 -0
- package/stacks/domain/mobile-growth/skills/apple-ads/SKILL.md +184 -0
- package/stacks/domain/mobile-growth/skills/apple-ads/references/benchmark-notes.md +47 -0
- package/stacks/domain/mobile-growth/skills/apple-ads/references/official-links.md +53 -0
- package/stacks/domain/mobile-growth/skills/google-play-growth/SKILL.md +197 -0
- package/stacks/domain/mobile-growth/skills/google-play-growth/references/benchmark-notes.md +47 -0
- package/stacks/domain/mobile-growth/skills/google-play-growth/references/official-links.md +45 -0
- package/stacks/iac/bicep/claude.fragment.md +14 -0
- package/stacks/iac/bicep/settings.fragment.json +20 -0
- package/stacks/iac/bicep/skills/iac-bicep/SKILL.md +113 -0
- package/stacks/iac/cdk/claude.fragment.md +14 -0
- package/stacks/iac/cdk/settings.fragment.json +23 -0
- package/stacks/iac/cdk/skills/iac-cdk/SKILL.md +104 -0
- package/stacks/iac/terraform/claude.fragment.md +13 -0
- package/stacks/iac/terraform/settings.fragment.json +25 -0
- package/stacks/iac/terraform/skills/iac-terraform/SKILL.md +93 -0
- package/stacks/iac/terraform/skills/terraform-conventions/SKILL.md +87 -0
- package/stacks/lang/kotlin/skills/android-testing/SKILL.md +263 -0
- package/stacks/lang/kotlin/skills/jetpack-compose/SKILL.md +264 -0
- package/stacks/lang/kotlin/skills/kotlin-coroutines/SKILL.md +329 -0
- package/stacks/lang/python/skills/python-conventions/SKILL.md +61 -0
- package/stacks/lang/shell/skills/shell-scripting/SKILL.md +110 -0
- package/stacks/lang/swift/skills/swift-concurrency/SKILL.md +423 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/approachable-concurrency.md +80 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/concurrency-patterns.md +233 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/swiftui-concurrency.md +187 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/synchronization-primitives.md +341 -0
- package/stacks/lang/swift/skills/swift-testing/SKILL.md +497 -0
- package/stacks/lang/swift/skills/swift-testing/references/testing-advanced.md +106 -0
- package/stacks/lang/swift/skills/swift-testing/references/testing-patterns.md +504 -0
- package/stacks/lang/swift/skills/swiftdata/SKILL.md +334 -0
- package/stacks/lang/swift/skills/swiftdata/references/core-data-coexistence.md +504 -0
- package/stacks/lang/swift/skills/swiftdata/references/swiftdata-advanced.md +975 -0
- package/stacks/lang/swift/skills/swiftdata/references/swiftdata-queries.md +675 -0
- package/stacks/lang/swift/skills/swiftui-patterns/SKILL.md +371 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/architecture-patterns.md +486 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/deprecated-migration.md +1097 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/design-polish.md +780 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/platform-and-sharing.md +696 -0
- package/stacks/lang/typescript/skills/typescript-conventions/SKILL.md +91 -0
- package/stacks/platform/android/claude.fragment.md +40 -0
- package/stacks/platform/android/hooks/pre-push-gradle.sh +70 -0
- package/stacks/platform/android/settings.fragment.json +13 -0
- package/stacks/platform/android/skills/android-build-conventions/SKILL.md +247 -0
- package/stacks/platform/ios/claude.fragment.md +24 -0
- package/stacks/platform/ios/hooks/pre-push-xcodebuild.sh +82 -0
- package/stacks/platform/ios/settings.fragment.json +21 -0
- package/stacks/platform/ios/skills/xcodebuildmcp-simulator-logs/SKILL.md +76 -0
- package/stacks/platform/web/skills/frontend-testing/SKILL.md +246 -0
- package/stacks/platform/web/skills/react-conventions/SKILL.md +261 -0
- package/stacks/platform/web/skills/web-platform-conventions/SKILL.md +55 -0
- package/stacks/tooling/issue-tracker-github/claude.fragment.md +10 -0
- package/stacks/tooling/issue-tracker-github/settings.fragment.json +24 -0
- package/stacks/tooling/issue-tracker-github/skills/issue-tracker-github/SKILL.md +278 -0
- package/stacks/tooling/issue-tracker-linear/claude.fragment.md +17 -0
- package/stacks/tooling/issue-tracker-linear/settings.fragment.json +9 -0
- package/stacks/tooling/issue-tracker-linear/skills/issue-tracker-linear/SKILL.md +183 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Walk a tracker project phase-by-phase, opening one PR per phase. Pauses on material code-review findings, otherwise continues autonomously.
|
|
3
|
+
argument-hint: <project-number>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the **isabelle** subagent, following the per-issue cycle in [/implement-issue](implement-issue.md) and the outer loop in [.claude/workflows/implement-project-workflow.md](.claude/workflows/implement-project-workflow.md).
|
|
7
|
+
|
|
8
|
+
Board reads/writes (Phase/Priority/Owner/Status) go through the project's installed **issue-tracker skill** (`.claude/skills/issue-tracker-*/`) and its `query-board` / `set-board-field` operations โ the same flow works whether the tracker is GitHub or Linear. PR creation and CI stay on `gh` / GitHub.
|
|
9
|
+
|
|
10
|
+
Project: #$ARGUMENTS
|
|
11
|
+
|
|
12
|
+
Isabelle should:
|
|
13
|
+
|
|
14
|
+
1. **Read the board** โ use the issue-tracker skill's `query-board` operation to fetch fields + items (GitHub: `gh api graphql`). The project **must** have a `Phase` single-select field with `P<n>: <name>` options. If missing, stop and tell the operator to run [/generate-project](generate-project.md) (Jody) first.
|
|
15
|
+
2. **Pick the next batch** โ lowest-numbered phase with open issues. Print the plan (phase name, issue list, remaining phases). Do not wait for approval; the slash command is the authorization.
|
|
16
|
+
3. **Walk one phase** โ follow the [/implement-issue](implement-issue.md) cycle end-to-end: claim issues (issue-tracker skill `update-issue`), create worktree `agent/project-$ARGUMENTS-phase-<n>-<slug>`, set Status=In Progress (skill `set-board-field`), one commit per issue with `(#<num>)` references, full pre-push gate, **run a local code review with the built-in `/code-review` skill before push** (fix Critical + Warning, re-run clean), push once, create the PR on `gh pr create` and link/close work items per the skill's `link-pr` operation (GitHub: `Closes #<num>` one per line), then persist the local review findings onto the work item with the skill's `comment-issue` operation.
|
|
17
|
+
4. **Triage review findings** (done locally before push) โ classify each:
|
|
18
|
+
- **Material** (real bug / security / behavior change) โ fix, re-run review
|
|
19
|
+
- **Cosmetic** โ fix if trivially safe, otherwise note in the findings comment
|
|
20
|
+
- **Wrong** โ note why in the findings comment
|
|
21
|
+
5. **Objective independent review (orchestrator โ before any merge)** โ once Isabelle's phase PR is open and her local review is clean, the **orchestrator** (not Isabelle) launches a *fresh, independent* reviewer subagent โ general-purpose on **Opus**, with **no stake in the code** โ to objectively review the PR. It must: re-run the full gate from scratch (confirm/refute the author's numbers), verify **each** issue's acceptance criteria against the diff, probe security/correctness, and hunt for regressions and reconciliation artifacts (duplicate/dead code, dropped work, stray exports). It ends with a decisive **`VERDICT: CLEAN`** (no Critical/Warning โ safe to merge) or **`VERDICT: FINDINGS`** (severity-tagged, `file:line`). Never merge a phase PR that has not passed this gate.
|
|
22
|
+
6. **Continue or pause** โ after the objective review returns:
|
|
23
|
+
- **CLEAN** โ merge the phase PR (the human, or the orchestrator only with explicit operator authorization), mark phase items Status=Done (skill `set-board-field`), loop back to step 2 for the next phase.
|
|
24
|
+
- โ ๏ธ **Status=Done can auto-close the linked issue _pre-merge_.** If the board has the built-in **"Auto-close issue"** workflow enabled, setting an item's **Status=Done** immediately **closes the linked issue โ even while its PR is still an unmerged draft**. Only flip Status=Done **after** the phase PR has actually merged โ or, better, **disable that board workflow** so issue-closed tracks the real merge. Phases that must stay open through review/sign-off (e.g. a security-gated phase) will otherwise need their issues reopened.
|
|
25
|
+
- **FINDINGS** (Critical/Warning) โ route back to Isabelle to fix + re-review, or **stop** and report if it exposes a product/architecture decision
|
|
26
|
+
- Local *or* objective review errored / couldn't run โ **stop** and report
|
|
27
|
+
- Three consecutive autonomous phases done โ **courtesy pause**, report progress, ask operator before continuing
|
|
28
|
+
7. **Done** โ when every phase has Status=Done (or In Review), print the completion summary with PR links per phase.
|
|
29
|
+
|
|
30
|
+
Hard rules:
|
|
31
|
+
|
|
32
|
+
- **No merge without a `CLEAN` objective review** (step 5). The human merges every batch โ or the orchestrator, only with explicit operator authorization.
|
|
33
|
+
- Does **not** invent phases. If the `Phase` field is empty or missing, stop (no item may carry an empty Phase).
|
|
34
|
+
- One phase = one branch = one worktree = one PR. Per `CLAUDE.md` ยง Git / PR conventions.
|
|
35
|
+
- Work-item linking per the skill's `link-pr` operation (GitHub: one `Closes #<num>` per line โ a comma-list only closes the first issue).
|
|
36
|
+
- Use `tmp/` for commit messages and PR bodies โ never HEREDOC.
|
|
37
|
+
|
|
38
|
+
Reflection on pause: if the loop exposed a reusable failure or missing Jody field, update the relevant `CLAUDE.md` / `docs/agent-lessons/` before handoff.
|
|
39
|
+
|
|
40
|
+
**When the project's LAST PR merges** (all phases done): run the full **Project Closeout Ceremony** โ [/project-closeout $ARGUMENTS](project-closeout.md). Verify all PRs merged โ clean up worktrees/branches โ mine ALL local-review findings PR comments (+ any static-analysis alerts) across the project for recurring mistake families โ memorialize durable lessons. Don't stop at the completion report.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fill this project's CLAUDE.md PROJECT-FACTS and replace naturalize placeholders โ project facts only, never folder/plumbing setup.
|
|
3
|
+
argument-hint: (none)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are naturalizing this project's engineering system. The installer has already
|
|
7
|
+
created all directories, copied agents/commands/skills, and rendered the
|
|
8
|
+
templates. **Your job is project facts only โ do NOT create directories, move
|
|
9
|
+
files, or re-do any plumbing.** If structure is missing, that's an installer bug;
|
|
10
|
+
report it, don't paper over it.
|
|
11
|
+
|
|
12
|
+
Do this:
|
|
13
|
+
|
|
14
|
+
1. **Discover the project.** Read the repo: package manifests, build/test config,
|
|
15
|
+
CI workflows, IaC, README, existing docs. Identify: services/runtimes, the
|
|
16
|
+
build & verify toolchain, the cloud/stack, key paths, and any domain-specific
|
|
17
|
+
hard rules (the things that, if violated, break correctness or trust).
|
|
18
|
+
|
|
19
|
+
2. **Fill the PROJECT-FACTS region of `CLAUDE.md`.** Edit ONLY between
|
|
20
|
+
`<!-- ENGSYS:PROJECT-FACTS:START -->` and `<!-- ENGSYS:PROJECT-FACTS:END -->`.
|
|
21
|
+
Write tight, high-signal facts: project shape, the exact pre-push/precheck
|
|
22
|
+
command, invariants, where architecture docs and ADRs live. Everything outside
|
|
23
|
+
that region is installer-owned and will be regenerated by `engsys update`.
|
|
24
|
+
|
|
25
|
+
3. **Replace `<naturalize: ...>` placeholders.** Grep the installed tree
|
|
26
|
+
(`.mcp.json`, `.claude/hooks/*`, stack fragments echoed into CLAUDE.md) for
|
|
27
|
+
`<naturalize:` / `<proj>` / `<rg>` / `<env>` / `<suffix>` and substitute real
|
|
28
|
+
values. For iOS, that's the Xcode project path, scheme, simulator UDID, bundle
|
|
29
|
+
id; for cloud, the resource group / account / naming suffix.
|
|
30
|
+
|
|
31
|
+
4. **Fold in imported AI config (if any).** If `docs/imported-ai-config/` exists,
|
|
32
|
+
the installer found pre-existing Copilot/Cursor/etc. config and snapshotted it.
|
|
33
|
+
Read each file and:
|
|
34
|
+
- **Rules / instructions** (`copilot-instructions.md`, `.cursor/rules/*.mdc`,
|
|
35
|
+
`.cursorrules`) โ fold the durable, still-true rules into the PROJECT-FACTS
|
|
36
|
+
region (or a nested `CLAUDE.md`). Drop anything redundant with engsys or the
|
|
37
|
+
stack packs; don't blindly copy.
|
|
38
|
+
- **Agent definitions** (`.github/agents/*.agent.md`) โ if a persona is worth
|
|
39
|
+
keeping and engsys has no equivalent, convert it to a `.claude/agents/<name>.md`
|
|
40
|
+
(engsys frontmatter: `name`, `description`, `model`; strip editor-specific tool
|
|
41
|
+
IDs). If engsys already covers it, note that and skip.
|
|
42
|
+
- When done, delete `docs/imported-ai-config/` and (with the human's OK) the
|
|
43
|
+
now-superseded originals.
|
|
44
|
+
|
|
45
|
+
5. **Reconcile the project's own agents.** The install report lists any
|
|
46
|
+
pre-existing `.claude/agents/` (and commands/skills) the project already had โ
|
|
47
|
+
engsys preserved them untouched. For each: keep it (distinct role), merge its
|
|
48
|
+
guidance into the matching engsys agent, or rename on a name conflict. Never
|
|
49
|
+
silently shadow one with the other.
|
|
50
|
+
|
|
51
|
+
6. **Tune `naturalize.hook_patterns` if needed.** If discovery surfaced sensitive
|
|
52
|
+
files (schemas, specs, IaC entrypoints), make sure
|
|
53
|
+
`.claude/hooks/post-edit-reminders.sh` nudges on them โ edit the project's
|
|
54
|
+
`engsys.config.yaml` and re-run `engsys update`, rather than hand-editing the
|
|
55
|
+
generated hook (which `update` regenerates).
|
|
56
|
+
|
|
57
|
+
7. **Report** what you set, what you folded in or reconciled, and list anything you
|
|
58
|
+
couldn't determine so the human can confirm. Then suggest running
|
|
59
|
+
`engsys verify` to confirm no drift.
|
|
60
|
+
|
|
61
|
+
Be factual. Don't invent stack details you didn't verify in the repo.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the project's full local pre-push gate (build/lint/format/test plus any path-gated checks for migrations, IaC, and containers)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run the project's pre-push gate / precheck per `CLAUDE.md` ยง Pre-push gate. **Don't push if any step fails** โ fix locally first.
|
|
6
|
+
|
|
7
|
+
The exact gate commands are **defined by the project** (in `CLAUDE.md` and, where present, a `precheck`/`pre-push` task that the local pre-push hook runs). This command is the discipline; the project supplies the concrete commands.
|
|
8
|
+
|
|
9
|
+
1. **Identify touched paths** since `origin/main`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git diff --name-only origin/main...HEAD
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
2. **Always run the core gate** (mirrors CI) โ the project's:
|
|
16
|
+
- build / typecheck
|
|
17
|
+
- lint
|
|
18
|
+
- format check
|
|
19
|
+
- unit tests
|
|
20
|
+
|
|
21
|
+
Prefer the project's single precheck entrypoint if it has one (it is usually diff-driven and runs only the relevant gates).
|
|
22
|
+
|
|
23
|
+
3. **If database migrations were touched** โ additionally build the data layer and apply the migration against a local database to confirm the SQL/schema applies cleanly.
|
|
24
|
+
|
|
25
|
+
4. **If infrastructure-as-code was touched** โ run the project's IaC validation / synth / plan step (cloud-agnostic: whatever the active stack's skill pack defines).
|
|
26
|
+
|
|
27
|
+
5. **If a container build file was touched** โ smoke-build the image. A build failure (missing COPY, bad layer) blocks the push; runtime env/DB errors when running the image are expected and OK.
|
|
28
|
+
|
|
29
|
+
Report green โ / red โ per step. If everything green, you're cleared to push.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Pull the current Drive doc body back, render feedback.md, classify comments, force operator resolution on disagreements
|
|
3
|
+
argument-hint: <slug>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Collect feedback on a published review. Full workflow reference: [.claude/workflows/review-workflow.md](.claude/workflows/review-workflow.md).
|
|
7
|
+
|
|
8
|
+
Slug: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
> Tooling: uses the project's configured **document-drive MCP**. Tool names are project-defined; the steps below are tool-agnostic.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. **Load state**: read `docs/reviews/<slug>/state.yaml`. Validate:
|
|
15
|
+
- Exists?
|
|
16
|
+
- `phase == published` or `feedback-collected` (latter = re-run; that's fine, idempotent).
|
|
17
|
+
- `drive.file_id` present.
|
|
18
|
+
|
|
19
|
+
2. **Export the Drive doc as `.docx`** (preserves comments):
|
|
20
|
+
- Download/export the file as `.docx` (the export MIME type that preserves comments).
|
|
21
|
+
- Decode the returned base64 and write to `docs/reviews/<slug>/drive-export.docx`.
|
|
22
|
+
- Also pull a clean text/markdown rendering of the body (used for the diff in step 3 โ cleaner than parsing .docx XML for body text).
|
|
23
|
+
|
|
24
|
+
3. **Diff the body against `package.md`** (the snapshot we uploaded):
|
|
25
|
+
- Read `docs/reviews/<slug>/package.md`.
|
|
26
|
+
- Compute a section-level diff against the body text from step 2. For each H2/H3 section: classify as `unchanged | edited | added | removed`.
|
|
27
|
+
- For edited sections, capture both the original and current text.
|
|
28
|
+
|
|
29
|
+
4. **Extract comments from the `.docx`**:
|
|
30
|
+
- Use a docx-parsing skill, or unzip directly โ `word/comments.xml` for comment bodies + authors, `word/document.xml` for the anchors mapping comment-id โ anchored text.
|
|
31
|
+
- For each comment, capture: id, author, anchored selection text, comment body, resolved state if present.
|
|
32
|
+
- **Caveat**: drive `.docx` exports typically include **open** comments; **resolved** comments may be missing. If the comment count looks lower than expected, surface this to the operator and offer the paste-fallback (step 5).
|
|
33
|
+
|
|
34
|
+
5. **Fallback / supplement** โ present what was extracted and ask:
|
|
35
|
+
|
|
36
|
+
> "I pulled N comments from the .docx export. If you've resolved any in the doc already (those may not be in the export), paste their text here and I'll include them. Otherwise reply 'continue' and I'll classify."
|
|
37
|
+
|
|
38
|
+
6. **For each piece of feedback** (body change or comment), classify:
|
|
39
|
+
- **`clarification`** โ a question or small ask; will be folded into the next draft.
|
|
40
|
+
- **`disagreement`** โ pushback on a decision; needs an explicit operator call (accept / reject / explore-3rd-option).
|
|
41
|
+
- **`plus_one`** โ endorsement, no action needed.
|
|
42
|
+
- **`side_discussion`** โ adjacent thought, tracked as a follow-up, not blocking.
|
|
43
|
+
|
|
44
|
+
7. **For every `disagreement`, force operator resolution**:
|
|
45
|
+
- Present the disagreement, the proposer (if known), and the surrounding context.
|
|
46
|
+
- Ask: "Accept and revise the proposal, reject (keep original), or explore a third option?"
|
|
47
|
+
- If "explore" โ capture the operator's new direction.
|
|
48
|
+
- Record the resolution in `docs/reviews/<slug>/decisions.md` (create or append).
|
|
49
|
+
- Do **not** proceed to finalize until all disagreements have resolutions.
|
|
50
|
+
|
|
51
|
+
8. **Render `docs/reviews/<slug>/feedback.md`**:
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
# Feedback โ <slug>
|
|
55
|
+
|
|
56
|
+
Collected: <timestamp>
|
|
57
|
+
Source: <web_view_link>
|
|
58
|
+
|
|
59
|
+
## Summary
|
|
60
|
+
|
|
61
|
+
- N clarifications
|
|
62
|
+
- M disagreements (X resolved, Y unresolved)
|
|
63
|
+
- K plus-ones
|
|
64
|
+
- L side discussions
|
|
65
|
+
|
|
66
|
+
## Per-section feedback
|
|
67
|
+
|
|
68
|
+
### <Section title>
|
|
69
|
+
|
|
70
|
+
**Status:** edited | commented | unchanged
|
|
71
|
+
|
|
72
|
+
**Original (excerpt):**
|
|
73
|
+
|
|
74
|
+
> ...
|
|
75
|
+
|
|
76
|
+
**Current (excerpt):**
|
|
77
|
+
|
|
78
|
+
> ...
|
|
79
|
+
|
|
80
|
+
**Comments:**
|
|
81
|
+
|
|
82
|
+
- [clarification] <text> โ <author> โ _operator note: ..._
|
|
83
|
+
- [disagreement] <text> โ <author> โ **resolved: accept** (see decisions.md)
|
|
84
|
+
|
|
85
|
+
## Plus-ones
|
|
86
|
+
|
|
87
|
+
- <author>: <text or "๐ on announcement">
|
|
88
|
+
|
|
89
|
+
## Side discussions (tracked as follow-ups)
|
|
90
|
+
|
|
91
|
+
- <text> โ <author>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
9. **Update `state.yaml`**:
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
phase: feedback-collected
|
|
98
|
+
feedback:
|
|
99
|
+
collected_at: <now ISO>
|
|
100
|
+
body_changed: true|false
|
|
101
|
+
comment_count: N
|
|
102
|
+
classification:
|
|
103
|
+
clarification: N
|
|
104
|
+
disagreement: M
|
|
105
|
+
plus_one: K
|
|
106
|
+
side_discussion: L
|
|
107
|
+
unresolved_disagreements: 0
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
10. **Report back**: brief summary (counts per category), highlight any unresolved disagreements, and the next step:
|
|
111
|
+
- All resolved โ "Ready for `/prep-review-finalize <slug>`."
|
|
112
|
+
- Unresolved remain โ "Resolve N disagreements before finalize. Re-run this command after."
|
|
113
|
+
|
|
114
|
+
11. **Propose a commit message**:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
docs(reviews): collect feedback for <slug>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Tool notes
|
|
121
|
+
|
|
122
|
+
- Drive: export as `.docx` (for comments) + a clean body-text read (for the diff). No writes to Drive.
|
|
123
|
+
- No chat calls in this phase.
|
|
124
|
+
- The classification step is judgment work โ don't rubber-stamp. If a comment reads ambiguous, ask the operator before classifying.
|
|
125
|
+
|
|
126
|
+
## Important
|
|
127
|
+
|
|
128
|
+
- The `.docx` export typically gives you open comments. If the operator's review pattern resolves comments inline before collect runs, expect to need the paste-fallback. Note this in the announcement (workflow doc has the template).
|
|
129
|
+
- `decisions.md` becomes part of the ADR context in finalize โ it's the trail of "we considered X, chose Y."
|
|
130
|
+
- Don't auto-commit.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Draft the ADR from a reviewed proposal, close the loop in chat, promote the final spec to docs/specs/
|
|
3
|
+
argument-hint: <slug>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Close out a review: ADR + chat thread reply + promote the final spec. Full workflow reference: [.claude/workflows/review-workflow.md](.claude/workflows/review-workflow.md).
|
|
7
|
+
|
|
8
|
+
Slug: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
> Tooling: uses the project's configured **document-drive MCP** and **chat MCP**. Tool names are project-defined; the steps below are tool-agnostic.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. **Load state**: read `docs/reviews/<slug>/state.yaml`. Validate:
|
|
15
|
+
- `phase == feedback-collected`.
|
|
16
|
+
- `feedback.unresolved_disagreements == 0` (else bail: "Run `/prep-review-collect <slug>` again โ N disagreements still unresolved.").
|
|
17
|
+
- `decisions.md` exists if any disagreements were recorded.
|
|
18
|
+
- `feedback.md` exists.
|
|
19
|
+
|
|
20
|
+
2. **Gather all inputs**:
|
|
21
|
+
- `source.md` (original)
|
|
22
|
+
- `package.md` (what went to Drive)
|
|
23
|
+
- Current Drive body (read via the drive MCP using `drive.file_id`)
|
|
24
|
+
- `feedback.md` (classifications + per-section)
|
|
25
|
+
- `decisions.md` (operator's resolutions on disagreements)
|
|
26
|
+
|
|
27
|
+
3. **Determine the next ADR number**:
|
|
28
|
+
- List `docs/architecture/adr/*.md`, parse the `NNN-` prefix, take max + 1.
|
|
29
|
+
- Watch for any existing collision pattern (e.g. two files sharing a number). Confirm with the operator if there's ambiguity.
|
|
30
|
+
|
|
31
|
+
4. **Read 2โ3 recent ADRs** for voice and structure. Match the format:
|
|
32
|
+
- `# ADR-NNN: <title>`
|
|
33
|
+
- Header table: Status | Date | Context | Related
|
|
34
|
+
- `## Context` (3โ5 bullets)
|
|
35
|
+
- `## Decision N โ <sub-title>` sections (often a table for enums/options)
|
|
36
|
+
- `## Consequences` (Easier / Harder bullets)
|
|
37
|
+
- Optional `## Follow-up` (out-of-scope side-discussions go here)
|
|
38
|
+
|
|
39
|
+
5. **Draft the ADR** at `docs/architecture/adr/NNN-<slug>.md`:
|
|
40
|
+
- **Status:** `Accepted` by default (the operator has already reviewed feedback and resolved disagreements via `decisions.md`). Operator can manually downgrade to `Proposed` to leave the decision open for further input.
|
|
41
|
+
- **Date:** today.
|
|
42
|
+
- **Context:** 1โ2 sentences citing `docs/specs/<slug>.md` (the final spec we're about to write) and any related ADRs.
|
|
43
|
+
- **Related:** prior ADRs that touch the same area, the source spec path, the Drive review link.
|
|
44
|
+
- **Decisions:** one per significant call. For each disagreement that landed in `decisions.md`, capture the decision + the rationale (why we chose accept/reject/explore).
|
|
45
|
+
- **Consequences:** honest trade-offs from the synthesis. Don't overstate the upside.
|
|
46
|
+
- **Follow-up:** the `side_discussion` items from `feedback.md`, listed as tracked but out-of-scope for this ADR.
|
|
47
|
+
|
|
48
|
+
6. **Promote the final spec** to `docs/specs/<slug>.md`:
|
|
49
|
+
- This is the **post-review** version, not the original source.
|
|
50
|
+
- Start from the current Drive body โ it includes accepted suggestions.
|
|
51
|
+
- Layer in any clarifications from `feedback.md` that weren't body-edited.
|
|
52
|
+
- Add a header block linking back to the ADR and the review trail:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
# <Title>
|
|
56
|
+
|
|
57
|
+
> **Status:** Finalized after review ยท See [ADR-NNN](../architecture/adr/NNN-<slug>.md) ยท Review trail: [`docs/reviews/<slug>/`](../reviews/<slug>/)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- If the source markdown was already at `docs/specs/<slug>.md`, **diff** the new content vs the old before overwriting and report the changes.
|
|
61
|
+
|
|
62
|
+
7. **Gate on operator** โ present:
|
|
63
|
+
- ADR draft (full text, inline)
|
|
64
|
+
- Final spec diff vs source
|
|
65
|
+
- Chat reply draft (next step)
|
|
66
|
+
- **Ask explicitly**: "Looks good? Reply 'post' to send the chat reply and finalize, 'iterate' to revise either, or 'abort'."
|
|
67
|
+
|
|
68
|
+
8. **Chat: compose the thread reply** (template in the workflow doc):
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
โ
*Decision recorded:* <ADR title>
|
|
72
|
+
|
|
73
|
+
<2โ3 sentences: decision summary, key consequence>
|
|
74
|
+
|
|
75
|
+
๐ ADR: `docs/architecture/adr/NNN-<slug>.md` (in repo)
|
|
76
|
+
๐ Final spec: `docs/specs/<slug>.md`
|
|
77
|
+
|
|
78
|
+
Thanks for the feedback โ N comments incorporated, M side-discussions tracked as follow-ups.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- Reply **in-thread** on the original announcement (`thread_ts` = `chat.message_ts`).
|
|
82
|
+
- Optionally broadcast back to the main channel if the decision is worth re-surfacing (ask the operator).
|
|
83
|
+
|
|
84
|
+
9. **Update `state.yaml`**:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
phase: finalized
|
|
88
|
+
adr:
|
|
89
|
+
number: NNN
|
|
90
|
+
path: docs/architecture/adr/NNN-<slug>.md
|
|
91
|
+
drafted_at: <now ISO>
|
|
92
|
+
final_spec:
|
|
93
|
+
path: docs/specs/<slug>.md
|
|
94
|
+
chat:
|
|
95
|
+
finalize_reply_ts: <reply ts>
|
|
96
|
+
finalize_reply_permalink: ...
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
10. **Report back**: ADR path, final spec path, chat thread permalink, summary.
|
|
100
|
+
|
|
101
|
+
11. **Propose commit message(s)** โ suggest splitting into separate commits for clarity:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
docs(adr): ADR-NNN <title>
|
|
105
|
+
docs(specs): finalize <slug> after review
|
|
106
|
+
docs(reviews): mark <slug> finalized
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Tool notes
|
|
110
|
+
|
|
111
|
+
- Drive: only read the current body (to pull into the final spec). No writes to Drive.
|
|
112
|
+
- Chat: reply in-thread. Use a draft first if the operator hasn't seen the wording.
|
|
113
|
+
- Read recent ADRs from `docs/architecture/adr/` before drafting โ don't invent the format.
|
|
114
|
+
|
|
115
|
+
## Important
|
|
116
|
+
|
|
117
|
+
- The ADR is durable. It will get cited for years. Take this draft seriously: clear context, sharp decisions, honest consequences. Read recent ADRs for voice โ terse, tabular where it helps, no marketing language.
|
|
118
|
+
- The Drive doc stays untouched. The review trail in `docs/reviews/<slug>/` is preserved as the audit log.
|
|
119
|
+
- **Do not** delete `docs/reviews/<slug>/` after finalize. It's the receipts.
|
|
120
|
+
- If the source markdown was outside `docs/specs/`, ask the operator where the final spec belongs โ don't auto-relocate.
|
|
121
|
+
- Don't auto-commit.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Publish a staged review package to a shared drive (as native Doc/Slides) and announce in chat
|
|
3
|
+
argument-hint: <slug> [--channel #name] [--republish]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Publish a review package previously staged by `/prep-review`. Full workflow reference: [.claude/workflows/review-workflow.md](.claude/workflows/review-workflow.md).
|
|
7
|
+
|
|
8
|
+
Slug: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
> Tooling: this command uses the project's configured **document-drive MCP** (e.g. Google Drive) and **chat MCP** (e.g. Slack). The exact tool names are project-defined; the steps below are tool-agnostic.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. **Parse args**: slug (required), `--channel <name>` (default = the project's review channel), `--republish` (delete + repost).
|
|
15
|
+
|
|
16
|
+
2. **Load state**: read `docs/reviews/<slug>/state.yaml`. Validate:
|
|
17
|
+
- Exists? If not โ "Run `/prep-review <path>` first."
|
|
18
|
+
- `phase == drafted` or `published` (latter is a no-op unless `--republish`).
|
|
19
|
+
- `package.md` exists.
|
|
20
|
+
|
|
21
|
+
3. **Read `package.md`** โ this is what gets uploaded.
|
|
22
|
+
|
|
23
|
+
4. **Drive: locate the review folder** (the project's review folder in its shared drive):
|
|
24
|
+
- If `state.yaml` already has `drive.folder_id` โ skip the search, use it directly.
|
|
25
|
+
- Otherwise search the drive for the review folder by name.
|
|
26
|
+
- **If the search returns nothing** (some drive MCPs don't include shared-drive content by default): ask the operator to paste the folder URL. The folder ID is the last path segment of the folder URL.
|
|
27
|
+
- Persist `drive.folder_id` (and `drive.shared_drive_id` if available from metadata) to `state.yaml`. Subsequent publishes skip the lookup.
|
|
28
|
+
|
|
29
|
+
5. **Drive: generate the artifact with a descriptive filename, prompt drag-drop, detect via folder polling**:
|
|
30
|
+
- Verify the converter is on PATH (e.g. `which pandoc`; bail with install instructions if missing).
|
|
31
|
+
- **Derive the Drive filename from the source H1** (the drive uses the filename as the artifact's title in UI and chat):
|
|
32
|
+
- Take the H1 of `package.md`.
|
|
33
|
+
- Replace any `:` with `โ` (filesystem-friendly, reads cleaner).
|
|
34
|
+
- Append the right extension. Example: `Proposal: Review workflow via Drive + chat` โ `Proposal โ Review workflow via Drive + chat.docx`.
|
|
35
|
+
- **Do not** use generic names like `package.docx` โ those become ugly drive titles.
|
|
36
|
+
- **For Doc surface**: convert `package.md` โ `.docx` (e.g. `pandoc -f gfm -t docx docs/reviews/<slug>/package.md -o "docs/reviews/<slug>/<Derived>.docx"`).
|
|
37
|
+
- **For Slides surface**: generate `.pptx` via the project's slide skill, same derived-filename pattern.
|
|
38
|
+
- **Baseline the drive folder** before prompting: list existing file IDs in the folder (`baseline_ids`).
|
|
39
|
+
- Print one clear instruction:
|
|
40
|
+
> "Drag `docs/reviews/<slug>/<Derived>.docx` into this folder: `<folder URL>`. I'll detect it automatically โ no need to paste anything back. Note: the drive may not auto-prompt to convert .docx โ native Doc; that's fine, .docx editing supports comments and suggesting natively."
|
|
41
|
+
- **Poll the folder** every ~7s for up to ~3 min: re-list the folder, diff against `baseline_ids`. New file โ grab it.
|
|
42
|
+
- If polling times out: print the folder URL again and ask the operator to paste the new file's URL manually (fallback).
|
|
43
|
+
- Once detected: fetch metadata to capture `mimeType`, `title`, `web_view_link`.
|
|
44
|
+
- **Do not** attempt to create the file via base64 upload โ the base64 round-trip through LLM context is impractically slow.
|
|
45
|
+
|
|
46
|
+
6. **Persist Drive state**:
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
drive:
|
|
50
|
+
folder_id: ...
|
|
51
|
+
file_id: ...
|
|
52
|
+
web_view_link: ...
|
|
53
|
+
uploaded_at: <now ISO>
|
|
54
|
+
phase: published
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
7. **Chat: resolve channel**:
|
|
58
|
+
- Search the chat workspace for the channel name (strip leading `#`).
|
|
59
|
+
- If not found โ ask the operator for a valid channel.
|
|
60
|
+
- Persist `chat.channel_id` and `chat.channel_name`.
|
|
61
|
+
|
|
62
|
+
8. **Chat: compose the announcement** (use the template in the workflow doc):
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
๐ *Review needed:* <H1 title>
|
|
66
|
+
|
|
67
|
+
<2โ4 sentence TL;DR from package.md>
|
|
68
|
+
|
|
69
|
+
*Review objective:* <review_objective from state.yaml>
|
|
70
|
+
|
|
71
|
+
*How to weigh in:* Open the doc and leave inline comments / suggestions. Reactions on this message also count.
|
|
72
|
+
|
|
73
|
+
๐ <web_view_link>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
9. **Chat: send as a draft first** โ use the draft-message tool so the operator reviews wording before it ships. Wait for operator approval, then send.
|
|
77
|
+
|
|
78
|
+
10. **Persist chat state**:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
chat:
|
|
82
|
+
channel_id: ...
|
|
83
|
+
channel_name: ...
|
|
84
|
+
message_ts: ...
|
|
85
|
+
permalink: ...
|
|
86
|
+
posted_at: <now ISO>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
11. **Report back**: Drive link, chat permalink, summary of where to find things.
|
|
90
|
+
|
|
91
|
+
12. **Propose a commit message**:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
docs(reviews): publish <slug> review package (Drive + chat)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## `--republish` behavior
|
|
98
|
+
|
|
99
|
+
- Confirm with the operator first: "This will delete the existing Drive doc (losing any comments / suggestions on it) and post a fresh chat message. Proceed?"
|
|
100
|
+
- If the MCP can't delete, bail and ask the operator to delete in the UI, or skip deletion and overwrite content via a new upload.
|
|
101
|
+
- Reset `drive` and `chat` fields in `state.yaml`, then run steps 4โ11 fresh.
|
|
102
|
+
|
|
103
|
+
## Failure modes
|
|
104
|
+
|
|
105
|
+
- **Drive upload succeeds, chat post fails**: persist Drive state, bail with "Drive done. Re-run `/prep-review-publish <slug>` to retry chat only."
|
|
106
|
+
- **Both fail**: no state changes beyond what already succeeded; the operator can re-run safely.
|
|
107
|
+
- **Channel not found**: ask the operator to specify or create the channel; do not invent one.
|
|
108
|
+
|
|
109
|
+
## Important
|
|
110
|
+
|
|
111
|
+
- This is the first irreversible-ish action (humans will see the doc). Take the gate at step 9 seriously โ chat messages can be deleted but the notification already fired.
|
|
112
|
+
- Don't call Drive `delete` operations unless explicitly approved โ losing comments is destructive.
|
|
113
|
+
- Don't auto-commit.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Stage a markdown proposal for stakeholder review โ generate a review-ready package, pick a surface (Doc/Slides), gate on operator
|
|
3
|
+
argument-hint: <path-to-markdown> [--as doc|slides|auto] [--force]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Stage a review package for stakeholders who live outside the repo (no source access โ reviewing via Docs/Slides + chat). Full workflow reference: [.claude/workflows/review-workflow.md](.claude/workflows/review-workflow.md).
|
|
7
|
+
|
|
8
|
+
Source: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Parse args**: source path (required), `--as doc|slides|auto` (default `auto`), `--force` (overwrite existing).
|
|
13
|
+
|
|
14
|
+
2. **Read the source markdown.** If missing โ bail clearly. Derive a slug from the filename (kebab-case, no extension).
|
|
15
|
+
|
|
16
|
+
3. **Check `docs/reviews/<slug>/`**:
|
|
17
|
+
- Doesn't exist โ proceed.
|
|
18
|
+
- Exists without `--force` โ bail with: "Already drafted. Re-run with `--force` to overwrite, or `/prep-review-publish <slug>` to ship it, or `/prep-review-collect <slug>` if it's already published."
|
|
19
|
+
- `--force` โ preserve `state.yaml` Drive/chat fields if present (so we don't lose IDs); only overwrite `source.md` and `package.md`.
|
|
20
|
+
|
|
21
|
+
4. **Analyze the source** for surface recommendation (only if `--as auto`):
|
|
22
|
+
- Count `##`/`###` headings, list lines, paragraphs, tables, image refs.
|
|
23
|
+
- Look at filename + H1 for words like "deck", "pitch", "presentation" โ tilt Slides.
|
|
24
|
+
- Length > 300 lines or heavy prose โ tilt Doc.
|
|
25
|
+
- Decision-focused / spec-shaped โ Doc.
|
|
26
|
+
- See the surface heuristic in the workflow doc.
|
|
27
|
+
- If `--as doc` or `--as slides` is explicit, skip analysis.
|
|
28
|
+
|
|
29
|
+
5. **Extract the review objective.** Look for a `## Review objective` (or `## Decision needed` / `## What we need from you`) section in the source. If missing, **ask the operator** for a 1โ3 sentence statement before proceeding โ this is what stakeholders are being asked to decide.
|
|
30
|
+
|
|
31
|
+
6. **Generate the review package** at `docs/reviews/<slug>/package.md`:
|
|
32
|
+
- Lead with a 3โ5 sentence **TL;DR**, stakeholder-facing. If the source already has a TL;DR, **don't just copy it** โ the source TL;DR is repo-facing ("here's what this doc is"); the package TL;DR is stakeholder-facing ("here's what we need from you"). End it with an explicit "What we need from you" clause if not already obvious.
|
|
33
|
+
- Then the **Review objective** verbatim.
|
|
34
|
+
- Then the full source content (lightly reformatted only if the surface is Slides โ see below).
|
|
35
|
+
- Trailing **"How to leave feedback"** block: "Use suggesting mode for prose changes. Use inline comments for questions or disagreements. React ๐ on the announcement if you're aligned with no comments. **Please leave comments open** (don't resolve them) until you're told feedback has been collected โ resolved comments may not survive the export."
|
|
36
|
+
- For **Slides**: restructure into slide-shaped chunks separated by `---`. One concept per slide. Move long prose to speaker-notes-style indented blocks. **Ask the operator to confirm the slide structure** before publish.
|
|
37
|
+
|
|
38
|
+
7. **Snapshot the source** to `docs/reviews/<slug>/source.md` (raw copy, for diffing later).
|
|
39
|
+
|
|
40
|
+
8. **Write `state.yaml`** with: slug, source path, created_at (ISO 8601), `phase: drafted`, `surface`, `surface_reasoning` (one-paragraph honest explanation โ captures *why* this surface was picked, for audit and to force honesty when `--as auto` picks wrong), `review_objective`. No Drive/chat fields yet.
|
|
41
|
+
|
|
42
|
+
9. **Gate on operator** โ present:
|
|
43
|
+
- Surface choice + 1-line reasoning ("Recommended Doc because 480 lines, 12 sections, no deck signal in title")
|
|
44
|
+
- TL;DR you wrote
|
|
45
|
+
- Review objective
|
|
46
|
+
- File list staged
|
|
47
|
+
- **Ask explicitly**: "Look good? Reply 'publish' to run `/prep-review-publish <slug>`, 'iterate' to revise, or 'abort' to back out."
|
|
48
|
+
|
|
49
|
+
10. **Propose a commit message** (do not run it):
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
docs(reviews): draft review package for <slug>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Tool notes
|
|
56
|
+
|
|
57
|
+
- Use `Read` for the source, `Write` for all generated files.
|
|
58
|
+
- Don't call any Drive or chat tools โ this phase is local only.
|
|
59
|
+
- Don't auto-commit (`CLAUDE.md` rule).
|
|
60
|
+
|
|
61
|
+
## Important
|
|
62
|
+
|
|
63
|
+
- The package is what stakeholders will read. Quality matters โ this isn't a mechanical conversion. Add a TL;DR, ensure section flow makes sense out of repo context, expand acronyms on first use.
|
|
64
|
+
- The source markdown stays untouched. Only `docs/reviews/<slug>/` is written.
|
|
65
|
+
- If the operator says "iterate", make the revision in `package.md` (not the source), then re-gate.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Close out a finished project โ verify all PRs merged, clean up worktrees/branches, close the project board once every issue is closed, mine all local code-review findings (+ static-analysis alerts) for recurring mistake families, and memorialize durable lessons.
|
|
3
|
+
argument-hint: <project-number>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run the **Project Closeout Ceremony** for project #$ARGUMENTS. Full reference: [.claude/workflows/project-closeout-ceremony.md](.claude/workflows/project-closeout-ceremony.md). Run this once the project's last PR has merged (or on a deliberate long pause).
|
|
7
|
+
|
|
8
|
+
Work-item reads (board status, finding records) and closing the board go through the project's installed **issue-tracker skill** (`.claude/skills/issue-tracker-*/`) via `list-issues` / `get-issue` / `query-board` / `close-board`. PR state and CI alerts stay on `gh` / GitHub.
|
|
9
|
+
|
|
10
|
+
Execute the ceremony's seven steps in order:
|
|
11
|
+
|
|
12
|
+
1. **Verify everything merged** โ `gh pr view <n> --json state` for every project + follow-up PR (all `MERGED`; squash-merge means `git branch --merged` lies โ trust PR state). Board items all `Done`/`In Review` (skill `query-board`). If anything is still open/In Progress, stop and report โ the project isn't closed.
|
|
13
|
+
2. **Clean up** โ remove ONLY this project's worktrees (`git worktree remove --force` + `prune`), delete merged local branches, delete dangling remote branches (`git push origin --delete` โ UI merges don't auto-delete), restore the main checkout to `main`. Leave unrelated/locked worktrees.
|
|
14
|
+
3. **Close the project board** โ once Step 1 confirms the PRs merged, close the board **only if every issue on it is closed**, via the skill's `close-board` operation. The board's own status field is unreliable, so the skill gates on real issue state (intersect the board's issues with the still-open issues โ the intersection must be empty). Any issue still open โ do NOT close; stop and report (the project isn't done). Reversible.
|
|
15
|
+
4. **Mine ALL local-review findings** โ pull every local code-review findings record across the project into one corpus via the skill's `list-issues` / `get-issue` operations (on GitHub the findings live as the marked comment each PR posts โ `gh pr view <n> --json comments`, all PR numbers; the skill handles where they live on other trackers), plus any static-analysis / security-scanning alerts still produced in CI. (Review is local-only โ there are no cloud review threads to mine; the durable record is the findings comment each PR/work item posts.) Classify by mistake **family**, not individual fix. For each: recurrence count + distinct PRs (โฅ2 = a pattern); already in `docs/agent-lessons/` (or the engsys lessons-library)? (if yes but it still recurred โ strengthen, don't just re-file); severity (prioritize families that produced real Critical/Major bugs over nitpicks).
|
|
16
|
+
5. **Memorialize (team-facing, in the repo)** โ new recurring family โ new lesson under `docs/agent-lessons/`; documented-but-recurring โ strengthen the existing lesson + its Start-of-PR check; workflow/agent/command gap โ update the relevant `.claude/commands/*.md` / `.claude/agents/*.md` / `CLAUDE.md`. **Generalizable lessons** (not specific to this project's stack/domain) โ also open a PR back to the engsys `lessons-library/` so other projects inherit them. Commit on `agent/project-$ARGUMENTS-reflection-lessons` โ one docs PR.
|
|
17
|
+
6. **Update personal memory** โ orchestration/verification/tooling judgment that's about how YOU operate goes in your memory dir; append to existing feedback files, point at the repo checklist.
|
|
18
|
+
7. **Final report** โ PRs merged + lesson contributions, cleanup done, **whether the board was closed (or which issues block it)**, new/strengthened lessons (with the recurrence count justifying each), personal-memory updates, outstanding deferred/operator-gated work.
|
|
19
|
+
|
|
20
|
+
Hard rules:
|
|
21
|
+
|
|
22
|
+
- Repo-vs-personal split per `CLAUDE.md` ยง Memory & rules: anything that should change behavior for **anyone** in the repo goes in the repo (`docs/agent-lessons/` / workflow / `CLAUDE.md`), not personal memory. Anything generalizable beyond this project goes to the engsys `lessons-library/`.
|
|
23
|
+
- Generalize the **family**, don't just confirm the inline fix โ fixing a comment inline is not learning.
|
|
24
|
+
- Issue bodies / commit messages / PR bodies via `tmp/` files, never HEREDOC.
|
|
25
|
+
- Docs-only commits: if a local markdown-lint hook can't spawn, `--no-verify` is acceptable; the pre-push local review is the markdown backstop.
|