-
Notifications
You must be signed in to change notification settings - Fork 0
Clean up workBenches base and devBench tooling #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1b963bf
fcbf318
99f8bda
7a72b38
21cdc35
373a7e8
437a5b1
d7c8457
d52f633
0fa888d
b62366d
9ddf3c4
e021998
9657ed1
648f8a4
8f4ab4a
a33a22f
493f8d6
bd360d6
5c25003
bf481ca
77a06ea
c9e27af
6785fa7
d27d3e3
5c2d064
95ee771
6613d3e
1324168
9c4d587
d432219
3298e9d
a9d124c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,7 +7,8 @@ devBenches/flutterBench/ | |||||||||
| devBenches/frappeBench/ | ||||||||||
| devBenches/javaBench/ | ||||||||||
| devBenches/dotNetBench/ | ||||||||||
| devBenches/pythonBench/ | ||||||||||
| devBenches/pyBench/ | ||||||||||
| devBenches/phpBench/ | ||||||||||
|
|
||||||||||
| # Installation tracking (local only) | ||||||||||
| .installed-benches.json | ||||||||||
|
|
@@ -17,11 +18,23 @@ config/version-manifest.json | |||||||||
|
|
||||||||||
| # Common ignores | ||||||||||
| .DS_Store | ||||||||||
| __pycache__/ | ||||||||||
| *.py[cod] | ||||||||||
| *.log | ||||||||||
| *.tmp | ||||||||||
| node_modules/ | ||||||||||
|
|
||||||||||
| # Secret and machine-local environment files. Keep template examples tracked. | ||||||||||
| .env | ||||||||||
| .env.* | ||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] The added env-ignore block (lines 26-29: 1. Redundancy. 2. Does not protect already-tracked secrets. This repo already tracks 3. Correction — There are 7 tracked !*.env.exampleSuggested cleanup (collapse redundancy, keep templates committable):
Suggested change
and separately
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] New The newly added pattern Verified with Already-tracked files keep working (git skips ignore checks for tracked paths), but this is a multi-bench scaffolding repo whose purpose is creating new benches. Any new bench that adds a Note: line 28 Fix: re-allow the example templates after the ignore patterns (order matters — un-ignore lines must come after the ignore): .env
.env.*
*.env
!.env.example( |
||||||||||
| *.env | ||||||||||
| !.env.example | ||||||||||
| !.env.sample | ||||||||||
| !.env.template | ||||||||||
| *.backup | ||||||||||
| *.bak | ||||||||||
| *.bak.* | ||||||||||
| secrets/ | ||||||||||
| *.swp | ||||||||||
| *.swo | ||||||||||
|
|
||||||||||
|
|
@@ -38,4 +51,6 @@ bioBenches/gentecBench/ | |||||||||
| logs/ | ||||||||||
| .codex | ||||||||||
| .codex/ | ||||||||||
| .claude/dashboard.md | ||||||||||
| .claude/speckit-history.md | ||||||||||
| sysBenches/opsBench/ | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| # Asynchronous Clarify Protocol | ||
|
|
||
| A custom clarify step for [GitHub Spec Kit](https://github.com/github/spec-kit) + | ||
| Claude Code. It fans question generation out across reviewer angles, logs the questions | ||
| to a file, and finishes clarify **automatically** once they are answered — no manual | ||
| re-running. | ||
|
|
||
| ## Why | ||
|
|
||
| Spec Kit's stock `/speckit.clarify` is synchronous: it asks, you answer, all in one | ||
| sitting. Real clarification has human latency — a domain expert may take a day to answer | ||
| a compliance question. This protocol decouples **question generation** (cheap, parallel, | ||
| done by AI) from **answering** (slow, human) from **application** (one edit to `spec.md`), | ||
| and uses a polling loop so the loop, not you, watches for completion. | ||
|
|
||
| ## The four files | ||
|
|
||
| | File | Role | | ||
| |------|------| | ||
| | `.claude/commands/openClarify.md` | Orchestrator. Resolves the feature dir, initializes the log, triggers the generation fan-out, registers the poll loop. Never answers questions. | | ||
| | `.claude/commands/openClarify-resume.md` | Poll tick. Reads the log and branches cheaply; only the all-answered tick edits `spec.md`. Enforces the critical-class human gate. | | ||
| | `templates/clarify-log.template.md` | The log schema: two top-of-file sentinels + per-question blocks. | | ||
| | `PROTOCOL.md` | This document. | | ||
|
|
||
| ## Data flow | ||
|
|
||
| ``` | ||
| /openClarify [feature-dir] | ||
| ├─ verify spec.md exists | ||
| ├─ init clarify-log.md from template (GENERATION: PENDING, CLARIFY: IN_PROGRESS) | ||
| ├─ workflow: fan out reviewer angles ──┐ | ||
| │ data-model ┐ │ each appends OPEN question blocks | ||
| │ edge-cases ┤ │ merge + dedupe, cap 25 | ||
| │ security-compliance ┤ │ then flip GENERATION: COMPLETE | ||
| │ testability ┤ │ | ||
| │ integration ┘ │ | ||
| └─ register /loop 10m /openClarify-resume <dir> | ||
|
|
||
| ... humans answer blocks in clarify-log.md over time ... | ||
|
|
||
| /openClarify-resume <dir> (every 10 min) | ||
| ├─ log missing? → no-op | ||
| ├─ CLARIFY: COMPLETE? → no-op, stop loop | ||
| ├─ GENERATION != COMPLETE → no-op (sentinel guard: no early firing) | ||
| ├─ any status: OPEN? → no-op (still waiting) | ||
| ├─ critical answered by architect-ai? → no-op (human escalation) | ||
| └─ all answered, criticals human-signed → edit spec.md, CLARIFY: COMPLETE, stop loop | ||
| ``` | ||
|
|
||
| ## The log schema | ||
|
|
||
| Two **sentinels** at the top of `clarify-log.md` are the entire coordination contract: | ||
|
|
||
| - `GENERATION: PENDING | COMPLETE` — set `COMPLETE` only when the fan-out has written | ||
| every question. Until then the poller refuses to act. | ||
| - `CLARIFY: IN_PROGRESS | COMPLETE` — set `COMPLETE` only after answers are applied to | ||
| `spec.md`. | ||
|
|
||
| Each question is a block: | ||
|
|
||
| ``` | ||
| ## Q3 | ||
| - id: q3 | ||
| - status: OPEN # OPEN | ANSWERED | ||
| - class: normal # normal | critical | ||
| - agent: security-compliance # which reviewer angle raised it | ||
| - question: How long is PHI retained after account deletion? | ||
| - answer: | ||
| - answered_by: # human | architect-ai | ||
| - ts: | ||
| ``` | ||
|
|
||
| ## Three design guarantees | ||
|
|
||
| 1. **Sentinel guard against early firing.** The poller treats `GENERATION: COMPLETE` as a | ||
| precondition. A log that is mid-generation can momentarily show "zero OPEN questions" | ||
| simply because no questions have been written yet — the guard stops the poller from | ||
| misreading that as "all answered" and prematurely editing `spec.md`. | ||
|
|
||
| 2. **Critical-class human escalation.** A `class: critical` question (clinical / regulated / | ||
| safety-impacting) answered by `architect-ai` does **not** clear. Completion blocks until | ||
| a human re-answers or confirms it. The AI can draft; only a human signature releases the | ||
| gate. | ||
|
|
||
| 3. **Cheap read-and-branch ticks.** Nearly every poll tick just greps the sentinels and a | ||
| handful of `status:` lines, then exits. Exactly one tick — the one that sees everything | ||
| answered and all criticals human-signed — does the expensive `spec.md` edit. Polling | ||
| every 10 minutes is therefore nearly free. | ||
|
|
||
| ## Relationship to stock `/speckit.clarify` — audit pass | ||
|
|
||
| This protocol **does the clarification work**, then stock `/speckit.clarify` runs **after** | ||
| as an **audit**, not as the primary clarifier. | ||
|
|
||
| Because `/openClarify-resume` writes answers in stock's canonical shape — a | ||
| `## Clarifications` section with `### Session YYYY-MM-DD` and `- Q: … → A: …` bullets, plus | ||
| the answer folded into the relevant spec section — a subsequent stock run sees those points | ||
| as already resolved. Stock decides what to ask by scanning **spec sections** against its | ||
| coverage taxonomy (Clear / Partial / Missing), so the folding in §3b is what actually makes | ||
| the audit quiet, not the log bullets. | ||
|
|
||
| **How to use the audit:** after our protocol marks `CLARIFY: COMPLETE`, run stock | ||
| `/speckit.clarify` (the `speckit-clarify` skill) a few times. | ||
|
|
||
| - **No new questions** → our five reviewer angles covered the spec to stock's standard. Proceed to `/speckit.plan`. | ||
| - **New questions** → a real coverage gap. Most will land in taxonomy categories our angles | ||
| don't target: **functional scope & behavior, interaction/UX flow, non-functional | ||
| (performance, scalability, reliability, observability), constraints & tradeoffs, and | ||
| terminology consistency**. Our angles cover data-model, edge-cases, security/compliance, | ||
| testability, and integration — so those five categories are the expected blind spots. | ||
|
|
||
| Treat stock's output as a **regression check on our generation coverage**. If a category | ||
| keeps surfacing, add a reviewer angle for it to the fan-out in `/openClarify`. | ||
|
|
||
| > Note: in this environment stock clarify is overridden (see `~/.claude` global config) to | ||
| > ask up to **25** questions in **block form**, written to `<FEATURE_DIR>/clarify-questions.md` | ||
| > — so the audit produces a diffable file rather than a one-at-a-time interactive loop. | ||
|
|
||
| ``` | ||
| /openClarify → (async answers) → resume applies + canonical format → CLARIFY: COMPLETE | ||
| │ | ||
| /speckit.clarify ×N (audit) | ||
| │ | ||
| new questions? → new clarify cycle ; else → /speckit.plan | ||
| ``` | ||
|
|
||
| ## Known gaps / operational notes | ||
|
|
||
| - **Generation script is authored on first run.** The `workflow` keyword lets the Claude | ||
| Code runtime author the fan-out's internal script the first time `/openClarify` | ||
| runs. **Save that run as `/openClarify-generate`** so subsequent features reuse it | ||
| instead of re-authoring the fan-out each time. | ||
|
|
||
| - **`/loop` is session-scoped with a 3-day cap.** It only survives while the session is | ||
| alive and stops after ~3 days. For human turnaround longer than that, swap the in-session | ||
| loop for an external scheduler: | ||
|
|
||
| ``` | ||
| cron + claude -p /openClarify-resume <dir> | ||
| ``` | ||
|
|
||
| e.g. a crontab entry running `claude -p "/openClarify-resume specs/my-feature/"` every | ||
| 15 minutes, which survives restarts and arbitrary human latency. | ||
|
|
||
| ## Usage | ||
|
|
||
| ``` | ||
| # 1. start (defaults to specs/<current-branch>/) | ||
| /openClarify | ||
|
|
||
| # 2. humans edit clarify-log.md, filling answer / answered_by / status: ANSWERED | ||
|
|
||
| # 3. nothing else to do — the loop applies answers to spec.md and stops itself | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 *[MEDIUM] .gitignore adds pycache/claude rules but still has no .env / .backup / secret patterns
This PR touches .gitignore (adding pycache/, .py[cod], .claude/dashboard.md, .claude/speckit-history.md) but does not add any ignore rule for environment/secret files even though the same PR introduces a SonarQube workflow that reads tokens from ~/.config/sonarqube/sonar.env (see devBenches/base-image/files/sonarqube/sonar-env) and leaves a tracked bench-config.json.backup. With no '.env', '.env', 'sonar.env', '*.backup', or 'secrets' pattern, a developer who drops a sonar.env or a *.backup containing a SONAR_TOKEN into the tree will have it committed silently. Since the PR is already editing this file and adding a token-consuming feature, the env/secret ignores belong here.
Suggested fix: Add patterns such as '.env', '.env', 'sonar.env', '.backup', '*.bak', and 'secrets/' to .gitignore in this same change.