Skip to content

Commit 573a871

Browse files
authored
Merge pull request #1 from zooper-lib/feature/initial-implementation
Initial implementation
2 parents a10fd85 + 588b42f commit 573a871

71 files changed

Lines changed: 3350 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
description: Implement an approved OpenSpec change and keep tasks in sync.
3+
---
4+
5+
$ARGUMENTS
6+
<!-- OPENSPEC:START -->
7+
**Guardrails**
8+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
9+
- Keep changes tightly scoped to the requested outcome.
10+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
11+
12+
**Steps**
13+
Track these steps as TODOs and complete them one by one.
14+
1. Read `changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
15+
2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
16+
3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished.
17+
4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.
18+
5. Reference `openspec list` or `openspec show <item>` when additional context is required.
19+
20+
**Reference**
21+
- Use `openspec show <id> --json --deltas-only` if you need additional context from the proposal while implementing.
22+
<!-- OPENSPEC:END -->
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
description: Archive a deployed OpenSpec change and update specs.
3+
---
4+
5+
$ARGUMENTS
6+
<!-- OPENSPEC:START -->
7+
**Guardrails**
8+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
9+
- Keep changes tightly scoped to the requested outcome.
10+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
11+
12+
**Steps**
13+
1. Determine the change ID to archive:
14+
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.
15+
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.
16+
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.
17+
- If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.
18+
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.
19+
3. Run `openspec archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work).
20+
4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.
21+
5. Validate with `openspec validate --strict --no-interactive` and inspect with `openspec show <id>` if anything looks off.
22+
23+
**Reference**
24+
- Use `openspec list` to confirm change IDs before archiving.
25+
- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off.
26+
<!-- OPENSPEC:END -->
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
description: Scaffold a new OpenSpec change and validate strictly.
3+
---
4+
5+
$ARGUMENTS
6+
<!-- OPENSPEC:START -->
7+
**Guardrails**
8+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
9+
- Keep changes tightly scoped to the requested outcome.
10+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
11+
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
12+
- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and spec deltas). Implementation happens in the apply stage after approval.
13+
14+
**Steps**
15+
1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
16+
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `openspec/changes/<id>/`.
17+
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.
18+
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.
19+
5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.
20+
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.
21+
7. Validate with `openspec validate <id> --strict --no-interactive` and resolve every issue before sharing the proposal.
22+
23+
**Reference**
24+
- Use `openspec show <id> --json --deltas-only` or `openspec show <spec> --type spec` to inspect details when validation fails.
25+
- Search existing requirements with `rg -n "Requirement:|Scenario:" openspec/specs` before writing new ones.
26+
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.
27+
<!-- OPENSPEC:END -->

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- develop
8+
- main
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Dart
19+
uses: dart-lang/setup-dart@v1
20+
21+
- name: Install workspace deps
22+
run: dart pub get
23+
24+
- name: Bootstrap
25+
run: dart run melos bootstrap
26+
27+
- name: Format (check)
28+
run: dart format --output=none --set-exit-if-changed .
29+
30+
- name: Analyze
31+
run: dart run melos run analyze --no-select
32+
33+
- name: Test
34+
run: dart run melos run test --no-select

.github/workflows/publish.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*.*.*"
8+
9+
concurrency:
10+
group: publish-${{ github.ref }}
11+
cancel-in-progress: false
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Dart
24+
uses: dart-lang/setup-dart@v1
25+
26+
- name: Install workspace deps
27+
run: dart pub get
28+
29+
- name: Bootstrap
30+
run: dart run melos bootstrap
31+
32+
- name: Format (check)
33+
run: dart format --output=none --set-exit-if-changed .
34+
35+
- name: Analyze
36+
run: dart run melos run analyze --no-select
37+
38+
- name: Test
39+
run: dart run melos run test --no-select
40+
41+
- name: Configure pub.dev credentials
42+
env:
43+
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}
44+
run: |
45+
test -n "$PUB_CREDENTIALS"
46+
mkdir -p "$HOME/.config/dart"
47+
printf '%s' "$PUB_CREDENTIALS" > "$HOME/.config/dart/pub-credentials.json"
48+
49+
- name: Publish packages
50+
run: |
51+
# Publish in workspace dependency order (dependencies first).
52+
# melos publish is dry-run by default; we explicitly publish.
53+
dart run melos publish --no-private --no-dry-run --yes

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
.flutter-plugins-dependencies
30+
/build/
31+
/coverage/

.metadata

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "8b872868494e429d94fa06dca855c306438b22c0"
8+
channel: "stable"
9+
10+
project_type: package

AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- OPENSPEC:START -->
2+
# OpenSpec Instructions
3+
4+
These instructions are for AI assistants working in this project.
5+
6+
Always open `@/openspec/AGENTS.md` when the request:
7+
- Mentions planning or proposals (words like proposal, spec, change, plan)
8+
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
9+
- Sounds ambiguous and you need the authoritative spec before coding
10+
11+
Use `@/openspec/AGENTS.md` to learn:
12+
- How to create and apply change proposals
13+
- Spec format and conventions
14+
- Project structure and guidelines
15+
16+
Keep this managed block so 'openspec update' can refresh the instructions.
17+
18+
<!-- OPENSPEC:END -->

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Strongly-typed identity primitives (`Identity` interface, `TypedIdentity` class)
13+
- Value object support with structural equality (`ValueObject` mixin)
14+
- Entity mixin with identity-based equality
15+
- Aggregate root mixin with domain event collection
16+
- Domain event interface (`DomainEvent`)
17+
- Event collection methods on aggregates (record, retrieve, clear)
18+
- Pure Dart package with no infrastructure dependencies
19+

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# bounded workspace
2+
3+
This repository is a Melos-managed Dart workspace.
4+
5+
## Packages
6+
7+
- `packages/bounded`: The core Domain-Driven Design (DDD) common kernel package (published as `bounded`).
8+
- `packages/bounded_lints`: Custom analyzer lints for DDD/domain design principles (published as `bounded_lints`).
9+
10+
## Development
11+
12+
From the repository root:
13+
14+
- Bootstrap: `dart run melos bootstrap`
15+
- Test all packages: `dart run melos run test`
16+
- Analyze all packages: `dart run melos run analyze`
17+
18+
For usage instructions, see each package's README.
19+

0 commit comments

Comments
 (0)