@dtt_siye/atool 1.2.1 → 1.3.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/VERSION +1 -1
- package/hooks/session-start +9 -12
- package/lib/export-analysis.sh +100 -0
- package/lib/install-kiro.sh +11 -6
- package/lib/install-skills.sh +16 -0
- package/lib/knowledge-graph.sh +490 -83
- package/lib/pre-scan.sh +70 -5
- package/package.json +1 -1
- package/skills/doc-standards-enforcer/SKILL.md +200 -220
- package/skills/doc-standards-enforcer/examples/valid-document-example.md +5 -5
- package/skills/doc-standards-enforcer/references/101-standards-summary.md +17 -17
- package/skills/project-analyze/SKILL.md +157 -124
- package/skills/project-analyze/phases/{phase0-discovery.md → archive/phase0-discovery.md} +6 -2
- package/skills/project-analyze/phases/{phase1-inventory.md → archive/phase1-inventory.md} +10 -0
- package/skills/project-analyze/phases/{phase2-deep-analysis.md → archive/phase2-deep-analysis.md} +20 -0
- package/skills/project-analyze/phases/{phase3-knowledge-graph.md → archive/phase3-knowledge-graph.md} +31 -0
- package/skills/project-analyze/phases/{phase3a-multi-dimensional.md → archive/phase3a-multi-dimensional.md} +13 -0
- package/skills/project-analyze/phases/{phase5-synthesis.md → archive/phase5-synthesis.md} +20 -0
- package/skills/project-analyze/phases/phase1-setup.md +182 -0
- package/skills/project-analyze/phases/phase2-understand.md +114 -0
- package/skills/project-analyze/phases/phase2.5-refine.md +284 -0
- package/skills/project-analyze/phases/phase3-graph.md +77 -0
- package/skills/project-analyze/phases/phase4-synthesize.md +241 -0
- package/skills/project-analyze/phases/phase5-export.md +207 -0
- package/skills/project-analyze/prompts/{deep-analysis-agent.md → archive/deep-analysis-agent.md} +14 -1
- package/skills/project-analyze/prompts/understand-agent.md +424 -0
- package/skills/project-analyze/rules/android.md +61 -260
- package/skills/project-analyze/rules/devops.md +61 -421
- package/skills/project-analyze/rules/generic.md +53 -221
- package/skills/project-analyze/rules/go.md +60 -275
- package/skills/project-analyze/rules/harmony.md +64 -237
- package/skills/project-analyze/rules/java.md +47 -485
- package/skills/project-analyze/rules/mobile-flutter.md +57 -292
- package/skills/project-analyze/rules/mobile-react-native.md +65 -262
- package/skills/project-analyze/rules/mobile-swift.md +58 -303
- package/skills/project-analyze/rules/python.md +50 -296
- package/skills/project-analyze/rules/rust-tauri.md +51 -217
- package/skills/project-analyze/rules/rust.md +50 -274
- package/skills/project-analyze/rules/web-nextjs.md +61 -335
- package/skills/project-analyze/rules/web-react.md +50 -272
- package/skills/project-analyze/rules/web-vue.md +58 -352
- package/skills/project-analyze/rules/web.md +55 -347
- package/skills/requirements-writer/README.md +1 -1
- package/skills/requirements-writer/SKILL.md +423 -282
- package/skills/requirements-writer/examples/prd-outline-example.md +5 -5
- package/skills/requirements-writer/templates/module-prd-template.md +15 -15
- package/skills/requirements-writer/templates/prd-outline-template.md +3 -3
- package/skills/requirements-writer/templates/user-story-template.md +23 -23
- package/skills/software-architecture/SKILL.md +318 -17
- package/templates/CLAUDE.md.android +17 -0
- package/templates/CLAUDE.md.devops +17 -0
- package/templates/CLAUDE.md.generic +17 -0
- package/templates/CLAUDE.md.go +17 -0
- package/templates/CLAUDE.md.harmony +17 -0
- package/templates/CLAUDE.md.java +17 -0
- package/templates/CLAUDE.md.mobile-flutter +17 -0
- package/templates/CLAUDE.md.mobile-react-native +17 -0
- package/templates/CLAUDE.md.mobile-swift +17 -0
- package/templates/CLAUDE.md.python +17 -0
- package/templates/CLAUDE.md.rust +17 -0
- package/templates/CLAUDE.md.rust-tauri +17 -0
- package/templates/CLAUDE.md.web +17 -0
- package/templates/cursor-rules.android.mdc +17 -0
- package/templates/cursor-rules.devops.mdc +17 -0
- package/templates/cursor-rules.generic.mdc +17 -0
- package/templates/cursor-rules.go.mdc +17 -0
- package/templates/cursor-rules.harmony.mdc +17 -0
- package/templates/cursor-rules.java.mdc +17 -0
- package/templates/cursor-rules.mobile-flutter.mdc +17 -0
- package/templates/cursor-rules.mobile-react-native.mdc +17 -0
- package/templates/cursor-rules.mobile-swift.mdc +17 -0
- package/templates/cursor-rules.python.mdc +17 -0
- package/templates/cursor-rules.rust-tauri.mdc +17 -0
- package/templates/cursor-rules.rust.mdc +17 -0
- package/templates/cursor-rules.web.mdc +17 -0
- package/templates/kiro-steering.android.md +6 -0
- package/templates/kiro-steering.devops.md +6 -0
- package/templates/kiro-steering.generic.md +6 -0
- package/templates/kiro-steering.go.md +6 -0
- package/templates/kiro-steering.harmony.md +6 -0
- package/templates/kiro-steering.java.md +6 -0
- package/templates/kiro-steering.mobile-flutter.md +6 -0
- package/templates/kiro-steering.mobile-react-native.md +6 -0
- package/templates/kiro-steering.mobile-swift.md +6 -0
- package/templates/kiro-steering.python.md +6 -0
- package/templates/kiro-steering.rust-tauri.md +6 -0
- package/templates/kiro-steering.rust.md +6 -0
- package/templates/kiro-steering.web.md +6 -0
- package/templates/shared/hard-rules.md +21 -0
- /package/skills/project-analyze/phases/{phase0.5-prescan.md → archive/phase0.5-prescan.md} +0 -0
- /package/skills/project-analyze/phases/{phase2a-l4-analysis.md → archive/phase2a-l4-analysis.md} +0 -0
- /package/skills/project-analyze/phases/{phase2b-l5-analysis.md → archive/phase2b-l5-analysis.md} +0 -0
- /package/skills/project-analyze/phases/{phase4-code-quality.md → archive/phase4-code-quality.md} +0 -0
- /package/skills/project-analyze/phases/{phase6-validation.md → archive/phase6-validation.md} +0 -0
- /package/skills/project-analyze/prompts/{code-review-agent.md → archive/code-review-agent.md} +0 -0
- /package/skills/project-analyze/prompts/{inventory-agent.md → archive/inventory-agent.md} +0 -0
- /package/skills/project-analyze/prompts/{l4-analysis-agent.md → archive/l4-analysis-agent.md} +0 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1.3.0
|
package/hooks/session-start
CHANGED
|
@@ -190,24 +190,21 @@ if $IS_PROJECT && declare -f detect_stack &>/dev/null; then
|
|
|
190
190
|
|
|
191
191
|
PROJECT_CONTEXT+="</ATOOL-PROJECT-CONTEXT>"
|
|
192
192
|
|
|
193
|
-
#
|
|
194
|
-
|
|
193
|
+
# Hard rules — non-bypassable gates extracted from skills
|
|
194
|
+
# These apply in ALL modes: normal, Plan Mode, etc.
|
|
195
|
+
DOC_SYNC="<ATOOL-HARD-RULES>"
|
|
195
196
|
DOC_SYNC+=$'\n'
|
|
196
|
-
DOC_SYNC+="
|
|
197
|
+
DOC_SYNC+="Three NON-NEGOTIABLE rules that apply in ALL modes (Plan Mode, normal mode, etc.):"
|
|
197
198
|
DOC_SYNC+=$'\n\n'
|
|
198
|
-
DOC_SYNC+="
|
|
199
|
+
DOC_SYNC+="1. **Doc Sync Gate**: After modifying any source file, update affected docs (README.md, COMPONENT.md, UI_STYLE.md, docs/) BEFORE claiming done. If docs stale -> task NOT done."
|
|
199
200
|
DOC_SYNC+=$'\n'
|
|
200
|
-
DOC_SYNC+="
|
|
201
|
+
DOC_SYNC+="2. **Verification Gate**: Before claiming complete: (a) tests pass, (b) docs fresh, (c) no critical issues. Any fail -> task NOT done. Invoke /verification-before-completion."
|
|
201
202
|
DOC_SYNC+=$'\n'
|
|
202
|
-
DOC_SYNC+="
|
|
203
|
-
DOC_SYNC+=$'\n'
|
|
204
|
-
DOC_SYNC+="3. For doc writing, invoke /doc-coauthoring. For doc format validation, invoke /doc-standards-enforcer."
|
|
203
|
+
DOC_SYNC+="3. **Root Cause Gate**: When debugging, identify root cause BEFORE writing fix. Never guess-fix. See /systematic-debugging."
|
|
205
204
|
DOC_SYNC+=$'\n\n'
|
|
206
|
-
DOC_SYNC+="When writing plans:
|
|
207
|
-
DOC_SYNC+=$'\n'
|
|
208
|
-
DOC_SYNC+="Gate rule: if docs are stale, task is NOT done. No exceptions."
|
|
205
|
+
DOC_SYNC+="When writing plans (any mode): MUST include a final Documentation Sync task. Plans without it are INCOMPLETE."
|
|
209
206
|
DOC_SYNC+=$'\n'
|
|
210
|
-
DOC_SYNC+="</ATOOL-
|
|
207
|
+
DOC_SYNC+="</ATOOL-HARD-RULES>"
|
|
211
208
|
fi
|
|
212
209
|
|
|
213
210
|
# ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# lib/export-analysis.sh — Project analysis export and registry management
|
|
3
|
+
#
|
|
4
|
+
# Manages ~/.atool/projects.json, the global registry of analyzed projects.
|
|
5
|
+
# Called by Phase 5 (EXPORT) of project-analyze skill.
|
|
6
|
+
#
|
|
7
|
+
# Functions:
|
|
8
|
+
# register_project(project_root) — Add/update project in ~/.atool/projects.json
|
|
9
|
+
# list_projects() — List all registered projects
|
|
10
|
+
# unregister_project(project_root) — Remove project from registry
|
|
11
|
+
set -euo pipefail
|
|
12
|
+
|
|
13
|
+
ATOOL_HOME="${HOME}/.atool"
|
|
14
|
+
PROJECTS_REGISTRY="${ATOOL_HOME}/projects.json"
|
|
15
|
+
|
|
16
|
+
# _init_registry: Create registry file if it doesn't exist
|
|
17
|
+
_init_registry() {
|
|
18
|
+
mkdir -p "$ATOOL_HOME"
|
|
19
|
+
if [ ! -f "$PROJECTS_REGISTRY" ]; then
|
|
20
|
+
echo '{"version":"1.0","projects":[]}' > "$PROJECTS_REGISTRY"
|
|
21
|
+
fi
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
# register_project: Add or update a project in the global registry
|
|
25
|
+
# Args: $1 = project_root (absolute path to analyzed project)
|
|
26
|
+
# Reads: $project_root/atool-analysis/manifest.json
|
|
27
|
+
register_project() {
|
|
28
|
+
local project_root="${1:?register_project: project_root required}"
|
|
29
|
+
local manifest="$project_root/atool-analysis/manifest.json"
|
|
30
|
+
|
|
31
|
+
if [ ! -f "$manifest" ]; then
|
|
32
|
+
echo "Warning: manifest.json not found at $manifest, skipping registry" >&2
|
|
33
|
+
return 0
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
_init_registry
|
|
37
|
+
|
|
38
|
+
local name stack depth module_count file_count analyzed_at version
|
|
39
|
+
name=$(jq -r '.name // "unknown"' "$manifest")
|
|
40
|
+
stack=$(jq -r '.stack // "unknown"' "$manifest")
|
|
41
|
+
depth=$(jq -r '.depth // "L2"' "$manifest")
|
|
42
|
+
module_count=$(jq -r '.module_count // 0' "$manifest")
|
|
43
|
+
file_count=$(jq -r '.file_count // 0' "$manifest")
|
|
44
|
+
analyzed_at=$(jq -r '.analyzed_at // ""' "$manifest")
|
|
45
|
+
version=$(jq -r '.analysis_version // "5.1.0"' "$manifest")
|
|
46
|
+
|
|
47
|
+
# Build new entry JSON
|
|
48
|
+
local new_entry
|
|
49
|
+
new_entry=$(jq -n \
|
|
50
|
+
--arg path "$project_root" \
|
|
51
|
+
--arg name "$name" \
|
|
52
|
+
--arg stack "$stack" \
|
|
53
|
+
--arg depth "$depth" \
|
|
54
|
+
--argjson module_count "$module_count" \
|
|
55
|
+
--argjson file_count "$file_count" \
|
|
56
|
+
--arg analyzed_at "$analyzed_at" \
|
|
57
|
+
--arg version "$version" \
|
|
58
|
+
'{
|
|
59
|
+
path: $path,
|
|
60
|
+
name: $name,
|
|
61
|
+
stack: $stack,
|
|
62
|
+
depth: $depth,
|
|
63
|
+
module_count: $module_count,
|
|
64
|
+
file_count: $file_count,
|
|
65
|
+
analyzed_at: $analyzed_at,
|
|
66
|
+
analysis_version: $version
|
|
67
|
+
}')
|
|
68
|
+
|
|
69
|
+
# Upsert: remove existing entry with same path, then add new one
|
|
70
|
+
jq --argjson entry "$new_entry" \
|
|
71
|
+
'.projects = ([.projects[] | select(.path != $entry.path)] + [$entry])' \
|
|
72
|
+
"$PROJECTS_REGISTRY" > "${PROJECTS_REGISTRY}.tmp" \
|
|
73
|
+
&& mv "${PROJECTS_REGISTRY}.tmp" "$PROJECTS_REGISTRY"
|
|
74
|
+
|
|
75
|
+
echo "Project registered: $name ($stack) → $PROJECTS_REGISTRY"
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
# list_projects: Print all registered projects (one per line)
|
|
79
|
+
list_projects() {
|
|
80
|
+
_init_registry
|
|
81
|
+
local count
|
|
82
|
+
count=$(jq '.projects | length' "$PROJECTS_REGISTRY" 2>/dev/null || echo 0)
|
|
83
|
+
if [ "$count" -eq 0 ]; then
|
|
84
|
+
echo "No projects registered yet"
|
|
85
|
+
return 0
|
|
86
|
+
fi
|
|
87
|
+
jq -r '.projects[] | "\(.name) [\(.stack)] \(.depth) — \(.path)"' "$PROJECTS_REGISTRY"
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
# unregister_project: Remove a project from the registry by path
|
|
91
|
+
# Args: $1 = project_root (absolute path)
|
|
92
|
+
unregister_project() {
|
|
93
|
+
local project_root="${1:?unregister_project: project_root required}"
|
|
94
|
+
_init_registry
|
|
95
|
+
jq --arg path "$project_root" \
|
|
96
|
+
'.projects = [.projects[] | select(.path != $path)]' \
|
|
97
|
+
"$PROJECTS_REGISTRY" > "${PROJECTS_REGISTRY}.tmp" \
|
|
98
|
+
&& mv "${PROJECTS_REGISTRY}.tmp" "$PROJECTS_REGISTRY"
|
|
99
|
+
echo "Project unregistered: $project_root"
|
|
100
|
+
}
|
package/lib/install-kiro.sh
CHANGED
|
@@ -314,15 +314,20 @@ MDFRONT
|
|
|
314
314
|
# Append skill catalog (no indentation)
|
|
315
315
|
cat >> "$md_file" <<< "$skills_catalog"
|
|
316
316
|
|
|
317
|
-
# Append
|
|
317
|
+
# Append hard rules (extracted from skills, non-bypassable in all modes)
|
|
318
318
|
cat >> "$md_file" <<'RULES'
|
|
319
319
|
|
|
320
|
-
##
|
|
320
|
+
## aTool Hard Rules (Non-bypassable)
|
|
321
321
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
Three NON-NEGOTIABLE rules that apply in ALL modes (Plan Mode, normal mode, etc.):
|
|
323
|
+
|
|
324
|
+
1. **Doc Sync Gate**: After modifying any source file, update affected docs (README.md, COMPONENT.md, UI_STYLE.md, docs/) BEFORE claiming done. If docs stale -> task NOT done.
|
|
325
|
+
|
|
326
|
+
2. **Verification Gate**: Before claiming complete: (a) tests pass, (b) docs fresh, (c) no critical issues. Any fail -> task NOT done. Invoke /verification-before-completion.
|
|
327
|
+
|
|
328
|
+
3. **Root Cause Gate**: When debugging, identify root cause BEFORE writing fix. Never guess-fix. See /systematic-debugging.
|
|
329
|
+
|
|
330
|
+
When writing plans (any mode): MUST include a final Documentation Sync task. Plans without it are INCOMPLETE.
|
|
326
331
|
|
|
327
332
|
## On-Demand Skills
|
|
328
333
|
|
package/lib/install-skills.sh
CHANGED
|
@@ -118,6 +118,22 @@ install_skills() {
|
|
|
118
118
|
run_cmd cp -r "$skill_dir" "$target_skill"
|
|
119
119
|
write_skill_version_marker "$target_skill" "$source_ver"
|
|
120
120
|
|
|
121
|
+
# Copy referenced lib/ scripts into skill's lib/ subdirectory
|
|
122
|
+
# Skills reference scripts via "source lib/X.sh" relative to the skill dir
|
|
123
|
+
local skill_lib_dir="$target_skill/lib"
|
|
124
|
+
local referenced_libs
|
|
125
|
+
referenced_libs=$(find "$target_skill/phases" "$target_skill" -maxdepth 2 -name '*.md' -exec grep -roh 'source lib/[^ ]*\.sh' {} + 2>/dev/null \
|
|
126
|
+
| sed 's/source lib\///' | sort -u)
|
|
127
|
+
if [[ -n "$referenced_libs" ]]; then
|
|
128
|
+
run_cmd mkdir -p "$skill_lib_dir"
|
|
129
|
+
for lib_name in $referenced_libs; do
|
|
130
|
+
local lib_src="$atool_root/lib/$lib_name"
|
|
131
|
+
if [[ -f "$lib_src" ]]; then
|
|
132
|
+
run_cmd cp "$lib_src" "$skill_lib_dir/$lib_name"
|
|
133
|
+
fi
|
|
134
|
+
done
|
|
135
|
+
fi
|
|
136
|
+
|
|
121
137
|
if [[ "$installed_ver" != "none" ]] && [[ "$installed_ver" != "$source_ver" ]]; then
|
|
122
138
|
log_info "Updated skill: $skill_name"
|
|
123
139
|
else
|