@northbridge-security/secureai 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.
@@ -88,4 +88,4 @@ Check .tmp/session.keep
88
88
 
89
89
 
90
90
  /clear → New session
91
- ```
91
+ ```
@@ -2,14 +2,45 @@ Implement a feature from its PRD specification.
2
2
 
3
3
  ## Input
4
4
 
5
- PRD path: $ARGUMENTS
5
+ Requirement path or task identifier: $ARGUMENTS
6
6
 
7
- Resolve the PRD file path. The PRD is always under `docs/requirements/`. Accept both formats:
7
+ Resolve the requirement file using this priority:
8
8
 
9
+ ### 1. PRD in docs/requirements/
10
+
11
+ Accept both formats:
9
12
  - Full path: `docs/requirements/prd.feature-name.md`
10
13
  - Short name: `prd.feature-name.md` (prepend `docs/requirements/`)
11
14
 
12
- Read the PRD file. If it does not exist, stop and tell the user.
15
+ If the file exists, use it and proceed to Phase 1.
16
+
17
+ ### 2. Plan in ~/.claude/plans/
18
+
19
+ Accept both formats:
20
+ - Full path: `~/.claude/plans/feature-name.md`
21
+ - Short name: `feature-name.md` (prepend `~/.claude/plans/`)
22
+
23
+ If the file exists, use it and proceed to Phase 1.
24
+
25
+ ### 3. TODO task in docs/TODO.md
26
+
27
+ If no file found in steps 1-2, search `docs/TODO.md` for a matching task section:
28
+ - Read the entire TODO.md file
29
+ - Search for headers (lines starting with `##` or `###`) that contain the search text (case-insensitive)
30
+ - If found, extract the full task section including:
31
+ - The task header
32
+ - All task items (lines starting with `- [ ]` or `- [x]`)
33
+ - Any PRD references in the header (e.g., "PRD: prd.feature-name.md")
34
+ - If a PRD reference exists, read that PRD file from `docs/requirements/`
35
+ - If no PRD reference, use the task section content as the requirement specification
36
+
37
+ ### 4. Not Found
38
+
39
+ If none of the above resolve, stop and tell the user:
40
+ - List the paths checked
41
+ - Suggest running `/todo` to see available tasks
42
+ - Suggest checking `docs/requirements/` for available PRDs
43
+ - Suggest going in to plan mode and refine a new plan to work on
13
44
 
14
45
  ## Phase 1: Discovery
15
46
 
@@ -8,6 +8,55 @@ List or add todos in `docs/TODO.md`. This file is gitignored - personal task tra
8
8
  - **Git status**: Ignored (add to `.gitignore` if not present)
9
9
  - **Scope**: Personal/local - not shared with team
10
10
 
11
+ ## Requirement Document References
12
+
13
+ When referencing requirement documents in TODO.md, follow these path rules:
14
+
15
+ ### No Path Required
16
+
17
+ - **Global Claude plans**: `~/.claude/plans/*.md` - Just use filename: `plan-feature.md`
18
+ - **Project requirements**: `docs/requirements/*.md` - Just use filename: `prd.feature.md`
19
+ - **Self-contained tasks**: All information in TODO.md - No reference needed
20
+
21
+ **Examples**:
22
+ ```markdown
23
+ ## Feature Implementation
24
+ PRD: prd.auth-system.md
25
+ - [ ] Implement OAuth2 flow
26
+
27
+ ## Database Migration
28
+ Plan: migration-plan.md
29
+ - [ ] Update schema
30
+ ```
31
+
32
+ ### Path MUST Be Provided
33
+
34
+ - **Other repo locations**: Provide repo-relative path
35
+ - **Outside repo**: Provide full filesystem path or URL
36
+
37
+ **Examples**:
38
+ ```markdown
39
+ ## Infrastructure Update
40
+ Spec: infrastructure/specs/k8s-migration.md
41
+ - [ ] Migrate to Kubernetes
42
+
43
+ ## External Integration
44
+ API Docs: https://api.example.com/docs/v2
45
+ - [ ] Implement webhook handler
46
+
47
+ ## Shared Documentation
48
+ Guide: /Users/team/shared-docs/security-guidelines.md
49
+ - [ ] Apply security standards
50
+ ```
51
+
52
+ ### Validation
53
+
54
+ The `/code` command will:
55
+ 1. Check `~/.claude/plans/` for plan files
56
+ 2. Check `docs/requirements/` for PRD files
57
+ 3. Check repo-relative paths if provided
58
+ 4. Fail with clear error if document not found
59
+
11
60
  ## Tasks
12
61
 
13
62
  ### Prerequisites
@@ -97,4 +146,4 @@ List or add todos in `docs/TODO.md`. This file is gitignored - personal task tra
97
146
 
98
147
  /todo done Fix login timeout bug
99
148
  → Moved to Done (2024-02-03)
100
- ```
149
+ ```
@@ -100,4 +100,4 @@ Decisions are numbered sequentially (ADR-001, ADR-002, etc.).
100
100
 
101
101
  ## Note
102
102
 
103
- After this command, manually run `/clear` to start fresh.
103
+ After this command, manually run `/clear` to start fresh.
package/package.json CHANGED
@@ -123,7 +123,7 @@
123
123
  "validate-commit": "bun run packages/secureai-cli/src/cli.ts validate-commit"
124
124
  },
125
125
  "type": "module",
126
- "version": "0.2.0",
126
+ "version": "0.2.1",
127
127
  "workspaces": [
128
128
  "packages/*"
129
129
  ]