prjct-cli 0.59.0 → 0.60.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/CHANGELOG.md +92 -0
- package/assets/statusline/components/git.sh +32 -2
- package/assets/statusline/lib/theme.sh +8 -8
- package/assets/statusline/themes/default.json +2 -2
- package/core/__tests__/agentic/command-executor.test.ts +659 -0
- package/core/__tests__/services/hierarchical-agent-resolver.test.ts +359 -0
- package/core/__tests__/services/nested-context-resolver.test.ts +443 -0
- package/core/commands/analysis.ts +72 -64
- package/core/domain/agent-loader.ts +197 -3
- package/core/services/hierarchical-agent-resolver.ts +234 -0
- package/core/services/nested-context-resolver.ts +467 -3
- package/dist/bin/prjct.mjs +352 -56
- package/package.json +1 -1
- package/templates/commands/done.md +61 -13
- package/templates/commands/merge.md +11 -18
- package/templates/commands/ship.md +75 -42
- package/templates/commands/task.md +53 -19
- package/templates/global/CLAUDE.md +27 -0
- package/templates/global/STORAGE-SPEC.md +138 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.60.1] - 2026-02-05
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- improve sync output with summary-first format (PRJ-100) (#100)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [0.60.1] - 2026-02-05
|
|
11
|
+
|
|
12
|
+
### Improved
|
|
13
|
+
|
|
14
|
+
- **Sync output UX (PRJ-100)**: Summary-first format with key metrics prominent, ~50% less output
|
|
15
|
+
|
|
16
|
+
### Implementation Details
|
|
17
|
+
|
|
18
|
+
Refactored `showSyncResult()` in `core/commands/analysis.ts` to show success line with timing immediately, followed by single-line metrics (files → context | agents | reduction). Removed redundant bottom summary section. Fixed compressionRate calculation (was decimal, now percentage). Added conditional display for low-value metrics (only show reduction if >10%). Fixed pluralization ("1 skill" not "1 skills").
|
|
19
|
+
|
|
20
|
+
### Learnings
|
|
21
|
+
|
|
22
|
+
- `syncMetrics.compressionRate` is a decimal (0-1), not percentage - multiply by 100
|
|
23
|
+
- Summary-first output pattern improves scannability
|
|
24
|
+
- Conditional metric display reduces noise for low-value data
|
|
25
|
+
|
|
26
|
+
### Test Plan
|
|
27
|
+
|
|
28
|
+
#### For QA
|
|
29
|
+
1. Run `prjct sync --yes` on any project
|
|
30
|
+
2. Verify output shows success line first with timing: `✅ Synced {project} ({time}s)`
|
|
31
|
+
3. Verify single-line metrics: `{files} files → {context} context | {agents} agents`
|
|
32
|
+
4. Verify compression rate only shows if > 10%
|
|
33
|
+
5. Verify pluralization is correct ("1 skill" not "1 skills")
|
|
34
|
+
|
|
35
|
+
#### For Users
|
|
36
|
+
- Sync output is now more scannable - key metrics appear first instead of buried at bottom
|
|
37
|
+
- Run `p. sync` as usual - new format is automatic
|
|
38
|
+
- No breaking changes
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [0.60.0] - 2026-02-05
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
- hierarchical AGENTS.md resolution and template improvements (PRJ-101) (#99)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## [0.60.0] - 2026-02-05
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
- **Hierarchical AGENTS.md resolution (PRJ-101)**: Agent files can now be discovered and loaded hierarchically from any directory level
|
|
53
|
+
- **Learnings capture on task completion**: Templates now capture patterns, approaches, and decisions for LLM knowledge transfer
|
|
54
|
+
- **Local-first issue tracking**: READ LOCAL, WRITE REMOTE pattern for Linear/JIRA (faster, fewer tokens)
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- **Statusline improvements**: `p/` → `p.`, branch names truncated to 10 chars, neutral colors
|
|
59
|
+
- **Templates use `prjct` CLI directly**: No more dependency on `$PRJCT_CLI` environment variable
|
|
60
|
+
- **Ship always marks Done**: Issue tracker status updated to Done after ship (work complete)
|
|
61
|
+
|
|
62
|
+
### Implementation Details
|
|
63
|
+
|
|
64
|
+
Implemented hierarchical agent resolution allowing AGENTS.md files at any directory level to define domain-specific patterns. Extended NestedContextResolver to discover these files and HierarchicalAgentResolver to merge them. Updated templates to enforce issue tracker updates and capture learnings on completion.
|
|
65
|
+
|
|
66
|
+
### Learnings
|
|
67
|
+
|
|
68
|
+
- LLMs tend to skip template steps even when marked mandatory - need explicit POST-MERGE sections
|
|
69
|
+
- `$PRJCT_CLI` may not be set - use `prjct` CLI directly
|
|
70
|
+
- Local-first caching critical for token efficiency
|
|
71
|
+
- Neutral colors better than brand colors for dev tools
|
|
72
|
+
|
|
73
|
+
### Test Plan
|
|
74
|
+
|
|
75
|
+
#### For QA
|
|
76
|
+
1. Run `p. sync` → Verify statusline shows `p.` instead of `p/`
|
|
77
|
+
2. On long branch name → Verify truncates to 10 chars after `/`
|
|
78
|
+
3. Run `p. task PRJ-XXX` → Should read from local `issues.json`, not API
|
|
79
|
+
4. Run `p. done` → Should update Linear status to Done
|
|
80
|
+
5. Run `p. ship` after merge → Must update issue tracker before outputting success
|
|
81
|
+
|
|
82
|
+
#### For Users
|
|
83
|
+
- Statusline: `p/` → `p.`, branch names truncated, neutral colors
|
|
84
|
+
- Templates enforce issue tracker updates (never skipped)
|
|
85
|
+
- Learnings captured on task completion for LLM knowledge transfer
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## [0.59.1] - 2026-02-05
|
|
89
|
+
|
|
90
|
+
### Tests
|
|
91
|
+
|
|
92
|
+
- **command-executor.ts tests (PRJ-82)**: Added 26 unit tests for the command execution pipeline
|
|
93
|
+
|
|
94
|
+
|
|
3
95
|
## [0.59.0] - 2026-02-05
|
|
4
96
|
|
|
5
97
|
### Features
|
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# prjct statusline - Git component
|
|
3
|
-
# Displays the current branch and dirty status
|
|
3
|
+
# Displays the current branch (truncated) and dirty status
|
|
4
|
+
|
|
5
|
+
# Truncate branch name: keep prefix + 10 chars after slash
|
|
6
|
+
# feat/PRJ-101-hierarchical-scope → feat/PRJ-101-hi...
|
|
7
|
+
truncate_branch() {
|
|
8
|
+
local branch="$1"
|
|
9
|
+
local max_suffix=10
|
|
10
|
+
|
|
11
|
+
# If branch has a slash (e.g., feat/something)
|
|
12
|
+
if [[ "$branch" == *"/"* ]]; then
|
|
13
|
+
local prefix="${branch%%/*}"
|
|
14
|
+
local suffix="${branch#*/}"
|
|
15
|
+
|
|
16
|
+
# If suffix is longer than max, truncate with ...
|
|
17
|
+
if [[ ${#suffix} -gt $max_suffix ]]; then
|
|
18
|
+
suffix="${suffix:0:$max_suffix}..."
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
echo "${prefix}/${suffix}"
|
|
22
|
+
else
|
|
23
|
+
# No slash, just truncate if too long
|
|
24
|
+
if [[ ${#branch} -gt 15 ]]; then
|
|
25
|
+
echo "${branch:0:15}..."
|
|
26
|
+
else
|
|
27
|
+
echo "$branch"
|
|
28
|
+
fi
|
|
29
|
+
fi
|
|
30
|
+
}
|
|
4
31
|
|
|
5
32
|
component_git() {
|
|
6
33
|
component_enabled "git" || return
|
|
@@ -41,5 +68,8 @@ component_git() {
|
|
|
41
68
|
|
|
42
69
|
[[ -z "$branch" ]] && return
|
|
43
70
|
|
|
44
|
-
|
|
71
|
+
# Truncate long branch names
|
|
72
|
+
local display_branch=$(truncate_branch "$branch")
|
|
73
|
+
|
|
74
|
+
echo -e "${SECONDARY}${display_branch}${dirty}${NC}"
|
|
45
75
|
}
|
|
@@ -7,14 +7,14 @@ STATUSLINE_DIR="${HOME}/.prjct-cli/statusline"
|
|
|
7
7
|
THEME_DIR="${STATUSLINE_DIR}/themes"
|
|
8
8
|
|
|
9
9
|
# Default colors (ANSI 256) - used as fallback
|
|
10
|
-
DEFAULT_PRIMARY='\033[38;5;
|
|
11
|
-
DEFAULT_ACCENT='\033[38;5;
|
|
12
|
-
DEFAULT_SECONDARY='\033[38;5;
|
|
13
|
-
DEFAULT_MUTED='\033[38;5;
|
|
14
|
-
DEFAULT_SUCCESS='\033[38;5;
|
|
15
|
-
DEFAULT_ERROR='\033[38;5;
|
|
16
|
-
DEFAULT_WARNING='\033[38;5;
|
|
17
|
-
DEFAULT_PURPLE='\033[38;5;
|
|
10
|
+
DEFAULT_PRIMARY='\033[38;5;252m' # Light gray/white - neutral
|
|
11
|
+
DEFAULT_ACCENT='\033[38;5;252m' # Light gray/white
|
|
12
|
+
DEFAULT_SECONDARY='\033[38;5;248m' # Medium gray
|
|
13
|
+
DEFAULT_MUTED='\033[38;5;245m' # Gray
|
|
14
|
+
DEFAULT_SUCCESS='\033[38;5;108m' # Muted green
|
|
15
|
+
DEFAULT_ERROR='\033[38;5;174m' # Muted red/pink
|
|
16
|
+
DEFAULT_WARNING='\033[38;5;180m' # Muted yellow
|
|
17
|
+
DEFAULT_PURPLE='\033[38;5;182m' # Muted purple
|
|
18
18
|
|
|
19
19
|
# Default icons
|
|
20
20
|
DEFAULT_ICON_PRJCT="⚡"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "prjct-default",
|
|
3
3
|
"description": "Default prjct theme for Claude Code statusline",
|
|
4
4
|
"colors": {
|
|
5
|
-
"primary": "
|
|
5
|
+
"primary": "252",
|
|
6
6
|
"accent": "252",
|
|
7
7
|
"secondary": "248",
|
|
8
8
|
"muted": "245",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"purple": "182"
|
|
13
13
|
},
|
|
14
14
|
"icons": {
|
|
15
|
-
"prjct": "p
|
|
15
|
+
"prjct": "p.",
|
|
16
16
|
"dir": "",
|
|
17
17
|
"git": "",
|
|
18
18
|
"separator": "│",
|