CLI maintenance audit: 21 findings (spec drift, missing tests, weak assertions)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- github-actions, javascript
- Área
- build-system, ci-cd, cli, documentation, testing
Línea de trabajo
Comienza con cli/specs/audit-sonnet.md y cli/specs/audit-delta.md; después, compara los hallazgos con cli/specs/requirements.md, cli/specs/design.md, cli/specs/validation.md, launch.js, cli.js, package.json, los tests y la configuración de GitHub Actions. Ejecuta los tests existentes de CLI e inspecciona la ejecución en seco de npm pack; se considera terminado cuando cada hallazgo enumerado está resuelto y están presentes la assertion especificada, la actualización de documentación o la cobertura de CI correspondiente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Background
A maintenance audit of the CLI was conducted against cli/specs/requirements.md, cli/specs/design.md, cli/specs/validation.md, implementation files, and tests. Full audit report: cli/specs/audit-sonnet.md. Delta analysis (what agents missed and why): cli/specs/audit-delta.md.
Not urgent — nothing is broken in production — but these shouldn't get lost.
High Severity
F-001 — TC-CLI-080/081 spawn arg assertions are illusory
- Tests check function exports and source strings, but never intercept
spawnto verifycmd/argsper CLI - The
switch/caseinlaunch.js:89–105is behaviorally untested - Fix: intercept
child_process.spawnwith a mock, assert correctcmdandargsfor each CLI variant
F-002 — REQ-CLI-019 spawn failure path completely untested
- No test triggers
child.on("error", ...)inlaunch.js:112–119 - Traceability matrix maps REQ-CLI-019 → TC-CLI-076, but TC-CLI-076 tests "no CLI found" (different path)
- Fix: add a test that passes a nonexistent binary and asserts error message/exit code
F-003 — Spec frontmatter says version 0.3.0, package.json is 0.5.0
- Affects
requirements.md,design.md,validation.md— all sayversion: "0.3.0" - Fix: bump all three to
0.5.0and add revision history entries
Medium Severity
F-004 — REQ-CLI-082 (publishConfig) has no automated test
- Validation plan says "verified by package.json inspection" — no TC covers this
- Fix: add a test asserting
publishConfig.access === "public"and scoped package name
F-005 — REQ-CLI-091 (cross-platform) has no CI matrix
- Platform-aware code exists but no CI runs tests on Windows + macOS + Linux
- Fix: add a GitHub Actions matrix job
F-006 — TC-CLI-071 (gh-copilot detection) not implemented
detectCli()gh-copilot branch is untested- Fix: implement TC-CLI-071
F-007 — TC-CLI-075 (--cli flag override) not implemented
- REQ-CLI-011 core behavior is untested
- Fix: implement TC-CLI-075
F-008 — TC-CLI-079 (temp dir cleanup on exit) not implemented
- REQ-CLI-018 cleanup behavior is untested
- Fix: implement TC-CLI-079
F-009 — TC-CLI-100/121 (npm pack distribution) not implemented
- No test runs
npm pack --dry-runto verify package contents - Fix: implement as a build-type test
F-010 — TC-CLI-073 type mismatch (integration vs spec's unit)
- Spec says "Type: Unit — call
detectCli()directly"; test runs full CLI binary viaexecFileSync - Fix: refactor TC-CLI-073 to call
detectCli()as a unit
F-011 — REQ-CLI-094 (dependency count) has no automated test
- One assertion (
Object.keys(pkg.dependencies).length === 2) would cover this - Fix: add assertion to package.json inspection test
Low Severity
F-012 — REQ-CLI-082/090 not traced in design document
enginesandpublishConfigfields not mentioned in design doc §6- Fix: add brief §6 entries for both
F-013 — GAP-010 in design.md should be marked resolved
cli.js:48already documents valid--clivalues; gap is closed- Fix: update GAP-010 status to "Resolved in v0.5.0"
F-014 — Informational launch messages undocumented
launch.jsprints "PromptKit content staged at: ..." and "Launching [cli]..." — not in any spec- Fix: document in design.md §4 or requirements
F-015 — Usage hint references stale assemble verb
cli.js:98hint doesn't mentioninteractivesubcommand- Fix: update hint to say "run
promptkit interactive"
F-016 — TC-CLI-077 (fallback warning) not implemented
- Fix: implement TC-CLI-077
F-017 — TC-CLI-101 (content/ gitignored) not automated
- Could be a static test asserting
.gitignorecontainscontent/ - Fix: implement as a simple assertion
F-018 — TC-CLI-078 only checks 2 of 5 component directories
- Test asserts
personas/andtemplates/exist but skipsprotocols/,formats/,taxonomies/ - Fix: add assertions for all five
F-019 — TC-CLI-002 doesn't test -V short flag
- REQ-CLI-003 says "--version or -V" but test only uses
--version - Fix: add
-Vassertion
F-020 — TC-CLI-053 assertion too weak
- Spec says hint should reference "promptkit interactive"; test only checks for "promptkit"
- Fix: tighten assertion to check for "interactive"
Reference Files
cli/specs/audit-sonnet.md— Sonnet blind audit (18 findings, overlaps heavily)cli/specs/audit-delta.md— Root cause analysis of what agents miss and whycli/specs/maintenance-audit.md— Original 8-finding audit
- Lenguaje dominante
- JavaScript
- Estrellas
- 105
- Forks
- 23
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PromptKit
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
Todos los issues de microsoft/PromptKit
Issues similares
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/safe-publish#594 ·
-
内部文件键(绝对路径的 base64)泄漏到界面标签 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
NousResearch/hermes-agent#121143 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100