Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5d60318
LED-122 docs: define terminal tombstone states
gorushkin Jul 27, 2026
fba7d61
LED-122 docs: update status to accepted and refine lifecycle terminology
gorushkin Jul 27, 2026
80668da
Merge pull request #260 from gorushkin:LED-122-terminal-tombstone-states
gorushkin Jul 27, 2026
823f5d9
LED-124 feat(accounts): implement close, reopen, and terminal delete
gorushkin Jul 31, 2026
8be15fe
LED-124 feat(accounts): add preventing updating closed accounts
gorushkin Jul 31, 2026
9e51b3c
LED-124 fix(transaction-service): prevent loading closed accounts
gorushkin Jul 31, 2026
1397dcb
LED-124 docs(accounts): update lifecycle documentation
gorushkin Jul 31, 2026
c6d2c4d
LED-124 feat(accounts): add lifecycle endpoints
gorushkin Jul 31, 2026
185ec3b
LED-124 fix(accounts): align closed account update rules
gorushkin Jul 31, 2026
3580ec6
LED-124 fix(accounts): address lifecycle review feedback
gorushkin Jul 31, 2026
8a30d5c
LED-124 fix(accounts): use public imports and refresh migration baseline
gorushkin Jul 31, 2026
4e38bc7
LED-124 fix(accounts): check account before delete policy
gorushkin Jul 31, 2026
f9128bf
Merge pull request #261 from gorushkin:LED-124-account-close-reopen-t…
gorushkin Jul 31, 2026
bb263e1
LED-123 feat(lifecycle): add entity lifecycle state fields
gorushkin Aug 4, 2026
fc1612d
LED-125 refactor: update account and commodity lifecycle management
gorushkin Aug 5, 2026
76e42d4
LED-125 Refactor commodity lifecycle actions and repository methods
gorushkin Aug 5, 2026
0fccd7b
LED-125 test(commodities): clarify deleted commodity wording
gorushkin Aug 5, 2026
df89cab
LED-125 refactor(commodities): rename delete use case binding
gorushkin Aug 5, 2026
f30c825
LED-125 feat(commodities): add lifecycle use cases
gorushkin Aug 5, 2026
603b9f2
LED-125 refactor(commodities): wire lifecycle use cases
gorushkin Aug 5, 2026
e0ae5d4
LED-125 feat(commodities): add lifecycle routes
gorushkin Aug 5, 2026
a0f7280
LED-125 test(commodities): cover lifecycle routes
gorushkin Aug 5, 2026
b7affea
LED-125 feat(accounts): reject closed commodity references
gorushkin Aug 5, 2026
243124b
LED-125 feat(accounts, commodities): add foreign key constraints and …
gorushkin Aug 5, 2026
05a0c40
LED-125 refactor(accounts): rename archivedAccounts to closedAccounts…
gorushkin Aug 5, 2026
f245bcc
LED-125 fix(commodities): load lifecycle snapshots
gorushkin Aug 5, 2026
c8e742d
LED-125 fix(commodities): align lifecycle contracts
gorushkin Aug 5, 2026
2781caa
LED-125 feat(commodities): implement active references check for comm…
gorushkin Aug 5, 2026
b15d5d0
LED-125 feat(commodities): enhance delete commodity use case to handl…
gorushkin Aug 5, 2026
366b125
Merge pull request #262 from gorushkin:LED-125-commodity-lifecycle-ac…
gorushkin Aug 5, 2026
2a4ee8e
LED-130 feat(accounts): make account terminal delete idempotent using…
gorushkin Aug 5, 2026
b9a80b8
LED-130 feat(accounts): enhance delete account use case for idempoten…
gorushkin Aug 5, 2026
0350bc0
Merge pull request #263 from gorushkin:LED-130-make-account-terminal-…
gorushkin Aug 5, 2026
b92a4cd
LED-123 feat(operations): add tests for existsActiveByAccountId metho…
gorushkin Aug 6, 2026
5b6f726
LED-123 fix(types): correct import path for validation in commodity t…
gorushkin Aug 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .agents/skills/ledgerly-commit-message/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
name: ledgerly-commit-message
description: Create and validate Ledgerly commit messages. Use when committing Ledgerly changes, drafting commit messages, checking commit message format, or extracting the Jira ticket key from the current branch.
---

# Ledgerly Commit Message

Use this skill whenever the user asks to commit changes, draft a commit message,
or validate a commit message in the Ledgerly repository.

## Required Format

Commit messages must follow:

```text
LED-XXXXX type(scope): subject
```

Where:

