ai-dev-worklog 0.5.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/CHANGELOG.md ADDED
@@ -0,0 +1,40 @@
1
+ # Changelog
2
+
3
+ All notable changes to AI Dev Worklog are recorded here.
4
+
5
+ ## 0.5.0 - 2026-06-07
6
+
7
+ - Add `--intent` for recording the task goal in local worklog output.
8
+ - Include declared intent in Markdown and continuation prompt output.
9
+ - Set `schemaVersion` to `0.3` and expand the JSON Schema for provided CLI intent.
10
+ - Add npm package metadata and public install guidance.
11
+ - Add public launch and application draft notes for early open-source feedback.
12
+
13
+ ## 0.4.0 - 2026-06-06
14
+
15
+ - Add GitHub Actions CI for install, build, and test validation.
16
+ - Add a formal JSON Schema for `latest.json` at `schema/worklog.schema.json`.
17
+ - Add this changelog as a lightweight release history.
18
+ - Refresh the README roadmap and demo flow around current local CLI capabilities.
19
+
20
+ ## 0.3.0
21
+
22
+ - Add `.ai-dev-worklog/continue-prompt.md`.
23
+ - Add continuation prompt rendering from the structured worklog scan.
24
+ - Keep `schemaVersion` at `0.2` because the JSON output structure did not change.
25
+ - Update examples and documentation for the continuation prompt output.
26
+
27
+ ## 0.2.0
28
+
29
+ - Define the structured worklog JSON output shape.
30
+ - Set `schemaVersion` to `0.2`.
31
+ - Preserve raw git command output under `evidence.git`.
32
+ - Add unified observed file changes, validation status, risk signals, and next steps.
33
+ - Update README and examples for the structured schema.
34
+
35
+ ## 0.1.0
36
+
37
+ - Add the local TypeScript CLI core.
38
+ - Scan local git evidence from `git status --porcelain`, `git diff --stat`, and `git diff --name-status`.
39
+ - Write `.ai-dev-worklog/latest.md` and `.ai-dev-worklog/latest.json`.
40
+ - Keep all scan output local to the repository.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 alexan780
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.
package/README.md ADDED
@@ -0,0 +1,220 @@
1
+ # AI Dev Worklog
2
+
3
+ [![CI](https://github.com/alexan780/ai-dev-worklog/actions/workflows/ci.yml/badge.svg)](https://github.com/alexan780/ai-dev-worklog/actions/workflows/ci.yml)
4
+
5
+ A local CLI that turns git evidence into a readable AI development worklog.
6
+
7
+ AI Dev Worklog scans the current git repository and writes a Markdown report, a JSON report, and a continuation prompt. It is useful when an AI-assisted coding session needs a local, reviewable record of what changed, what the task goal was, and how to continue.
8
+
9
+ The CLI is intentionally small and local-first: it reads git evidence, writes files under `.ai-dev-worklog/`, and keeps the output on your machine.
10
+
11
+ ## What It Does Now
12
+
13
+ `ai-dev-worklog scan` records:
14
+
15
+ - optional declared intent from `--intent`
16
+ - changed files from `git status --porcelain`
17
+ - tracked file changes from `git diff --name-status`
18
+ - diff summary from `git diff --stat`
19
+ - raw command output for the scanned git commands
20
+ - structured JSON fields for evidence, observed changes, validation status, risk signals, and next steps
21
+ - a continuation prompt file for the next development session
22
+
23
+ ## Quick Start
24
+
25
+ Run once with `npx`:
26
+
27
+ ```bash
28
+ npx ai-dev-worklog scan
29
+ ```
30
+
31
+ Add a task goal for the next session:
32
+
33
+ ```bash
34
+ npx ai-dev-worklog scan --intent "Prepare the repository for an open-source release"
35
+ ```
36
+
37
+ Install globally:
38
+
39
+ ```bash
40
+ npm install -g ai-dev-worklog
41
+ ai-dev-worklog scan --intent "Review local changes before opening a pull request"
42
+ ```
43
+
44
+ Run from source:
45
+
46
+ ```bash
47
+ git clone https://github.com/alexan780/ai-dev-worklog.git
48
+ cd ai-dev-worklog
49
+ npm ci
50
+ npm run build
51
+ node dist/index.js scan --intent "Verify the local CLI from source"
52
+ ```
53
+
54
+ ## Local Output
55
+
56
+ Running `ai-dev-worklog scan` writes:
57
+
58
+ ```text
59
+ .ai-dev-worklog/
60
+ latest.md
61
+ latest.json
62
+ continue-prompt.md
63
+ ```
64
+
65
+ `latest.md` is the human-readable report.
66
+ `latest.json` is the machine-readable scan result. It uses a structured worklog schema that separates declared intent, git evidence, observed changes, validation status, risk signals, and next steps. The formal JSON Schema is available at [`schema/worklog.schema.json`](schema/worklog.schema.json).
67
+ `continue-prompt.md` is a prompt-oriented summary for continuing the development session.
68
+
69
+ Example output is available in [`examples/basic-worklog`](examples/basic-worklog).
70
+
71
+ Example summary:
72
+
73
+ ```text
74
+ ## Summary
75
+
76
+ - Git status entries: 2
77
+ - Git diff name-status entries: 2
78
+ - Changed files: 2
79
+ - Working tree has changes: yes
80
+ - Validation: not_recorded
81
+ - Risk signals: 0
82
+ - Declared intent: Prepare the repository for an open-source release
83
+ ```
84
+
85
+ ## What The CLI Scans
86
+
87
+ The local CLI reads these git commands:
88
+
89
+ ```bash
90
+ git status --porcelain
91
+ git diff --stat
92
+ git diff --name-status
93
+ ```
94
+
95
+ The scan uses local git evidence as the source of truth for observed code changes.
96
+
97
+ The CLI does not read chat windows, call AI APIs, upload code, or integrate with Codex App, Claude Code, Cursor, or MCP tools.
98
+
99
+ ## Privacy And Data Flow
100
+
101
+ AI Dev Worklog runs locally in the git repository where you call it.
102
+
103
+ - It runs local git commands.
104
+ - It writes local files under `.ai-dev-worklog/`.
105
+ - It does not upload source code or generated worklogs.
106
+ - It does not require an API key.
107
+
108
+ ## Why This Exists
109
+
110
+ When context breaks, tools switch, or a task becomes long, it can be hard to answer:
111
+
112
+ - What files actually changed?
113
+ - What git evidence is available?
114
+ - What still needs checking?
115
+ - How should the next session continue?
116
+
117
+ AI Dev Worklog turns AI-assisted coding sessions into local, reviewable development records.
118
+
119
+ ## Local Development
120
+
121
+ Install dependencies:
122
+
123
+ ```bash
124
+ npm ci
125
+ ```
126
+
127
+ Build the TypeScript CLI:
128
+
129
+ ```bash
130
+ npm run build
131
+ ```
132
+
133
+ Run tests:
134
+
135
+ ```bash
136
+ npm test
137
+ ```
138
+
139
+ Run a local scan:
140
+
141
+ ```bash
142
+ node dist/index.js scan --intent "Validate local development output"
143
+ ```
144
+
145
+ Generated build output goes to `dist/`.
146
+ Generated worklog output goes to `.ai-dev-worklog/`.
147
+
148
+ GitHub Actions runs the same install, build, and test checks on pushes to `main` and on pull requests.
149
+
150
+ ## What It Records
151
+
152
+ The CLI records observed local git evidence.
153
+
154
+ Current output includes:
155
+
156
+ - optional declared intent from the CLI
157
+ - changed files from `git status --porcelain`
158
+ - tracked file changes from `git diff --name-status`
159
+ - diff summary from `git diff --stat`
160
+ - raw command output for the scanned git commands
161
+ - a JSON worklog schema with declared intent, evidence, observed changes, validation status, risk signals, and next steps
162
+ - a continuation prompt file with changed files, command results, risk signals, remaining checks, and suggested next steps
163
+
164
+ Future versions may add command history and validation evidence.
165
+
166
+ ## What It Is
167
+
168
+ - Local first
169
+ - Evidence before summary
170
+ - Human-readable Markdown
171
+ - Machine-readable JSON
172
+ - Minimal dependencies
173
+
174
+ ## Roadmap
175
+
176
+ ### Released
177
+
178
+ #### v0.1 - Local Core
179
+
180
+ - Scan the current git repository
181
+ - Record changed files from local git evidence
182
+ - Generate `latest.md` and `latest.json`
183
+ - Keep all data local
184
+
185
+ #### v0.2 - Worklog Schema
186
+
187
+ - Define a stable JSON structure for AI coding worklogs
188
+ - Separate declared intent from observed evidence
189
+ - Add unified observed file changes
190
+ - Add validation status and basic risk signals
191
+
192
+ #### v0.3 - Continuation Prompt
193
+
194
+ - Generate a continuation prompt for the next development session
195
+ - Keep git evidence as the source of truth for observed code changes
196
+
197
+ #### v0.4 - Open-source Readiness
198
+
199
+ - Add GitHub Actions CI
200
+ - Add a formal JSON Schema file for `latest.json`
201
+ - Add a changelog and release history
202
+ - Improve README demo flow and roadmap clarity
203
+
204
+ #### v0.5 - Declared Intent
205
+
206
+ - Add `--intent` for recording the task goal in local worklog output
207
+ - Include declared intent in Markdown and continuation prompt output
208
+ - Prepare npm metadata and public installation paths
209
+
210
+ ### Future Work
211
+
212
+ - Command history and validation evidence
213
+ - Optional workflow guides for AI coding tools
214
+
215
+ ## Status
216
+
217
+ This project is in early development.
218
+ The CLI scans a git repository and generates a local Markdown worklog, a structured JSON scan result, and a continuation prompt.
219
+
220
+ The next milestones focus on strengthening the local CLI contract before adding optional workflow integrations.
@@ -0,0 +1,104 @@
1
+ #!/usr/bin/env node
2
+ export interface GitCommandResult {
3
+ command: string;
4
+ stdout: string;
5
+ stderr: string;
6
+ exitCode: number;
7
+ }
8
+ export interface StatusEntry {
9
+ indexStatus: string;
10
+ workingTreeStatus: string;
11
+ path: string;
12
+ previousPath?: string;
13
+ raw: string;
14
+ }
15
+ export interface NameStatusEntry {
16
+ status: string;
17
+ path: string;
18
+ previousPath?: string;
19
+ raw: string;
20
+ }
21
+ export type ObservedFileStatus = "modified" | "added" | "deleted" | "renamed" | "copied" | "untracked" | "unknown";
22
+ export interface ToolInfo {
23
+ name: string;
24
+ version: string;
25
+ command: string;
26
+ }
27
+ export interface RepositoryInfo {
28
+ cwd: string;
29
+ gitRoot: string;
30
+ }
31
+ export interface DeclaredIntent {
32
+ status: "not_provided" | "provided";
33
+ source: "not_provided" | "cli_option";
34
+ summary: string | null;
35
+ }
36
+ export interface ScanOptions {
37
+ intent?: string;
38
+ }
39
+ export interface ObservedFileChange {
40
+ path: string;
41
+ previousPath: string | null;
42
+ status: ObservedFileStatus;
43
+ sources: string[];
44
+ }
45
+ export interface ValidationRecord {
46
+ status: "not_recorded";
47
+ commands: [];
48
+ }
49
+ export interface RiskSignal {
50
+ kind: "untracked_files" | "deleted_files" | "renamed_files";
51
+ severity: "info" | "warning";
52
+ message: string;
53
+ paths: string[];
54
+ }
55
+ export interface RiskSignals {
56
+ items: RiskSignal[];
57
+ }
58
+ export interface NextSteps {
59
+ items: [];
60
+ continuationPrompt: string;
61
+ }
62
+ export interface WorklogScan {
63
+ schemaVersion: "0.3";
64
+ generatedAt: string;
65
+ tool: ToolInfo;
66
+ repository: RepositoryInfo;
67
+ declaredIntent: DeclaredIntent;
68
+ summary: {
69
+ statusEntryCount: number;
70
+ diffNameStatusEntryCount: number;
71
+ changedFileCount: number;
72
+ hasWorkingTreeChanges: boolean;
73
+ validationStatus: ValidationRecord["status"];
74
+ riskSignalCount: number;
75
+ };
76
+ evidence: {
77
+ git: {
78
+ statusPorcelain: GitCommandResult;
79
+ diffStat: GitCommandResult;
80
+ diffNameStatus: GitCommandResult;
81
+ };
82
+ };
83
+ observedChanges: {
84
+ statusEntries: StatusEntry[];
85
+ diffNameStatusEntries: NameStatusEntry[];
86
+ files: ObservedFileChange[];
87
+ };
88
+ validation: ValidationRecord;
89
+ riskSignals: RiskSignals;
90
+ nextSteps: NextSteps;
91
+ }
92
+ export declare function parseStatusPorcelain(output: string): StatusEntry[];
93
+ export declare function parseNameStatus(output: string): NameStatusEntry[];
94
+ export declare function buildObservedFiles(statusEntries: StatusEntry[], diffNameStatusEntries: NameStatusEntry[]): ObservedFileChange[];
95
+ export declare function buildRiskSignals(files: ObservedFileChange[]): RiskSignals;
96
+ export declare function scanRepository(cwd?: string, options?: ScanOptions): Promise<WorklogScan>;
97
+ export declare function writeScanOutputs(scan: WorklogScan): Promise<{
98
+ markdownPath: string;
99
+ jsonPath: string;
100
+ continuePromptPath: string;
101
+ }>;
102
+ export declare function renderMarkdown(scan: WorklogScan): string;
103
+ export declare function renderContinuePrompt(scan: WorklogScan): string;
104
+ export declare function runCli(argv?: string[], cwd?: string): Promise<number>;