@leanspec/ui 0.2.6-dev.20251125010539 → 0.2.6
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/.next/standalone/node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/.next/standalone/packages/ui/.next/BUILD_ID +1 -1
- package/.next/standalone/packages/ui/.next/build-manifest.json +2 -2
- package/.next/standalone/packages/ui/.next/prerender-manifest.json +3 -3
- package/.next/standalone/packages/ui/.next/required-server-files.json +4 -4
- package/.next/standalone/packages/ui/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/packages/ui/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/packages/ui/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/local-projects/[id]/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/local-projects/discover/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/local-projects/list-directory/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/local-projects/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/projects/[id]/specs/[spec]/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/projects/[id]/specs/[spec]/status/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/projects/[id]/specs/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/projects/[id]/stats/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/revalidate/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/dependency-graph/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/specs/[id]/subspecs/[file]/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/api/stats/route.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects/[projectId]/specs/[specId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects/[projectId]/specs/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects.html +2 -2
- package/.next/standalone/packages/ui/.next/server/app/projects.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects.segments/_full.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects.segments/_index.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/.next/standalone/packages/ui/.next/server/app/specs/[id]/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/specs/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/app/stats/page.js.nft.json +1 -1
- package/.next/standalone/packages/ui/.next/server/pages/404.html +2 -2
- package/.next/standalone/packages/ui/.next/server/pages/500.html +2 -2
- package/.next/standalone/packages/ui/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/packages/ui/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/packages/ui/dist/BUILD_ID +1 -0
- package/.next/standalone/packages/ui/dist/public/f864aa7e7061c0600e35cf3d879b27cf.txt +1 -0
- package/.next/standalone/packages/ui/dist/public/favicon.ico +0 -0
- package/.next/standalone/packages/ui/dist/public/file.svg +1 -0
- package/.next/standalone/packages/ui/dist/public/github-mark-white.svg +1 -0
- package/.next/standalone/packages/ui/dist/public/github-mark.svg +1 -0
- package/.next/standalone/packages/ui/dist/public/globe.svg +1 -0
- package/.next/standalone/packages/ui/dist/public/icon.svg +7 -0
- package/.next/standalone/packages/ui/dist/public/logo-dark-bg.svg +17 -0
- package/.next/standalone/packages/ui/dist/public/logo-with-bg.svg +17 -0
- package/.next/standalone/packages/ui/dist/public/logo.svg +17 -0
- package/.next/standalone/packages/ui/dist/public/next.svg +1 -0
- package/.next/standalone/packages/ui/dist/public/vercel.svg +1 -0
- package/.next/standalone/packages/ui/dist/public/window.svg +1 -0
- package/.next/standalone/packages/ui/dist/standalone/packages/web/README.md +196 -0
- package/.next/standalone/packages/ui/dist/standalone/packages/web/leanspec.db +0 -0
- package/.next/standalone/packages/ui/dist/standalone/packages/web/package.json +75 -0
- package/.next/standalone/packages/ui/dist/standalone/packages/web/server.js +44 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/014-complete-custom-frontmatter/README.md +175 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/016-github-action/README.md +317 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/017-vscode-extension/README.md +261 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/018-spec-validation/CLI-DESIGN.md +380 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/018-spec-validation/CONFIGURATION-EXAMPLES.md +230 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/018-spec-validation/CONFIGURATION.md +285 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/018-spec-validation/IMPLEMENTATION.md +358 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/018-spec-validation/README.md +303 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/018-spec-validation/TESTING.md +368 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/018-spec-validation/VALIDATION-RULES.md +327 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/024-pattern-aware-list-grouping/README.md +117 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/025-template-config-updates/README.md +73 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/026-init-pattern-selection/README.md +109 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/034-copilot-slash-commands/README.md +107 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/035-live-specs-showcase/ARCHITECTURE.md +244 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/035-live-specs-showcase/IMPLEMENTATION.md +429 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/035-live-specs-showcase/README.md +302 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/036-pm-integrations/README.md +158 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/DEMO-AI-ASSISTED.md +359 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/DEMO-FULL-LIFECYCLE.md +86 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/DEMO-REAL-FEATURE.md +437 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/DEMO-SCRIPT.md +365 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/DOGFOODING-FINAL.md +203 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/DOGFOODING-SESSION-2025-11-06.md +174 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/DOGFOODING-SUMMARY.md +156 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/IMPLEMENTATION.md +183 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/MARKETING.md +229 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/NEXT-STEPS-DEMO.md +243 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/README.md +217 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/SESSION-2025-11-06.md +166 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/043-official-launch-02/TESTING.md +126 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/045-unified-dashboard/ACTUAL-IMPLEMENTATION.md +108 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/045-unified-dashboard/DESIGN.md +382 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/045-unified-dashboard/IMPLEMENTATION.md +144 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/045-unified-dashboard/RATIONALE.md +146 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/045-unified-dashboard/README.md +208 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/045-unified-dashboard/TESTING.md +182 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/047-git-backfill-timestamps/README.md +314 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/048-spec-complexity-analysis/FINDINGS.md +113 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/048-spec-complexity-analysis/GUIDELINES.md +237 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/048-spec-complexity-analysis/README.md +149 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/049-leanspec-first-principles/ANALYSIS-COMPARISONS.md +175 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/049-leanspec-first-principles/ANALYSIS-CONSTRAINTS.md +254 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/049-leanspec-first-principles/FIRST-PRINCIPLES.md +376 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/049-leanspec-first-principles/OPERATIONALIZATION-ROADMAP.md +240 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/049-leanspec-first-principles/OPERATIONALIZATION-TOOLS.md +175 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/049-leanspec-first-principles/README.md +374 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/051-docs-system-prompt-principles/README.md +339 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/052-branding-assets/README.md +128 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/053-spec-assets-philosophy/README.md +97 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/054-validate-output-lint-style/DESIGN-DECISIONS.md +93 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/054-validate-output-lint-style/OUTPUT-FORMAT-SPEC.md +146 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/054-validate-output-lint-style/README.md +175 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/ANALYSIS-PART1.md +397 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/ANALYSIS-PART2.md +342 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/ANALYSIS.md +44 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/CHANGES.md +150 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/CONCERNS-ANALYSIS.md +351 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/DOCS-ALIGNMENT-ANALYSIS.md +238 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/README.md +280 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/REDESIGN-DRAFT.md +372 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/055-readme-redesign-ai-first/REDESIGN-REFINED.md +466 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/056-docs-site-accuracy-audit/AUDIT-RESULTS.md +178 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/056-docs-site-accuracy-audit/README.md +174 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/057-docs-validation-comprehensive/README.md +295 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/057-docs-validation-comprehensive/VALIDATION-RESULTS.md +487 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/058-docs-overview-polish/ANALYSIS.md +241 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/058-docs-overview-polish/DESIGN.md +279 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/058-docs-overview-polish/IMPLEMENTATION.md +642 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/058-docs-overview-polish/NOTES.md +125 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/058-docs-overview-polish/README.md +286 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/059-programmatic-spec-management/ARCHITECTURE.md +392 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/059-programmatic-spec-management/COMMANDS.md +1002 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/059-programmatic-spec-management/CONTEXT-ENGINEERING.md +411 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/059-programmatic-spec-management/IMPLEMENTATION.md +812 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/059-programmatic-spec-management/README.md +504 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/059-programmatic-spec-management/TESTING.md +724 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/060-core-concepts-coherence/README.md +125 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/061-ai-assisted-spec-writing/README.md +299 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/062-docs-info-architecture-v2/IMPLEMENTATION-PLAN.md +174 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/062-docs-info-architecture-v2/PAGE-SPECIFICATIONS.md +265 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/062-docs-info-architecture-v2/PROBLEM-ANALYSIS.md +36 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/062-docs-info-architecture-v2/README.md +243 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/062-docs-info-architecture-v2/SOLUTION-DESIGN.md +82 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/063-migration-from-existing-tools/DESIGN.md +338 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/063-migration-from-existing-tools/EXAMPLES.md +354 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/063-migration-from-existing-tools/IMPLEMENTATION.md +189 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/063-migration-from-existing-tools/README.md +119 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/064-docs-site-zh-translation/README.md +170 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/065-v03-planning/README.md +158 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/066-context-economy-thresholds-refinement/README.md +842 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/067-monorepo-core-extraction/README.md +358 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/068-live-specs-ux-enhancements/DESIGN.md +444 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/068-live-specs-ux-enhancements/README.md +357 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/069-token-counting-utils/README.md +551 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/070-mcp-token-counting-tool/README.md +372 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/071-simplified-token-validation/README.md +489 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/072-ai-agent-first-use-workflow/README.md +285 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/073-template-engine-agents-md/README.md +323 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/074-content-at-creation/README.md +136 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/075-intelligent-search-engine/README.md +399 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/076-programmatic-spec-relationships/README.md +301 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/077-archiving-strategy/README.md +235 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/078-sub-spec-template-system/README.md +303 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/079-cli-alphabetical-organization/README.md +196 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/080-mcp-server-modular-architecture/README.md +388 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/081-web-app-ux-redesign/README.md +824 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/082-web-realtime-sync-architecture/DATABASE.md +111 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/082-web-realtime-sync-architecture/DEPLOYMENT.md +69 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/082-web-realtime-sync-architecture/FILESYSTEM.md +77 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/082-web-realtime-sync-architecture/IMPLEMENTATION.md +184 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/082-web-realtime-sync-architecture/README.md +496 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/083-web-navigation-performance/README.md +490 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/084-sub-spec-visibility-in-tools/README.md +389 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/085-cli-relationship-commands/README.md +920 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/086-template-component-deduplication/README.md +146 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/087-cli-ui-command/README.md +607 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/088-core-concepts-terminology-only/README.md +104 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/089-sdd-practical-tutorials/README.md +124 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/090-leanspec-sdd-case-studies/README.md +129 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/091-chinese-localization-strategy/README.md +244 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/092-docs-site-submodule-migration/README.md +148 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/093-spec-detail-ui-improvements/README.md +54 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/001-typescript-cli-migration/README.md +37 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/002-template-system-redesign/README.md +60 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/003-init-system-redesign/README.md +113 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/004-existing-project-integration/README.md +69 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/004-existing-project-integration/SUMMARY.md +112 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/005-structured-frontmatter/README.md +229 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/006-pm-visualization-tools/README.md +406 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/007-system-prompt-updates/README.md +168 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/008-commander-migration/README.md +174 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/009-cli-ux-enhancement/README.md +212 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/010-commands-refactor/README.md +249 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/011-test-results/README.md +60 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/011-test-results/TEST_SUMMARY.md +139 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/012-sub-spec-files/README.md +722 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/013-custom-spec-templates/README.md +413 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/015-npm-publishing/README.md +255 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/019-readme-improvement/README.md +252 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/020-documentation-website/README.md +253 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/021-docusaurus-vercel-migration/README.md +612 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/022-flexible-folder-structure/README.md +794 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/023-folder-structure-improvements/DESIGN.md +834 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/023-folder-structure-improvements/README.md +255 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/027-cli-ui-ux-optimization/README.md +454 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/028-cli-ui-modernization/README.md +172 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/029-visualization-improvements/IMPLEMENTATION.md +152 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/029-visualization-improvements/README.md +95 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/030-created-date-format-bug/README.md +87 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/031-gantt-ux-improvements/README.md +230 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/032-console-log-chalk-security/README.md +89 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/033-mcp-server/README.md +89 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/037-docs-overhaul/README.md +166 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/038-flat-structure-migration/README.md +276 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/038-mcp-frontmatter-bug-fix/README.md +122 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/039-simplify-viewer-commands/README.md +198 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/039-template-variable-sync/README.md +192 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/040-spec-viewer-commands/README.md +171 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/042-mcp-error-handling/README.md +200 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/044-spec-relationships-clarity/README.md +317 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/046-stats-dashboard-refactor/DESIGN.md +276 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/046-stats-dashboard-refactor/IMPLEMENTATION.md +241 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/046-stats-dashboard-refactor/README.md +139 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/046-stats-dashboard-refactor/TESTING.md +328 -0
- package/.next/standalone/packages/ui/dist/standalone/specs/archived/050-tool-redesign-first-principles/README.md +400 -0
- package/.next/standalone/packages/ui/dist/static/chunks/0c19c69aa7625475.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/116800b03245a1e5.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/15843a3d7584e314.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/19e80edf527aef5c.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/465954d5af3284a9.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/5abeeb89f1412a80.js +3 -0
- package/.next/standalone/packages/ui/dist/static/chunks/5c2072ad938de8ed.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/6a05a93ec8fa7b83.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/778e42188e450b39.css +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/a02c1f50ff00204f.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/a45464b9776dd88e.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/a6dad97d9634a72d.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/b0ea0ac61604f843.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/c06e85b449720194.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/c557ac675be79771.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/cad005a57ffbb2d3.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/cdf6fe33bc65efbc.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/d12ed5dbe44caed7.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/d1ebe5c1a344f4ca.js +5 -0
- package/.next/standalone/packages/ui/dist/static/chunks/d42cf1682bc46652.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/dde5d8bddd7fbfcf.js +1 -0
- package/.next/standalone/packages/ui/dist/static/chunks/ebd89051637b9a47.js +4 -0
- package/.next/standalone/packages/ui/dist/static/chunks/ec82875d18b29f47.js +2 -0
- package/.next/standalone/packages/ui/dist/static/chunks/f0b701df9769bcc5.js +19 -0
- package/.next/standalone/packages/ui/dist/static/chunks/turbopack-1c09a99f4c9e28d3.js +3 -0
- package/.next/standalone/packages/ui/leanspec.db +0 -0
- package/.next/standalone/packages/ui/package.json +1 -1
- package/.next/standalone/packages/ui/server.js +1 -1
- package/.next/standalone/packages/ui/tsconfig.tsbuildinfo +1 -1
- package/.next/static/T_KGFP0pHt_xSaaYUJa3L/_buildManifest.js +11 -0
- package/.next/static/T_KGFP0pHt_xSaaYUJa3L/_clientMiddlewareManifest.json +1 -0
- package/.next/static/T_KGFP0pHt_xSaaYUJa3L/_ssgManifest.js +1 -0
- package/package.json +2 -2
- /package/.next/standalone/packages/ui/.next/static/{WJi9opx4ShY8zt8yBFo4r → T_KGFP0pHt_xSaaYUJa3L}/_buildManifest.js +0 -0
- /package/.next/standalone/packages/ui/.next/static/{WJi9opx4ShY8zt8yBFo4r → T_KGFP0pHt_xSaaYUJa3L}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/packages/ui/.next/static/{WJi9opx4ShY8zt8yBFo4r → T_KGFP0pHt_xSaaYUJa3L}/_ssgManifest.js +0 -0
- /package/.next/{static/WJi9opx4ShY8zt8yBFo4r → standalone/packages/ui/dist/static/4ZnYN1WbN4LGJQOwP6FkT}/_buildManifest.js +0 -0
- /package/.next/{static/WJi9opx4ShY8zt8yBFo4r → standalone/packages/ui/dist/static/4ZnYN1WbN4LGJQOwP6FkT}/_clientMiddlewareManifest.json +0 -0
- /package/.next/{static/WJi9opx4ShY8zt8yBFo4r → standalone/packages/ui/dist/static/4ZnYN1WbN4LGJQOwP6FkT}/_ssgManifest.js +0 -0
package/.next/standalone/packages/ui/dist/standalone/specs/071-simplified-token-validation/README.md
ADDED
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: complete
|
|
3
|
+
created: '2025-11-13'
|
|
4
|
+
tags:
|
|
5
|
+
- validation
|
|
6
|
+
- simplification
|
|
7
|
+
- tokens
|
|
8
|
+
priority: high
|
|
9
|
+
assignee: marvin
|
|
10
|
+
created_at: '2025-11-13T03:11:29.739Z'
|
|
11
|
+
related:
|
|
12
|
+
- 066-context-economy-thresholds-refinement
|
|
13
|
+
- 069-token-counting-utils
|
|
14
|
+
updated_at: '2025-11-13T03:54:24.312Z'
|
|
15
|
+
completed_at: '2025-11-13T03:54:24.312Z'
|
|
16
|
+
completed: '2025-11-13'
|
|
17
|
+
transitions:
|
|
18
|
+
- status: complete
|
|
19
|
+
at: '2025-11-13T03:54:24.312Z'
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Simplified Token-Based Validation
|
|
23
|
+
|
|
24
|
+
> **Status**: ✅ Complete · **Priority**: High · **Created**: 2025-11-13 · **Tags**: validation, simplification, tokens
|
|
25
|
+
> **Assignee**: marvin · **Reviewer**: TBD
|
|
26
|
+
|
|
27
|
+
## Overview
|
|
28
|
+
|
|
29
|
+
**The Problem**: Current complexity validation uses a score-based approach (0-100) that:
|
|
30
|
+
- Uses arbitrary weight ratios (token score 0-60, structure modifier -30 to +20)
|
|
31
|
+
- Produces confusing derived scores (what does "45/100" mean?)
|
|
32
|
+
- Hides actual metrics users care about (5,207 tokens becomes "score 60")
|
|
33
|
+
- Can give misleading results (>5K tokens with sub-specs = "good" due to -30 modifier)
|
|
34
|
+
|
|
35
|
+
**The Solution**: Use **direct token thresholds** with clear, independent checks for each factor.
|
|
36
|
+
|
|
37
|
+
**Why Now**: We just removed line-count validator in favor of token-based validation, but the implementation is overly complex and confusing.
|
|
38
|
+
|
|
39
|
+
## Design
|
|
40
|
+
|
|
41
|
+
### Core Principle: Direct, Independent Checks
|
|
42
|
+
|
|
43
|
+
Instead of calculating a composite score, evaluate each factor independently and report clearly.
|
|
44
|
+
|
|
45
|
+
### Token Thresholds (Primary Check)
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
interface TokenValidation {
|
|
49
|
+
tokens: number;
|
|
50
|
+
level: 'excellent' | 'good' | 'warning' | 'error';
|
|
51
|
+
message: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function validateTokens(tokens: number): TokenValidation {
|
|
55
|
+
if (tokens > 5000) {
|
|
56
|
+
return {
|
|
57
|
+
tokens,
|
|
58
|
+
level: 'error',
|
|
59
|
+
message: `Spec has ${tokens} tokens (threshold: 5,000) - should split for Context Economy`
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (tokens > 3500) {
|
|
64
|
+
return {
|
|
65
|
+
tokens,
|
|
66
|
+
level: 'warning',
|
|
67
|
+
message: `Spec has ${tokens} tokens (threshold: 3,500) - consider simplification`
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (tokens > 2000) {
|
|
72
|
+
return {
|
|
73
|
+
tokens,
|
|
74
|
+
level: 'info',
|
|
75
|
+
message: `Spec has ${tokens} tokens - acceptable, watch for growth`
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
tokens,
|
|
81
|
+
level: 'excellent',
|
|
82
|
+
message: `Spec has ${tokens} tokens - excellent`
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Structure Checks (Independent Feedback)
|
|
88
|
+
|
|
89
|
+
Each structural issue gets its own clear message:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
interface StructureCheck {
|
|
93
|
+
passed: boolean;
|
|
94
|
+
message?: string;
|
|
95
|
+
suggestion?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function checkStructure(metrics: Metrics): StructureCheck[] {
|
|
99
|
+
const checks: StructureCheck[] = [];
|
|
100
|
+
|
|
101
|
+
// Sub-specs presence (positive feedback)
|
|
102
|
+
if (metrics.hasSubSpecs) {
|
|
103
|
+
checks.push({
|
|
104
|
+
passed: true,
|
|
105
|
+
message: `✓ Uses ${metrics.subSpecCount} sub-spec files for progressive disclosure`
|
|
106
|
+
});
|
|
107
|
+
} else if (metrics.tokens > 3000) {
|
|
108
|
+
checks.push({
|
|
109
|
+
passed: false,
|
|
110
|
+
message: `Consider using sub-spec files (DESIGN.md, IMPLEMENTATION.md)`,
|
|
111
|
+
suggestion: `Progressive disclosure reduces cognitive load for large specs`
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Section organization
|
|
116
|
+
if (metrics.sectionCount >= 15 && metrics.sectionCount <= 35) {
|
|
117
|
+
checks.push({
|
|
118
|
+
passed: true,
|
|
119
|
+
message: `✓ Good sectioning (${metrics.sectionCount} sections) enables cognitive chunking`
|
|
120
|
+
});
|
|
121
|
+
} else if (metrics.sectionCount < 8) {
|
|
122
|
+
checks.push({
|
|
123
|
+
passed: false,
|
|
124
|
+
message: `Only ${metrics.sectionCount} sections - too monolithic`,
|
|
125
|
+
suggestion: `Break into 15-35 sections for better readability (7±2 cognitive chunks)`
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return checks;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Line Count (Backstop Only)
|
|
134
|
+
|
|
135
|
+
Line count becomes a simple backstop check:
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
function checkLineCount(lines: number): StructureCheck | null {
|
|
139
|
+
if (lines > 500) {
|
|
140
|
+
return {
|
|
141
|
+
passed: false,
|
|
142
|
+
message: `Spec is very long (${lines} lines)`,
|
|
143
|
+
suggestion: `Consider splitting even if token count is acceptable`
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Output Format
|
|
151
|
+
|
|
152
|
+
**Example 1: Clean spec (016)**
|
|
153
|
+
```
|
|
154
|
+
✓ 016-github-action passed
|
|
155
|
+
|
|
156
|
+
Token Analysis:
|
|
157
|
+
2,004 tokens - acceptable, watch for growth
|
|
158
|
+
|
|
159
|
+
Structure:
|
|
160
|
+
✓ Good sectioning (20 sections) enables cognitive chunking
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Example 2: Warning spec (049)**
|
|
164
|
+
```
|
|
165
|
+
⚠ 049-first-principles has warnings
|
|
166
|
+
|
|
167
|
+
Token Analysis:
|
|
168
|
+
3,413 tokens (threshold: 3,500) - consider simplification
|
|
169
|
+
|
|
170
|
+
Structure:
|
|
171
|
+
✓ Uses 5 sub-spec files for progressive disclosure
|
|
172
|
+
✓ Good sectioning (38 sections) enables cognitive chunking
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Example 3: Error spec (066)**
|
|
176
|
+
```
|
|
177
|
+
✖ 066-context-economy-thresholds-refinement failed
|
|
178
|
+
|
|
179
|
+
Token Analysis:
|
|
180
|
+
8,073 tokens (threshold: 5,000) - should split for Context Economy
|
|
181
|
+
|
|
182
|
+
Structure:
|
|
183
|
+
Consider using sub-spec files (DESIGN.md, IMPLEMENTATION.md)
|
|
184
|
+
→ Progressive disclosure reduces cognitive load for large specs
|
|
185
|
+
|
|
186
|
+
Line Count:
|
|
187
|
+
Spec is very long (843 lines)
|
|
188
|
+
→ Consider splitting even if token count is acceptable
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Key Improvements
|
|
192
|
+
|
|
193
|
+
1. **Clear thresholds**: Users see actual token counts and thresholds
|
|
194
|
+
2. **No derived scores**: No confusing "45/100" numbers
|
|
195
|
+
3. **Independent factors**: Each aspect evaluated separately
|
|
196
|
+
4. **Actionable feedback**: Specific suggestions for each issue
|
|
197
|
+
5. **Positive reinforcement**: Shows what's working well
|
|
198
|
+
6. **Simple logic**: Easy to understand and maintain
|
|
199
|
+
|
|
200
|
+
### Comparison: Before vs After
|
|
201
|
+
|
|
202
|
+
**Before (Score-Based):**
|
|
203
|
+
```
|
|
204
|
+
✖ error: Spec complexity too high (score: 60/100, 8073 tokens) and 843 lines
|
|
205
|
+
→ Token count very high - strongly consider splitting;
|
|
206
|
+
Use sub-spec files for progressive disclosure
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**After (Direct Thresholds):**
|
|
210
|
+
```
|
|
211
|
+
✖ error: Spec has 8,073 tokens (threshold: 5,000) - should split for Context Economy
|
|
212
|
+
⚠ warning: Consider using sub-spec files (DESIGN.md, IMPLEMENTATION.md)
|
|
213
|
+
→ Progressive disclosure reduces cognitive load for large specs
|
|
214
|
+
⚠ warning: Spec is very long (843 lines)
|
|
215
|
+
→ Consider splitting even if token count is acceptable
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Advantages:**
|
|
219
|
+
- ✅ Shows actual token count prominently
|
|
220
|
+
- ✅ Clear threshold (5,000)
|
|
221
|
+
- ✅ Separate, specific suggestions
|
|
222
|
+
- ✅ No confusing score math
|
|
223
|
+
- ✅ Easy to understand what's wrong and how to fix it
|
|
224
|
+
|
|
225
|
+
## Plan
|
|
226
|
+
|
|
227
|
+
### Phase 1: Simplify ComplexityValidator ✅
|
|
228
|
+
- [x] Remove score calculation logic
|
|
229
|
+
- [x] Implement direct token threshold checks
|
|
230
|
+
- [x] Implement independent structure checks
|
|
231
|
+
- [x] Update error/warning messages to show actual values
|
|
232
|
+
- [x] Keep line count as simple backstop
|
|
233
|
+
|
|
234
|
+
### Phase 2: Update SubSpecValidator ✅
|
|
235
|
+
- [x] Apply same simplification to sub-spec validation
|
|
236
|
+
- [x] Remove score calculation from sub-spec checks
|
|
237
|
+
- [x] Use direct token thresholds for sub-specs
|
|
238
|
+
|
|
239
|
+
### Phase 3: Update Tests ✅
|
|
240
|
+
- [x] Remove tests that check score values
|
|
241
|
+
- [x] Add tests for direct threshold behavior
|
|
242
|
+
- [x] Add tests for structure feedback messages
|
|
243
|
+
- [x] Verify output format
|
|
244
|
+
|
|
245
|
+
### Phase 4: Update Documentation ✅
|
|
246
|
+
- [x] Update AGENTS.md to remove score references
|
|
247
|
+
- [x] Update spec 066 to document simplified approach
|
|
248
|
+
- [x] Update validation output examples in docs
|
|
249
|
+
|
|
250
|
+
### Phase 5: Test Against Real Specs ✅
|
|
251
|
+
- [x] Validate against all current specs
|
|
252
|
+
- [x] Verify messages are clear and actionable
|
|
253
|
+
- [x] Confirm no false positives/negatives
|
|
254
|
+
|
|
255
|
+
## Test
|
|
256
|
+
|
|
257
|
+
### Validation Behavior Tests
|
|
258
|
+
|
|
259
|
+
**Test Case 1: Excellent spec (<2K tokens)**
|
|
260
|
+
- Input: Spec with 1,500 tokens, 15 sections, 250 lines
|
|
261
|
+
- Expected: ✓ Pass with positive feedback
|
|
262
|
+
- Output: Shows token count, notes good sectioning
|
|
263
|
+
|
|
264
|
+
**Test Case 2: Good spec (2-3.5K tokens)**
|
|
265
|
+
- Input: Spec with 2,800 tokens, 20 sections, 350 lines
|
|
266
|
+
- Expected: ✓ Pass with info message
|
|
267
|
+
- Output: "acceptable, watch for growth"
|
|
268
|
+
|
|
269
|
+
**Test Case 3: Warning spec (3.5-5K tokens)**
|
|
270
|
+
- Input: Spec with 4,200 tokens, 18 sections, 450 lines
|
|
271
|
+
- Expected: ⚠ Warning
|
|
272
|
+
- Output: Shows exact token count and threshold (3,500)
|
|
273
|
+
|
|
274
|
+
**Test Case 4: Error spec (>5K tokens)**
|
|
275
|
+
- Input: Spec with 8,073 tokens, 45 sections, 843 lines
|
|
276
|
+
- Expected: ✖ Error
|
|
277
|
+
- Output: Shows exact token count and threshold (5,000)
|
|
278
|
+
|
|
279
|
+
**Test Case 5: Good tokens + sub-specs**
|
|
280
|
+
- Input: Spec with 3,200 tokens, has 4 sub-specs
|
|
281
|
+
- Expected: ✓ Pass with positive feedback
|
|
282
|
+
- Output: Notes progressive disclosure
|
|
283
|
+
|
|
284
|
+
**Test Case 6: High tokens + poor structure**
|
|
285
|
+
- Input: Spec with 4,500 tokens, only 5 sections
|
|
286
|
+
- Expected: ⚠ Warning for tokens + structure
|
|
287
|
+
- Output: Both token warning and sectioning suggestion
|
|
288
|
+
|
|
289
|
+
**Test Case 7: Line count backstop**
|
|
290
|
+
- Input: Spec with 2,500 tokens, 600 lines
|
|
291
|
+
- Expected: ⚠ Warning about length
|
|
292
|
+
- Output: Token count OK, but warns about line count
|
|
293
|
+
|
|
294
|
+
### Output Format Tests
|
|
295
|
+
|
|
296
|
+
- [ ] Error messages show actual token counts
|
|
297
|
+
- [ ] Warnings show actual thresholds
|
|
298
|
+
- [ ] Structure feedback is separate from token checks
|
|
299
|
+
- [ ] Positive feedback appears for good practices
|
|
300
|
+
- [ ] No score values (0-100) appear anywhere
|
|
301
|
+
- [ ] Messages are actionable with specific suggestions
|
|
302
|
+
|
|
303
|
+
### Real Spec Validation
|
|
304
|
+
|
|
305
|
+
Test against actual specs:
|
|
306
|
+
- [ ] 016 (2,004 tokens): Should pass cleanly
|
|
307
|
+
- [ ] 049 (3,413 tokens): Should pass with info/positive feedback
|
|
308
|
+
- [ ] 059 (3,364 tokens): Should pass with positive feedback for sub-specs
|
|
309
|
+
- [ ] 066 (8,073 tokens): Should error with clear token threshold message
|
|
310
|
+
- [ ] 069 (5,207 tokens): Should error with clear token threshold message
|
|
311
|
+
|
|
312
|
+
## Notes
|
|
313
|
+
|
|
314
|
+
### Why Simplify?
|
|
315
|
+
|
|
316
|
+
**Current Problems:**
|
|
317
|
+
1. **Arbitrary math**: `tokenScore (0-60) + structureModifier (-30 to +20) = finalScore` - these ratios are made up
|
|
318
|
+
2. **Confusing abstraction**: Score 45/100 is meaningless to users
|
|
319
|
+
3. **Misleading results**: >5K tokens with sub-specs gets -30 modifier = "good" (but it's still >5K!)
|
|
320
|
+
4. **Hides real data**: Users care about "5,207 tokens" not "score 60"
|
|
321
|
+
5. **Hard to maintain**: Complex score calculation logic
|
|
322
|
+
|
|
323
|
+
**Simplification Benefits:**
|
|
324
|
+
1. **Direct thresholds**: If tokens > 5000 → error. Simple.
|
|
325
|
+
2. **Clear values**: Show actual tokens and thresholds
|
|
326
|
+
3. **Independent checks**: Each factor evaluated separately
|
|
327
|
+
4. **Easier to understand**: No derived scores to explain
|
|
328
|
+
5. **Easier to maintain**: Straightforward if/else logic
|
|
329
|
+
|
|
330
|
+
### Design Principles Applied
|
|
331
|
+
|
|
332
|
+
From First Principles (spec 049):
|
|
333
|
+
|
|
334
|
+
1. **Context Economy**: Token count is the direct measure of context size - don't abstract it
|
|
335
|
+
2. **Signal-to-Noise**: Show actual numbers users care about, not derived scores
|
|
336
|
+
3. **Intent Over Implementation**: Users want to know "how many tokens?" not "what's the complexity score?"
|
|
337
|
+
|
|
338
|
+
### Research Basis & Threshold Validation
|
|
339
|
+
|
|
340
|
+
**From Academic Research (2024-2025):**
|
|
341
|
+
|
|
342
|
+
1. **NeedleBench (arXiv:2407.11963, Sep 2025)** - Information Density Study:
|
|
343
|
+
- Models struggle with "information-dense" scenarios where relevant information is continuously distributed
|
|
344
|
+
- "Under-thinking" phenomenon: Models prematurely conclude reasoning despite available information
|
|
345
|
+
- **Finding**: Even advanced reasoning models (Deepseek-R1, OpenAI o3) struggle with continuous retrieval
|
|
346
|
+
- **Implication**: Denser specs (more code blocks, tables) are cognitively heavier
|
|
347
|
+
|
|
348
|
+
2. **Multi-Turn Degradation (arXiv:2505.06120, May 2025)** - Context Accumulation:
|
|
349
|
+
- **39% average performance drop** in multi-turn conversations vs single-turn
|
|
350
|
+
- LLMs make premature assumptions and overly rely on them
|
|
351
|
+
- **Finding**: "When LLMs take a wrong turn in a conversation, they get lost and do not recover"
|
|
352
|
+
- **Implication**: Accumulated context across turns compounds degradation
|
|
353
|
+
|
|
354
|
+
**From Latest Models (Nov 2025):**
|
|
355
|
+
|
|
356
|
+
**OpenAI GPT-5 & Family:**
|
|
357
|
+
- **GPT-5**: Flagship model with "thinking built in" for complex tasks
|
|
358
|
+
- **GPT-4o**: 128K context window standard
|
|
359
|
+
- **Industry standard**: Most models now support 100K-200K tokens
|
|
360
|
+
- **Key insight**: "Tasks that would typically require hours of human effort to complete may take Claude a few minutes" - latency increases with context
|
|
361
|
+
|
|
362
|
+
**Anthropic Claude 4.5 & Family:**
|
|
363
|
+
- **Claude Sonnet 4.5**: 200K context standard, **1M tokens (beta)**
|
|
364
|
+
- **Pricing**: $3/MTok input, $15/MTok output
|
|
365
|
+
- **Extended thinking**: Available for complex reasoning
|
|
366
|
+
- **Finding**: "Superior instruction following, tool selection, error correction for long-running agents"
|
|
367
|
+
- **Implication**: While 200K+ is possible, optimal performance is still at lower token counts
|
|
368
|
+
|
|
369
|
+
**Industry Pricing Signal:**
|
|
370
|
+
- Standard context: Free/low-cost tier
|
|
371
|
+
- Extended context (>50K): Premium pricing
|
|
372
|
+
- **Interpretation**: Providers indicate optimal usage is <50K tokens despite technical capacity
|
|
373
|
+
|
|
374
|
+
**Our Threshold Analysis:**
|
|
375
|
+
|
|
376
|
+
Real-world spec data from our corpus:
|
|
377
|
+
- Median spec: ~2,500 tokens (~300 lines)
|
|
378
|
+
- Well-structured: ~3,500 tokens (~400 lines)
|
|
379
|
+
- Large spec: ~5,000 tokens (~550 lines)
|
|
380
|
+
- Very large: >8,000 tokens (~800+ lines)
|
|
381
|
+
|
|
382
|
+
**Conservative Thresholds (RECOMMENDED):**
|
|
383
|
+
|
|
384
|
+
Based on:
|
|
385
|
+
- Multi-turn degradation research (39% drop)
|
|
386
|
+
- Information density effects
|
|
387
|
+
- Real-world spec corpus
|
|
388
|
+
- Industry pricing signals
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
<2,000 tokens: ✅ Excellent - Baseline performance
|
|
392
|
+
(~1,500 words, ~250 lines)
|
|
393
|
+
Fits comfortably with room for conversation
|
|
394
|
+
|
|
395
|
+
2,000-3,500: ✅ Good - Slight degradation acceptable
|
|
396
|
+
(~2,500 words, ~350 lines)
|
|
397
|
+
Well within all model capacities
|
|
398
|
+
|
|
399
|
+
3,500-5,000: ⚠️ Warning - Consider simplification
|
|
400
|
+
(~4,000 words, ~500 lines)
|
|
401
|
+
Approaching cognitive/attention limits
|
|
402
|
+
|
|
403
|
+
>5,000: 🔴 Should split - Significant performance impact
|
|
404
|
+
(~4,000+ words, ~600+ lines)
|
|
405
|
+
Research shows compound degradation
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Why These Thresholds Remain Valid (Nov 2025):**
|
|
409
|
+
|
|
410
|
+
1. **Research-backed**: 39% degradation in multi-turn contexts affects all models
|
|
411
|
+
2. **Information density**: Dense content (code, tables) remains cognitively heavier
|
|
412
|
+
3. **Attention constraints**: Human working memory still limited to 7±2 items
|
|
413
|
+
4. **Cost-effective**: Smaller prompts = faster responses + lower costs
|
|
414
|
+
5. **Conservative**: Well below technical limits, optimized for quality
|
|
415
|
+
|
|
416
|
+
**Validation Against Real Specs:**
|
|
417
|
+
- 016 (2,004 tokens): ✅ Just above baseline - info appropriate
|
|
418
|
+
- 049 (3,413 tokens): ✅ Good range - acceptable
|
|
419
|
+
- 059 (3,364 tokens): ✅ Good range with sub-specs
|
|
420
|
+
- 066 (8,073 tokens): 🔴 Way over 5K - must split
|
|
421
|
+
- 069 (5,207 tokens): 🔴 Just over 5K - should split
|
|
422
|
+
|
|
423
|
+
**Conclusion**: Despite massive increases in context window sizes (now 200K-1M tokens), our **conservative thresholds (2K/3.5K/5K) remain optimal** for:
|
|
424
|
+
- Best AI performance (avoiding multi-turn degradation)
|
|
425
|
+
- Human readability (Context Economy principle)
|
|
426
|
+
- Cost efficiency (smaller prompts = faster/cheaper)
|
|
427
|
+
- Cognitive load (attention limits haven't changed)
|
|
428
|
+
|
|
429
|
+
**Context windows got bigger, but optimal usage patterns didn't change.**
|
|
430
|
+
|
|
431
|
+
### Alternative Considered: Weighted Score
|
|
432
|
+
|
|
433
|
+
We could keep the score approach but make weights more principled:
|
|
434
|
+
- Use empirically validated weights from benchmarking
|
|
435
|
+
- Make score calculation transparent
|
|
436
|
+
- Show breakdown (token score, structure score, etc.)
|
|
437
|
+
|
|
438
|
+
**Rejected because:**
|
|
439
|
+
- Still abstracts away the actual metrics
|
|
440
|
+
- Users don't care about scores, they care about token counts
|
|
441
|
+
- Adds complexity without clear benefit
|
|
442
|
+
- "Good enough" now is better than "perfect" later
|
|
443
|
+
|
|
444
|
+
### Migration Notes
|
|
445
|
+
|
|
446
|
+
**Breaking Changes:**
|
|
447
|
+
- No more `ComplexityScore.score` field
|
|
448
|
+
- No more `recommendation` field ('excellent', 'good', 'review', 'split')
|
|
449
|
+
- Validation results return direct checks instead of derived scores
|
|
450
|
+
|
|
451
|
+
**Backward Compatibility:**
|
|
452
|
+
- Can keep deprecated score fields temporarily if needed
|
|
453
|
+
- Migration path: Show both old score and new checks for one release
|
|
454
|
+
- Remove score fields in v0.4.0
|
|
455
|
+
|
|
456
|
+
**For Now:**
|
|
457
|
+
- Implement new approach as replacement
|
|
458
|
+
- Update all tests
|
|
459
|
+
- Single release, clean break
|
|
460
|
+
|
|
461
|
+
### Open Questions
|
|
462
|
+
|
|
463
|
+
1. **Should we show positive feedback?** (e.g., "✓ Uses sub-specs")
|
|
464
|
+
- Pro: Reinforces good practices
|
|
465
|
+
- Con: Adds noise to output
|
|
466
|
+
- **Decision**: Yes, but only in verbose mode or when spec passes
|
|
467
|
+
|
|
468
|
+
2. **Info level for 2-3.5K tokens?**
|
|
469
|
+
- Current design: Shows "acceptable, watch for growth"
|
|
470
|
+
- Alternative: Silent pass (only warn/error)
|
|
471
|
+
- **Research supports**: Slight degradation in this range, info message is appropriate
|
|
472
|
+
- **Decision**: Show info message - it's educational and matches research
|
|
473
|
+
|
|
474
|
+
3. **Line count threshold?**
|
|
475
|
+
- Current: 500 lines backstop
|
|
476
|
+
- Research: Token count is primary, line count is proxy
|
|
477
|
+
- **Decision**: Keep 500 lines as simple backstop for extreme cases
|
|
478
|
+
|
|
479
|
+
4. **Sub-spec thresholds?**
|
|
480
|
+
- Should sub-specs use same thresholds (2K/3.5K/5K)?
|
|
481
|
+
- Or lower since they're typically smaller?
|
|
482
|
+
- **Hypothesis**: Same thresholds - a sub-spec shouldn't be a dumping ground
|
|
483
|
+
- **Decision**: Use same thresholds, validate with real sub-spec data
|
|
484
|
+
|
|
485
|
+
### Related Work
|
|
486
|
+
|
|
487
|
+
- **Spec 066**: Established token-based validation with research
|
|
488
|
+
- **Spec 069**: Implemented token counting utilities
|
|
489
|
+
- **This spec (071)**: Simplifies the validation logic itself
|