sinapse-ai 7.7.2 → 7.7.3
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/.claude/hooks/enforce-git-push-authority.sh +34 -2
- package/.claude/rules/safe-collaboration.md +12 -1
- package/.sinapse-ai/data/entity-registry.yaml +797 -796
- package/.sinapse-ai/infrastructure/templates/safe-collab/README.md +45 -18
- package/.sinapse-ai/infrastructure/templates/safe-collab/apply.sh +85 -0
- package/.sinapse-ai/infrastructure/templates/safe-collab/safe-collaboration-rule.md +11 -0
- package/.sinapse-ai/install-manifest.yaml +13 -9
- package/docs/ORQX-PLAN.md +3 -2
- package/package.json +1 -1
- package/scripts/ensure-manifest.js +9 -0
|
@@ -2,38 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
Template reutilizavel para configurar colaboracao segura em qualquer projeto.
|
|
4
4
|
|
|
5
|
-
## Uso
|
|
6
|
-
|
|
7
|
-
Copie os arquivos deste diretorio para o projeto alvo:
|
|
5
|
+
## Uso rapido
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# 2. Guia para a equipe
|
|
14
|
-
cp parallel-workflow-guide.md <projeto>/docs/guides/parallel-workflow.md
|
|
8
|
+
bash apply.sh <projeto> <owner-github> <collab-github> [prefix1] [prefix2]
|
|
9
|
+
```
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
cp CODEOWNERS.template <projeto>/.github/CODEOWNERS
|
|
11
|
+
### Exemplo
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
```bash
|
|
14
|
+
bash .sinapse-ai/infrastructure/templates/safe-collab/apply.sh \
|
|
15
|
+
/path/to/meu-projeto \
|
|
16
|
+
caioimori \
|
|
17
|
+
Matheus-soier \
|
|
18
|
+
caio \
|
|
19
|
+
soier
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
Isso cria automaticamente:
|
|
23
|
+
- `.claude/rules/safe-collaboration.md` — regras para agentes
|
|
24
|
+
- `.github/PULL_REQUEST_TEMPLATE.md` — template simplificado de PR
|
|
25
|
+
- `.github/CODEOWNERS` — code owners configurado
|
|
26
|
+
- `docs/guides/parallel-workflow.md` — guia para equipe
|
|
27
|
+
- Atualiza `.gitignore` com patterns de runtime
|
|
28
|
+
|
|
29
|
+
## Configuracao manual no GitHub
|
|
24
30
|
|
|
25
|
-
Apos
|
|
31
|
+
Apos rodar o script, configure no repositorio:
|
|
26
32
|
|
|
27
|
-
1. Settings > Rules > Rulesets > New ruleset
|
|
28
|
-
- Target: `main`
|
|
33
|
+
1. **Settings > Rules > Rulesets > New ruleset** (target: `main`)
|
|
29
34
|
- Block direct pushes
|
|
30
35
|
- Require 1 PR approval
|
|
31
36
|
- Block force pushes
|
|
32
37
|
- Block branch deletion
|
|
33
38
|
- Dismiss stale reviews
|
|
34
39
|
|
|
35
|
-
2. Settings > Collaborators
|
|
40
|
+
2. **Settings > Collaborators**
|
|
36
41
|
- Adicionar membros com permissao `Write` (nunca Admin)
|
|
37
42
|
|
|
38
|
-
3. Settings > General
|
|
43
|
+
3. **Settings > General**
|
|
39
44
|
- Marcar "Automatically delete head branches"
|
|
45
|
+
|
|
46
|
+
## Arquivos incluidos
|
|
47
|
+
|
|
48
|
+
| Arquivo | Proposito |
|
|
49
|
+
|---------|-----------|
|
|
50
|
+
| `apply.sh` | Script de aplicacao automatica |
|
|
51
|
+
| `safe-collaboration-rule.md` | Regra para `.claude/rules/` |
|
|
52
|
+
| `parallel-workflow-guide.md` | Guia para equipe |
|
|
53
|
+
| `CODEOWNERS.template` | Template de code owners |
|
|
54
|
+
| `pull_request_template.md` | PR template simplificado |
|
|
55
|
+
|
|
56
|
+
## Placeholders
|
|
57
|
+
|
|
58
|
+
| Placeholder | Descricao | Exemplo |
|
|
59
|
+
|-------------|-----------|---------|
|
|
60
|
+
| `{{USER_1}}` | Nome do usuario 1 | Caio |
|
|
61
|
+
| `{{USER_2}}` | Nome do usuario 2 | Matheus |
|
|
62
|
+
| `{{user1}}` | Prefixo de branch user 1 | caio |
|
|
63
|
+
| `{{user2}}` | Prefixo de branch user 2 | soier |
|
|
64
|
+
| `{{OWNER_GITHUB}}` | Username GitHub do owner | caioimori |
|
|
65
|
+
| `{{COLLAB_GITHUB}}` | Username GitHub do collab | Matheus-soier |
|
|
66
|
+
| `{{PROJECT_NAME}}` | Nome do projeto | meu-projeto |
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# apply.sh — Apply safe-collab template to a target project
|
|
3
|
+
# Usage: bash apply.sh <target-dir> <owner-github> <collab-github> [user1-prefix] [user2-prefix]
|
|
4
|
+
#
|
|
5
|
+
# Example:
|
|
6
|
+
# bash apply.sh /path/to/my-project caioimori Matheus-soier caio soier
|
|
7
|
+
|
|
8
|
+
set -e
|
|
9
|
+
|
|
10
|
+
TARGET="${1:?Usage: bash apply.sh <target-dir> <owner-github> <collab-github> [user1] [user2]}"
|
|
11
|
+
OWNER="${2:?Missing owner GitHub username}"
|
|
12
|
+
COLLAB="${3:?Missing collaborator GitHub username}"
|
|
13
|
+
USER1="${4:-dev1}"
|
|
14
|
+
USER2="${5:-dev2}"
|
|
15
|
+
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
17
|
+
|
|
18
|
+
echo "=== Safe Collaboration Setup ==="
|
|
19
|
+
echo "Target: $TARGET"
|
|
20
|
+
echo "Owner: @$OWNER"
|
|
21
|
+
echo "Collaborator: @$COLLAB"
|
|
22
|
+
echo "Branch prefixes: $USER1/, $USER2/"
|
|
23
|
+
echo ""
|
|
24
|
+
|
|
25
|
+
# Create directories
|
|
26
|
+
mkdir -p "$TARGET/.claude/rules"
|
|
27
|
+
mkdir -p "$TARGET/.github"
|
|
28
|
+
mkdir -p "$TARGET/docs/guides"
|
|
29
|
+
|
|
30
|
+
# Copy and customize rule file
|
|
31
|
+
sed -e "s/{{USER_1}}/$USER1/g" \
|
|
32
|
+
-e "s/{{USER_2}}/$USER2/g" \
|
|
33
|
+
-e "s/{{user1}}/$USER1/g" \
|
|
34
|
+
-e "s/{{user2}}/$USER2/g" \
|
|
35
|
+
"$SCRIPT_DIR/safe-collaboration-rule.md" > "$TARGET/.claude/rules/safe-collaboration.md"
|
|
36
|
+
echo "[OK] .claude/rules/safe-collaboration.md"
|
|
37
|
+
|
|
38
|
+
# Copy PR template
|
|
39
|
+
cp "$SCRIPT_DIR/pull_request_template.md" "$TARGET/.github/PULL_REQUEST_TEMPLATE.md"
|
|
40
|
+
echo "[OK] .github/PULL_REQUEST_TEMPLATE.md"
|
|
41
|
+
|
|
42
|
+
# Copy and customize CODEOWNERS
|
|
43
|
+
sed -e "s/{{PROJECT_NAME}}/$(basename "$TARGET")/g" \
|
|
44
|
+
-e "s/{{OWNER_GITHUB}}/$OWNER/g" \
|
|
45
|
+
-e "s/{{COLLAB_GITHUB}}/$COLLAB/g" \
|
|
46
|
+
"$SCRIPT_DIR/CODEOWNERS.template" > "$TARGET/.github/CODEOWNERS"
|
|
47
|
+
echo "[OK] .github/CODEOWNERS"
|
|
48
|
+
|
|
49
|
+
# Copy workflow guide
|
|
50
|
+
cp "$SCRIPT_DIR/parallel-workflow-guide.md" "$TARGET/docs/guides/parallel-workflow.md"
|
|
51
|
+
echo "[OK] docs/guides/parallel-workflow.md"
|
|
52
|
+
|
|
53
|
+
# Add runtime patterns to .gitignore if not already present
|
|
54
|
+
GITIGNORE="$TARGET/.gitignore"
|
|
55
|
+
if [ -f "$GITIGNORE" ]; then
|
|
56
|
+
if ! grep -q '.sinapse-ai/.cache/' "$GITIGNORE" 2>/dev/null; then
|
|
57
|
+
echo "" >> "$GITIGNORE"
|
|
58
|
+
echo "# SINAPSE runtime artifacts" >> "$GITIGNORE"
|
|
59
|
+
echo ".sinapse-ai/.cache/" >> "$GITIGNORE"
|
|
60
|
+
echo ".sinapse-ai/.tmp/" >> "$GITIGNORE"
|
|
61
|
+
echo "[OK] .gitignore updated"
|
|
62
|
+
else
|
|
63
|
+
echo "[OK] .gitignore already has runtime patterns"
|
|
64
|
+
fi
|
|
65
|
+
else
|
|
66
|
+
echo "[SKIP] No .gitignore found"
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
echo ""
|
|
70
|
+
echo "=== Files applied. Now configure GitHub: ==="
|
|
71
|
+
echo ""
|
|
72
|
+
echo "1. Settings > Rules > Rulesets > New ruleset (target: main)"
|
|
73
|
+
echo " - Block direct pushes"
|
|
74
|
+
echo " - Require 1 PR approval"
|
|
75
|
+
echo " - Block force pushes"
|
|
76
|
+
echo " - Block branch deletion"
|
|
77
|
+
echo " - Dismiss stale reviews"
|
|
78
|
+
echo ""
|
|
79
|
+
echo "2. Settings > Collaborators"
|
|
80
|
+
echo " - Add @$COLLAB with Write permission"
|
|
81
|
+
echo ""
|
|
82
|
+
echo "3. Settings > General"
|
|
83
|
+
echo " - Check 'Automatically delete head branches'"
|
|
84
|
+
echo ""
|
|
85
|
+
echo "Done. Safe collaboration is ready."
|
|
@@ -33,6 +33,17 @@ Before ANY work begins, the agent MUST:
|
|
|
33
33
|
|
|
34
34
|
Types: `feat`, `fix`, `refactor`, `docs`, `chore`, `test`
|
|
35
35
|
|
|
36
|
+
**User Detection (priority order):**
|
|
37
|
+
1. `git config user.name` -> lookup in mapping table (case-insensitive)
|
|
38
|
+
2. `$USERNAME` (Windows) or `$USER` (Unix) -> lookup
|
|
39
|
+
3. Fallback: `dev/`
|
|
40
|
+
|
|
41
|
+
| git config / env contains | Branch prefix |
|
|
42
|
+
|----------------------------|---------------|
|
|
43
|
+
| {{user1}} (case-insensitive) | `{{user1}}/` |
|
|
44
|
+
| {{user2}} (case-insensitive) | `{{user2}}/` |
|
|
45
|
+
| (anything else) | `dev/` |
|
|
46
|
+
|
|
36
47
|
## Before Every Commit — Safety Checks
|
|
37
48
|
|
|
38
49
|
1. `git status` — verify only expected files changed
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
# - SHA256 hashes for change detection
|
|
8
8
|
# - File types for categorization
|
|
9
9
|
#
|
|
10
|
-
version: 7.7.
|
|
11
|
-
generated_at: "2026-04-02T01:
|
|
10
|
+
version: 7.7.3
|
|
11
|
+
generated_at: "2026-04-02T01:44:04.986Z"
|
|
12
12
|
generator: scripts/generate-install-manifest.js
|
|
13
|
-
file_count:
|
|
13
|
+
file_count: 1113
|
|
14
14
|
files:
|
|
15
15
|
- path: cli/commands/config/index.js
|
|
16
16
|
hash: sha256:66f111eceef0f60fa0a8904add783b615d55b01d5fe36408623c3dd828e702f6
|
|
@@ -1237,9 +1237,9 @@ files:
|
|
|
1237
1237
|
type: data
|
|
1238
1238
|
size: 9586
|
|
1239
1239
|
- path: data/entity-registry.yaml
|
|
1240
|
-
hash: sha256:
|
|
1240
|
+
hash: sha256:17d002e1c7b1dc347bc369fd82b28a931babcb69f16efc9ac76eb484eaacc1a1
|
|
1241
1241
|
type: data
|
|
1242
|
-
size:
|
|
1242
|
+
size: 511993
|
|
1243
1243
|
- path: data/learned-patterns.yaml
|
|
1244
1244
|
hash: sha256:24ac0b160615583a0ff783d3da8af80b7f94191575d6db2054ec8e10a3f945dc
|
|
1245
1245
|
type: data
|
|
@@ -3508,6 +3508,10 @@ files:
|
|
|
3508
3508
|
hash: sha256:4c9b70cacde88097d53f9d4d6e2319f65cabf6a076047195cdcf949d9e949512
|
|
3509
3509
|
type: template
|
|
3510
3510
|
size: 5567
|
|
3511
|
+
- path: infrastructure/templates/safe-collab/apply.sh
|
|
3512
|
+
hash: sha256:1f9d39834ff301e3ee1adf1779fc3dd9e22bd12c9a603f8ff11d430c1328ed82
|
|
3513
|
+
type: template
|
|
3514
|
+
size: 2738
|
|
3511
3515
|
- path: infrastructure/templates/safe-collab/CODEOWNERS.template
|
|
3512
3516
|
hash: sha256:988d5f6e373df03913d84c11cc42af42917f702920059ef296b2b236be7387e8
|
|
3513
3517
|
type: template
|
|
@@ -3521,13 +3525,13 @@ files:
|
|
|
3521
3525
|
type: template
|
|
3522
3526
|
size: 338
|
|
3523
3527
|
- path: infrastructure/templates/safe-collab/README.md
|
|
3524
|
-
hash: sha256:
|
|
3528
|
+
hash: sha256:53e1193eaf30b5a4d9a5d2c5f700b22a210515abb661baf2b5ebe056343806fe
|
|
3525
3529
|
type: template
|
|
3526
|
-
size:
|
|
3530
|
+
size: 1958
|
|
3527
3531
|
- path: infrastructure/templates/safe-collab/safe-collaboration-rule.md
|
|
3528
|
-
hash: sha256:
|
|
3532
|
+
hash: sha256:9631681340fddc314080f9182b76ccfbb1ee3441d92ce181067e76cace960a5e
|
|
3529
3533
|
type: template
|
|
3530
|
-
size:
|
|
3534
|
+
size: 2871
|
|
3531
3535
|
- path: infrastructure/templates/sinapse-sync.yaml.template
|
|
3532
3536
|
hash: sha256:36ada7873fcbd5bab225b528c7be39035a12fc156135cc82c73d75782d7c53a2
|
|
3533
3537
|
type: template
|
package/docs/ORQX-PLAN.md
CHANGED
|
@@ -188,8 +188,9 @@ Pente fino em cada arquivo do framework. Zero assinaturas escondidas, zero easte
|
|
|
188
188
|
- [ ] `.github/workflows/` — actions com refs externas
|
|
189
189
|
- [ ] `scripts/` — automacoes com refs externas
|
|
190
190
|
- [ ] `packages/` — package.json internos (author, contributors, repository)
|
|
191
|
-
- [
|
|
192
|
-
- [
|
|
191
|
+
- [x] Git tags — verificar se alguma tag referencia AIOX (VERIFIED 2026-04-02: ZERO tags AIOX)
|
|
192
|
+
- [x] Git commit messages — verificar se tem refs problematicas (informativo, nao rewrite)
|
|
193
|
+
- [x] GitHub Issues/PRs/Labels/Milestones — VERIFIED 2026-04-02: 0 issues, 0 PRs, 0 AIOX labels, description=SINAPSE
|
|
193
194
|
|
|
194
195
|
### Pos-Audit
|
|
195
196
|
- [ ] Regenerar package-lock.json limpo (`npm install`)
|
package/package.json
CHANGED
|
@@ -37,6 +37,15 @@ async function main() {
|
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// In pre-commit: validate-only to prevent merge conflicts (Art. IX)
|
|
41
|
+
// Regeneration happens via `npm run generate:manifest` or prepublishOnly
|
|
42
|
+
const validateOnly = process.argv.includes('--validate-only');
|
|
43
|
+
|
|
44
|
+
if (validateOnly) {
|
|
45
|
+
console.log('⚠️ manifest: outdated — run `npm run generate:manifest` to update');
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
40
49
|
console.log('🔄 manifest: outdated, regenerating...');
|
|
41
50
|
const manifest = await generateManifest();
|
|
42
51
|
await writeManifest(manifest);
|