devflow-kit 1.8.2 → 2.0.0
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/CHANGELOG.md +191 -6
- package/LICENSE +1 -1
- package/README.md +139 -219
- package/dist/cli/agents-view/index.js +9 -0
- package/dist/cli/agents-view/render.js +310 -0
- package/dist/cli/agents-view/state.js +423 -0
- package/dist/cli/agents-view/terminal.js +179 -0
- package/dist/cli/commands/agents.js +585 -0
- package/dist/cli/commands/ambient.js +231 -0
- package/dist/cli/commands/capture.js +133 -0
- package/dist/cli/commands/compliance-prompts.js +174 -0
- package/dist/cli/commands/compliance.js +337 -0
- package/dist/cli/commands/context.js +66 -0
- package/dist/cli/commands/debug.js +122 -0
- package/dist/cli/commands/flags.js +119 -0
- package/dist/cli/commands/hud.js +229 -0
- package/dist/cli/commands/init-seed.js +226 -0
- package/dist/cli/commands/init.js +1786 -0
- package/dist/cli/commands/knowledge/index.js +25 -0
- package/dist/cli/commands/knowledge/list.js +115 -0
- package/dist/cli/commands/knowledge/toggle.js +84 -0
- package/dist/cli/commands/learning.js +311 -0
- package/dist/cli/commands/legacy-hooks.js +40 -0
- package/dist/cli/commands/memory.js +349 -0
- package/dist/cli/commands/proxy.js +1435 -0
- package/dist/cli/commands/rules.js +334 -0
- package/dist/cli/commands/safe-delete.js +140 -0
- package/dist/cli/commands/security.js +179 -0
- package/dist/cli/commands/skills.js +140 -0
- package/dist/cli/commands/uninstall.js +1214 -0
- package/dist/cli.js +35 -10
- package/dist/commands/bug-analysis.md +400 -0
- package/dist/commands/code-review.md +403 -0
- package/dist/commands/debug.md +282 -0
- package/dist/commands/dynamic-build.md +972 -0
- package/dist/commands/dynamic-plan.md +383 -0
- package/dist/commands/dynamic-profile.md +206 -0
- package/dist/commands/dynamic-tickets.md +583 -0
- package/dist/commands/explore.md +208 -0
- package/dist/commands/implement.md +590 -0
- package/dist/commands/plan.md +570 -0
- package/dist/commands/release.md +206 -0
- package/dist/commands/research.md +212 -0
- package/dist/commands/resolve.md +731 -0
- package/dist/commands/self-review.md +251 -0
- package/dist/core/agent-frontmatter.js +209 -0
- package/dist/core/agent-models.js +556 -0
- package/dist/core/agent-state.js +44 -0
- package/dist/core/assets.js +39 -0
- package/dist/core/cache.js +205 -0
- package/dist/core/codex-auth-inspect.js +128 -0
- package/dist/core/compliance-compose.js +458 -0
- package/dist/core/compliance.js +165 -0
- package/dist/core/external-models.js +76 -0
- package/dist/core/feature-config.js +125 -0
- package/dist/core/flags.js +309 -0
- package/dist/core/fs-atomic.js +74 -0
- package/dist/core/git.js +61 -0
- package/dist/core/learning-queue-cleanup.js +92 -0
- package/dist/core/learning-tuning-config.js +78 -0
- package/dist/core/manifest.js +171 -0
- package/dist/core/migrations.js +330 -0
- package/dist/core/model-discovery.js +655 -0
- package/dist/core/observation-io.js +50 -0
- package/dist/core/observations.js +109 -0
- package/dist/core/orphan-sweep.js +92 -0
- package/dist/core/paths.js +48 -0
- package/dist/core/plugins.js +525 -0
- package/dist/core/project-paths.js +159 -0
- package/dist/core/proxy-log.js +165 -0
- package/dist/core/proxy-state.js +305 -0
- package/dist/core/safe-delete-install.js +191 -0
- package/dist/core/teammate-mode-cleanup.js +33 -0
- package/dist/hud/colors.js +13 -2
- package/dist/hud/components/config-counts.js +2 -2
- package/dist/hud/components/context-usage.js +2 -2
- package/dist/hud/components/learning-counts.js +92 -0
- package/dist/hud/components/session-cost.js +10 -2
- package/dist/hud/components/usage-quota.js +43 -8
- package/dist/hud/components/version-badge.js +17 -7
- package/dist/hud/config.js +4 -2
- package/dist/hud/cost-history.js +281 -0
- package/dist/hud/git.js +112 -71
- package/dist/hud/index.js +47 -4
- package/dist/hud/render.js +8 -20
- package/dist/hud/transcript.js +5 -6
- package/dist/targets/claude-code/claude-paths.js +106 -0
- package/dist/targets/claude-code/compliance-install.js +305 -0
- package/dist/targets/claude-code/hooks.js +9 -0
- package/dist/targets/claude-code/installer.js +458 -0
- package/dist/targets/claude-code/legacy.js +239 -0
- package/dist/targets/claude-code/post-install.js +971 -0
- package/package.json +23 -17
- package/src/assets/agents/code.md +244 -0
- package/src/assets/agents/design.md +113 -0
- package/src/assets/agents/diagnose.md +210 -0
- package/src/assets/agents/evaluate.md +117 -0
- package/src/assets/agents/git.md +938 -0
- package/src/assets/agents/knowledge.md +89 -0
- package/src/assets/agents/learning.md +203 -0
- package/src/assets/agents/research.md +134 -0
- package/src/assets/agents/review.md +220 -0
- package/src/assets/agents/scrutinize.md +95 -0
- package/src/assets/agents/simplify.md +108 -0
- package/src/assets/agents/skim.md +136 -0
- package/src/assets/agents/synthesize.md +402 -0
- package/src/assets/agents/test.md +155 -0
- package/src/assets/agents/triage.md +141 -0
- package/src/assets/agents/validate.md +103 -0
- package/src/assets/commands/_partials/_compliance.mds +5 -0
- package/src/assets/commands/_partials/_decisions.mds +20 -0
- package/src/assets/commands/_partials/_engine.mds +244 -0
- package/src/assets/commands/_partials/_factory.mds +216 -0
- package/src/assets/commands/_partials/_knowledge.mds +95 -0
- package/src/assets/commands/_partials/_plan_contract.mds +51 -0
- package/src/assets/commands/_partials/_preamble.mds +82 -0
- package/src/assets/commands/_partials/_publication.mds +7 -0
- package/src/assets/commands/_partials/_roster.mds +31 -0
- package/src/assets/commands/_partials/_ticket_template.mds +59 -0
- package/src/assets/commands/_partials/_wave.mds +123 -0
- package/src/assets/commands/bug-analysis.mds +353 -0
- package/src/assets/commands/code-review.mds +355 -0
- package/src/assets/commands/debug.mds +224 -0
- package/src/assets/commands/dynamic-build.mds +534 -0
- package/src/assets/commands/dynamic-plan.mds +244 -0
- package/src/assets/commands/dynamic-profile.mds +132 -0
- package/src/assets/commands/dynamic-tickets.mds +226 -0
- package/src/assets/commands/explore.mds +150 -0
- package/src/assets/commands/implement.mds +496 -0
- package/src/assets/commands/plan.mds +523 -0
- package/src/assets/commands/release.md +206 -0
- package/src/assets/commands/research.mds +164 -0
- package/src/assets/commands/resolve.mds +636 -0
- package/src/assets/commands/self-review.mds +156 -0
- package/src/assets/rules/accessibility.md +11 -0
- package/src/assets/rules/compliance.md +15 -0
- package/src/assets/rules/engineering.md +13 -0
- package/src/assets/rules/go.md +12 -0
- package/src/assets/rules/java.md +12 -0
- package/src/assets/rules/python.md +12 -0
- package/src/assets/rules/quality.md +14 -0
- package/src/assets/rules/react.md +11 -0
- package/src/assets/rules/reliability.md +12 -0
- package/src/assets/rules/rust.md +12 -0
- package/src/assets/rules/security.md +12 -0
- package/src/assets/rules/typescript.md +12 -0
- package/src/assets/rules/ui-design.md +11 -0
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +21 -0
- package/src/assets/scripts/hooks/background-memory-update +460 -0
- package/src/assets/scripts/hooks/capture-prompt +87 -0
- package/src/assets/scripts/hooks/capture-question +153 -0
- package/src/assets/scripts/hooks/capture-turn +105 -0
- package/src/assets/scripts/hooks/debug-trace +75 -0
- package/src/assets/scripts/hooks/decisions-usage-scan.cjs +131 -0
- package/src/assets/scripts/hooks/ensure-devflow-init +39 -0
- package/src/assets/scripts/hooks/ensure-proxy +294 -0
- package/src/assets/scripts/hooks/ensure-root-gitignore +116 -0
- package/src/assets/scripts/hooks/get-mtime +23 -0
- package/src/assets/scripts/hooks/git-marker +16 -0
- package/src/assets/scripts/hooks/hook-bootstrap +25 -0
- package/src/assets/scripts/hooks/hook-log-init +41 -0
- package/src/assets/scripts/hooks/json-helper.cjs +725 -0
- package/src/assets/scripts/hooks/json-parse +243 -0
- package/src/assets/scripts/hooks/learning-lock +44 -0
- package/src/assets/scripts/hooks/lib/decisions-format.cjs +301 -0
- package/src/assets/scripts/hooks/lib/mkdir-lock.cjs +106 -0
- package/src/assets/scripts/hooks/lib/project-paths.cjs +230 -0
- package/src/assets/scripts/hooks/lib/render-decisions.cjs +398 -0
- package/src/assets/scripts/hooks/lib/safe-path.cjs +29 -0
- package/src/assets/scripts/hooks/log-paths +24 -0
- package/src/assets/scripts/hooks/memory-worker +101 -0
- package/src/assets/scripts/hooks/pre-compact-memory +126 -0
- package/src/assets/scripts/hooks/preamble +77 -0
- package/src/assets/scripts/hooks/queue-append +120 -0
- package/src/assets/scripts/hooks/resolve-project-root +37 -0
- package/src/assets/scripts/hooks/run-hook +31 -0
- package/src/assets/scripts/hooks/session-start-context +180 -0
- package/src/assets/scripts/hooks/session-start-memory +318 -0
- package/src/assets/scripts/hooks/session-start-orchestrator +54 -0
- package/src/assets/scripts/hud.sh +5 -0
- package/src/assets/scripts/redact-secrets.cjs +410 -0
- package/src/assets/skills/accessibility/SKILL.md +145 -0
- package/src/assets/skills/accessibility/references/patterns.md +398 -0
- package/src/assets/skills/accessibility/references/sources.md +26 -0
- package/src/assets/skills/accessibility/references/violations.md +358 -0
- package/src/assets/skills/apply-decisions/SKILL.md +100 -0
- package/src/assets/skills/apply-feature-knowledge/SKILL.md +69 -0
- package/src/assets/skills/architecture/SKILL.md +138 -0
- package/src/assets/skills/architecture/references/patterns.md +378 -0
- package/src/assets/skills/architecture/references/sources.md +41 -0
- package/src/assets/skills/architecture/references/violations.md +314 -0
- package/src/assets/skills/boundary-validation/SKILL.md +119 -0
- package/src/assets/skills/boundary-validation/references/detection.md +283 -0
- package/src/assets/skills/boundary-validation/references/patterns.md +283 -0
- package/src/assets/skills/boundary-validation/references/sources.md +41 -0
- package/src/assets/skills/boundary-validation/references/violations.md +211 -0
- package/src/assets/skills/complexity/SKILL.md +150 -0
- package/src/assets/skills/compliance/SKILL.md +121 -0
- package/src/assets/skills/compliance/frameworks/gdpr/fragment.md +11 -0
- package/src/assets/skills/compliance/frameworks/gdpr/reference.md +50 -0
- package/src/assets/skills/compliance/frameworks/hipaa/fragment.md +11 -0
- package/src/assets/skills/compliance/frameworks/hipaa/reference.md +44 -0
- package/src/assets/skills/compliance/frameworks/iso-27001/fragment.md +10 -0
- package/src/assets/skills/compliance/frameworks/iso-27001/reference.md +45 -0
- package/src/assets/skills/compliance/frameworks/pci-dss/fragment.md +11 -0
- package/src/assets/skills/compliance/frameworks/pci-dss/reference.md +55 -0
- package/src/assets/skills/compliance/frameworks/soc2/fragment.md +10 -0
- package/src/assets/skills/compliance/frameworks/soc2/reference.md +53 -0
- package/src/assets/skills/compliance/frameworks/sox/fragment.md +10 -0
- package/src/assets/skills/compliance/frameworks/sox/reference.md +67 -0
- package/src/assets/skills/compliance/references/detection.md +108 -0
- package/src/assets/skills/compliance/references/sources.md +28 -0
- package/src/assets/skills/consistency/SKILL.md +140 -0
- package/src/assets/skills/database/SKILL.md +134 -0
- package/src/assets/skills/dependencies/SKILL.md +141 -0
- package/src/assets/skills/dependency-research/SKILL.md +133 -0
- package/src/assets/skills/dependency-research/references/evaluation-criteria.md +101 -0
- package/src/assets/skills/design-review/SKILL.md +155 -0
- package/src/assets/skills/design-review/references/anti-patterns.md +207 -0
- package/src/assets/skills/docs-framework/SKILL.md +190 -0
- package/src/assets/skills/docs-framework/references/patterns.md +381 -0
- package/src/assets/skills/docs-framework/references/violations.md +221 -0
- package/src/assets/skills/documentation/SKILL.md +126 -0
- package/src/assets/skills/feature-knowledge/SKILL.md +341 -0
- package/src/assets/skills/gap-analysis/SKILL.md +151 -0
- package/src/assets/skills/gap-analysis/references/check-layers.md +125 -0
- package/src/assets/skills/git/SKILL.md +287 -0
- package/src/assets/skills/git/references/github-api.md +666 -0
- package/src/assets/skills/git/references/patterns.md +324 -0
- package/src/assets/skills/git/references/sources.md +16 -0
- package/src/assets/skills/git/references/violations.md +128 -0
- package/src/assets/skills/go/SKILL.md +147 -0
- package/src/assets/skills/go/references/concurrency.md +335 -0
- package/src/assets/skills/go/references/patterns.md +278 -0
- package/src/assets/skills/go/references/sources.md +41 -0
- package/src/assets/skills/go/references/violations.md +262 -0
- package/src/assets/skills/java/SKILL.md +148 -0
- package/src/assets/skills/java/references/modern-java.md +335 -0
- package/src/assets/skills/java/references/patterns.md +311 -0
- package/src/assets/skills/java/references/sources.md +44 -0
- package/src/assets/skills/java/references/violations.md +257 -0
- package/src/assets/skills/patterns/SKILL.md +162 -0
- package/src/assets/skills/performance/SKILL.md +135 -0
- package/src/assets/skills/performance/references/patterns.md +516 -0
- package/src/assets/skills/performance/references/sources.md +41 -0
- package/src/assets/skills/performance/references/violations.md +417 -0
- package/src/assets/skills/python/SKILL.md +156 -0
- package/src/assets/skills/python/references/async.md +255 -0
- package/src/assets/skills/python/references/patterns.md +280 -0
- package/src/assets/skills/python/references/sources.md +41 -0
- package/src/assets/skills/python/references/violations.md +272 -0
- package/src/assets/skills/qa/SKILL.md +136 -0
- package/src/assets/skills/qa/references/browser-testing.md +97 -0
- package/src/assets/skills/qa/references/patterns.md +118 -0
- package/src/assets/skills/qa/references/scenario-templates.md +102 -0
- package/src/assets/skills/qa/references/sources.md +30 -0
- package/src/assets/skills/qa/references/violations.md +98 -0
- package/src/assets/skills/quality-gates/SKILL.md +152 -0
- package/src/assets/skills/quality-gates/references/stub-detection.md +135 -0
- package/src/assets/skills/react/SKILL.md +143 -0
- package/src/assets/skills/react/references/error-handling.md +179 -0
- package/src/assets/skills/react/references/forms.md +214 -0
- package/src/assets/skills/react/references/hooks.md +193 -0
- package/src/assets/skills/react/references/patterns.md +1336 -0
- package/src/assets/skills/react/references/sources.md +35 -0
- package/src/assets/skills/react/references/violations.md +570 -0
- package/src/assets/skills/regression/SKILL.md +146 -0
- package/src/assets/skills/reliability/SKILL.md +153 -0
- package/src/assets/skills/reliability/references/detection.md +66 -0
- package/src/assets/skills/reliability/references/patterns.md +151 -0
- package/src/assets/skills/reliability/references/sources.md +27 -0
- package/src/assets/skills/reliability/references/violations.md +125 -0
- package/src/assets/skills/research-codebase/SKILL.md +135 -0
- package/src/assets/skills/research-competitor/SKILL.md +145 -0
- package/src/assets/skills/research-external/SKILL.md +141 -0
- package/src/assets/skills/research-market/SKILL.md +145 -0
- package/src/assets/skills/research-technology/SKILL.md +180 -0
- package/src/assets/skills/review-methodology/SKILL.md +121 -0
- package/src/assets/skills/review-methodology/references/patterns.md +186 -0
- package/src/assets/skills/review-methodology/references/report-template.md +142 -0
- package/src/assets/skills/review-methodology/references/violations.md +125 -0
- package/src/assets/skills/rust/SKILL.md +148 -0
- package/src/assets/skills/rust/references/ownership.md +278 -0
- package/src/assets/skills/rust/references/patterns.md +247 -0
- package/src/assets/skills/rust/references/sources.md +46 -0
- package/src/assets/skills/rust/references/violations.md +252 -0
- package/src/assets/skills/security/SKILL.md +121 -0
- package/src/assets/skills/security/references/patterns.md +271 -0
- package/src/assets/skills/security/references/sources.md +41 -0
- package/src/assets/skills/security/references/violations.md +241 -0
- package/src/assets/skills/software-design/SKILL.md +143 -0
- package/src/assets/skills/software-design/references/checklist.md +259 -0
- package/src/assets/skills/software-design/references/code-smell-violations.md +189 -0
- package/src/assets/skills/software-design/references/patterns.md +359 -0
- package/src/assets/skills/software-design/references/sources.md +41 -0
- package/src/assets/skills/software-design/references/violations.md +341 -0
- package/src/assets/skills/test-driven-development/SKILL.md +197 -0
- package/src/assets/skills/testing/SKILL.md +139 -0
- package/src/assets/skills/testing/references/patterns.md +346 -0
- package/src/assets/skills/testing/references/sources.md +53 -0
- package/src/assets/skills/testing/references/violations.md +322 -0
- package/src/assets/skills/typescript/SKILL.md +150 -0
- package/src/assets/skills/typescript/references/async.md +333 -0
- package/src/assets/skills/typescript/references/patterns.md +440 -0
- package/src/assets/skills/typescript/references/sources.md +41 -0
- package/src/assets/skills/typescript/references/type-guards.md +333 -0
- package/src/assets/skills/typescript/references/utility-types.md +255 -0
- package/src/assets/skills/typescript/references/violations.md +285 -0
- package/src/assets/skills/ui-design/SKILL.md +144 -0
- package/src/assets/skills/ui-design/references/patterns.md +341 -0
- package/src/assets/skills/ui-design/references/sources.md +41 -0
- package/src/assets/skills/ui-design/references/violations.md +312 -0
- package/src/assets/skills/worktree-support/SKILL.md +92 -0
- package/src/targets/claude-code/templates/claudeignore.template +188 -0
- package/src/targets/claude-code/templates/settings.json +86 -0
- package/dist/cli.d.ts +0 -3
- package/dist/commands/ambient.d.ts +0 -18
- package/dist/commands/ambient.js +0 -137
- package/dist/commands/hud.d.ts +0 -22
- package/dist/commands/hud.js +0 -180
- package/dist/commands/init.d.ts +0 -16
- package/dist/commands/init.js +0 -738
- package/dist/commands/list.d.ts +0 -24
- package/dist/commands/list.js +0 -89
- package/dist/commands/memory.d.ts +0 -22
- package/dist/commands/memory.js +0 -175
- package/dist/commands/skills.d.ts +0 -11
- package/dist/commands/skills.js +0 -116
- package/dist/commands/uninstall.d.ts +0 -22
- package/dist/commands/uninstall.js +0 -558
- package/dist/hud/cache.d.ts +0 -14
- package/dist/hud/cache.js +0 -54
- package/dist/hud/colors.d.ts +0 -23
- package/dist/hud/components/config-counts.d.ts +0 -8
- package/dist/hud/components/context-usage.d.ts +0 -8
- package/dist/hud/components/diff-stats.d.ts +0 -3
- package/dist/hud/components/directory.d.ts +0 -3
- package/dist/hud/components/git-ahead-behind.d.ts +0 -3
- package/dist/hud/components/git-branch.d.ts +0 -3
- package/dist/hud/components/model.d.ts +0 -3
- package/dist/hud/components/release-info.d.ts +0 -3
- package/dist/hud/components/session-cost.d.ts +0 -3
- package/dist/hud/components/session-duration.d.ts +0 -3
- package/dist/hud/components/todo-progress.d.ts +0 -3
- package/dist/hud/components/usage-quota.d.ts +0 -3
- package/dist/hud/components/version-badge.d.ts +0 -3
- package/dist/hud/components/worktree-count.d.ts +0 -3
- package/dist/hud/config.d.ts +0 -10
- package/dist/hud/credentials.d.ts +0 -17
- package/dist/hud/credentials.js +0 -99
- package/dist/hud/git.d.ts +0 -7
- package/dist/hud/index.d.ts +0 -2
- package/dist/hud/render.d.ts +0 -7
- package/dist/hud/stdin.d.ts +0 -6
- package/dist/hud/transcript.d.ts +0 -7
- package/dist/hud/types.d.ts +0 -116
- package/dist/hud/usage-api.d.ts +0 -7
- package/dist/hud/usage-api.js +0 -84
- package/dist/plugins.d.ts +0 -46
- package/dist/plugins.js +0 -233
- package/dist/utils/cli.d.ts +0 -5
- package/dist/utils/cli.js +0 -14
- package/dist/utils/git.d.ts +0 -11
- package/dist/utils/git.js +0 -36
- package/dist/utils/installer.d.ts +0 -41
- package/dist/utils/installer.js +0 -195
- package/dist/utils/manifest.d.ts +0 -46
- package/dist/utils/manifest.js +0 -100
- package/dist/utils/paths.d.ts +0 -42
- package/dist/utils/paths.js +0 -106
- package/dist/utils/post-install.d.ts +0 -87
- package/dist/utils/post-install.js +0 -546
- package/dist/utils/safe-delete-install.d.ts +0 -29
- package/dist/utils/safe-delete-install.js +0 -191
- package/dist/utils/safe-delete.d.ts +0 -12
- package/plugins/devflow-accessibility/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-accessibility/skills/accessibility/SKILL.md +0 -229
- package/plugins/devflow-accessibility/skills/accessibility/references/patterns.md +0 -670
- package/plugins/devflow-accessibility/skills/accessibility/references/violations.md +0 -419
- package/plugins/devflow-ambient/.claude-plugin/plugin.json +0 -33
- package/plugins/devflow-ambient/README.md +0 -68
- package/plugins/devflow-ambient/agents/coder.md +0 -135
- package/plugins/devflow-ambient/agents/reviewer.md +0 -165
- package/plugins/devflow-ambient/agents/scrutinizer.md +0 -82
- package/plugins/devflow-ambient/agents/shepherd.md +0 -108
- package/plugins/devflow-ambient/agents/simplifier.md +0 -102
- package/plugins/devflow-ambient/agents/skimmer.md +0 -143
- package/plugins/devflow-ambient/agents/validator.md +0 -86
- package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +0 -145
- package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +0 -74
- package/plugins/devflow-ambient/skills/debug-orchestration/SKILL.md +0 -69
- package/plugins/devflow-ambient/skills/implementation-orchestration/SKILL.md +0 -92
- package/plugins/devflow-ambient/skills/plan-orchestration/SKILL.md +0 -71
- package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +0 -19
- package/plugins/devflow-audit-claude/README.md +0 -46
- package/plugins/devflow-audit-claude/agents/claude-md-auditor.md +0 -134
- package/plugins/devflow-audit-claude/commands/audit-claude.md +0 -89
- package/plugins/devflow-code-review/.claude-plugin/plugin.json +0 -38
- package/plugins/devflow-code-review/README.md +0 -73
- package/plugins/devflow-code-review/agents/git.md +0 -277
- package/plugins/devflow-code-review/agents/reviewer.md +0 -165
- package/plugins/devflow-code-review/agents/synthesizer.md +0 -211
- package/plugins/devflow-code-review/commands/code-review-teams.md +0 -285
- package/plugins/devflow-code-review/commands/code-review.md +0 -163
- package/plugins/devflow-code-review/skills/agent-teams/SKILL.md +0 -124
- package/plugins/devflow-code-review/skills/agent-teams/references/cleanup.md +0 -104
- package/plugins/devflow-code-review/skills/agent-teams/references/communication.md +0 -122
- package/plugins/devflow-code-review/skills/agent-teams/references/team-patterns.md +0 -217
- package/plugins/devflow-code-review/skills/architecture-patterns/SKILL.md +0 -153
- package/plugins/devflow-code-review/skills/architecture-patterns/references/patterns.md +0 -873
- package/plugins/devflow-code-review/skills/architecture-patterns/references/violations.md +0 -575
- package/plugins/devflow-code-review/skills/complexity-patterns/SKILL.md +0 -143
- package/plugins/devflow-code-review/skills/consistency-patterns/SKILL.md +0 -140
- package/plugins/devflow-code-review/skills/database-patterns/SKILL.md +0 -134
- package/plugins/devflow-code-review/skills/dependencies-patterns/SKILL.md +0 -141
- package/plugins/devflow-code-review/skills/documentation-patterns/SKILL.md +0 -125
- package/plugins/devflow-code-review/skills/knowledge-persistence/SKILL.md +0 -128
- package/plugins/devflow-code-review/skills/knowledge-persistence/references/examples.md +0 -44
- package/plugins/devflow-code-review/skills/performance-patterns/SKILL.md +0 -154
- package/plugins/devflow-code-review/skills/performance-patterns/references/patterns.md +0 -503
- package/plugins/devflow-code-review/skills/performance-patterns/references/violations.md +0 -354
- package/plugins/devflow-code-review/skills/regression-patterns/SKILL.md +0 -146
- package/plugins/devflow-code-review/skills/review-methodology/SKILL.md +0 -119
- package/plugins/devflow-code-review/skills/review-methodology/references/patterns.md +0 -186
- package/plugins/devflow-code-review/skills/review-methodology/references/report-template.md +0 -142
- package/plugins/devflow-code-review/skills/review-methodology/references/violations.md +0 -125
- package/plugins/devflow-code-review/skills/security-patterns/SKILL.md +0 -156
- package/plugins/devflow-code-review/skills/security-patterns/references/patterns.md +0 -507
- package/plugins/devflow-code-review/skills/security-patterns/references/violations.md +0 -237
- package/plugins/devflow-code-review/skills/test-patterns/SKILL.md +0 -183
- package/plugins/devflow-code-review/skills/test-patterns/references/patterns.md +0 -220
- package/plugins/devflow-code-review/skills/test-patterns/references/violations.md +0 -221
- package/plugins/devflow-core-skills/.claude-plugin/plugin.json +0 -31
- package/plugins/devflow-core-skills/README.md +0 -50
- package/plugins/devflow-core-skills/skills/core-patterns/SKILL.md +0 -162
- package/plugins/devflow-core-skills/skills/core-patterns/references/checklist.md +0 -276
- package/plugins/devflow-core-skills/skills/core-patterns/references/code-smell-violations.md +0 -144
- package/plugins/devflow-core-skills/skills/core-patterns/references/patterns.md +0 -576
- package/plugins/devflow-core-skills/skills/core-patterns/references/violations.md +0 -369
- package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +0 -143
- package/plugins/devflow-core-skills/skills/docs-framework/references/patterns.md +0 -346
- package/plugins/devflow-core-skills/skills/docs-framework/references/violations.md +0 -221
- package/plugins/devflow-core-skills/skills/git-safety/SKILL.md +0 -122
- package/plugins/devflow-core-skills/skills/git-safety/references/patterns.md +0 -289
- package/plugins/devflow-core-skills/skills/git-safety/references/violations.md +0 -18
- package/plugins/devflow-core-skills/skills/git-workflow/SKILL.md +0 -158
- package/plugins/devflow-core-skills/skills/git-workflow/references/commit-patterns.md +0 -115
- package/plugins/devflow-core-skills/skills/git-workflow/references/commit-violations.md +0 -77
- package/plugins/devflow-core-skills/skills/git-workflow/references/pr-patterns.md +0 -127
- package/plugins/devflow-core-skills/skills/git-workflow/references/pr-violations.md +0 -96
- package/plugins/devflow-core-skills/skills/github-patterns/SKILL.md +0 -153
- package/plugins/devflow-core-skills/skills/github-patterns/references/patterns.md +0 -572
- package/plugins/devflow-core-skills/skills/github-patterns/references/violations.md +0 -298
- package/plugins/devflow-core-skills/skills/input-validation/SKILL.md +0 -148
- package/plugins/devflow-core-skills/skills/input-validation/references/detection.md +0 -283
- package/plugins/devflow-core-skills/skills/input-validation/references/patterns.md +0 -361
- package/plugins/devflow-core-skills/skills/input-validation/references/violations.md +0 -224
- package/plugins/devflow-core-skills/skills/search-first/SKILL.md +0 -133
- package/plugins/devflow-core-skills/skills/search-first/references/evaluation-criteria.md +0 -101
- package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +0 -137
- package/plugins/devflow-core-skills/skills/test-patterns/SKILL.md +0 -183
- package/plugins/devflow-core-skills/skills/test-patterns/references/detection.md +0 -149
- package/plugins/devflow-core-skills/skills/test-patterns/references/patterns.md +0 -220
- package/plugins/devflow-core-skills/skills/test-patterns/references/report-template.md +0 -108
- package/plugins/devflow-core-skills/skills/test-patterns/references/violations.md +0 -221
- package/plugins/devflow-debug/.claude-plugin/plugin.json +0 -26
- package/plugins/devflow-debug/README.md +0 -65
- package/plugins/devflow-debug/agents/git.md +0 -277
- package/plugins/devflow-debug/agents/synthesizer.md +0 -211
- package/plugins/devflow-debug/commands/debug-teams.md +0 -245
- package/plugins/devflow-debug/commands/debug.md +0 -174
- package/plugins/devflow-debug/skills/agent-teams/SKILL.md +0 -124
- package/plugins/devflow-debug/skills/agent-teams/references/cleanup.md +0 -104
- package/plugins/devflow-debug/skills/agent-teams/references/communication.md +0 -122
- package/plugins/devflow-debug/skills/agent-teams/references/team-patterns.md +0 -217
- package/plugins/devflow-debug/skills/git-safety/SKILL.md +0 -122
- package/plugins/devflow-debug/skills/git-safety/references/detection.md +0 -290
- package/plugins/devflow-debug/skills/git-safety/references/patterns.md +0 -289
- package/plugins/devflow-debug/skills/git-safety/references/violations.md +0 -18
- package/plugins/devflow-debug/skills/knowledge-persistence/SKILL.md +0 -128
- package/plugins/devflow-debug/skills/knowledge-persistence/references/examples.md +0 -44
- package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-frontend-design/skills/frontend-design/SKILL.md +0 -254
- package/plugins/devflow-frontend-design/skills/frontend-design/references/patterns.md +0 -511
- package/plugins/devflow-frontend-design/skills/frontend-design/references/violations.md +0 -453
- package/plugins/devflow-go/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-go/skills/go/SKILL.md +0 -187
- package/plugins/devflow-go/skills/go/references/concurrency.md +0 -312
- package/plugins/devflow-go/skills/go/references/patterns.md +0 -232
- package/plugins/devflow-go/skills/go/references/violations.md +0 -205
- package/plugins/devflow-implement/.claude-plugin/plugin.json +0 -35
- package/plugins/devflow-implement/README.md +0 -71
- package/plugins/devflow-implement/agents/coder.md +0 -135
- package/plugins/devflow-implement/agents/git.md +0 -277
- package/plugins/devflow-implement/agents/scrutinizer.md +0 -82
- package/plugins/devflow-implement/agents/shepherd.md +0 -108
- package/plugins/devflow-implement/agents/simplifier.md +0 -102
- package/plugins/devflow-implement/agents/skimmer.md +0 -143
- package/plugins/devflow-implement/agents/synthesizer.md +0 -211
- package/plugins/devflow-implement/agents/validator.md +0 -86
- package/plugins/devflow-implement/commands/implement-teams.md +0 -620
- package/plugins/devflow-implement/commands/implement.md +0 -430
- package/plugins/devflow-implement/skills/agent-teams/SKILL.md +0 -124
- package/plugins/devflow-implement/skills/agent-teams/references/cleanup.md +0 -104
- package/plugins/devflow-implement/skills/agent-teams/references/communication.md +0 -122
- package/plugins/devflow-implement/skills/agent-teams/references/team-patterns.md +0 -217
- package/plugins/devflow-implement/skills/implementation-patterns/SKILL.md +0 -162
- package/plugins/devflow-implement/skills/knowledge-persistence/SKILL.md +0 -128
- package/plugins/devflow-implement/skills/knowledge-persistence/references/examples.md +0 -44
- package/plugins/devflow-implement/skills/self-review/SKILL.md +0 -149
- package/plugins/devflow-implement/skills/self-review/references/stub-detection.md +0 -135
- package/plugins/devflow-java/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-java/skills/java/SKILL.md +0 -183
- package/plugins/devflow-java/skills/java/references/modern-java.md +0 -270
- package/plugins/devflow-java/skills/java/references/patterns.md +0 -235
- package/plugins/devflow-java/skills/java/references/violations.md +0 -213
- package/plugins/devflow-python/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-python/skills/python/SKILL.md +0 -188
- package/plugins/devflow-python/skills/python/references/async.md +0 -220
- package/plugins/devflow-python/skills/python/references/patterns.md +0 -226
- package/plugins/devflow-python/skills/python/references/violations.md +0 -204
- package/plugins/devflow-react/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-react/skills/react/SKILL.md +0 -276
- package/plugins/devflow-react/skills/react/references/patterns.md +0 -1331
- package/plugins/devflow-react/skills/react/references/violations.md +0 -565
- package/plugins/devflow-resolve/.claude-plugin/plugin.json +0 -29
- package/plugins/devflow-resolve/README.md +0 -65
- package/plugins/devflow-resolve/agents/git.md +0 -277
- package/plugins/devflow-resolve/agents/resolver.md +0 -131
- package/plugins/devflow-resolve/agents/simplifier.md +0 -102
- package/plugins/devflow-resolve/commands/resolve-teams.md +0 -307
- package/plugins/devflow-resolve/commands/resolve.md +0 -246
- package/plugins/devflow-resolve/skills/agent-teams/SKILL.md +0 -124
- package/plugins/devflow-resolve/skills/agent-teams/references/cleanup.md +0 -104
- package/plugins/devflow-resolve/skills/agent-teams/references/communication.md +0 -122
- package/plugins/devflow-resolve/skills/agent-teams/references/team-patterns.md +0 -217
- package/plugins/devflow-resolve/skills/implementation-patterns/SKILL.md +0 -162
- package/plugins/devflow-resolve/skills/implementation-patterns/references/patterns.md +0 -1063
- package/plugins/devflow-resolve/skills/implementation-patterns/references/violations.md +0 -483
- package/plugins/devflow-resolve/skills/knowledge-persistence/SKILL.md +0 -128
- package/plugins/devflow-resolve/skills/knowledge-persistence/references/examples.md +0 -44
- package/plugins/devflow-resolve/skills/security-patterns/SKILL.md +0 -156
- package/plugins/devflow-resolve/skills/security-patterns/references/detection.md +0 -287
- package/plugins/devflow-resolve/skills/security-patterns/references/patterns.md +0 -507
- package/plugins/devflow-resolve/skills/security-patterns/references/violations.md +0 -237
- package/plugins/devflow-rust/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-rust/skills/rust/SKILL.md +0 -193
- package/plugins/devflow-rust/skills/rust/references/ownership.md +0 -242
- package/plugins/devflow-rust/skills/rust/references/patterns.md +0 -210
- package/plugins/devflow-rust/skills/rust/references/violations.md +0 -191
- package/plugins/devflow-self-review/.claude-plugin/plugin.json +0 -26
- package/plugins/devflow-self-review/README.md +0 -38
- package/plugins/devflow-self-review/agents/scrutinizer.md +0 -82
- package/plugins/devflow-self-review/agents/simplifier.md +0 -102
- package/plugins/devflow-self-review/agents/validator.md +0 -86
- package/plugins/devflow-self-review/commands/self-review.md +0 -132
- package/plugins/devflow-self-review/skills/core-patterns/SKILL.md +0 -162
- package/plugins/devflow-self-review/skills/core-patterns/references/checklist.md +0 -276
- package/plugins/devflow-self-review/skills/core-patterns/references/code-smell-violations.md +0 -144
- package/plugins/devflow-self-review/skills/core-patterns/references/detection.md +0 -303
- package/plugins/devflow-self-review/skills/core-patterns/references/patterns.md +0 -576
- package/plugins/devflow-self-review/skills/core-patterns/references/violations.md +0 -369
- package/plugins/devflow-self-review/skills/self-review/SKILL.md +0 -149
- package/plugins/devflow-self-review/skills/self-review/references/patterns.md +0 -405
- package/plugins/devflow-self-review/skills/self-review/references/report-template.md +0 -253
- package/plugins/devflow-self-review/skills/self-review/references/stub-detection.md +0 -135
- package/plugins/devflow-self-review/skills/self-review/references/violations.md +0 -308
- package/plugins/devflow-specify/.claude-plugin/plugin.json +0 -25
- package/plugins/devflow-specify/README.md +0 -46
- package/plugins/devflow-specify/agents/skimmer.md +0 -143
- package/plugins/devflow-specify/agents/synthesizer.md +0 -211
- package/plugins/devflow-specify/commands/specify-teams.md +0 -321
- package/plugins/devflow-specify/commands/specify.md +0 -186
- package/plugins/devflow-specify/skills/agent-teams/SKILL.md +0 -124
- package/plugins/devflow-specify/skills/agent-teams/references/cleanup.md +0 -104
- package/plugins/devflow-specify/skills/agent-teams/references/communication.md +0 -122
- package/plugins/devflow-specify/skills/agent-teams/references/team-patterns.md +0 -217
- package/plugins/devflow-typescript/.claude-plugin/plugin.json +0 -21
- package/plugins/devflow-typescript/skills/typescript/SKILL.md +0 -176
- package/plugins/devflow-typescript/skills/typescript/references/patterns.md +0 -1105
- package/plugins/devflow-typescript/skills/typescript/references/violations.md +0 -433
- package/scripts/hooks/ambient-prompt +0 -50
- package/scripts/hooks/background-memory-update +0 -257
- package/scripts/hooks/ensure-memory-gitignore +0 -17
- package/scripts/hooks/pre-compact-memory +0 -87
- package/scripts/hooks/run-hook +0 -23
- package/scripts/hooks/session-start-memory +0 -165
- package/scripts/hooks/stop-update-memory +0 -85
- package/scripts/hud/cache.d.ts +0 -14
- package/scripts/hud/cache.d.ts.map +0 -1
- package/scripts/hud/cache.js +0 -54
- package/scripts/hud/cache.js.map +0 -1
- package/scripts/hud/colors.d.ts +0 -23
- package/scripts/hud/colors.d.ts.map +0 -1
- package/scripts/hud/colors.js +0 -62
- package/scripts/hud/colors.js.map +0 -1
- package/scripts/hud/components/config-counts.d.ts +0 -8
- package/scripts/hud/components/config-counts.d.ts.map +0 -1
- package/scripts/hud/components/config-counts.js +0 -91
- package/scripts/hud/components/config-counts.js.map +0 -1
- package/scripts/hud/components/context-usage.d.ts +0 -8
- package/scripts/hud/components/context-usage.d.ts.map +0 -1
- package/scripts/hud/components/context-usage.js +0 -49
- package/scripts/hud/components/context-usage.js.map +0 -1
- package/scripts/hud/components/diff-stats.d.ts +0 -3
- package/scripts/hud/components/diff-stats.d.ts.map +0 -1
- package/scripts/hud/components/diff-stats.js +0 -36
- package/scripts/hud/components/diff-stats.js.map +0 -1
- package/scripts/hud/components/directory.d.ts +0 -3
- package/scripts/hud/components/directory.d.ts.map +0 -1
- package/scripts/hud/components/directory.js +0 -10
- package/scripts/hud/components/directory.js.map +0 -1
- package/scripts/hud/components/git-ahead-behind.d.ts +0 -3
- package/scripts/hud/components/git-ahead-behind.d.ts.map +0 -1
- package/scripts/hud/components/git-ahead-behind.js +0 -16
- package/scripts/hud/components/git-ahead-behind.js.map +0 -1
- package/scripts/hud/components/git-branch.d.ts +0 -3
- package/scripts/hud/components/git-branch.d.ts.map +0 -1
- package/scripts/hud/components/git-branch.js +0 -14
- package/scripts/hud/components/git-branch.js.map +0 -1
- package/scripts/hud/components/model.d.ts +0 -3
- package/scripts/hud/components/model.d.ts.map +0 -1
- package/scripts/hud/components/model.js +0 -21
- package/scripts/hud/components/model.js.map +0 -1
- package/scripts/hud/components/release-info.d.ts +0 -3
- package/scripts/hud/components/release-info.d.ts.map +0 -1
- package/scripts/hud/components/release-info.js +0 -9
- package/scripts/hud/components/release-info.js.map +0 -1
- package/scripts/hud/components/session-cost.d.ts +0 -3
- package/scripts/hud/components/session-cost.d.ts.map +0 -1
- package/scripts/hud/components/session-cost.js +0 -9
- package/scripts/hud/components/session-cost.js.map +0 -1
- package/scripts/hud/components/session-duration.d.ts +0 -3
- package/scripts/hud/components/session-duration.d.ts.map +0 -1
- package/scripts/hud/components/session-duration.js +0 -18
- package/scripts/hud/components/session-duration.js.map +0 -1
- package/scripts/hud/components/todo-progress.d.ts +0 -3
- package/scripts/hud/components/todo-progress.d.ts.map +0 -1
- package/scripts/hud/components/todo-progress.js +0 -11
- package/scripts/hud/components/todo-progress.js.map +0 -1
- package/scripts/hud/components/usage-quota.d.ts +0 -3
- package/scripts/hud/components/usage-quota.d.ts.map +0 -1
- package/scripts/hud/components/usage-quota.js +0 -45
- package/scripts/hud/components/usage-quota.js.map +0 -1
- package/scripts/hud/components/version-badge.d.ts +0 -3
- package/scripts/hud/components/version-badge.d.ts.map +0 -1
- package/scripts/hud/components/version-badge.js +0 -80
- package/scripts/hud/components/version-badge.js.map +0 -1
- package/scripts/hud/components/worktree-count.d.ts +0 -3
- package/scripts/hud/components/worktree-count.d.ts.map +0 -1
- package/scripts/hud/components/worktree-count.js +0 -8
- package/scripts/hud/components/worktree-count.js.map +0 -1
- package/scripts/hud/config.d.ts +0 -10
- package/scripts/hud/config.d.ts.map +0 -1
- package/scripts/hud/config.js +0 -55
- package/scripts/hud/config.js.map +0 -1
- package/scripts/hud/credentials.d.ts +0 -17
- package/scripts/hud/credentials.d.ts.map +0 -1
- package/scripts/hud/credentials.js +0 -99
- package/scripts/hud/credentials.js.map +0 -1
- package/scripts/hud/git.d.ts +0 -7
- package/scripts/hud/git.d.ts.map +0 -1
- package/scripts/hud/git.js +0 -153
- package/scripts/hud/git.js.map +0 -1
- package/scripts/hud/index.d.ts +0 -2
- package/scripts/hud/index.d.ts.map +0 -1
- package/scripts/hud/index.js +0 -81
- package/scripts/hud/index.js.map +0 -1
- package/scripts/hud/render.d.ts +0 -7
- package/scripts/hud/render.d.ts.map +0 -1
- package/scripts/hud/render.js +0 -111
- package/scripts/hud/render.js.map +0 -1
- package/scripts/hud/stdin.d.ts +0 -6
- package/scripts/hud/stdin.d.ts.map +0 -1
- package/scripts/hud/stdin.js +0 -25
- package/scripts/hud/stdin.js.map +0 -1
- package/scripts/hud/transcript.d.ts +0 -7
- package/scripts/hud/transcript.d.ts.map +0 -1
- package/scripts/hud/transcript.js +0 -130
- package/scripts/hud/transcript.js.map +0 -1
- package/scripts/hud/types.d.ts +0 -116
- package/scripts/hud/types.d.ts.map +0 -1
- package/scripts/hud/types.js +0 -2
- package/scripts/hud/types.js.map +0 -1
- package/scripts/hud/usage-api.d.ts +0 -7
- package/scripts/hud/usage-api.d.ts.map +0 -1
- package/scripts/hud/usage-api.js +0 -84
- package/scripts/hud/usage-api.js.map +0 -1
- package/scripts/hud.sh +0 -5
- package/shared/agents/coder.md +0 -135
- package/shared/agents/git.md +0 -277
- package/shared/agents/resolver.md +0 -131
- package/shared/agents/reviewer.md +0 -165
- package/shared/agents/scrutinizer.md +0 -82
- package/shared/agents/shepherd.md +0 -108
- package/shared/agents/simplifier.md +0 -102
- package/shared/agents/skimmer.md +0 -143
- package/shared/agents/synthesizer.md +0 -211
- package/shared/agents/validator.md +0 -86
- package/shared/skills/accessibility/SKILL.md +0 -229
- package/shared/skills/accessibility/references/detection.md +0 -171
- package/shared/skills/accessibility/references/patterns.md +0 -670
- package/shared/skills/accessibility/references/violations.md +0 -419
- package/shared/skills/agent-teams/SKILL.md +0 -124
- package/shared/skills/agent-teams/references/cleanup.md +0 -104
- package/shared/skills/agent-teams/references/communication.md +0 -122
- package/shared/skills/agent-teams/references/team-patterns.md +0 -217
- package/shared/skills/ambient-router/SKILL.md +0 -145
- package/shared/skills/ambient-router/references/skill-catalog.md +0 -74
- package/shared/skills/architecture-patterns/SKILL.md +0 -153
- package/shared/skills/architecture-patterns/references/detection.md +0 -337
- package/shared/skills/architecture-patterns/references/patterns.md +0 -873
- package/shared/skills/architecture-patterns/references/violations.md +0 -575
- package/shared/skills/complexity-patterns/SKILL.md +0 -143
- package/shared/skills/complexity-patterns/references/detection.md +0 -264
- package/shared/skills/complexity-patterns/references/patterns.md +0 -487
- package/shared/skills/complexity-patterns/references/violations.md +0 -361
- package/shared/skills/consistency-patterns/SKILL.md +0 -140
- package/shared/skills/consistency-patterns/references/detection.md +0 -207
- package/shared/skills/consistency-patterns/references/patterns.md +0 -202
- package/shared/skills/consistency-patterns/references/violations.md +0 -213
- package/shared/skills/core-patterns/SKILL.md +0 -162
- package/shared/skills/core-patterns/references/checklist.md +0 -276
- package/shared/skills/core-patterns/references/code-smell-violations.md +0 -144
- package/shared/skills/core-patterns/references/detection.md +0 -303
- package/shared/skills/core-patterns/references/patterns.md +0 -576
- package/shared/skills/core-patterns/references/violations.md +0 -369
- package/shared/skills/database-patterns/SKILL.md +0 -134
- package/shared/skills/database-patterns/references/detection.md +0 -208
- package/shared/skills/database-patterns/references/patterns.md +0 -394
- package/shared/skills/database-patterns/references/violations.md +0 -332
- package/shared/skills/debug-orchestration/SKILL.md +0 -69
- package/shared/skills/dependencies-patterns/SKILL.md +0 -141
- package/shared/skills/dependencies-patterns/references/detection.md +0 -181
- package/shared/skills/dependencies-patterns/references/patterns.md +0 -225
- package/shared/skills/dependencies-patterns/references/violations.md +0 -247
- package/shared/skills/docs-framework/SKILL.md +0 -143
- package/shared/skills/docs-framework/references/patterns.md +0 -346
- package/shared/skills/docs-framework/references/violations.md +0 -221
- package/shared/skills/documentation-patterns/SKILL.md +0 -125
- package/shared/skills/documentation-patterns/references/detection.md +0 -190
- package/shared/skills/documentation-patterns/references/patterns.md +0 -189
- package/shared/skills/documentation-patterns/references/violations.md +0 -163
- package/shared/skills/frontend-design/SKILL.md +0 -254
- package/shared/skills/frontend-design/references/detection.md +0 -184
- package/shared/skills/frontend-design/references/patterns.md +0 -511
- package/shared/skills/frontend-design/references/violations.md +0 -453
- package/shared/skills/git-safety/SKILL.md +0 -122
- package/shared/skills/git-safety/references/detection.md +0 -290
- package/shared/skills/git-safety/references/patterns.md +0 -289
- package/shared/skills/git-safety/references/violations.md +0 -18
- package/shared/skills/git-workflow/SKILL.md +0 -158
- package/shared/skills/git-workflow/references/commit-patterns.md +0 -115
- package/shared/skills/git-workflow/references/commit-violations.md +0 -77
- package/shared/skills/git-workflow/references/pr-patterns.md +0 -127
- package/shared/skills/git-workflow/references/pr-violations.md +0 -96
- package/shared/skills/github-patterns/SKILL.md +0 -153
- package/shared/skills/github-patterns/references/patterns.md +0 -572
- package/shared/skills/github-patterns/references/violations.md +0 -298
- package/shared/skills/go/SKILL.md +0 -187
- package/shared/skills/go/references/concurrency.md +0 -312
- package/shared/skills/go/references/detection.md +0 -129
- package/shared/skills/go/references/patterns.md +0 -232
- package/shared/skills/go/references/violations.md +0 -205
- package/shared/skills/implementation-orchestration/SKILL.md +0 -92
- package/shared/skills/implementation-patterns/SKILL.md +0 -162
- package/shared/skills/implementation-patterns/references/patterns.md +0 -1063
- package/shared/skills/implementation-patterns/references/violations.md +0 -483
- package/shared/skills/input-validation/SKILL.md +0 -148
- package/shared/skills/input-validation/references/detection.md +0 -283
- package/shared/skills/input-validation/references/patterns.md +0 -361
- package/shared/skills/input-validation/references/violations.md +0 -224
- package/shared/skills/java/SKILL.md +0 -183
- package/shared/skills/java/references/detection.md +0 -120
- package/shared/skills/java/references/modern-java.md +0 -270
- package/shared/skills/java/references/patterns.md +0 -235
- package/shared/skills/java/references/violations.md +0 -213
- package/shared/skills/knowledge-persistence/SKILL.md +0 -128
- package/shared/skills/knowledge-persistence/references/examples.md +0 -44
- package/shared/skills/performance-patterns/SKILL.md +0 -154
- package/shared/skills/performance-patterns/references/detection.md +0 -351
- package/shared/skills/performance-patterns/references/patterns.md +0 -503
- package/shared/skills/performance-patterns/references/violations.md +0 -354
- package/shared/skills/plan-orchestration/SKILL.md +0 -71
- package/shared/skills/python/SKILL.md +0 -188
- package/shared/skills/python/references/async.md +0 -220
- package/shared/skills/python/references/detection.md +0 -128
- package/shared/skills/python/references/patterns.md +0 -226
- package/shared/skills/python/references/violations.md +0 -204
- package/shared/skills/react/SKILL.md +0 -276
- package/shared/skills/react/references/patterns.md +0 -1331
- package/shared/skills/react/references/violations.md +0 -565
- package/shared/skills/regression-patterns/SKILL.md +0 -146
- package/shared/skills/regression-patterns/references/detection.md +0 -237
- package/shared/skills/regression-patterns/references/patterns.md +0 -226
- package/shared/skills/regression-patterns/references/violations.md +0 -225
- package/shared/skills/review-methodology/SKILL.md +0 -119
- package/shared/skills/review-methodology/references/patterns.md +0 -186
- package/shared/skills/review-methodology/references/report-template.md +0 -142
- package/shared/skills/review-methodology/references/violations.md +0 -125
- package/shared/skills/rust/SKILL.md +0 -193
- package/shared/skills/rust/references/detection.md +0 -131
- package/shared/skills/rust/references/ownership.md +0 -242
- package/shared/skills/rust/references/patterns.md +0 -210
- package/shared/skills/rust/references/violations.md +0 -191
- package/shared/skills/search-first/SKILL.md +0 -133
- package/shared/skills/search-first/references/evaluation-criteria.md +0 -101
- package/shared/skills/security-patterns/SKILL.md +0 -156
- package/shared/skills/security-patterns/references/detection.md +0 -287
- package/shared/skills/security-patterns/references/patterns.md +0 -507
- package/shared/skills/security-patterns/references/violations.md +0 -237
- package/shared/skills/self-review/SKILL.md +0 -149
- package/shared/skills/self-review/references/patterns.md +0 -405
- package/shared/skills/self-review/references/report-template.md +0 -253
- package/shared/skills/self-review/references/stub-detection.md +0 -135
- package/shared/skills/self-review/references/violations.md +0 -308
- package/shared/skills/test-driven-development/SKILL.md +0 -137
- package/shared/skills/test-driven-development/references/rationalization-prevention.md +0 -111
- package/shared/skills/test-patterns/SKILL.md +0 -183
- package/shared/skills/test-patterns/references/detection.md +0 -149
- package/shared/skills/test-patterns/references/patterns.md +0 -220
- package/shared/skills/test-patterns/references/report-template.md +0 -108
- package/shared/skills/test-patterns/references/violations.md +0 -221
- package/shared/skills/typescript/SKILL.md +0 -176
- package/shared/skills/typescript/references/patterns.md +0 -1105
- package/shared/skills/typescript/references/violations.md +0 -433
- package/src/templates/claudeignore.template +0 -188
- package/src/templates/settings.json +0 -59
- /package/dist/{utils → core}/safe-delete.js +0 -0
- /package/{plugins/devflow-accessibility → src/assets}/skills/accessibility/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/architecture-patterns → src/assets/skills/architecture}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/complexity-patterns → src/assets/skills/complexity}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/complexity-patterns → src/assets/skills/complexity}/references/patterns.md +0 -0
- /package/{plugins/devflow-code-review/skills/complexity-patterns → src/assets/skills/complexity}/references/violations.md +0 -0
- /package/{plugins/devflow-code-review/skills/consistency-patterns → src/assets/skills/consistency}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/consistency-patterns → src/assets/skills/consistency}/references/patterns.md +0 -0
- /package/{plugins/devflow-code-review/skills/consistency-patterns → src/assets/skills/consistency}/references/violations.md +0 -0
- /package/{plugins/devflow-code-review/skills/database-patterns → src/assets/skills/database}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/database-patterns → src/assets/skills/database}/references/patterns.md +0 -0
- /package/{plugins/devflow-code-review/skills/database-patterns → src/assets/skills/database}/references/violations.md +0 -0
- /package/{plugins/devflow-code-review/skills/dependencies-patterns → src/assets/skills/dependencies}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/dependencies-patterns → src/assets/skills/dependencies}/references/patterns.md +0 -0
- /package/{plugins/devflow-code-review/skills/dependencies-patterns → src/assets/skills/dependencies}/references/violations.md +0 -0
- /package/{plugins/devflow-code-review/skills/documentation-patterns → src/assets/skills/documentation}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/documentation-patterns → src/assets/skills/documentation}/references/patterns.md +0 -0
- /package/{plugins/devflow-code-review/skills/documentation-patterns → src/assets/skills/documentation}/references/violations.md +0 -0
- /package/{plugins/devflow-core-skills/skills/git-safety → src/assets/skills/git}/references/detection.md +0 -0
- /package/{plugins/devflow-go → src/assets}/skills/go/references/detection.md +0 -0
- /package/{plugins/devflow-java → src/assets}/skills/java/references/detection.md +0 -0
- /package/{plugins/devflow-implement/skills/implementation-patterns → src/assets/skills/patterns}/references/patterns.md +0 -0
- /package/{plugins/devflow-implement/skills/implementation-patterns → src/assets/skills/patterns}/references/violations.md +0 -0
- /package/{plugins/devflow-code-review/skills/performance-patterns → src/assets/skills/performance}/references/detection.md +0 -0
- /package/{plugins/devflow-python → src/assets}/skills/python/references/detection.md +0 -0
- /package/{plugins/devflow-implement/skills/self-review → src/assets/skills/quality-gates}/references/patterns.md +0 -0
- /package/{plugins/devflow-implement/skills/self-review → src/assets/skills/quality-gates}/references/report-template.md +0 -0
- /package/{plugins/devflow-implement/skills/self-review → src/assets/skills/quality-gates}/references/violations.md +0 -0
- /package/{plugins/devflow-code-review/skills/regression-patterns → src/assets/skills/regression}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/regression-patterns → src/assets/skills/regression}/references/patterns.md +0 -0
- /package/{plugins/devflow-code-review/skills/regression-patterns → src/assets/skills/regression}/references/violations.md +0 -0
- /package/{plugins/devflow-rust → src/assets}/skills/rust/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/security-patterns → src/assets/skills/security}/references/detection.md +0 -0
- /package/{plugins/devflow-core-skills/skills/core-patterns → src/assets/skills/software-design}/references/detection.md +0 -0
- /package/{plugins/devflow-core-skills → src/assets}/skills/test-driven-development/references/rationalization-prevention.md +0 -0
- /package/{plugins/devflow-code-review/skills/test-patterns → src/assets/skills/testing}/references/detection.md +0 -0
- /package/{plugins/devflow-code-review/skills/test-patterns → src/assets/skills/testing}/references/report-template.md +0 -0
- /package/{plugins/devflow-frontend-design/skills/frontend-design → src/assets/skills/ui-design}/references/detection.md +0 -0
- /package/src/{templates → targets/claude-code/templates}/managed-settings.json +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip `teammateMode: "auto"` from a freshly parsed copy of the settings JSON.
|
|
3
|
+
* Returns the serialised JSON string (with trailing newline).
|
|
4
|
+
*
|
|
5
|
+
* Pure string→string — matches the pipeline pattern used by stripFlags /
|
|
6
|
+
* stripViewMode so uninstall.ts can chain it without a separate parse/stringify.
|
|
7
|
+
* Only removes the key when the value is exactly `"auto"`; user-set values
|
|
8
|
+
* (`"tmux"`, `"in-process"`, etc.) are preserved as-is.
|
|
9
|
+
*
|
|
10
|
+
* Tolerant: malformed JSON is returned unchanged (no-op). Non-object roots
|
|
11
|
+
* (null, arrays, primitives) are treated as a no-op — only object roots can
|
|
12
|
+
* carry the key (avoids PF-004: a TypeError here would escape the function
|
|
13
|
+
* and surface as an unhandled error during uninstall).
|
|
14
|
+
*/
|
|
15
|
+
export function stripDevflowTeammateModeFromJson(settingsJson) {
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = JSON.parse(settingsJson);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return settingsJson; // Malformed JSON — leave untouched
|
|
22
|
+
}
|
|
23
|
+
// Tolerant: only object roots can carry the key; null/arrays/primitives are no-ops.
|
|
24
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
25
|
+
return settingsJson;
|
|
26
|
+
}
|
|
27
|
+
const settings = parsed;
|
|
28
|
+
if (settings['teammateMode'] !== 'auto')
|
|
29
|
+
return settingsJson;
|
|
30
|
+
delete settings['teammateMode'];
|
|
31
|
+
return JSON.stringify(settings, null, 2) + '\n';
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=teammate-mode-cleanup.js.map
|
package/dist/hud/colors.js
CHANGED
|
@@ -55,8 +55,19 @@ export function bgRed(s) {
|
|
|
55
55
|
export function truncate(s, max) {
|
|
56
56
|
return s.length > max ? s.slice(0, max - 1) + '\u2026' : s;
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
// S2 — Terminal-escape and control-character sanitization (HIGH, pre-existing defect).
|
|
59
|
+
//
|
|
60
|
+
// The prior pattern (/\x1b\[[0-9;]*m/g) matched only SGR sequences (colour).
|
|
61
|
+
// The broadened ANSI_PATTERN also covers:
|
|
62
|
+
// CSI sequences — \x1b[ ... with intermediate bytes, any final byte
|
|
63
|
+
// OSC sequences — \x1b] ... terminated by BEL (\x07) or ST (\x1b\\)
|
|
64
|
+
// Two-byte C1 — \x1b followed by any single character in the C1 range
|
|
65
|
+
// CTRL_PATTERN removes non-printable C0 control chars that are not TAB (\x09)
|
|
66
|
+
// or standard newlines (\x0a, \x0d). Together they prevent agent names
|
|
67
|
+
// embedded in model IDs from injecting escape sequences into --list output.
|
|
68
|
+
const ANSI_PATTERN = /\x1b(?:\[[0-9;?]*[ -\/]*[@-~]|\][^\x07\x1b]*(?:\x07|\x1b\\)|[@-Z\\-_])/g;
|
|
69
|
+
const CTRL_PATTERN = /[\x00-\x08\x0b-\x1f\x7f]/g;
|
|
59
70
|
export function stripAnsi(s) {
|
|
60
|
-
return s.replace(ANSI_PATTERN, '');
|
|
71
|
+
return s.replace(ANSI_PATTERN, '').replace(CTRL_PATTERN, '');
|
|
61
72
|
}
|
|
62
73
|
//# sourceMappingURL=colors.js.map
|
|
@@ -49,8 +49,8 @@ export function gatherConfigCounts(cwd) {
|
|
|
49
49
|
path.join(claudeDir, 'rules'),
|
|
50
50
|
]) {
|
|
51
51
|
try {
|
|
52
|
-
const
|
|
53
|
-
rules +=
|
|
52
|
+
const entries = fs.readdirSync(rulesDir, { recursive: true, withFileTypes: true });
|
|
53
|
+
rules += entries.filter((d) => d.isFile() && (d.name.endsWith('.md') || d.name.endsWith('.mdc'))).length;
|
|
54
54
|
}
|
|
55
55
|
catch {
|
|
56
56
|
/* ignore */
|
|
@@ -37,8 +37,8 @@ export default async function contextUsage(ctx) {
|
|
|
37
37
|
const inK = Math.round(cw.current_usage.input_tokens / 1000);
|
|
38
38
|
suffix = ` (in: ${inK}k)`;
|
|
39
39
|
}
|
|
40
|
-
const raw = `
|
|
41
|
-
const text = dim('
|
|
40
|
+
const raw = `Context ${filledBar}${emptyBar} ${pct}%${suffix}`;
|
|
41
|
+
const text = dim('Context ') +
|
|
42
42
|
colorFn(filledBar) +
|
|
43
43
|
dim(emptyBar) +
|
|
44
44
|
' ' +
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import { dim } from '../colors.js';
|
|
3
|
+
import { getDecisionsLedgerPath } from '../../core/project-paths.js';
|
|
4
|
+
/**
|
|
5
|
+
* @devflow-design-decision D309
|
|
6
|
+
* Counts come from decisions-ledger.jsonl (the render source of truth), NOT
|
|
7
|
+
* the rendered decisions.md/pitfalls.md, so the HUD never couples to markdown
|
|
8
|
+
* format. Active-row semantics mirror render-decisions.cjs exactly: a row
|
|
9
|
+
* counts when anchor_id is set and decisions_status is absent or outside
|
|
10
|
+
* INACTIVE_STATUSES — so the numbers always equal the entries visible in the
|
|
11
|
+
* rendered files.
|
|
12
|
+
*/
|
|
13
|
+
const INACTIVE_STATUSES = new Set(['Deprecated', 'Superseded', 'Retired']);
|
|
14
|
+
function isLedgerCountRow(val) {
|
|
15
|
+
if (typeof val !== 'object' || val === null)
|
|
16
|
+
return false;
|
|
17
|
+
const o = val;
|
|
18
|
+
if (o.type !== 'decision' && o.type !== 'pitfall')
|
|
19
|
+
return false;
|
|
20
|
+
if (typeof o.anchor_id !== 'string' || o.anchor_id.length === 0)
|
|
21
|
+
return false;
|
|
22
|
+
return o.decisions_status === undefined || typeof o.decisions_status === 'string';
|
|
23
|
+
}
|
|
24
|
+
function isActive(row) {
|
|
25
|
+
if (!row.decisions_status)
|
|
26
|
+
return true;
|
|
27
|
+
return !INACTIVE_STATUSES.has(row.decisions_status);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Read .devflow/learning/decisions-ledger.jsonl and count active anchored
|
|
31
|
+
* rows by type. Returns null if the ledger is missing or holds no valid rows
|
|
32
|
+
* (graceful fallback). Exported for use by the main HUD entry point.
|
|
33
|
+
*/
|
|
34
|
+
export function gatherLearningCounts(cwd) {
|
|
35
|
+
let content;
|
|
36
|
+
try {
|
|
37
|
+
content = fs.readFileSync(getDecisionsLedgerPath(cwd), 'utf-8');
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const counts = { decisions: 0, pitfalls: 0 };
|
|
43
|
+
let parsedAny = false;
|
|
44
|
+
for (const rawLine of content.split('\n')) {
|
|
45
|
+
const line = rawLine.trim();
|
|
46
|
+
if (!line)
|
|
47
|
+
continue;
|
|
48
|
+
let parsed;
|
|
49
|
+
try {
|
|
50
|
+
parsed = JSON.parse(line);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
// Skip malformed lines — graceful
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (!isLedgerCountRow(parsed))
|
|
57
|
+
continue;
|
|
58
|
+
parsedAny = true;
|
|
59
|
+
if (!isActive(parsed))
|
|
60
|
+
continue;
|
|
61
|
+
if (parsed.type === 'decision')
|
|
62
|
+
counts.decisions++;
|
|
63
|
+
else
|
|
64
|
+
counts.pitfalls++;
|
|
65
|
+
}
|
|
66
|
+
return parsedAny ? counts : null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* HUD component: decisions/pitfalls counts.
|
|
70
|
+
* Shows how many active ADR/PF entries the project has accumulated.
|
|
71
|
+
* Returns null when no ledger exists or every entry is retired.
|
|
72
|
+
*/
|
|
73
|
+
export default async function learningCounts(ctx) {
|
|
74
|
+
const data = ctx.learningCounts;
|
|
75
|
+
if (!data)
|
|
76
|
+
return null;
|
|
77
|
+
const { decisions, pitfalls } = data;
|
|
78
|
+
if (decisions + pitfalls === 0)
|
|
79
|
+
return null;
|
|
80
|
+
const parts = [];
|
|
81
|
+
if (decisions > 0)
|
|
82
|
+
parts.push(`${decisions} decision${decisions !== 1 ? 's' : ''}`);
|
|
83
|
+
if (pitfalls > 0)
|
|
84
|
+
parts.push(`${pitfalls} pitfall${pitfalls !== 1 ? 's' : ''}`);
|
|
85
|
+
// Intentionally one dimmed clause (unlike config-counts, which dims each
|
|
86
|
+
// part and joins with a middot for a list of independent facts): "Learning:
|
|
87
|
+
// N decisions, M pitfalls" reads as a single sentence, so the whole string
|
|
88
|
+
// is dimmed once and parts are comma-joined rather than middot-separated.
|
|
89
|
+
const raw = `Learning: ${parts.join(', ')}`;
|
|
90
|
+
return { text: dim(raw), raw };
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=learning-counts.js.map
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { dim } from '../colors.js';
|
|
2
|
+
/** Session cost with optional rolling 7-day (/wk) and 30-day (/mo) totals. */
|
|
2
3
|
export default async function sessionCost(ctx) {
|
|
3
4
|
const cost = ctx.stdin.cost?.total_cost_usd;
|
|
4
5
|
if (cost == null)
|
|
5
6
|
return null;
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const parts = [`$${cost.toFixed(2)}`];
|
|
8
|
+
if (ctx.costHistory?.weeklyCost != null && ctx.costHistory.weeklyCost > 0) {
|
|
9
|
+
parts.push(`$${ctx.costHistory.weeklyCost.toFixed(2)}/wk`);
|
|
10
|
+
}
|
|
11
|
+
if (ctx.costHistory?.monthlyCost != null && ctx.costHistory.monthlyCost > 0) {
|
|
12
|
+
parts.push(`$${ctx.costHistory.monthlyCost.toFixed(2)}/mo`);
|
|
13
|
+
}
|
|
14
|
+
const raw = parts.join(' \u00B7 ');
|
|
15
|
+
return { text: dim(raw), raw };
|
|
8
16
|
}
|
|
9
17
|
//# sourceMappingURL=session-cost.js.map
|
|
@@ -22,24 +22,59 @@ function renderBar(percent) {
|
|
|
22
22
|
const raw = `${filledBar}${emptyBar} ${percent}%`;
|
|
23
23
|
return { text, raw };
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Format seconds remaining until a reset timestamp into compact form.
|
|
27
|
+
* Returns '' if the timestamp is in the past or not provided.
|
|
28
|
+
* Format: '2h 15m', '3d 12h', '45m'
|
|
29
|
+
*/
|
|
30
|
+
export function formatCountdown(resetsAtEpoch) {
|
|
31
|
+
const nowMs = Date.now();
|
|
32
|
+
const resetsAtMs = resetsAtEpoch * 1000;
|
|
33
|
+
const remainingMs = resetsAtMs - nowMs;
|
|
34
|
+
if (remainingMs <= 0)
|
|
35
|
+
return '';
|
|
36
|
+
const totalSeconds = Math.floor(remainingMs / 1000);
|
|
37
|
+
const totalMinutes = Math.floor(totalSeconds / 60);
|
|
38
|
+
const totalHours = Math.floor(totalMinutes / 60);
|
|
39
|
+
const days = Math.floor(totalHours / 24);
|
|
40
|
+
if (days > 0) {
|
|
41
|
+
const hours = totalHours % 24;
|
|
42
|
+
return hours > 0 ? `${days}d ${hours}h` : `${days}d`;
|
|
43
|
+
}
|
|
44
|
+
if (totalHours > 0) {
|
|
45
|
+
const minutes = totalMinutes % 60;
|
|
46
|
+
return minutes > 0 ? `${totalHours}h ${minutes}m` : `${totalHours}h`;
|
|
47
|
+
}
|
|
48
|
+
return `${totalMinutes}m`;
|
|
49
|
+
}
|
|
50
|
+
/** Render a single quota window: "5h ████░░░░ 45% (2h 15m)" */
|
|
51
|
+
function renderQuotaWindow(label, percent, resetsAt) {
|
|
52
|
+
const bar = renderBar(Math.round(percent));
|
|
53
|
+
const countdown = resetsAt != null ? formatCountdown(resetsAt) : '';
|
|
54
|
+
const countdownText = countdown ? dim(` (${countdown})`) : '';
|
|
55
|
+
const countdownRaw = countdown ? ` (${countdown})` : '';
|
|
56
|
+
return {
|
|
57
|
+
text: dim(label + ' ') + bar.text + countdownText,
|
|
58
|
+
raw: `${label} ${bar.raw}${countdownRaw}`,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
25
61
|
export default async function usageQuota(ctx) {
|
|
26
62
|
if (!ctx.usage)
|
|
27
63
|
return null;
|
|
28
|
-
const { fiveHourPercent, sevenDayPercent } = ctx.usage;
|
|
64
|
+
const { fiveHourPercent, sevenDayPercent, fiveHourResetsAt, sevenDayResetsAt } = ctx.usage;
|
|
29
65
|
const parts = [];
|
|
30
66
|
if (fiveHourPercent !== null) {
|
|
31
|
-
|
|
32
|
-
parts.push({ text: dim('5h ') + bar.text, raw: `5h ${bar.raw}` });
|
|
67
|
+
parts.push(renderQuotaWindow('5h', fiveHourPercent, fiveHourResetsAt));
|
|
33
68
|
}
|
|
34
69
|
if (sevenDayPercent !== null) {
|
|
35
|
-
|
|
36
|
-
parts.push({ text: dim('7d ') + bar.text, raw: `7d ${bar.raw}` });
|
|
70
|
+
parts.push(renderQuotaWindow('7d', sevenDayPercent, sevenDayResetsAt));
|
|
37
71
|
}
|
|
38
72
|
if (parts.length === 0)
|
|
39
73
|
return null;
|
|
40
74
|
const sep = dim(' \u00B7 ');
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
75
|
+
return {
|
|
76
|
+
text: parts.map((p) => p.text).join(sep),
|
|
77
|
+
raw: parts.map((p) => p.raw).join(' \u00B7 '),
|
|
78
|
+
};
|
|
44
79
|
}
|
|
45
80
|
//# sourceMappingURL=usage-quota.js.map
|
|
@@ -2,9 +2,18 @@ import { execFile } from 'node:child_process';
|
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import { yellow } from '../colors.js';
|
|
5
|
-
import { readCache, writeCache } from '
|
|
5
|
+
import { readCache, writeCache, hudCacheDir } from '../../core/cache.js';
|
|
6
|
+
import { getPackageRoot } from '../../core/paths.js';
|
|
6
7
|
const VERSION_CACHE_KEY = 'version-check';
|
|
7
8
|
const VERSION_CACHE_TTL = 24 * 60 * 60 * 1000; // 24 hours
|
|
9
|
+
function validateVersionInfo(data) {
|
|
10
|
+
if (typeof data !== 'object' || data === null)
|
|
11
|
+
return null;
|
|
12
|
+
const obj = data;
|
|
13
|
+
if (typeof obj.latest !== 'string')
|
|
14
|
+
return null;
|
|
15
|
+
return { latest: obj.latest };
|
|
16
|
+
}
|
|
8
17
|
function getCurrentVersion(devflowDir) {
|
|
9
18
|
// Try manifest.json first (most reliable for installed version)
|
|
10
19
|
try {
|
|
@@ -18,7 +27,7 @@ function getCurrentVersion(devflowDir) {
|
|
|
18
27
|
}
|
|
19
28
|
// Try package.json as fallback
|
|
20
29
|
try {
|
|
21
|
-
const pkgPath = path.join(
|
|
30
|
+
const pkgPath = path.join(getPackageRoot(), 'package.json');
|
|
22
31
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
23
32
|
if (typeof pkg.version === 'string')
|
|
24
33
|
return pkg.version;
|
|
@@ -61,16 +70,17 @@ export default async function versionBadge(ctx) {
|
|
|
61
70
|
const current = getCurrentVersion(ctx.devflowDir);
|
|
62
71
|
if (!current)
|
|
63
72
|
return null;
|
|
64
|
-
//
|
|
65
|
-
|
|
73
|
+
const cacheDir = hudCacheDir(ctx.devflowDir); // authoritative path from cache.ts (avoids PF-013)
|
|
74
|
+
// Cache only the npm registry result (expensive); current is always live
|
|
75
|
+
let info = readCache(cacheDir, VERSION_CACHE_KEY, validateVersionInfo);
|
|
66
76
|
if (!info) {
|
|
67
77
|
const latest = await fetchLatestVersion();
|
|
68
78
|
if (latest) {
|
|
69
|
-
info = {
|
|
70
|
-
writeCache(VERSION_CACHE_KEY, info, VERSION_CACHE_TTL);
|
|
79
|
+
info = { latest };
|
|
80
|
+
await writeCache(cacheDir, VERSION_CACHE_KEY, info, VERSION_CACHE_TTL);
|
|
71
81
|
}
|
|
72
82
|
}
|
|
73
|
-
if (info && compareVersions(
|
|
83
|
+
if (info && compareVersions(current, info.latest) < 0) {
|
|
74
84
|
const badge = `\u2726 Devflow v${info.latest} \u00B7 update: npx devflow-kit init`;
|
|
75
85
|
return { text: yellow(badge), raw: badge };
|
|
76
86
|
}
|
package/dist/hud/config.js
CHANGED
|
@@ -2,7 +2,9 @@ import * as fs from 'node:fs';
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Default HUD components in display order.
|
|
6
|
+
* sessionDuration is intentionally omitted — the component is retained
|
|
7
|
+
* in the type system and render map but excluded from display by default.
|
|
6
8
|
*/
|
|
7
9
|
export const HUD_COMPONENTS = [
|
|
8
10
|
'directory',
|
|
@@ -14,11 +16,11 @@ export const HUD_COMPONENTS = [
|
|
|
14
16
|
'model',
|
|
15
17
|
'contextUsage',
|
|
16
18
|
'versionBadge',
|
|
17
|
-
'sessionDuration',
|
|
18
19
|
'sessionCost',
|
|
19
20
|
'usageQuota',
|
|
20
21
|
'todoProgress',
|
|
21
22
|
'configCounts',
|
|
23
|
+
'learningCounts',
|
|
22
24
|
];
|
|
23
25
|
export function getConfigPath() {
|
|
24
26
|
const devflowDir = process.env.DEVFLOW_DIR || path.join(process.env.HOME || homedir(), '.devflow');
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
const SECONDS_1_HOUR = 3600;
|
|
5
|
+
const SECONDS_PER_DAY = 86400;
|
|
6
|
+
const SECONDS_7_DAYS = 7 * SECONDS_PER_DAY;
|
|
7
|
+
const SECONDS_30_DAYS = 30 * SECONDS_PER_DAY;
|
|
8
|
+
const SECONDS_90_DAYS = 90 * SECONDS_PER_DAY;
|
|
9
|
+
const ARCHIVE_TRIM_THRESHOLD = 500;
|
|
10
|
+
const CACHE_TTL_MS = 30_000;
|
|
11
|
+
/** Returns the current time as a Unix epoch in whole seconds. */
|
|
12
|
+
function nowEpoch() {
|
|
13
|
+
return Math.floor(Date.now() / 1000);
|
|
14
|
+
}
|
|
15
|
+
function isSessionEntry(value) {
|
|
16
|
+
if (typeof value !== 'object' || value === null)
|
|
17
|
+
return false;
|
|
18
|
+
const obj = value;
|
|
19
|
+
return (typeof obj.session_id === 'string' &&
|
|
20
|
+
typeof obj.cost_usd === 'number' &&
|
|
21
|
+
typeof obj.timestamp === 'number' &&
|
|
22
|
+
typeof obj.cwd === 'string');
|
|
23
|
+
}
|
|
24
|
+
let sessionsDirCreated = false;
|
|
25
|
+
let cachedAggregation = null;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the paths used for cost storage.
|
|
28
|
+
* Respects DEVFLOW_DIR env for testability.
|
|
29
|
+
*/
|
|
30
|
+
export function getCostFilePaths() {
|
|
31
|
+
const devflowDir = process.env.DEVFLOW_DIR ||
|
|
32
|
+
path.join(process.env.HOME || homedir(), '.devflow');
|
|
33
|
+
const sessionsDir = path.join(devflowDir, 'costs', 'sessions');
|
|
34
|
+
const archivePath = path.join(devflowDir, 'costs', 'archive.jsonl');
|
|
35
|
+
return { sessionsDir, archivePath };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Persist the current session cost atomically.
|
|
39
|
+
* Fire-and-forget — all errors are swallowed to avoid blocking HUD render.
|
|
40
|
+
* Periodic cleanup runs every ~50 seconds (when timestamp % 50 === 0).
|
|
41
|
+
*/
|
|
42
|
+
export function persistSessionCost(sessionId, costUsd, cwd) {
|
|
43
|
+
if (costUsd <= 0 || !Number.isFinite(costUsd))
|
|
44
|
+
return;
|
|
45
|
+
// Sanitize sessionId to prevent path traversal (defense-in-depth)
|
|
46
|
+
if (!sessionId || /[/\\]/.test(sessionId))
|
|
47
|
+
return;
|
|
48
|
+
try {
|
|
49
|
+
const { sessionsDir } = getCostFilePaths();
|
|
50
|
+
if (!sessionsDirCreated) {
|
|
51
|
+
fs.mkdirSync(sessionsDir, { recursive: true });
|
|
52
|
+
sessionsDirCreated = true;
|
|
53
|
+
}
|
|
54
|
+
const entry = {
|
|
55
|
+
session_id: sessionId,
|
|
56
|
+
cost_usd: costUsd,
|
|
57
|
+
timestamp: nowEpoch(),
|
|
58
|
+
cwd,
|
|
59
|
+
};
|
|
60
|
+
const filePath = path.join(sessionsDir, `${sessionId}.json`);
|
|
61
|
+
const tmpPath = `${filePath}.tmp`;
|
|
62
|
+
const data = JSON.stringify(entry);
|
|
63
|
+
// Atomic write: write to .tmp then rename
|
|
64
|
+
try {
|
|
65
|
+
fs.writeFileSync(tmpPath, data, { encoding: 'utf-8', flag: 'wx' });
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
if (err.code === 'EEXIST') {
|
|
69
|
+
// Stale .tmp from prior crash — unlink and retry once
|
|
70
|
+
try {
|
|
71
|
+
fs.unlinkSync(tmpPath);
|
|
72
|
+
}
|
|
73
|
+
catch { /* race — already removed */ }
|
|
74
|
+
fs.writeFileSync(tmpPath, data, { encoding: 'utf-8', flag: 'wx' });
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw err;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
fs.renameSync(tmpPath, filePath);
|
|
81
|
+
// Periodic cleanup: run every ~50 seconds
|
|
82
|
+
if (entry.timestamp % 50 === 0) {
|
|
83
|
+
runCleanup();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Non-fatal: HUD must not block on cost persistence errors
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/** Remove orphaned .tmp files in sessionsDir that are older than 1 hour. */
|
|
91
|
+
function cleanOrphanedTmpFiles(sessionsDir, nowSeconds, files) {
|
|
92
|
+
for (const filename of files) {
|
|
93
|
+
if (!filename.endsWith('.tmp'))
|
|
94
|
+
continue;
|
|
95
|
+
const filePath = path.join(sessionsDir, filename);
|
|
96
|
+
try {
|
|
97
|
+
const stat = fs.statSync(filePath);
|
|
98
|
+
const ageSeconds = nowSeconds - Math.floor(stat.mtimeMs / 1000);
|
|
99
|
+
if (ageSeconds > SECONDS_1_HOUR) {
|
|
100
|
+
fs.unlinkSync(filePath);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch { /* non-fatal */ }
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** Archive session JSON files older than 24 hours into the archive JSONL. */
|
|
107
|
+
function archiveStaleSessionFiles(sessionsDir, archivePath, nowSeconds, files) {
|
|
108
|
+
for (const filename of files) {
|
|
109
|
+
if (!filename.endsWith('.json'))
|
|
110
|
+
continue;
|
|
111
|
+
const filePath = path.join(sessionsDir, filename);
|
|
112
|
+
try {
|
|
113
|
+
const raw = fs.readFileSync(filePath, 'utf-8');
|
|
114
|
+
const parsed = JSON.parse(raw);
|
|
115
|
+
if (!isSessionEntry(parsed))
|
|
116
|
+
continue;
|
|
117
|
+
const age = nowSeconds - parsed.timestamp;
|
|
118
|
+
if (age > SECONDS_PER_DAY) {
|
|
119
|
+
fs.mkdirSync(path.dirname(archivePath), { recursive: true });
|
|
120
|
+
fs.appendFileSync(archivePath, JSON.stringify(parsed) + '\n');
|
|
121
|
+
fs.unlinkSync(filePath);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
catch { /* non-fatal: skip malformed files */ }
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Clean up stale session files, orphaned .tmp files, and trim archive.
|
|
129
|
+
* Called periodically from persistSessionCost.
|
|
130
|
+
*/
|
|
131
|
+
export function runCleanup() {
|
|
132
|
+
try {
|
|
133
|
+
const { sessionsDir, archivePath } = getCostFilePaths();
|
|
134
|
+
const nowSeconds = nowEpoch();
|
|
135
|
+
let sessionFiles;
|
|
136
|
+
try {
|
|
137
|
+
sessionFiles = fs.readdirSync(sessionsDir);
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
cleanOrphanedTmpFiles(sessionsDir, nowSeconds, sessionFiles);
|
|
143
|
+
archiveStaleSessionFiles(sessionsDir, archivePath, nowSeconds, sessionFiles);
|
|
144
|
+
// Trim archive.jsonl when it exceeds threshold
|
|
145
|
+
trimArchive(archivePath, nowSeconds);
|
|
146
|
+
}
|
|
147
|
+
catch { /* non-fatal */ }
|
|
148
|
+
}
|
|
149
|
+
function trimArchive(archivePath, nowSeconds) {
|
|
150
|
+
try {
|
|
151
|
+
const raw = fs.readFileSync(archivePath, 'utf-8');
|
|
152
|
+
const lines = raw.split('\n').filter((l) => l.trim().length > 0);
|
|
153
|
+
if (lines.length <= ARCHIVE_TRIM_THRESHOLD)
|
|
154
|
+
return;
|
|
155
|
+
// Remove entries older than 90 days
|
|
156
|
+
const cutoff = nowSeconds - SECONDS_90_DAYS;
|
|
157
|
+
const retained = lines.filter((line) => {
|
|
158
|
+
try {
|
|
159
|
+
const parsed = JSON.parse(line);
|
|
160
|
+
if (!isSessionEntry(parsed))
|
|
161
|
+
return false;
|
|
162
|
+
return parsed.timestamp >= cutoff;
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
fs.writeFileSync(archivePath, retained.join('\n') + '\n', 'utf-8');
|
|
169
|
+
}
|
|
170
|
+
catch { /* non-fatal */ }
|
|
171
|
+
}
|
|
172
|
+
/** Insert or replace entry in map, keeping the one with the higher cost_usd. */
|
|
173
|
+
function upsertMax(map, entry) {
|
|
174
|
+
const existing = map.get(entry.session_id);
|
|
175
|
+
if (!existing || entry.cost_usd > existing.cost_usd) {
|
|
176
|
+
map.set(entry.session_id, entry);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/** Read all valid SessionEntry objects from the sessions directory. */
|
|
180
|
+
function readSessionEntries(sessionsDir) {
|
|
181
|
+
const map = new Map();
|
|
182
|
+
try {
|
|
183
|
+
const files = fs.readdirSync(sessionsDir);
|
|
184
|
+
for (const filename of files) {
|
|
185
|
+
if (!filename.endsWith('.json'))
|
|
186
|
+
continue;
|
|
187
|
+
try {
|
|
188
|
+
const raw = fs.readFileSync(path.join(sessionsDir, filename), 'utf-8');
|
|
189
|
+
const parsed = JSON.parse(raw);
|
|
190
|
+
if (isSessionEntry(parsed)) {
|
|
191
|
+
upsertMax(map, parsed);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
catch { /* skip malformed */ }
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch { /* sessions dir may not exist yet */ }
|
|
198
|
+
return map;
|
|
199
|
+
}
|
|
200
|
+
/** Read all valid SessionEntry objects from the archive JSONL file. */
|
|
201
|
+
function readArchiveEntries(archivePath) {
|
|
202
|
+
const entries = [];
|
|
203
|
+
try {
|
|
204
|
+
const raw = fs.readFileSync(archivePath, 'utf-8');
|
|
205
|
+
const lines = raw.split('\n').filter((l) => l.trim().length > 0);
|
|
206
|
+
for (const line of lines) {
|
|
207
|
+
try {
|
|
208
|
+
const parsed = JSON.parse(line);
|
|
209
|
+
if (isSessionEntry(parsed)) {
|
|
210
|
+
entries.push(parsed);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
catch { /* skip malformed JSONL lines */ }
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
catch { /* archive may not exist yet */ }
|
|
217
|
+
return entries;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Aggregate costs from all session files and archive.
|
|
221
|
+
* The currentSessionId + currentCostUsd parameters are authoritative
|
|
222
|
+
* (from stdin) and override any file-based entry for the same session.
|
|
223
|
+
* Results are cached for CACHE_TTL_MS to avoid repeated filesystem reads.
|
|
224
|
+
*/
|
|
225
|
+
export function aggregateCosts(currentSessionId, currentCostUsd) {
|
|
226
|
+
// Return cached result if still valid
|
|
227
|
+
if (cachedAggregation !== null && Date.now() < cachedAggregation.expiresAt) {
|
|
228
|
+
return cachedAggregation.value;
|
|
229
|
+
}
|
|
230
|
+
try {
|
|
231
|
+
const { sessionsDir, archivePath } = getCostFilePaths();
|
|
232
|
+
const sessionMap = readSessionEntries(sessionsDir);
|
|
233
|
+
for (const entry of readArchiveEntries(archivePath)) {
|
|
234
|
+
upsertMax(sessionMap, entry);
|
|
235
|
+
}
|
|
236
|
+
// Override/add current session from stdin (authoritative), only when cost > 0
|
|
237
|
+
if (currentCostUsd > 0) {
|
|
238
|
+
const currentEntry = {
|
|
239
|
+
session_id: currentSessionId,
|
|
240
|
+
cost_usd: currentCostUsd,
|
|
241
|
+
timestamp: nowEpoch(),
|
|
242
|
+
cwd: '',
|
|
243
|
+
};
|
|
244
|
+
const existingCurrent = sessionMap.get(currentSessionId);
|
|
245
|
+
if (!existingCurrent || currentCostUsd >= existingCurrent.cost_usd) {
|
|
246
|
+
sessionMap.set(currentSessionId, currentEntry);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (sessionMap.size === 0) {
|
|
250
|
+
cachedAggregation = { value: null, expiresAt: Date.now() + CACHE_TTL_MS };
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
253
|
+
const nowSeconds = nowEpoch();
|
|
254
|
+
const cutoff7d = nowSeconds - SECONDS_7_DAYS;
|
|
255
|
+
const cutoff30d = nowSeconds - SECONDS_30_DAYS;
|
|
256
|
+
let weeklyCost = 0;
|
|
257
|
+
let monthlyCost = 0;
|
|
258
|
+
let hasWeekly = false;
|
|
259
|
+
let hasMonthly = false;
|
|
260
|
+
for (const entry of sessionMap.values()) {
|
|
261
|
+
if (entry.timestamp >= cutoff30d) {
|
|
262
|
+
monthlyCost += entry.cost_usd;
|
|
263
|
+
hasMonthly = true;
|
|
264
|
+
}
|
|
265
|
+
if (entry.timestamp >= cutoff7d) {
|
|
266
|
+
weeklyCost += entry.cost_usd;
|
|
267
|
+
hasWeekly = true;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const result = {
|
|
271
|
+
weeklyCost: hasWeekly ? weeklyCost : null,
|
|
272
|
+
monthlyCost: hasMonthly ? monthlyCost : null,
|
|
273
|
+
};
|
|
274
|
+
cachedAggregation = { value: result, expiresAt: Date.now() + CACHE_TTL_MS };
|
|
275
|
+
return result;
|
|
276
|
+
}
|
|
277
|
+
catch {
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=cost-history.js.map
|