Skip to content

Commit b4f6471

Browse files
committed
Merge branch 'release/v1.0.0' into main
2 parents a10fd85 + 07bf589 commit b4f6471

70 files changed

Lines changed: 3331 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 -->

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+

analysis_options.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
include: package:lints/recommended.yaml
2+
3+
formatter:
4+
# Keep trailing commas.
5+
trailing_commas: preserve
6+
7+
# Set the maximum line length.
8+
page_width: 160
9+
10+
# Customize additional linter rules.
11+
linter:
12+
# Specify rules to be enabled or disabled.
13+
rules:
14+
# **Style Rules**
15+
# Enforce using const constructors where possible.
16+
prefer_const_constructors: true
17+
prefer_const_literals_to_create_immutables: true
18+
19+
# Prefer single quotes over double quotes where possible.
20+
prefer_single_quotes: true
21+
22+
# Enforce a consistent type definition for variables.
23+
always_specify_types: false
24+
25+
# **Best Practices**
26+
# Avoid using dynamic types.
27+
avoid_dynamic_calls: true
28+
29+
# Avoid using print statements in production code.
30+
avoid_print: true
31+
32+
# Prefer using the `final` keyword for variables that are not reassigned.
33+
prefer_final_fields: true
34+
prefer_final_locals: true
35+
36+
# **Error Prevention**
37+
38+
# Enforce non-nullable types where possible.
39+
always_require_non_null_named_parameters: true
40+
41+
# **Documentation**
42+
# Require documentation for public members.
43+
public_member_api_docs: false
44+
45+
# **Other Useful Rules**
46+
# Enforce sorting of directives (e.g., imports).
47+
directives_ordering: true
48+
49+
# Prefer using `isEmpty` and `isNotEmpty` over `length` comparisons.
50+
prefer_is_empty: true
51+
prefer_is_not_empty: true
52+
53+
# **Disable Rules (if necessary)**
54+
# Uncomment the following lines to disable specific lints.
55+
# avoid_unused_constructor_parameters: false
56+
# unnecessary_null_in_if_null_operators: false
57+
58+
# Analyzer settings.
59+
analyzer:
60+
# Exclude certain files or directories from analysis.
61+
exclude:
62+
- "**/*.g.dart"
63+
- "**/build/**"
64+
- "**/generated/**"
65+
- "**/mocks/**"
66+
- "**/*.freezed.dart/**"
67+
68+
# Language-specific analyzer strictness options.
69+
language:
70+
strict-casts: false
71+
strict-inference: false
72+
strict-raw-types: false
73+
74+
strong-mode:
75+
implicit-casts: false
76+
implicit-dynamic: false

0 commit comments

Comments
 (0)