@vanshbhardwaj/worklog 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +19 -0
- package/.github/workflows/release.yml +63 -0
- package/.github/workflows/validate.yml +103 -0
- package/.prettierrc +8 -0
- package/ARCHITECTURE.md +82 -0
- package/CODE_OF_CONDUCT.md +65 -0
- package/CONTRIBUTING.md +74 -0
- package/INSTALLATION.md +98 -0
- package/LICENSE +21 -0
- package/README.md +246 -0
- package/SECURITY.md +18 -0
- package/benchmarks/benchmark.ts +149 -0
- package/benchmarks/vitest.bench.config.ts +9 -0
- package/dist/database/migrations/001_initial.sql +60 -0
- package/dist/database/migrations/002_relational_tables.sql +22 -0
- package/dist/index.cjs +31007 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1873 -0
- package/dist/index.js.map +1 -0
- package/eslint.config.js +38 -0
- package/package.json +49 -0
- package/pnpm-workspace.yaml +6 -0
- package/scripts/build-bin.js +75 -0
- package/sea-config.json +5 -0
- package/src/cli/commands/add.ts +176 -0
- package/src/cli/commands/continue.ts +80 -0
- package/src/cli/commands/dashboard.ts +30 -0
- package/src/cli/commands/export.ts +72 -0
- package/src/cli/commands/init.ts +52 -0
- package/src/cli/commands/list.ts +33 -0
- package/src/cli/commands/search.ts +33 -0
- package/src/cli/commands/show.ts +42 -0
- package/src/cli/commands/stats.ts +23 -0
- package/src/cli/commands/today.ts +27 -0
- package/src/cli/commands/week.ts +93 -0
- package/src/cli/index.ts +294 -0
- package/src/cli/ui.ts +323 -0
- package/src/core/config.ts +69 -0
- package/src/core/discovery.ts +38 -0
- package/src/core/logger.ts +53 -0
- package/src/database/connection.ts +95 -0
- package/src/database/migration-data.ts +71 -0
- package/src/database/migrations/001_initial.sql +60 -0
- package/src/database/migrations/002_relational_tables.sql +22 -0
- package/src/database/migrations.ts +65 -0
- package/src/errors/index.ts +51 -0
- package/src/exporters/csv.ts +59 -0
- package/src/exporters/json.ts +8 -0
- package/src/exporters/markdown.ts +71 -0
- package/src/models/work-unit.ts +38 -0
- package/src/repositories/work-unit.ts +466 -0
- package/src/services/work-unit.ts +131 -0
- package/src/tests/cli/__snapshots__/cli-productivity.test.ts.snap +37 -0
- package/src/tests/cli/__snapshots__/cli.test.ts.snap +20 -0
- package/src/tests/cli/cli-productivity.test.ts +167 -0
- package/src/tests/cli/cli.test.ts +171 -0
- package/src/tests/core/config.test.ts +53 -0
- package/src/tests/core/discovery.test.ts +46 -0
- package/src/tests/database/migrations.test.ts +75 -0
- package/src/tests/repositories/work-unit.test.ts +243 -0
- package/src/tests/services/work-unit.test.ts +87 -0
- package/src/validators/work-unit.ts +63 -0
- package/tsconfig.json +16 -0
- package/tsup.config.ts +50 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Create a report to help us improve.
|
|
4
|
+
title: 'bug: '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the Bug**
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**To Reproduce**
|
|
13
|
+
Steps to reproduce the behavior:
|
|
14
|
+
1. Initialize repository with `worklog init`
|
|
15
|
+
2. Run command `worklog add ...`
|
|
16
|
+
3. Run command `...`
|
|
17
|
+
4. See error
|
|
18
|
+
|
|
19
|
+
**Expected Behavior**
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
**Desktop/Environment Details:**
|
|
23
|
+
- OS: (e.g. macOS, Windows, Linux)
|
|
24
|
+
- Node.js Version: (e.g. 20.10.0)
|
|
25
|
+
- WorkLog Version: (e.g. 0.1.0)
|
|
26
|
+
|
|
27
|
+
**Additional Context**
|
|
28
|
+
Add any other context, CLI stdout prints, or log contents from `.worklog/worklog.log` here.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest an idea for this project.
|
|
4
|
+
title: 'feat: '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your feature request related to a problem? Please describe.**
|
|
10
|
+
A clear and concise description of what the problem is. (e.g. "I'm frustrated when...")
|
|
11
|
+
|
|
12
|
+
**Describe the Solution You'd Like**
|
|
13
|
+
A clear and concise description of what you want to happen.
|
|
14
|
+
|
|
15
|
+
**Describe Alternatives You've Considered**
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
**Additional Context**
|
|
19
|
+
Add any other context, mockup screenshots, or console output outlines here.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
Describe your changes and the motivation/rationale behind them.
|
|
3
|
+
|
|
4
|
+
## Related Issues
|
|
5
|
+
Closes # (issue number)
|
|
6
|
+
|
|
7
|
+
## Type of Change
|
|
8
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
9
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
10
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
11
|
+
- [ ] Documentation update
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
- [ ] My code follows the style guidelines of this project
|
|
15
|
+
- [ ] I have performed a self-review of my own code
|
|
16
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
17
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
18
|
+
- [ ] All new and existing tests pass cleanly
|
|
19
|
+
- [ ] Linter check passes cleanly
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Compile & Release Binaries
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
name: Build Native Executable on ${{ matrix.os }}
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
18
|
+
include:
|
|
19
|
+
- os: ubuntu-latest
|
|
20
|
+
artifact_name: worklog-linux
|
|
21
|
+
- os: macos-latest
|
|
22
|
+
artifact_name: worklog-macos
|
|
23
|
+
- os: windows-latest
|
|
24
|
+
artifact_name: worklog-win.exe
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout Code
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Setup Node.js
|
|
31
|
+
uses: actions/setup-node@v4
|
|
32
|
+
with:
|
|
33
|
+
node-version: 20
|
|
34
|
+
|
|
35
|
+
- name: Setup pnpm
|
|
36
|
+
uses: pnpm/action-setup@v3
|
|
37
|
+
with:
|
|
38
|
+
version: 11
|
|
39
|
+
|
|
40
|
+
- name: Install Dependencies
|
|
41
|
+
run: pnpm install --frozen-lockfile
|
|
42
|
+
|
|
43
|
+
- name: Compile ESM Script
|
|
44
|
+
run: pnpm build
|
|
45
|
+
|
|
46
|
+
- name: Compile Single Executable Binary
|
|
47
|
+
run: pnpm pkg:bin
|
|
48
|
+
|
|
49
|
+
- name: Rename Executable (Unix)
|
|
50
|
+
if: matrix.os != 'windows-latest'
|
|
51
|
+
run: mv bin/worklog bin/${{ matrix.artifact_name }}
|
|
52
|
+
|
|
53
|
+
- name: Rename Executable (Windows)
|
|
54
|
+
if: matrix.os == 'windows-latest'
|
|
55
|
+
run: Rename-Item bin/worklog.exe ${{ matrix.artifact_name }}
|
|
56
|
+
|
|
57
|
+
- name: Upload Binary Artifact to GitHub Release
|
|
58
|
+
uses: softprops/action-gh-release@v2
|
|
59
|
+
with:
|
|
60
|
+
files: bin/${{ matrix.artifact_name }}
|
|
61
|
+
draft: false
|
|
62
|
+
prerelease: false
|
|
63
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
name: Validate Project
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
name: Lint & Format Check
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout Code
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup Node.js
|
|
18
|
+
uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: 20
|
|
21
|
+
|
|
22
|
+
- name: Setup pnpm
|
|
23
|
+
uses: pnpm/action-setup@v3
|
|
24
|
+
with:
|
|
25
|
+
version: 11
|
|
26
|
+
|
|
27
|
+
- name: Install Dependencies
|
|
28
|
+
run: pnpm install --frozen-lockfile
|
|
29
|
+
|
|
30
|
+
- name: Run Prettier Formatter Check
|
|
31
|
+
run: pnpm exec prettier --check "src/**/*.ts"
|
|
32
|
+
|
|
33
|
+
- name: Run ESLint Checks
|
|
34
|
+
run: pnpm lint
|
|
35
|
+
|
|
36
|
+
typecheck:
|
|
37
|
+
name: TypeScript Compilation Check
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- name: Checkout Code
|
|
41
|
+
uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Setup Node.js
|
|
44
|
+
uses: actions/setup-node@v4
|
|
45
|
+
with:
|
|
46
|
+
node-version: 20
|
|
47
|
+
|
|
48
|
+
- name: Setup pnpm
|
|
49
|
+
uses: pnpm/action-setup@v3
|
|
50
|
+
with:
|
|
51
|
+
version: 11
|
|
52
|
+
|
|
53
|
+
- name: Install Dependencies
|
|
54
|
+
run: pnpm install --frozen-lockfile
|
|
55
|
+
|
|
56
|
+
- name: Run Compiler Check
|
|
57
|
+
run: pnpm exec tsc --noEmit
|
|
58
|
+
|
|
59
|
+
tests:
|
|
60
|
+
name: Execute Automated Tests
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
steps:
|
|
63
|
+
- name: Checkout Code
|
|
64
|
+
uses: actions/checkout@v4
|
|
65
|
+
|
|
66
|
+
- name: Setup Node.js
|
|
67
|
+
uses: actions/setup-node@v4
|
|
68
|
+
with:
|
|
69
|
+
node-version: 20
|
|
70
|
+
|
|
71
|
+
- name: Setup pnpm
|
|
72
|
+
uses: pnpm/action-setup@v3
|
|
73
|
+
with:
|
|
74
|
+
version: 11
|
|
75
|
+
|
|
76
|
+
- name: Install Dependencies
|
|
77
|
+
run: pnpm install --frozen-lockfile
|
|
78
|
+
|
|
79
|
+
- name: Run Test Suite
|
|
80
|
+
run: pnpm test
|
|
81
|
+
|
|
82
|
+
build:
|
|
83
|
+
name: Verify ESM Build Compilation
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
steps:
|
|
86
|
+
- name: Checkout Code
|
|
87
|
+
uses: actions/checkout@v4
|
|
88
|
+
|
|
89
|
+
- name: Setup Node.js
|
|
90
|
+
uses: actions/setup-node@v4
|
|
91
|
+
with:
|
|
92
|
+
node-version: 20
|
|
93
|
+
|
|
94
|
+
- name: Setup pnpm
|
|
95
|
+
uses: pnpm/action-setup@v3
|
|
96
|
+
with:
|
|
97
|
+
version: 11
|
|
98
|
+
|
|
99
|
+
- name: Install Dependencies
|
|
100
|
+
run: pnpm install --frozen-lockfile
|
|
101
|
+
|
|
102
|
+
- name: Compile ESM Script
|
|
103
|
+
run: pnpm build
|
package/.prettierrc
ADDED
package/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Architecture Guide
|
|
2
|
+
|
|
3
|
+
WorkLog is designed as a **local-first, offline-first command line application** compiled into a single executable binary using **Node.js SEA (Single Executable Applications)**. It is built to run instantly, utilizing SQLite as its storage engine.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Folder Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
src/
|
|
11
|
+
cli/
|
|
12
|
+
commands/ <-- CLI command actions (init, add, list, show, etc.)
|
|
13
|
+
index.ts <-- Commander entry point, CLI bootstrap & error boundaries
|
|
14
|
+
ui.ts <-- Output rendering (git-like tables & cards formatting)
|
|
15
|
+
core/
|
|
16
|
+
config.ts <-- Zod-validated config manager (.worklog/config.json)
|
|
17
|
+
discovery.ts <-- Parent traversal workspace discovery
|
|
18
|
+
logger.ts <-- Pino logger writing to .worklog/worklog.log
|
|
19
|
+
database/
|
|
20
|
+
migrations/ <-- raw SQL incremental migrations (001, 002)
|
|
21
|
+
connection.ts <-- optimize SQLite PRAGMAs (WAL, NORMAL, foreign keys)
|
|
22
|
+
migrations.ts <-- transaction-safe SQL migrations runner
|
|
23
|
+
exporters/
|
|
24
|
+
markdown.ts <-- Markdown serializer
|
|
25
|
+
csv.ts <-- CSV serializer
|
|
26
|
+
json.ts <-- JSON serializer
|
|
27
|
+
models/
|
|
28
|
+
work-unit.ts <-- pure TypeScript domain model definitions
|
|
29
|
+
repositories/
|
|
30
|
+
work-unit.ts <-- raw SQL query statements & DB-to-Domain mapping
|
|
31
|
+
services/
|
|
32
|
+
work-unit.ts <-- Zod input validator & service boundary orchestration
|
|
33
|
+
errors/
|
|
34
|
+
index.ts <-- custom domain exceptions
|
|
35
|
+
benchmarks/
|
|
36
|
+
benchmark.ts <-- performance testing suite
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Architectural Layers
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
CLI Layer (index.ts / commands)
|
|
45
|
+
│
|
|
46
|
+
▼
|
|
47
|
+
Service Boundary Layer (validators / orchestrations)
|
|
48
|
+
│
|
|
49
|
+
▼
|
|
50
|
+
Repository Layer (SQL queries / relational maps)
|
|
51
|
+
│
|
|
52
|
+
▼
|
|
53
|
+
SQLite Database (WAL journal mode / FTS5 index)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 1. CLI Layer (`src/cli/`)
|
|
57
|
+
- Validates terminal flag bounds.
|
|
58
|
+
- Intercepts input streams and routes arguments to Commander.
|
|
59
|
+
- Renders minimal, git-like terminal interfaces.
|
|
60
|
+
|
|
61
|
+
### 2. Service Layer (`src/services/`)
|
|
62
|
+
- Forms the core validation boundary of the application.
|
|
63
|
+
- Uses Zod schemas (`src/validators/`) to audit incoming commands.
|
|
64
|
+
- Coordinates database transaction bounds and injects auditing markers (e.g. `createdAt`/`updatedAt` timestamps).
|
|
65
|
+
|
|
66
|
+
### 3. Repository Layer (`src/repositories/`)
|
|
67
|
+
- Contains database query statements.
|
|
68
|
+
- Resolves SQLite relational schemas (joining tags from `work_unit_tags` and relations from `work_unit_relations`) and maps them back into unified TypeScript domain models.
|
|
69
|
+
|
|
70
|
+
### 4. Database Layer (`src/database/`)
|
|
71
|
+
- Configured to use a single connection lifecycle per CLI command execution.
|
|
72
|
+
- Enables WAL (Write-Ahead Logging) mode and Normal synchronous settings to guarantee sub-10ms query execution times.
|
|
73
|
+
- Auto-runs outstanding incremental schema migrations transaction-safely using `PRAGMA user_version` and a `schema_migrations` log table.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Search Indexing Framework (FTS5)
|
|
78
|
+
|
|
79
|
+
WorkLog uses SQLite's built-in **FTS5 Full Text Search** module.
|
|
80
|
+
|
|
81
|
+
During initialization (`001_initial.sql`), a virtual index table `work_units_fts` is declared to track columns (`title`, `description`, `decision`, `blocker`, `notes`) from the main `work_units` table. Three database triggers (`work_units_ai`, `work_units_ad`, `work_units_au`) automatically intercept inserts, deletes, and updates on the main table, keeping the FTS5 search index in sync.
|
|
82
|
+
If FTS MATCH query syntax errors occur (e.g. invalid characters), searches fall back automatically to case-insensitive `LIKE` patterns.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully receiving constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best for the overall community, and the common good of
|
|
26
|
+
the community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and unwelcome sexual attention or
|
|
31
|
+
advances
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior they deem inappropriate, threatening, offensive, or
|
|
44
|
+
harmful.
|
|
45
|
+
|
|
46
|
+
## Enforcement Guidelines
|
|
47
|
+
|
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
49
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
50
|
+
|
|
51
|
+
### 1. Correction
|
|
52
|
+
**Community Impact:** A private, written warning, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate.
|
|
53
|
+
**Consequence:** A warning and request to modify behavior.
|
|
54
|
+
|
|
55
|
+
### 2. Warning
|
|
56
|
+
**Community Impact:** A warning with more detailed consequences if behavior is not modified.
|
|
57
|
+
**Consequence:** A warning with potential temporary suspension from community interactions.
|
|
58
|
+
|
|
59
|
+
### 3. Temporary Ban
|
|
60
|
+
**Community Impact:** A temporary ban from any sort of interaction or public communication with the community.
|
|
61
|
+
**Consequence:** A temporary ban for a specified period.
|
|
62
|
+
|
|
63
|
+
### 4. Permanent Ban
|
|
64
|
+
**Community Impact:** A permanent ban from any public interaction within the project community.
|
|
65
|
+
**Consequence:** A permanent ban.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributing to WorkLog
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to WorkLog! We welcome your help to make this engineering context manager better.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Code of Conduct
|
|
8
|
+
|
|
9
|
+
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## How Can I Contribute?
|
|
14
|
+
|
|
15
|
+
### 1. Reporting Bugs
|
|
16
|
+
- Search existing issues before creating a new one.
|
|
17
|
+
- Use the **Bug Report** template to provide detailed steps to reproduce, expected vs actual behaviour, and system details.
|
|
18
|
+
|
|
19
|
+
### 2. Suggesting Features
|
|
20
|
+
- Open an issue using the **Feature Request** template to describe the problem and proposed solution.
|
|
21
|
+
|
|
22
|
+
### 3. Submitting Pull Requests
|
|
23
|
+
- Keep changes focused and incremental.
|
|
24
|
+
- Adhere to the design philosophy: **KISS, YAGNI, Local-first**.
|
|
25
|
+
- Ensure all tests pass, and linter checks run cleanly before submitting.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Local Development Setup
|
|
30
|
+
|
|
31
|
+
Ensure you have **Node.js (v20+)** and **pnpm** installed.
|
|
32
|
+
|
|
33
|
+
1. Clone the repository and install dependencies:
|
|
34
|
+
```bash
|
|
35
|
+
pnpm install
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Format source files using Prettier:
|
|
39
|
+
```bash
|
|
40
|
+
pnpm format
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. Run linting checks using ESLint:
|
|
44
|
+
```bash
|
|
45
|
+
pnpm lint
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
4. Run strict TypeScript compiler verification:
|
|
49
|
+
```bash
|
|
50
|
+
pnpm exec tsc --noEmit
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
5. Run the automated test suite:
|
|
54
|
+
```bash
|
|
55
|
+
pnpm test
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
6. Compile the code:
|
|
59
|
+
```bash
|
|
60
|
+
pnpm build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
7. Run local performance benchmarks:
|
|
64
|
+
```bash
|
|
65
|
+
pnpm benchmark
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Pull Request Guidelines
|
|
71
|
+
|
|
72
|
+
- Give your PR a clear, descriptive title.
|
|
73
|
+
- Link any related issues in the PR description.
|
|
74
|
+
- Ensure the CI validation pipeline passes completely.
|
package/INSTALLATION.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Installation Guide
|
|
2
|
+
|
|
3
|
+
WorkLog v0.1.0 releases pre-compiled native binaries that do not require Node.js or any external runtimes to execute.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Native Binary Download
|
|
8
|
+
You can download the compiled executables for your platform directly from the GitHub Releases tab:
|
|
9
|
+
- **macOS:** `worklog-macos`
|
|
10
|
+
- **Linux:** `worklog-linux`
|
|
11
|
+
- **Windows:** `worklog-win.exe`
|
|
12
|
+
|
|
13
|
+
After downloading, rename the binary to `worklog` (or `worklog.exe` on Windows) and add it to your system `PATH`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Packaging Layout (For Future Distribution)
|
|
18
|
+
|
|
19
|
+
To prepare for automated package managers as user counts scale, the following directory outlines will package our compiled binaries:
|
|
20
|
+
|
|
21
|
+
### 1. Homebrew (macOS / Linux)
|
|
22
|
+
A Homebrew Formula (`worklog.rb`) will download the compiled macOS/Linux release tarball, install the binary, and symlink it to `bin/worklog`:
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
class Worklog < Formula
|
|
26
|
+
desc "Engineering Context Manager"
|
|
27
|
+
homepage "https://github.com/vansh/worklog"
|
|
28
|
+
url "https://github.com/vansh/worklog/releases/download/v0.1.0/worklog-macos"
|
|
29
|
+
sha256 "PROD_RELEASE_SHA256_HERE"
|
|
30
|
+
version "0.1.0"
|
|
31
|
+
|
|
32
|
+
def install
|
|
33
|
+
bin.install "worklog-macos" => "worklog"
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
test do
|
|
37
|
+
assert_match "worklog", shell_output("#{bin}/worklog --version")
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 2. Winget (Windows)
|
|
43
|
+
A YAML manifest file submitted to `microsoft/winget-pkgs` will reference the executable URL directly:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
# yaml-language-server: $schema=https://github.com/microsoft/winget-cli/releases/latest/download/manifest.schema.1.1.0.json
|
|
47
|
+
PackageIdentifier: Vansh.WorkLog
|
|
48
|
+
PackageName: WorkLog
|
|
49
|
+
PackageVersion: 0.1.0
|
|
50
|
+
Publisher: Vansh
|
|
51
|
+
Author: Vansh
|
|
52
|
+
License: MIT
|
|
53
|
+
ShortDescription: Engineering Context Manager
|
|
54
|
+
Installers:
|
|
55
|
+
- Architecture: x64
|
|
56
|
+
InstallerType: portable
|
|
57
|
+
InstallerUrl: https://github.com/vansh/worklog/releases/download/v0.1.0/worklog-win.exe
|
|
58
|
+
InstallerSha256: WINDOWS_RELEASE_SHA256_HERE
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 3. Scoop (Windows portable)
|
|
62
|
+
A JSON manifest submitted to Scoop's bucket will download and symlink the portable windows binary:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"version": "0.1.0",
|
|
67
|
+
"description": "Engineering Context Manager",
|
|
68
|
+
"homepage": "https://github.com/vansh/worklog",
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"url": "https://github.com/vansh/worklog/releases/download/v0.1.0/worklog-win.exe#/worklog.exe",
|
|
71
|
+
"hash": "WINDOWS_RELEASE_SHA256_HERE",
|
|
72
|
+
"bin": "worklog.exe"
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 4. Chocolatey (Windows)
|
|
77
|
+
A Chocolatey package structure (`.nuspec` and installation PowerShell script) will wrap the executable installation:
|
|
78
|
+
|
|
79
|
+
**`worklog.nuspec`:**
|
|
80
|
+
```xml
|
|
81
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
82
|
+
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
|
|
83
|
+
<metadata>
|
|
84
|
+
<id>worklog</id>
|
|
85
|
+
<version>0.1.0</version>
|
|
86
|
+
<title>WorkLog</title>
|
|
87
|
+
<authors>Vansh</authors>
|
|
88
|
+
<projectUrl>https://github.com/vansh/worklog</projectUrl>
|
|
89
|
+
<licenseUrl>https://github.com/vansh/worklog/blob/main/LICENSE</licenseUrl>
|
|
90
|
+
<description>Engineering Context Manager - Local context tracker</description>
|
|
91
|
+
</metadata>
|
|
92
|
+
</package>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Returning to main guide
|
|
98
|
+
Refer back to the main [README.md](README.md) for usage examples and CLI command flags.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vansh
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|