guardian-framework 0.1.5 → 0.1.7
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/dist/cli.js +1 -1
- package/dist/exports.js +1 -1
- package/package.json +1 -1
- package/templates/pi/extensions/architect.ts +6 -0
- package/templates/pi/preflight_report.json +1 -1
- package/templates/pi/prompts/bug-fix.md +1 -0
- package/templates/pi/prompts/feature-development.md +2 -0
- package/templates/pi/prompts/hotfix.md +1 -0
- package/templates/pi/prompts/issue-implementation-series.md +1 -0
- package/templates/pi/prompts/refactoring.md +1 -0
- package/templates/pi/scripts/ci/local-ci.sh +144 -0
package/dist/cli.js
CHANGED
|
@@ -1335,7 +1335,7 @@ __export(exports_package, {
|
|
|
1335
1335
|
bin: () => bin,
|
|
1336
1336
|
author: () => author
|
|
1337
1337
|
});
|
|
1338
|
-
var name = "guardian-framework", version = "0.1.
|
|
1338
|
+
var name = "guardian-framework", version = "0.1.7", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
|
|
1339
1339
|
var init_package = __esm(() => {
|
|
1340
1340
|
exports = {
|
|
1341
1341
|
".": {
|
package/dist/exports.js
CHANGED
|
@@ -995,7 +995,7 @@ __export(exports_package, {
|
|
|
995
995
|
bin: () => bin,
|
|
996
996
|
author: () => author
|
|
997
997
|
});
|
|
998
|
-
var name = "guardian-framework", version = "0.1.
|
|
998
|
+
var name = "guardian-framework", version = "0.1.7", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
|
|
999
999
|
var init_package = __esm(() => {
|
|
1000
1000
|
exports = {
|
|
1001
1001
|
".": {
|
package/package.json
CHANGED
|
@@ -729,6 +729,8 @@ guardian_issue:
|
|
|
729
729
|
- Check test coverage meets thresholds
|
|
730
730
|
- Integrate proofing scripts into .pi/scripts/ci/
|
|
731
731
|
- Scripts must be self-contained shell scripts (zero token cost)
|
|
732
|
+
- Scripts auto-register in local-ci.sh via regex (stage_*.sh, check_*.sh)
|
|
733
|
+
- Run bash .pi/scripts/ci/local-ci.sh — must pass before closing this issue
|
|
732
734
|
|
|
733
735
|
out_of_scope:
|
|
734
736
|
- Implementation changes
|
|
@@ -749,6 +751,7 @@ guardian_issue:
|
|
|
749
751
|
- "Scripts pass on current implementation"
|
|
750
752
|
- "Scripts fail if implementation is removed"
|
|
751
753
|
- "Scripts integrated into CI pipeline (stage in run_hardening_stages.sh)"
|
|
754
|
+
- "bash .pi/scripts/ci/local-ci.sh exits 0 (all scripts pass together)"
|
|
752
755
|
|
|
753
756
|
validators:
|
|
754
757
|
- ci
|
|
@@ -764,7 +767,9 @@ guardian_issue:
|
|
|
764
767
|
file_changes:
|
|
765
768
|
- "create: .pi/scripts/ci/check_${moduleId}_contracts.sh"
|
|
766
769
|
- "create: .pi/scripts/ci/check_${moduleId}_coverage.sh"
|
|
770
|
+
- "create: .pi/scripts/ci/stage_${moduleId}_proofing.sh"
|
|
767
771
|
- "modify: .pi/scripts/ci/run_hardening_stages.sh"
|
|
772
|
+
- "modify (auto): .pi/scripts/ci/local-ci.sh — scripts register via regex pattern, no manual edit needed"
|
|
768
773
|
---
|
|
769
774
|
|
|
770
775
|
# Proofing & CI Enforcement: ${slice.module}
|
|
@@ -818,6 +823,7 @@ run_stage "11" "${moduleId}_proofing" \\
|
|
|
818
823
|
| 2 | Coverage ≥ 80% per module | check_coverage.sh |
|
|
819
824
|
| 3 | CI runs checks on every PR | run_hardening_stages.sh |
|
|
820
825
|
| 4 | All scripts exit 0 on pass, 1 on fail | self-validating |
|
|
826
|
+
| 5 | All scripts pass together | bash .pi/scripts/ci/local-ci.sh |
|
|
821
827
|
|
|
822
828
|
## Implementation
|
|
823
829
|
|
|
@@ -72,6 +72,7 @@ For each issue in batch order:
|
|
|
72
72
|
git commit -m "feat: implement #123 - {description}"
|
|
73
73
|
```
|
|
74
74
|
5. Mark issue in progress: `gh issue comment {num} --body "Implementing in {branch}"`
|
|
75
|
+
6. Auto-advance: call `pipeline_advance` immediately (no asking)
|
|
75
76
|
|
|
76
77
|
### Phase 6: Pre-MR Validation
|
|
77
78
|
**Scripts:** Run automated validators
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Local CI — runs ALL validation and proofing scripts locally
|
|
3
|
+
#
|
|
4
|
+
# Scans .pi/scripts/ci/ for stage_*.sh, check_*.sh, and validate-*.sh
|
|
5
|
+
# scripts and runs every one. This includes all epic proofing scripts.
|
|
6
|
+
# Use before committing to catch regressions across all modules.
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# bash .pi/scripts/ci/local-ci.sh # Run all
|
|
10
|
+
# bash .pi/scripts/ci/local-ci.sh --list # List matching scripts only
|
|
11
|
+
# bash .pi/scripts/ci/local-ci.sh --verbose # Verbose output
|
|
12
|
+
# bash .pi/scripts/ci/local-ci.sh --json # JSON report
|
|
13
|
+
#
|
|
14
|
+
# Registration: add new scripts by placing them in .pi/scripts/ci/
|
|
15
|
+
# with names matching: stage_*.sh, check_*.sh, or validate-*.sh
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
PI_DIR=".pi"
|
|
20
|
+
CI_DIR="${PI_DIR}/scripts/ci"
|
|
21
|
+
START_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
|
|
22
|
+
|
|
23
|
+
# Colors
|
|
24
|
+
RED='\033[0;31m'
|
|
25
|
+
GREEN='\033[0;32m'
|
|
26
|
+
YELLOW='\033[1;33m'
|
|
27
|
+
BLUE='\033[0;34m'
|
|
28
|
+
NC='\033[0m'
|
|
29
|
+
|
|
30
|
+
# Options
|
|
31
|
+
LIST_ONLY=false
|
|
32
|
+
VERBOSE=false
|
|
33
|
+
JSON=false
|
|
34
|
+
TOTAL=0
|
|
35
|
+
PASSED=0
|
|
36
|
+
FAILED=0
|
|
37
|
+
RESULTS=()
|
|
38
|
+
START_TIME=$(date +%s)
|
|
39
|
+
|
|
40
|
+
while [[ $# -gt 0 ]]; do
|
|
41
|
+
case $1 in
|
|
42
|
+
--list) LIST_ONLY=true; shift ;;
|
|
43
|
+
--verbose) VERBOSE=true; shift ;;
|
|
44
|
+
--json) JSON=true; shift ;;
|
|
45
|
+
*) shift ;;
|
|
46
|
+
esac
|
|
47
|
+
done
|
|
48
|
+
|
|
49
|
+
cd "$START_DIR"
|
|
50
|
+
|
|
51
|
+
# Discover all scripts via regex: stage_*.sh, check_*.sh, validate-*.sh
|
|
52
|
+
SCRIPTS=()
|
|
53
|
+
while IFS= read -r -d '' script; do
|
|
54
|
+
SCRIPTS+=("$script")
|
|
55
|
+
done < <(find "$CI_DIR" -maxdepth 1 -type f -name 'stage_*.sh' -print0 2>/dev/null)
|
|
56
|
+
while IFS= read -r -d '' script; do
|
|
57
|
+
SCRIPTS+=("$script")
|
|
58
|
+
done < <(find "$CI_DIR" -maxdepth 1 -type f -name 'check_*.sh' -print0 2>/dev/null)
|
|
59
|
+
while IFS= read -r -d '' script; do
|
|
60
|
+
SCRIPTS+=("$script")
|
|
61
|
+
done < <(find "$CI_DIR" -maxdepth 1 -type f -name 'validate-*.sh' -print0 2>/dev/null)
|
|
62
|
+
|
|
63
|
+
if [[ ${#SCRIPTS[@]} -eq 0 ]]; then
|
|
64
|
+
echo "No matching scripts found in $CI_DIR"
|
|
65
|
+
exit 0
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
# Sort for deterministic order
|
|
69
|
+
IFS=$'\n' SCRIPTS=($(sort <<<"${SCRIPTS[*]}")); unset IFS
|
|
70
|
+
|
|
71
|
+
if [[ "$LIST_ONLY" == "true" ]]; then
|
|
72
|
+
echo "Scripts in $CI_DIR:"
|
|
73
|
+
for script in "${SCRIPTS[@]}"; do
|
|
74
|
+
echo " $script"
|
|
75
|
+
done
|
|
76
|
+
exit 0
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
if [[ "$JSON" == "false" ]]; then
|
|
80
|
+
echo -e "${BLUE}══════════════════════════════════════════════${NC}"
|
|
81
|
+
echo -e "${BLUE} Local CI — Running ${#SCRIPTS[@]} scripts${NC}"
|
|
82
|
+
echo -e "${BLUE}══════════════════════════════════════════════${NC}"
|
|
83
|
+
echo ""
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
for script in "${SCRIPTS[@]}"; do
|
|
87
|
+
name=$(basename "$script")
|
|
88
|
+
TOTAL=$((TOTAL + 1))
|
|
89
|
+
|
|
90
|
+
if [[ "$JSON" == "false" ]]; then
|
|
91
|
+
echo -e "${YELLOW}[RUN]${NC} $name"
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
set +e
|
|
95
|
+
output=$(bash "$script" 2>&1)
|
|
96
|
+
exit_code=$?
|
|
97
|
+
set -e
|
|
98
|
+
|
|
99
|
+
if [[ $exit_code -eq 0 ]]; then
|
|
100
|
+
PASSED=$((PASSED + 1))
|
|
101
|
+
RESULTS+=("{\"script\":\"$name\",\"status\":\"pass\"}")
|
|
102
|
+
if [[ "$JSON" == "false" ]]; then
|
|
103
|
+
echo -e " ${GREEN}✓ PASS${NC}"
|
|
104
|
+
fi
|
|
105
|
+
else
|
|
106
|
+
FAILED=$((FAILED + 1))
|
|
107
|
+
RESULTS+=("{\"script\":\"$name\",\"status\":\"fail\",\"exit_code\":$exit_code}")
|
|
108
|
+
if [[ "$JSON" == "false" ]]; then
|
|
109
|
+
echo -e " ${RED}✗ FAIL (exit $exit_code)${NC}"
|
|
110
|
+
if [[ "$VERBOSE" == "true" ]]; then
|
|
111
|
+
echo "$output" | sed 's/^/ /'
|
|
112
|
+
fi
|
|
113
|
+
fi
|
|
114
|
+
fi
|
|
115
|
+
done
|
|
116
|
+
|
|
117
|
+
END_TIME=$(date +%s)
|
|
118
|
+
DURATION=$((END_TIME - START_TIME))
|
|
119
|
+
|
|
120
|
+
if [[ "$JSON" == "true" ]]; then
|
|
121
|
+
echo "{"
|
|
122
|
+
echo " \"total\": $TOTAL,"
|
|
123
|
+
echo " \"passed\": $PASSED,"
|
|
124
|
+
echo " \"failed\": $FAILED,"
|
|
125
|
+
echo " \"duration_seconds\": $DURATION,"
|
|
126
|
+
echo " \"results\": ["
|
|
127
|
+
for i in "${!RESULTS[@]}"; do
|
|
128
|
+
sep=","
|
|
129
|
+
if [[ $i -eq $((${#RESULTS[@]} - 1)) ]]; then sep=""; fi
|
|
130
|
+
echo " ${RESULTS[$i]}$sep"
|
|
131
|
+
done
|
|
132
|
+
echo " ]"
|
|
133
|
+
echo "}"
|
|
134
|
+
else
|
|
135
|
+
echo ""
|
|
136
|
+
echo -e "${BLUE}══════════════════════════════════════════════${NC}"
|
|
137
|
+
echo -e " Total: $TOTAL | ${GREEN}Passed: $PASSED${NC} | ${RED}Failed: $FAILED${NC} | ${DURATION}s"
|
|
138
|
+
echo -e "${BLUE}══════════════════════════════════════════════${NC}"
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
if [[ $FAILED -gt 0 ]]; then
|
|
142
|
+
exit 1
|
|
143
|
+
fi
|
|
144
|
+
exit 0
|