@raquezha/norpiv 0.0.7 → 0.1.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/README.md +30 -34
- package/frame/SKILL.md +13 -7
- package/grill-with-docs/SKILL.md +15 -15
- package/implement/SKILL.md +18 -17
- package/implement/scripts/enforce-branch.sh +22 -12
- package/package.json +3 -1
- package/plan/SKILL.md +10 -2
- package/refine/SKILL.md +54 -0
- package/scripts/graphify-grill.py +42 -0
- package/scripts/graphify-grill.sh +24 -0
- package/scripts/test_graphify_grill.py +21 -0
- package/scripts/triage_helper.sh +133 -36
- package/scripts/validate_active_task.sh +63 -37
- package/sync/SKILL.md +12 -3
- package/triage/SKILL.md +10 -13
- package/verify/SKILL.md +3 -3
- package/scripts/reposcry-bootstrap.sh +0 -108
- package/scripts/reposcry-refresh.sh +0 -19
- package/scripts/reposcry-task-context.sh +0 -40
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
6
|
-
cd "$REPO_ROOT"
|
|
7
|
-
|
|
8
|
-
ensure_reposcry_gitignore() {
|
|
9
|
-
local gitignore=".gitignore"
|
|
10
|
-
touch "$gitignore"
|
|
11
|
-
|
|
12
|
-
if ! grep -qxF ".reposcry/" "$gitignore"; then
|
|
13
|
-
{
|
|
14
|
-
printf '\n# RepoScry local cache\n'
|
|
15
|
-
printf '.reposcry/\n'
|
|
16
|
-
} >> "$gitignore"
|
|
17
|
-
echo "Added .reposcry/ to .gitignore"
|
|
18
|
-
fi
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
refuse_tracked_reposcry_cache() {
|
|
22
|
-
local tracked staged
|
|
23
|
-
tracked=$(git ls-files .reposcry 2>/dev/null || true)
|
|
24
|
-
staged=$(git diff --cached --name-only -- .reposcry 2>/dev/null || true)
|
|
25
|
-
|
|
26
|
-
if [[ -n "$tracked" || -n "$staged" ]]; then
|
|
27
|
-
echo "ERROR: .reposcry/ cache is tracked or staged. It is generated local state and must not be committed." >&2
|
|
28
|
-
if [[ -n "$tracked" ]]; then
|
|
29
|
-
echo "Tracked files:" >&2
|
|
30
|
-
printf '%s\n' "$tracked" >&2
|
|
31
|
-
fi
|
|
32
|
-
if [[ -n "$staged" ]]; then
|
|
33
|
-
echo "Staged files:" >&2
|
|
34
|
-
printf '%s\n' "$staged" >&2
|
|
35
|
-
fi
|
|
36
|
-
echo "Fix: git rm --cached -r .reposcry && keep .reposcry/ in .gitignore" >&2
|
|
37
|
-
exit 1
|
|
38
|
-
fi
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
reposcry_indexed_files() {
|
|
42
|
-
reposcry stats 2>/dev/null | awk '/Files indexed:/ {print $3; exit}'
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
# Quick health check for Pulse info
|
|
46
|
-
check_pulse() {
|
|
47
|
-
if ! command -v reposcry >/dev/null 2>&1; then
|
|
48
|
-
echo "PULSE: Missing (Not installed)"
|
|
49
|
-
return
|
|
50
|
-
fi
|
|
51
|
-
if [[ ! -d .reposcry ]]; then
|
|
52
|
-
echo "PULSE: Cold (No cache)"
|
|
53
|
-
return
|
|
54
|
-
fi
|
|
55
|
-
local files
|
|
56
|
-
files=$(reposcry_indexed_files || echo "0")
|
|
57
|
-
if [[ "$files" == "0" ]]; then
|
|
58
|
-
echo "PULSE: Cold (Zero files)"
|
|
59
|
-
else
|
|
60
|
-
echo "PULSE: Warm ($files files)"
|
|
61
|
-
fi
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if [[ "${1:-}" == "--pulse" ]]; then
|
|
65
|
-
check_pulse
|
|
66
|
-
exit 0
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
ensure_reposcry_gitignore
|
|
70
|
-
refuse_tracked_reposcry_cache
|
|
71
|
-
|
|
72
|
-
if ! command -v reposcry >/dev/null 2>&1; then
|
|
73
|
-
echo "RepoScry not installed; skipping bootstrap."
|
|
74
|
-
exit 0
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
HAD_REPOSCRYIGNORE=0
|
|
78
|
-
[[ -f .reposcryignore ]] && HAD_REPOSCRYIGNORE=1
|
|
79
|
-
|
|
80
|
-
FORCE_REINDEX=0
|
|
81
|
-
if [[ "${1:-}" == "--force" || "${1:-}" == "--reindex" ]]; then
|
|
82
|
-
FORCE_REINDEX=1
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
if [[ ! -d .reposcry ]]; then
|
|
86
|
-
echo "Initializing RepoScry..."
|
|
87
|
-
reposcry init >/dev/null 2>&1 || reposcry init || {
|
|
88
|
-
echo "RepoScry init failed; continuing without RepoScry." >&2
|
|
89
|
-
exit 0
|
|
90
|
-
}
|
|
91
|
-
fi
|
|
92
|
-
|
|
93
|
-
INDEXED_FILES=$(reposcry_indexed_files || true)
|
|
94
|
-
INDEXED_FILES=${INDEXED_FILES:-0}
|
|
95
|
-
|
|
96
|
-
if [[ $FORCE_REINDEX -eq 1 || "$INDEXED_FILES" == "0" ]]; then
|
|
97
|
-
echo "Indexing repository with RepoScry (--no-semantic)..."
|
|
98
|
-
reposcry index --no-semantic || {
|
|
99
|
-
echo "RepoScry index failed; continuing without RepoScry." >&2
|
|
100
|
-
exit 0
|
|
101
|
-
}
|
|
102
|
-
else
|
|
103
|
-
echo "RepoScry index already present ($INDEXED_FILES files indexed)."
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
if [[ $HAD_REPOSCRYIGNORE -eq 0 && -f .reposcryignore ]]; then
|
|
107
|
-
echo "RepoScry created .reposcryignore. Review and commit it if you want stable RepoScry indexing rules."
|
|
108
|
-
fi
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
BASE_REF=${1:-${REPOSCRY_BASE_REF:-main}}
|
|
6
|
-
|
|
7
|
-
if ! command -v reposcry-update >/dev/null 2>&1; then
|
|
8
|
-
echo "reposcry-update not installed; skipping refresh."
|
|
9
|
-
exit 0
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
13
|
-
cd "$REPO_ROOT"
|
|
14
|
-
|
|
15
|
-
echo "Refreshing RepoScry for changed files against base '$BASE_REF'..."
|
|
16
|
-
if ! reposcry-update --changed --base "$BASE_REF"; then
|
|
17
|
-
echo "RepoScry refresh failed; continuing without refreshed graph state." >&2
|
|
18
|
-
exit 0
|
|
19
|
-
fi
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
TASK_TEXT=${*:-}
|
|
6
|
-
if [[ -z "$TASK_TEXT" ]]; then
|
|
7
|
-
echo "Usage: $0 <task summary>"
|
|
8
|
-
exit 1
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
if ! command -v reposcry >/dev/null 2>&1; then
|
|
12
|
-
echo "RepoScry not installed; skipping task context generation."
|
|
13
|
-
exit 0
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
17
|
-
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
18
|
-
cd "$REPO_ROOT"
|
|
19
|
-
|
|
20
|
-
"$SCRIPT_DIR/reposcry-bootstrap.sh" || true
|
|
21
|
-
|
|
22
|
-
mkdir -p .reposcry
|
|
23
|
-
|
|
24
|
-
# Detect low-token modes (Caveman, etc.)
|
|
25
|
-
DEFAULT_BUDGET=20000
|
|
26
|
-
if [[ "${CAVEMAN_MODE:-off}" != "off" ]] || [[ "${LOW_TOKEN_MODE:-0}" == "1" ]]; then
|
|
27
|
-
DEFAULT_BUDGET=5000
|
|
28
|
-
echo "Low-token mode detected: reducing context budget to $DEFAULT_BUDGET"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
BUDGET=${REPOSCRY_CONTEXT_BUDGET:-$DEFAULT_BUDGET}
|
|
32
|
-
OUTPUT_PATH=".reposcry/AI_CONTEXT.md"
|
|
33
|
-
|
|
34
|
-
echo "Generating RepoScry task context at $OUTPUT_PATH..."
|
|
35
|
-
if reposcry context "$TASK_TEXT" --strict --budget "$BUDGET" --format markdown > "$OUTPUT_PATH"; then
|
|
36
|
-
echo "Wrote $OUTPUT_PATH"
|
|
37
|
-
else
|
|
38
|
-
echo "RepoScry context generation failed; leaving RPIV flow unchanged." >&2
|
|
39
|
-
rm -f "$OUTPUT_PATH"
|
|
40
|
-
fi
|