← back to Cli Printing Press
feat(scorecard): implement two-tier Vision scoring
de296d1fcd73148c8bee3706bb50d3bc3e3ca838 · 2026-03-25 21:20:16 -0700 · Matt Van Horn
Tier 1 (0-5): file presence (export, store, search, sync, tail,
import, workflow/compound).
Tier 2 (0-5): intelligence checks - domain-specific tables in
store.go, FTS5 indexes, vision commands wired in root.go, search
uses store package. Stub files alone no longer score 10/10.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Files touched
M internal/pipeline/scorecard.go
Diff
commit de296d1fcd73148c8bee3706bb50d3bc3e3ca838
Author: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Date: Wed Mar 25 21:20:16 2026 -0700
feat(scorecard): implement two-tier Vision scoring
Tier 1 (0-5): file presence (export, store, search, sync, tail,
import, workflow/compound).
Tier 2 (0-5): intelligence checks - domain-specific tables in
store.go, FTS5 indexes, vision commands wired in root.go, search
uses store package. Stub files alone no longer score 10/10.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
internal/pipeline/scorecard.go | 89 ++++++++++++++++++++++++++++++++++++------
1 file changed, 78 insertions(+), 11 deletions(-)
diff --git a/internal/pipeline/scorecard.go b/internal/pipeline/scorecard.go
index c2955ef4..33814a27 100644
--- a/internal/pipeline/scorecard.go
+++ b/internal/pipeline/scorecard.go
@@ -492,39 +492,106 @@ func scoreBreadth(dir string) int {
}
func scoreVision(dir string) int {
- score := 0
cliDir := filepath.Join(dir, "internal", "cli")
+
+ // Tier 1: Feature Presence (0-5 points)
+ tier1 := 0.0
if fileExists(filepath.Join(cliDir, "export.go")) {
- score += 2
- }
- if fileExists(filepath.Join(cliDir, "import.go")) {
- score += 1
+ tier1 += 1.0
}
if fileExists(filepath.Join(dir, "internal", "store", "store.go")) {
- score += 2
+ tier1 += 1.0
}
if fileExists(filepath.Join(cliDir, "search.go")) {
- score += 2
+ tier1 += 1.0
}
if fileExists(filepath.Join(cliDir, "sync.go")) {
- score += 1
+ tier1 += 0.5
}
if fileExists(filepath.Join(cliDir, "tail.go")) {
- score += 1
+ tier1 += 0.5
+ }
+ if fileExists(filepath.Join(cliDir, "import.go")) {
+ tier1 += 0.5
}
- // Check for workflow or compound command files
+ // Workflow or compound command files
entries, err := os.ReadDir(cliDir)
if err == nil {
for _, e := range entries {
name := e.Name()
if strings.Contains(name, "_workflow") || strings.Contains(name, "_compound") {
if strings.HasSuffix(name, ".go") {
- score++
+ tier1 += 0.5
break
}
}
}
}
+ if tier1 > 5 {
+ tier1 = 5
+ }
+
+ // Tier 2: Feature Intelligence (0-5 points)
+ tier2 := 0.0
+
+ // Schema depth (0-1.5): check if store.go has domain-specific tables
+ storePath := filepath.Join(dir, "internal", "store", "store.go")
+ if fileExists(storePath) {
+ storeContent := readFileContent(storePath)
+ tableCount := strings.Count(storeContent, "CREATE TABLE")
+ syncStateCount := strings.Count(storeContent, "sync_state")
+ domainTables := tableCount
+ if syncStateCount > 0 {
+ domainTables-- // Don't count sync_state as a domain table
+ }
+ if domainTables >= 3 {
+ tier2 += 1.5
+ } else if domainTables >= 2 {
+ tier2 += 1.0
+ } else if domainTables >= 1 {
+ tier2 += 0.5
+ }
+ }
+
+ // Wiring check (0-1.5): are vision commands registered in root.go?
+ rootPath := filepath.Join(cliDir, "root.go")
+ if fileExists(rootPath) {
+ rootContent := readFileContent(rootPath)
+ visionFuncs := []string{"newSyncCmd", "newSearchCmd", "newExportCmd", "newTailCmd", "newImportCmd", "newAnalyticsCmd"}
+ wired := 0
+ for _, fn := range visionFuncs {
+ if strings.Contains(rootContent, fn) {
+ wired++
+ }
+ }
+ tier2 += float64(wired) * 0.25
+ if tier2 > 3.0 { // cap wiring contribution
+ tier2 = 3.0
+ }
+ }
+
+ // FTS5 check (0-1.0): does the store have full-text search?
+ if fileExists(storePath) {
+ storeContent := readFileContent(storePath)
+ if strings.Contains(storeContent, "fts5") || strings.Contains(storeContent, "FTS5") {
+ tier2 += 1.0
+ }
+ }
+
+ // Search uses store (0-0.5): does search.go reference the store package?
+ searchPath := filepath.Join(cliDir, "search.go")
+ if fileExists(searchPath) {
+ searchContent := readFileContent(searchPath)
+ if strings.Contains(searchContent, "store.") || strings.Contains(searchContent, "/store") {
+ tier2 += 0.5
+ }
+ }
+
+ if tier2 > 5 {
+ tier2 = 5
+ }
+
+ score := int(tier1 + tier2)
if score > 10 {
score = 10
}
← bba88f65 feat(generator): wire vision templates into Generate()
·
back to Cli Printing Press
·
fix(profiler): improve HighVolume and NeedsSearch heuristics a783ac12 →