Skip to content

Phase 1 foundation + repo conventions#1

Merged
StuartMeeks merged 3 commits into
masterfrom
phase-1-foundation
May 29, 2026
Merged

Phase 1 foundation + repo conventions#1
StuartMeeks merged 3 commits into
masterfrom
phase-1-foundation

Conversation

@StuartMeeks

@StuartMeeks StuartMeeks commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Lands the UI-free Snipdeck.Core (domain models, substitution engine, JSON store with atomic writes, settings, backup, first-run seed) with 63 unit tests
  • Adds repo-wide conventions: .editorconfig, Directory.Build.props (TreatWarningsAsErrors, Authors = Stuart Meeks, Company = Next Iteration), Central Package Management via Directory.Packages.props
  • Adds licence (Apache 2.0), README, CONTRIBUTING.md, Keep-a-Changelog CHANGELOG.md, CODEOWNERS, CI + tag-driven Velopack release workflows

What's in Snipdeck.Core

  • Models/: Cli, Snip, Parameter (Text / Choice), AppConfig, HotkeyBinding (values matching Win32 MOD_*), ThemePreference, CloseBehaviour, BackupInfo, versioned SnipStoreDocument
  • Engine/SubstitutionEngine — strict {placeholder} source-generated regex; JSON braces pass through; returns resolved text + unresolved tokens in first-appearance order for live preview
  • Abstractions/: ISnipStore, ISettingsStore, IBackupService, IClock
  • Services/: JsonSnipStore and JsonSettingsStore with temp-file-then-rename atomic writes + schema-version guards; BackupService with default retention 20 + collision-safe filenames; SystemClock; ExamplesSeed for the first-run "Examples" CLI

CLAUDE.md decisions baked in

  • Close behaviour: configurable, default hide-to-tray
  • Backups: on every write + before update, keep last 20
  • Default hotkey: Ctrl+Alt+S
  • First-run: single seeded "Examples" CLI

Test plan

  • dotnet build src/Snipdeck.Core clean, 0 warnings under TreatWarningsAsErrors
  • dotnet test tests/Snipdeck.Core.Tests — 63 passed, 0 failed in Release
  • Snipdeck.App builds on Windows (CI's app-build job on windows-latest)
  • Workflows lint cleanly (CI fires automatically on this PR)

🤖 Generated with Claude Code

StuartMeeks and others added 3 commits May 29, 2026 15:51
Lands the UI-free Core (domain, substitution engine, JSON store, settings,
backup, first-run seed) with 63 unit tests, plus the project-wide ground rules
that the rest of the build will follow.

Core (Snipdeck.Core, net10.0):
  - Models: Cli, Snip, Parameter (Text / Choice), AppConfig, HotkeyBinding
    (values matching Win32 MOD_*), ThemePreference, CloseBehaviour, BackupInfo,
    versioned SnipStoreDocument.
  - Engine: SubstitutionEngine with a strict {placeholder} regex (so JSON braces
    pass through), returning resolved text plus the unresolved-token list in
    first-appearance order for live previews.
  - Abstractions: ISnipStore, ISettingsStore, IBackupService, IClock.
  - Services: JsonSnipStore / JsonSettingsStore with temp-file-then-rename
    atomic writes and schema-version guards; BackupService with default
    retention 20 + collision-safe filenames + prune-by-pattern-only;
    SystemClock; ExamplesSeed for the first-run "Examples" CLI.

Repo conventions:
  - Apache 2.0 LICENSE.
  - README and Keep-a-Changelog CHANGELOG.
  - CONTRIBUTING.md covering prerequisites, the Core/App boundary discipline,
    package policy, brace rule, British English, the tag-driven release flow.
  - .editorconfig taken verbatim from
    StuartMeeks/NextIteration.SpectreConsole.SelfUpdate.
  - Directory.Build.props with Authors / Company / dynamic copyright, nullable,
    implicit usings, LangVersion=latest, TreatWarningsAsErrors=true,
    EnforceCodeStyleInBuild=true.
  - Directory.Packages.props for Central Package Management
    (ManagePackageVersionsCentrally + CentralPackageTransitivePinningEnabled).
  - GitHub Actions: ci.yml (Core on ubuntu, full solution on windows) and
    release.yml (tag-driven, stable vs pre-release detected from the tag,
    publishes Snipdeck.App and packs with Velopack).

CLAUDE.md updated with the four confirmed product decisions (configurable
hide-to-tray default, every-write backups keeping 20, default Ctrl+Alt+S
hotkey, single Examples CLI on first run) plus the latest-NuGet,
README/CHANGELOG-as-you-go, and Apache 2.0 conventions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* maps to Stuart so any change automatically requests his review under the
branch ruleset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
App.xaml.cs and MainWindow.xaml.cs shipped with the Visual Studio template's
cargo-culted using list (System / Windows / Microsoft.UI.Xaml in the wrong
group order, with most entries unused). Under TreatWarningsAsErrors this
trips IDE0005 (unused using) and IDE0055 (formatting / group ordering).

Reduce each file to the single using actually needed (Microsoft.UI.Xaml) and
drop the boilerplate comment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit e82fef3 into master May 29, 2026
2 checks passed
@StuartMeeks StuartMeeks deleted the phase-1-foundation branch May 29, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant