@dtt_siye/atool 1.2.1 → 1.3.0
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/knowledge-graph.sh +7 -2
- 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 +138 -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 +108 -0
- package/skills/project-analyze/phases/phase3-graph.md +77 -0
- package/skills/project-analyze/phases/phase4-synthesize.md +260 -0
- package/skills/project-analyze/phases/phase5-export.md +161 -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 +407 -0
- package/skills/requirements-writer/README.md +1 -1
- package/skills/requirements-writer/SKILL.md +378 -284
- 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 +248 -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/knowledge-graph.sh
CHANGED
|
@@ -410,11 +410,16 @@ compute_edge_weights() {
|
|
|
410
410
|
base_weights='{
|
|
411
411
|
"depends_on": 1.0, "calls": 0.9, "calls_async": 0.8,
|
|
412
412
|
"reads_state": 0.8, "writes_state": 0.8, "reads_from": 0.8,
|
|
413
|
-
"writes_to":
|
|
413
|
+
"writes_to": 1.2, "transforms": 0.7, "validates": 0.6,
|
|
414
414
|
"renders": 1.0, "routes_to": 1.0, "sends_http": 1.0,
|
|
415
415
|
"receives_http": 1.0, "persists_to": 0.9, "subscribes_to": 0.8,
|
|
416
416
|
"emits": 1.0, "listens_to": 1.0, "returns": 0.7,
|
|
417
|
-
"implements": 1.0, "extends": 1.0
|
|
417
|
+
"implements": 1.0, "extends": 1.0,
|
|
418
|
+
"configures": 0.6, "imports": 0.8,
|
|
419
|
+
"tests": 0.4, "mocks": 0.3,
|
|
420
|
+
"inherits": 1.0, "delegates": 0.9,
|
|
421
|
+
"contains": 0.5, "layer_depends": 0.7,
|
|
422
|
+
"publishes": 0.8, "subscribes": 0.8
|
|
418
423
|
}'
|
|
419
424
|
|
|
420
425
|
local result
|