feat(infra): auto-commit con 29 cambios
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+19
-2
@@ -12,11 +12,14 @@ import (
|
||||
|
||||
func cmdDoctor(args []string) {
|
||||
jsonOut := false
|
||||
emitClaudeMd := false
|
||||
sub := ""
|
||||
for _, a := range args {
|
||||
switch a {
|
||||
case "--json":
|
||||
jsonOut = true
|
||||
case "--emit-claude-md":
|
||||
emitClaudeMd = true
|
||||
case "-h", "--help":
|
||||
doctorUsage()
|
||||
return
|
||||
@@ -51,7 +54,11 @@ func cmdDoctor(args []string) {
|
||||
case "copied-code":
|
||||
doctorCopiedCode(r, jsonOut)
|
||||
case "capabilities":
|
||||
doctorCapabilities(r, jsonOut)
|
||||
if emitClaudeMd {
|
||||
doctorCapabilitiesEmitMd(r)
|
||||
} else {
|
||||
doctorCapabilities(r, jsonOut)
|
||||
}
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "unknown doctor subcommand: %s\n", sub)
|
||||
doctorUsage()
|
||||
@@ -79,7 +86,8 @@ Subcommands:
|
||||
capabilities Drift entre docs/capabilities/INDEX.md, tags de funciones, y paginas <grupo>.md (issue 0086)
|
||||
|
||||
Flags:
|
||||
--json Salida JSON (para scripting/agentes)`)
|
||||
--json Salida JSON (para scripting/agentes)
|
||||
--emit-claude-md (solo capabilities) Genera bloque markdown para CLAUDE.md`)
|
||||
}
|
||||
|
||||
func doctorAll(root string, jsonOut bool) {
|
||||
@@ -432,6 +440,15 @@ func doctorCapabilities(root string, jsonOut bool) {
|
||||
fmt.Printf("\n%d/%d capability groups healthy.\n", len(audits)-bad, len(audits))
|
||||
}
|
||||
|
||||
func doctorCapabilitiesEmitMd(root string) {
|
||||
result, err := infra.EmitCapabilitiesMd(root)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Print(infra.RenderCapabilitiesMd(result))
|
||||
}
|
||||
|
||||
func doctorCopiedCode(root string, jsonOut bool) {
|
||||
entries, err := infra.AuditCopiedCode(root)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user