claudenv 1.2.2 → 1.2.4
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/bin/cli.js
CHANGED
|
@@ -151,6 +151,22 @@ program
|
|
|
151
151
|
console.log(`\n claudenv loop v${pkgJson.version}`);
|
|
152
152
|
console.log(` Claude CLI: ${cli.version}`);
|
|
153
153
|
|
|
154
|
+
const cwd = opts.dir ? resolve(opts.dir) : process.cwd();
|
|
155
|
+
|
|
156
|
+
// --- Auto-detect project autonomy config ---
|
|
157
|
+
if (!opts.profile && !opts.trust) {
|
|
158
|
+
try {
|
|
159
|
+
const settingsPath = join(cwd, '.claude', 'settings.json');
|
|
160
|
+
const settings = JSON.parse(await readFile(settingsPath, 'utf-8'));
|
|
161
|
+
if (!settings.permissions || (!settings.permissions.allow && !settings.permissions.deny)) {
|
|
162
|
+
opts.trust = true;
|
|
163
|
+
console.log(' Auto-detected: full autonomy config (.claude/settings.json)');
|
|
164
|
+
}
|
|
165
|
+
} catch {
|
|
166
|
+
// No settings.json or invalid — proceed normally
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
154
170
|
// --- Load profile if specified ---
|
|
155
171
|
let profileDefaults = {};
|
|
156
172
|
if (opts.profile) {
|
|
@@ -165,7 +181,6 @@ program
|
|
|
165
181
|
}
|
|
166
182
|
|
|
167
183
|
// --- Config summary ---
|
|
168
|
-
const cwd = opts.dir ? resolve(opts.dir) : process.cwd();
|
|
169
184
|
const trust = opts.trust || profileDefaults.trust || false;
|
|
170
185
|
const pause = opts.pause !== undefined ? opts.pause : !trust;
|
|
171
186
|
|
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: claudenv
|
|
3
|
-
description: Detects missing or outdated project documentation and offers to generate or update it. Triggers when CLAUDE.md is missing, when the user mentions documentation setup, or when significant project changes are detected.
|
|
4
|
-
allowed-tools: Read, Write, Glob, Grep, Bash(find:*), Bash(cat:*), Bash(mkdir:*), Bash(cp:*), Bash(chmod:*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# claudenv — Documentation Management Skill
|
|
8
|
-
|
|
9
|
-
## When to auto-trigger
|
|
10
|
-
- CLAUDE.md does not exist in the project root
|
|
11
|
-
- `.mcp.json` does not exist in a project that has CLAUDE.md
|
|
12
|
-
- User mentions "documentation", "CLAUDE.md", "project setup", or "claudenv"
|
|
13
|
-
- User mentions "MCP", "MCP servers", or "mcp.json"
|
|
14
|
-
- User asks to configure Claude Code for their project
|
|
15
|
-
- After major refactoring that changes directory structure
|
|
16
|
-
|
|
17
|
-
## Capabilities
|
|
18
|
-
|
|
19
|
-
### Initial Setup
|
|
20
|
-
If no CLAUDE.md exists, suggest running `/claudenv` to set up full documentation.
|
|
21
|
-
|
|
22
|
-
### Update Detection
|
|
23
|
-
When working in a project with existing documentation, watch for:
|
|
24
|
-
- New dependencies added to manifest files
|
|
25
|
-
- New directories created that aren't in CLAUDE.md Architecture section
|
|
26
|
-
- Changed scripts in package.json / pyproject.toml
|
|
27
|
-
- New config files (linter, formatter, test framework)
|
|
28
|
-
|
|
29
|
-
When changes are detected, suggest running `/update-docs`.
|
|
30
|
-
|
|
31
|
-
### MCP Configuration
|
|
32
|
-
When `.mcp.json` is missing in a project that already has CLAUDE.md, suggest running `/setup-mcp` to configure MCP servers. When the user mentions MCP servers, offer to run `/setup-mcp`.
|
|
33
|
-
|
|
34
|
-
### Validation
|
|
35
|
-
After documentation changes, run the validation script:
|
|
36
|
-
```bash
|
|
37
|
-
bash .claude/skills/doc-generator/scripts/validate.sh 2>&1 || true
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Reference
|
|
41
|
-
|
|
42
|
-
For tech stack detection patterns, see:
|
|
43
|
-
@~/.claude/skills/claudenv/templates/detection-patterns.md
|
|
44
|
-
|
|
45
|
-
For MCP server search, evaluation, and configuration, see:
|
|
46
|
-
@~/.claude/skills/claudenv/templates/mcp-servers.md
|
|
47
|
-
|
|
48
|
-
## Project-level scaffold
|
|
49
|
-
|
|
50
|
-
The following files are available for installation into projects at `~/.claude/skills/claudenv/scaffold/`:
|
|
51
|
-
- `.claude/commands/init-docs.md` — Interactive documentation regeneration
|
|
52
|
-
- `.claude/commands/update-docs.md` — Refresh docs from current state
|
|
53
|
-
- `.claude/commands/validate-docs.md` — Run validation checks
|
|
54
|
-
- `.claude/skills/doc-generator/SKILL.md` — Per-project doc generation skill
|
|
55
|
-
- `.claude/skills/doc-generator/scripts/validate.sh` — Bash validation script
|
|
56
|
-
- `.claude/skills/doc-generator/templates/detection-patterns.md` — Detection reference
|
|
57
|
-
- `.claude/commands/setup-mcp.md` — MCP server recommendation and setup
|
|
58
|
-
- `.claude/commands/improve.md` — Single improvement iteration (used by claudenv loop)
|
|
59
|
-
- `.claude/skills/doc-generator/templates/mcp-servers.md` — MCP registry reference
|
|
60
|
-
- `.claude/agents/doc-analyzer.md` — Read-only analysis subagent
|