Skip to content

Commit d64cb90

Browse files
authored
feat: Pipeline 15%→90% + Protocol v2 + Linter (#68)
Build 9/9, Compile 90%, Lint 95.9%, Oracle, Faculty Board, Trinity Protocol v2
1 parent 02157c5 commit d64cb90

78 files changed

Lines changed: 98652 additions & 2958 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/tri/SKILL.md

Lines changed: 677 additions & 13 deletions
Large diffs are not rendered by default.

.claude/skills/tri/lang.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lang: ru

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ GLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4
1111

1212
# Alternative: OpenAI API - https://platform.openai.com/
1313
# OPENAI_API_KEY=your_openai_key_here
14+
15+
# Perplexity Scholar Agent (Sonar Pro API) — Pipeline Link 24
16+
# Get your key at https://www.perplexity.ai/settings/api
17+
# PERPLEXITY_API_KEY=pplx-xxxxxxxxxxxxx

.github/workflows/lint-specs.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Spec Linter Gate
2+
3+
on:
4+
pull_request:
5+
paths: ['specs/**/*.tri']
6+
push:
7+
paths: ['specs/**/*.tri']
8+
branches: [main]
9+
10+
jobs:
11+
lint-specs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Install Zig
19+
uses: goto-bus-stop/setup-zig@v2
20+
with:
21+
version: 0.15.0
22+
23+
- name: Build vibee
24+
run: zig build vibee
25+
26+
- name: Lint changed specs
27+
id: lint
28+
run: |
29+
if [ "${{ github.event_name }}" = "pull_request" ]; then
30+
CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- 'specs/**/*.tri')
31+
else
32+
CHANGED=$(git diff --name-only HEAD~1 HEAD -- 'specs/**/*.tri')
33+
fi
34+
35+
if [ -z "$CHANGED" ]; then
36+
echo "No .tri files changed"
37+
echo "summary=No specs changed" >> $GITHUB_OUTPUT
38+
exit 0
39+
fi
40+
41+
PASS=0; FAIL=0; WARN=0
42+
DETAILS=""
43+
44+
for f in $CHANGED; do
45+
if [ ! -f "$f" ]; then continue; fi
46+
RESULT=$(./zig-out/bin/vibee validate "$f" 2>&1)
47+
RC=$?
48+
if [ $RC -ne 0 ]; then
49+
FAIL=$((FAIL+1))
50+
DETAILS="${DETAILS}FAIL ${f}\n${RESULT}\n\n"
51+
elif echo "$RESULT" | grep -q "WARN"; then
52+
WARN=$((WARN+1))
53+
else
54+
PASS=$((PASS+1))
55+
fi
56+
done
57+
58+
echo "pass=$PASS" >> $GITHUB_OUTPUT
59+
echo "fail=$FAIL" >> $GITHUB_OUTPUT
60+
echo "warn=$WARN" >> $GITHUB_OUTPUT
61+
echo "summary=Pass:$PASS Warn:$WARN Fail:$FAIL" >> $GITHUB_OUTPUT
62+
63+
if [ $FAIL -gt 0 ]; then
64+
echo -e "$DETAILS"
65+
echo "Spec lint failed: $FAIL spec(s) have errors"
66+
exit 1
67+
fi
68+
69+
- name: Comment PR
70+
if: github.event_name == 'pull_request' && always()
71+
uses: actions/github-script@v7
72+
with:
73+
script: |
74+
const pass = '${{ steps.lint.outputs.pass }}' || '0';
75+
const fail = '${{ steps.lint.outputs.fail }}' || '0';
76+
const warn = '${{ steps.lint.outputs.warn }}' || '0';
77+
const status = fail > 0 ? 'BLOCKED' : 'OPEN';
78+
const emoji = fail > 0 ? '🔴' : '🟢';
79+
80+
await github.rest.issues.createComment({
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
issue_number: context.issue.number,
84+
body: `### Spec Linter Gate ${emoji}\n\n| Result | Count |\n|--------|-------|\n| Pass | ${pass} |\n| Warn | ${warn} |\n| Fail | ${fail} |\n\n**Gate**: ${status}`
85+
});

0 commit comments

Comments
 (0)