@sov3rain/nota 0.2.0 → 0.2.1

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/README.md CHANGED
@@ -1,55 +1,55 @@
1
- # nota
2
-
3
- A local annotation tool for AI agent implementation plans.
4
-
5
- `nota` opens a Markdown plan in a browser-based editor where you can highlight text and leave comments using [CriticMarkup](https://github.com/CriticMarkup/CriticMarkup-toolkit). The agent reads those comments back and adjusts the plan or implementation accordingly.
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install -g nota
11
- ```
12
-
13
- ## Usage
14
-
15
- ### Annotate a plan
16
-
17
- ```bash
18
- nota path/to/plan.md
19
- ```
20
-
21
- Opens the file in a local web UI. Highlight any text to leave a comment. When you're done, click **Done** — the agent reads the annotated file and processes your feedback.
22
-
23
- Pass `--no-open` to start the server without opening the browser automatically:
24
-
25
- ```bash
26
- nota --no-open path/to/plan.md
27
- ```
28
-
29
- ### Set up agent instructions
30
-
31
- ```bash
32
- nota init # choose agents interactively
33
- nota init all # all agents, non-interactive
34
- nota init claude # Claude only
35
- nota init codex # Codex only
36
- nota init cursor # Cursor only
37
- ```
38
-
39
- The interactive mode starts with no agents selected, so you explicitly choose the agent instructions to install.
40
-
41
- Writes the annotation workflow instructions into `CLAUDE.md`, `AGENTS.md`, or `.cursor/rules/nota.mdc`. Safe to re-run — existing files are updated in place, not overwritten.
42
-
43
- ## How it works
44
-
45
- 1. The agent creates a plan as `.agent-plans/<date>-<topic>.md` and runs `nota` on it
46
- 2. You annotate the plan in the browser
47
- 3. Feedback is stored as CriticMarkup inline in the file:
48
- ```
49
- {==highlighted text==}{>>your comment<<}
50
- ```
51
- 4. The agent reads the annotations and updates the plan or proceeds with implementation
52
-
53
- ## License
54
-
55
- MIT
1
+ # nota
2
+
3
+ A local annotation tool for AI agent implementation plans.
4
+
5
+ `nota` opens a Markdown plan in a browser-based editor where you can highlight text and leave comments using [CriticMarkup](https://github.com/CriticMarkup/CriticMarkup-toolkit). The agent reads those comments back and adjusts the plan or implementation accordingly.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g nota
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ### Annotate a plan
16
+
17
+ ```bash
18
+ nota path/to/plan.md
19
+ ```
20
+
21
+ Opens the file in a local web UI. Highlight any text to leave a comment. When you're done, click **Done** — the agent reads the annotated file and processes your feedback.
22
+
23
+ Pass `--no-open` to start the server without opening the browser automatically:
24
+
25
+ ```bash
26
+ nota --no-open path/to/plan.md
27
+ ```
28
+
29
+ ### Set up agent instructions
30
+
31
+ ```bash
32
+ nota init # choose agents interactively
33
+ nota init all # all agents, non-interactive
34
+ nota init claude # Claude only
35
+ nota init codex # Codex only
36
+ nota init cursor # Cursor only
37
+ ```
38
+
39
+ The interactive mode starts with no agents selected, so you explicitly choose the agent instructions to install.
40
+
41
+ Writes the annotation workflow instructions into `CLAUDE.md`, `AGENTS.md`, or `.cursor/rules/nota.mdc`. Safe to re-run — existing files are updated in place, not overwritten.
42
+
43
+ ## How it works
44
+
45
+ 1. The agent creates a plan as `.agent-plans/<date>-<topic>.md` and runs `nota` on it
46
+ 2. You annotate the plan in the browser
47
+ 3. Feedback is stored as CriticMarkup inline in the file:
48
+ ```
49
+ {==highlighted text==}{>>your comment<<}
50
+ ```
51
+ 4. The agent reads the annotations and updates the plan or proceeds with implementation
52
+
53
+ ## License
54
+
55
+ MIT
@@ -1,56 +1,60 @@
1
- export function getAgentInstructionBlock() {
2
- return `<!-- nota:start -->
3
- ## Plan Annotation Workflow
4
-
5
- When the user asks for an implementation plan, create a Markdown file in:
6
-
7
- \`\`\`text
8
- .agent-plans/<linux-epoch-seconds>-<topic>.md
9
- \`\`\`
10
-
1
+ export function getAgentInstructionBlock() {
2
+ return `<!-- nota:start -->
3
+ ## Plan Annotation Workflow
4
+
5
+ When the user asks for an implementation plan, create a Markdown file in:
6
+
7
+ \`\`\`text
8
+ .agent-plans/<linux-epoch-seconds>-<topic>.md
9
+ \`\`\`
10
+
11
11
  The filename must start with the current Unix epoch timestamp in seconds, not a formatted date.
12
12
 
13
- Then launch the local annotation tool and wait for the command to exit.
14
-
15
- On Windows/PowerShell, use the npm \`.cmd\` shim explicitly:
13
+ If you are running in a planning-only mode, read-only mode, or any mode where you cannot create files and keep a local command attached until it exits, do not attempt this workflow. Tell the user that the nota annotation workflow cannot run in the current mode, and ask them to switch to a mode that allows file writes and command execution.
16
14
 
15
+ Then launch the local annotation tool and wait for the command to exit.
16
+
17
+ On Windows/PowerShell, use the npm \`.cmd\` shim explicitly:
18
+
17
19
  \`\`\`powershell
18
20
  nota.cmd .agent-plans/<file>.md
19
21
  \`\`\`
20
22
 
21
- Do not use \`Start-Process -FilePath nota\` on Windows/PowerShell; it can resolve to the extensionless npm shim and trigger the Windows "open with" dialog instead of running the CLI.
22
-
23
- On macOS/Linux:
24
-
25
- \`\`\`bash
26
- nota .agent-plans/<file>.md
27
- \`\`\`
28
-
29
- Tell the user that the plan is open for annotation. Keep the command attached and do not continue with implementation until the \`nota\` process exits.
23
+ Run this command with a 60-minute timeout so the first Nota session has enough time to stay open while the user annotates.
30
24
 
31
- When the \`nota\` process exits, treat that as the signal that the user has finished annotating. Read the same Markdown file again. User feedback is stored as CriticMarkup:
32
-
33
- \`\`\`md
34
- {==text being discussed==}{>>user comment<<}
35
- \`\`\`
36
-
37
- Treat those comments as direct user feedback. Update the plan or implementation accordingly.
38
-
39
- Once all annotations have been processed, remove every CriticMarkup annotation from the file, as well as the global annotations block if present:
40
-
41
- \`\`\`md
42
- <!-- nota:globals
43
- [...]
44
- -->
45
- \`\`\`
46
-
47
- Leave only the plain Markdown content.
48
-
49
- If the \`nota\` command is unavailable, tell the user to install it globally:
50
-
51
- \`\`\`bash
52
- npm install -g nota
53
- \`\`\`
54
- <!-- nota:end -->
55
- `;
56
- }
25
+ Do not use \`Start-Process -FilePath nota\` on Windows/PowerShell; it can resolve to the extensionless npm shim and trigger the Windows "open with" dialog instead of running the CLI.
26
+
27
+ On macOS/Linux:
28
+
29
+ \`\`\`bash
30
+ nota .agent-plans/<file>.md
31
+ \`\`\`
32
+
33
+ Tell the user that the plan is open for annotation. Keep the command attached and do not continue with implementation until the \`nota\` process exits.
34
+
35
+ When the \`nota\` process exits, treat that as the signal that the user has finished annotating. Read the same Markdown file again. User feedback is stored as CriticMarkup:
36
+
37
+ \`\`\`md
38
+ {==text being discussed==}{>>user comment<<}
39
+ \`\`\`
40
+
41
+ Treat those comments as direct user feedback. Update the plan or implementation accordingly.
42
+
43
+ Once all annotations have been processed, remove every CriticMarkup annotation from the file, as well as the global annotations block if present:
44
+
45
+ \`\`\`md
46
+ <!-- nota:globals
47
+ [...]
48
+ -->
49
+ \`\`\`
50
+
51
+ Leave only the plain Markdown content.
52
+
53
+ If the \`nota\` command is unavailable, tell the user to install it globally:
54
+
55
+ \`\`\`bash
56
+ npm install -g nota
57
+ \`\`\`
58
+ <!-- nota:end -->
59
+ `;
60
+ }
@@ -1,20 +1,21 @@
1
- import { describe, expect, it } from 'vitest';
2
- import { getAgentInstructionBlock } from './agentInstructions.mjs';
3
-
4
- describe('getAgentInstructionBlock', () => {
5
- it('instructs agents to wait for the nota process to exit', () => {
6
- const block = getAgentInstructionBlock();
7
-
8
- expect(block).toContain('wait for the command to exit');
9
- expect(block).toContain('do not continue with implementation until the `nota` process exits');
10
- expect(block).toContain('When the `nota` process exits');
11
- expect(block).not.toContain('until the user says they are done annotating');
12
- });
13
-
1
+ import { describe, expect, it } from 'vitest';
2
+ import { getAgentInstructionBlock } from './agentInstructions.mjs';
3
+
4
+ describe('getAgentInstructionBlock', () => {
5
+ it('instructs agents to wait for the nota process to exit', () => {
6
+ const block = getAgentInstructionBlock();
7
+
8
+ expect(block).toContain('wait for the command to exit');
9
+ expect(block).toContain('do not continue with implementation until the `nota` process exits');
10
+ expect(block).toContain('When the `nota` process exits');
11
+ expect(block).not.toContain('until the user says they are done annotating');
12
+ });
13
+
14
14
  it('keeps the Windows npm shim guidance', () => {
15
15
  const block = getAgentInstructionBlock();
16
16
 
17
17
  expect(block).toContain('nota.cmd .agent-plans/<file>.md');
18
+ expect(block).toContain('Run this command with a 60-minute timeout');
18
19
  expect(block).toContain('Do not use `Start-Process -FilePath nota`');
19
20
  });
20
21
  });