- `LED-XXXXX` is the Jira ticket key extracted from the current branch name.
- `type` is one of: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`,
`build`, `ci`, `chore`, `revert`.
- `scope` is optional and must be concise kebab-case or a short module name,
such as `fullscreen`, `mobile`, or `platform-core`.
- `subject` must be imperative mood, lowercase, and must not end with a period.

Valid examples:

```text
LED-12345 fix(platform-core): handle empty ledger state
LED-12345 test: cover transaction context loading
```

Invalid examples:

```text
fix: handle empty ledger state
LED-12345 fixed(platform-core): handled empty ledger state.
LED-12345 feature: Add platform core loading
```

## Ticket Extraction

Before creating a commit, get the current branch:

```sh
git branch --show-current
```

Extract the first `LED-<digits>` key from a branch matching:

```text
LED-XXXXX-description
```

Use a practical regex:

```text
\bLED-[0-9]+\b
```

If the branch does not contain a `LED-<digits>` key, stop and ask the user for
the ticket key before committing.

## Drafting Rules

1. Choose the narrowest accurate `type`.
2. Add a scope only when it clarifies the changed area.
3. Keep the subject short, specific, lowercase, imperative, and without a final
period.
4. Prefer concrete verbs: `add`, `fix`, `move`, `rename`, `remove`, `update`,
`cover`, `document`, `refactor`.
5. Do not invent a Jira ticket key. Use the branch key or ask the user.

## Commit Workflow

When the user asks to commit:

1. Inspect `git status --short`.
2. Confirm the staged or intended files match the requested work.
3. Extract the Jira ticket key from the current branch.
4. Draft a valid commit message from the actual diff.
5. Run `git commit -m "<message>"`.

If unrelated user changes are present, do not stage or modify them unless the
user explicitly asks.
4 changes: 4 additions & 0 deletions .agents/skills/ledgerly-commit-message/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Ledgerly Commit Message"
short_description: "Format Ledgerly commits from branch tickets"
default_prompt: "Use $ledgerly-commit-message to create a valid Ledgerly commit message from the current branch."
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ data/sqlite.db

# TypeScript build info
tsconfig.tsbuildinfo


coverage
8 changes: 1 addition & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
{
"github.copilot.chat.commitMessageGeneration.instructions": [
{
"text": "Commit message must follow the format: 'LED-XXXXX type(scope): subject'. Extract the ticket number from the current branch name (pattern: LED-XXXXX-description). Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert. Scope is optional (e.g. fullscreen, mobile, platform-core). Subject must be in imperative mood, lowercase, no period at the end."
}
]
}
{}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CREATE TABLE `accounts` (
`description` text NOT NULL,
`id` text PRIMARY KEY NOT NULL,
`initial_balance` text NOT NULL,
`is_closed` integer NOT NULL,
`is_system` integer NOT NULL,
`is_tombstone` integer NOT NULL,
`name` text NOT NULL,
Expand Down
1 change: 1 addition & 0 deletions apps/backend/drizzle/0001_adorable_star_brand.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `commodities` ADD `is_closed` integer NOT NULL;
26 changes: 26 additions & 0 deletions apps/backend/drizzle/0002_numerous_alice.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CREATE UNIQUE INDEX `commodities_user_id_id_unique_idx` ON `commodities` (`user_id`,`id`);--> statement-breakpoint
PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_accounts` (
`commodity_id` text NOT NULL,
`created_at` text NOT NULL,
`current_cleared_balance_local` text NOT NULL,
`description` text NOT NULL,
`id` text PRIMARY KEY NOT NULL,
`initial_balance` text NOT NULL,
`is_closed` integer NOT NULL,
`is_system` integer NOT NULL,
`is_tombstone` integer NOT NULL,
`name` text NOT NULL,
`type` text NOT NULL,
`updated_at` text NOT NULL,
`user_id` text NOT NULL,
FOREIGN KEY (`commodity_id`) REFERENCES `commodities`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`user_id`,`commodity_id`) REFERENCES `commodities`(`user_id`,`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
INSERT INTO `__new_accounts`("commodity_id", "created_at", "current_cleared_balance_local", "description", "id", "initial_balance", "is_closed", "is_system", "is_tombstone", "name", "type", "updated_at", "user_id") SELECT "commodity_id", "created_at", "current_cleared_balance_local", "description", "id", "initial_balance", "is_closed", "is_system", "is_tombstone", "name", "type", "updated_at", "user_id" FROM `accounts`;--> statement-breakpoint
DROP TABLE `accounts`;--> statement-breakpoint
ALTER TABLE `__new_accounts` RENAME TO `accounts`;--> statement-breakpoint
PRAGMA foreign_keys=ON;--> statement-breakpoint
CREATE UNIQUE INDEX `user_id_name_unique_idx` ON `accounts` (`user_id`,`name`);
24 changes: 24 additions & 0 deletions apps/backend/drizzle/0003_bored_daredevil.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_accounts` (
`commodity_id` text NOT NULL,
`created_at` text NOT NULL,
`current_cleared_balance_local` text NOT NULL,
`description` text NOT NULL,
`id` text PRIMARY KEY NOT NULL,
`initial_balance` text NOT NULL,
`is_closed` integer NOT NULL,
`is_system` integer NOT NULL,
`is_tombstone` integer NOT NULL,
`name` text NOT NULL,
`type` text NOT NULL,
`updated_at` text NOT NULL,
`user_id` text NOT NULL,
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`user_id`,`commodity_id`) REFERENCES `commodities`(`user_id`,`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
INSERT INTO `__new_accounts`("commodity_id", "created_at", "current_cleared_balance_local", "description", "id", "initial_balance", "is_closed", "is_system", "is_tombstone", "name", "type", "updated_at", "user_id") SELECT "commodity_id", "created_at", "current_cleared_balance_local", "description", "id", "initial_balance", "is_closed", "is_system", "is_tombstone", "name", "type", "updated_at", "user_id" FROM `accounts`;--> statement-breakpoint
DROP TABLE `accounts`;--> statement-breakpoint
ALTER TABLE `__new_accounts` RENAME TO `accounts`;--> statement-breakpoint
PRAGMA foreign_keys=ON;--> statement-breakpoint
CREATE UNIQUE INDEX `user_id_name_unique_idx` ON `accounts` (`user_id`,`name`);
9 changes: 8 additions & 1 deletion apps/backend/drizzle/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "6",
"dialect": "sqlite",
"id": "59edadf8-a69b-4dbb-a24a-828a220d6559",
"id": "72b37ad6-4dd9-43c4-8017-7b838aee4e7b",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"accounts": {
Expand Down Expand Up @@ -49,6 +49,13 @@
"notNull": true,
"autoincrement": false
},
"is_closed": {
"name": "is_closed",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"is_system": {
"name": "is_system",
"type": "integer",
Expand Down
Loading
Loading