Skip to content

fix: dewey init scaffolds slash commands on re-init, not just first init (#48) - #49

Merged
jflowers merged 1 commit into
mainfrom
opsx/fix-init-scaffolding
Apr 19, 2026
Merged

jflowers merged 1 commit into
mainfrom
opsx/fix-init-scaffolding

Conversation

@jflowers

Copy link
Copy Markdown
Contributor

Summary

  • dewey init now scaffolds slash commands on every invocation, not just the first
  • Previously, the "already initialized" early return at cli.go:232 prevented slash command scaffolding from running on already-initialized repos — users upgrading dewey never got new slash commands
  • Fix: replaced return nil with a alreadyInitialized boolean flag that only skips config/sources creation while letting scaffolding run unconditionally
  • New TestInitCmd_ReInitScaffoldsNewCommands test: inits, deletes a command, re-inits, verifies re-scaffolding

Closes #48

…nit (#48)

- Replace early return at "already initialized" with conditional
  block — config/sources creation skipped, but slash command
  scaffolding always runs
- New test verifies re-init scaffolds missing commands after upgrade
@github-actions

Copy link
Copy Markdown

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ GO golangci-lint yes yes no no 45.2s
⚠️ MARKDOWN markdownlint 7 0 9 0 0.81s
✅ REPOSITORY gitleaks yes no no 2.02s
✅ REPOSITORY git_diff yes no no 0.35s
✅ YAML yamllint 2 0 0 0.81s

Detailed Issues

⚠️ MARKDOWN / markdownlint - 9 errors
openspec/changes/fix-init-scaffolding/design.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Context"]
openspec/changes/fix-init-scaffolding/proposal.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Why"]
openspec/changes/fix-init-scaffolding/tasks.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## 1. Restructure Init Flow"]
openspec/schemas/unbound-force/templates/design.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Context"]
openspec/schemas/unbound-force/templates/proposal.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Why"]
openspec/schemas/unbound-force/templates/spec.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## ADDED Requirements"]
openspec/schemas/unbound-force/templates/spec.md:14 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Requirement:"]
openspec/schemas/unbound-force/templates/spec.md:20 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Requirement:"]
openspec/schemas/unbound-force/templates/tasks.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## 1. <!-- .... ..... -->"]

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@jflowers
jflowers merged commit 8f2d728 into main Apr 19, 2026
3 checks passed
@jflowers
jflowers deleted the opsx/fix-init-scaffolding branch April 19, 2026 22:51
jflowers added a commit that referenced this pull request Apr 22, 2026
…file-backed persistence

- New curate/ package with curation pipeline: LLM extracts
  decisions, facts, patterns from indexed sources with quality
  analysis (missing_rationale, implied_assumption, incongruent)
  and confidence scoring (high/medium/low/flagged)
- File-backed learnings: store_learning dual-writes to SQLite +
  .uf/dewey/learnings/{tag}-{seq}.md with auto re-ingestion on
  startup when graph.db is missing
- Knowledge store config via .uf/dewey/knowledge-stores.yaml
  mapping sources to named curated stores
- Background curation goroutine polls per-store at configurable
  intervals, sharing indexing mutex via TryLock
- New curated trust tier (authored > curated > validated > draft)
  with semantic_search_filtered support
- dewey lint extended with knowledge quality metrics: confidence
  distribution, quality flags, stale store detection
- Auto-indexing: curated files persisted as searchable pages with
  source_id=knowledge-{store-name}
- dewey curate CLI command + curate MCP tool (tool #49) +
  /dewey-curate slash command
- 71 new tests across 7 packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

bug: dewey init early return prevents slash command scaffolding on already-initialized repos

1 participant