navori 0.7.8 → 0.8.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/dist/assets/core/core-assets/agents/commit-pr-pilot.md +3 -3
- package/dist/assets/core/core-assets/agents/implementer.md +1 -1
- package/dist/assets/core/core-assets/managed/cierre-sesion.md +1 -1
- package/dist/assets/core/core-assets/skills/pr-create.md +1 -1
- package/dist/assets/core/package.json +1 -1
- package/dist/assets/plugins/codegraph/plugin.json +3 -2
- package/dist/assets/plugins/jscpd/plugin.json +14 -9
- package/dist/assets/plugins/jscpd/skills/jscpd-review.md +19 -0
- package/dist/assets/plugins/semgrep/plugin.json +13 -9
- package/dist/assets/plugins/semgrep/skills/semgrep-review.md +24 -0
- package/dist/assets/plugins/tgrep/managed/tgrep-protocol.md +2 -0
- package/dist/index.js +333 -335
- package/package.json +4 -4
|
@@ -142,7 +142,7 @@ Never open the PR with the gate red.
|
|
|
142
142
|
3. Draft a Conventional commit message:
|
|
143
143
|
- Type: `feat | fix | docs | refactor | perf | test | chore | style | build | ci | revert`.
|
|
144
144
|
- Scope: lowercase, derived from the touched area (module/domain).
|
|
145
|
-
- Description: imperative, ≤70 chars, no trailing period, language defined by
|
|
145
|
+
- Description: imperative, ≤70 chars, no trailing period, language defined by `{{commits}}`.
|
|
146
146
|
- Optional body with the WHY if the decision isn't obvious.
|
|
147
147
|
4. If you touch potentially sensitive files (`.env*`, credentials, odd lockfiles), **flag the user before staging**.
|
|
148
148
|
5. `git add <files>` (prefer explicit over `git add -A`).
|
|
@@ -235,7 +235,7 @@ Never open the PR with the gate red.
|
|
|
235
235
|
**`Closes` is syntax, not prose.** GitHub links and auto-closes an issue only
|
|
236
236
|
when the body carries `Closes` / `Fixes` / `Resolves` followed by `#<N>`, **in
|
|
237
237
|
English**, pointing at an issue of this same repo. The rest of the body follows
|
|
238
|
-
the
|
|
238
|
+
the `{{commits}}` language and this keyword does NOT: translated (`Cierra
|
|
239
239
|
#<N>`) it is an ordinary sentence, GitHub links nothing, the issue stays open
|
|
240
240
|
and no error says so. That silence is the whole defect — navori's own repo
|
|
241
241
|
shipped 8 PRs that way and closed all 8 issues by hand before anyone noticed
|
|
@@ -266,7 +266,7 @@ wc -c CLAUDE.md # after
|
|
|
266
266
|
- ❌ Never skip hooks (`--no-verify`) unless the user explicitly asks.
|
|
267
267
|
- ❌ Never ask for a merge / approve the PR yourself. Your job ends with the URL.
|
|
268
268
|
- ❌ Never `gh pr checks --watch`: it takes no timeout and would hang the turn before the URL reaches the user.
|
|
269
|
-
- ✅ Commit and PR message in the language defined by
|
|
269
|
+
- ✅ Commit and PR message in the language defined by `{{commits}}` (`conventional-es` = Spanish MX, `conventional` = English) — except the `Closes #<N>` keyword, which GitHub parses and which stays in English in any language (see the body template).
|
|
270
270
|
- ✅ If you introduce a new pattern or non-obvious decision that wasn't already in `impl_<feature>.md`, leave a note in the PR body ("Decisions" section).
|
|
271
271
|
|
|
272
272
|
## Anti-patterns
|
|
@@ -100,7 +100,7 @@ Write `.claude/progress/impl_<feature>.md`:
|
|
|
100
100
|
- ...
|
|
101
101
|
|
|
102
102
|
## Suggested commit
|
|
103
|
-
`feat(<scope>): ...` (Conventional, atomic, language per
|
|
103
|
+
`feat(<scope>): ...` (Conventional, atomic, language per `{{commits}}`)
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
## Communication with the leader
|
|
@@ -6,7 +6,7 @@ Before closing the session:
|
|
|
6
6
|
2. **History**: add an entry in `progress/history.md` with `## YYYY-MM-DD HH:MM <agent> — <summary>` + changes + gate status. **One redaction, every destination**: write that summary once and reuse the same text wherever else this closeout persists it (a memory store, for instance) — never write the same session up twice. If the session turned up a durable fact that outlives this repo (a data model, a business rule, a cross-service contract, a shared gotcha), promote it with the `dominio` skill instead of leaving it only in session memory.
|
|
7
7
|
3. **Clear current**: leave `progress/current.md` at `idle` or with the explicit next step.
|
|
8
8
|
4. **No temporaries**: delete scratch files; don't leave `console.log`, `debugger`, or commented-out code.
|
|
9
|
-
5. **Conventional commit**: `feat|fix|chore|docs(scope): message`, atomic, in the language defined by
|
|
9
|
+
5. **Conventional commit**: `feat|fix|chore|docs(scope): message`, atomic, in the language defined by `{{commits}}`.
|
|
10
10
|
6. **Park on base**: once the cycle's work is committed and its branch pushed (PR opened when the flow calls for one), leave the repo standing on the base branch, synced: `git switch {{branchBase}}` then `git pull --ff-only`. The point is where the NEXT session starts from — a repo parked on last week's feature branch breeds branches cut from stale bases. Rules that make it safe:
|
|
11
11
|
- **Never delete the feature branch.** This is position hygiene, not history hygiene; the branch stays for its pending merge and for `babysit-prs`.
|
|
12
12
|
- Only with a **clean working tree** and the cycle's commits pushed. Anything unpushed or uncommitted → do NOT switch; say what was left and leave parking to the user.
|
|
@@ -9,7 +9,7 @@ type: reference
|
|
|
9
9
|
The commit + PR flow has **one owner**: the `commit-pr-pilot` agent
|
|
10
10
|
(`.claude/agents/commit-pr-pilot.md`). It owns the pre-flight, the PR gate
|
|
11
11
|
(`{{qualityGate.full}}` green), the review/R1 handling, the body template and the
|
|
12
|
-
commit/PR language (per
|
|
12
|
+
commit/PR language (per `{{commits}}`).
|
|
13
13
|
|
|
14
14
|
**To close a cycle, invoke `commit-pr-pilot`.** Don't draft the PR from a separate
|
|
15
15
|
template here — a second flow drifts from the pilot (that's why this skill was
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "codegraph",
|
|
3
3
|
"name": "CodeGraph \u2014 surgical code context",
|
|
4
4
|
"description": "Pre-built AST code graph via MCP: symbols, call paths and blast-radius in one call, fewer grep/read loops",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.2",
|
|
6
6
|
"managed": [
|
|
7
7
|
{
|
|
8
8
|
"id": "codegraph-protocol",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"args": [
|
|
25
25
|
"serve",
|
|
26
26
|
"--mcp"
|
|
27
|
-
]
|
|
27
|
+
],
|
|
28
|
+
"alwaysLoad": true
|
|
28
29
|
},
|
|
29
30
|
"settingsFragment": {
|
|
30
31
|
"permissions": {
|
|
@@ -2,14 +2,8 @@
|
|
|
2
2
|
"id": "jscpd",
|
|
3
3
|
"name": "jscpd (code duplication detector)",
|
|
4
4
|
"description": "Detección de duplicación de código en el diff vs branch base",
|
|
5
|
-
"version": "0.0.
|
|
6
|
-
"managed": [
|
|
7
|
-
{
|
|
8
|
-
"id": "jscpd-protocol",
|
|
9
|
-
"file": "managed/jscpd-protocol.md",
|
|
10
|
-
"recommendedAgent": "reviewer"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
5
|
+
"version": "0.0.5",
|
|
6
|
+
"managed": [],
|
|
13
7
|
"externalTool": {
|
|
14
8
|
"name": "jscpd",
|
|
15
9
|
"checkBinary": "jscpd",
|
|
@@ -35,5 +29,16 @@
|
|
|
35
29
|
"statusMessage": "navori/jscpd: dup check"
|
|
36
30
|
}
|
|
37
31
|
],
|
|
38
|
-
"invariants": [
|
|
32
|
+
"invariants": [
|
|
33
|
+
"jscpd",
|
|
34
|
+
"do not approve"
|
|
35
|
+
],
|
|
36
|
+
"skills": [
|
|
37
|
+
{
|
|
38
|
+
"id": "jscpd-review-extension",
|
|
39
|
+
"file": "skills/jscpd-review.md",
|
|
40
|
+
"recommendedAgent": "reviewer",
|
|
41
|
+
"injectInto": ".claude/skills/review-diff/SKILL.md"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
39
44
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jscpd-duplication-gate
|
|
3
|
+
description: Use when reviewing a diff and the repo renders the jscpd plugin — scan the changed files for duplication before approving, and treat clones over the threshold as a blocker.
|
|
4
|
+
type: behavior
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Code duplication (jscpd)
|
|
8
|
+
|
|
9
|
+
Before approving a change, run jscpd over the diff vs the base branch.
|
|
10
|
+
|
|
11
|
+
- Only over modified files:
|
|
12
|
+
```
|
|
13
|
+
git diff --name-only {{branchBase}}...HEAD | grep -E '\.(ts|tsx|js|jsx)$' | xargs jscpd --silent
|
|
14
|
+
```
|
|
15
|
+
- If it reports clones >0 with the project's threshold: **do not approve** the change without justification (reviewers must ask for a refactor or extraction).
|
|
16
|
+
- Silent skip if `jscpd` is not in `PATH` (don't block if the dev doesn't have the tool installed).
|
|
17
|
+
|
|
18
|
+
The commit gate runs this for you (`PreToolUse` on `git commit`), so this text is
|
|
19
|
+
the reasoning and the manual command — not the mechanism.
|
|
@@ -2,14 +2,8 @@
|
|
|
2
2
|
"id": "semgrep",
|
|
3
3
|
"name": "semgrep (security + pattern analysis)",
|
|
4
4
|
"description": "Detección de vulnerabilidades y patrones inseguros local opt-in",
|
|
5
|
-
"version": "0.0.
|
|
6
|
-
"managed": [
|
|
7
|
-
{
|
|
8
|
-
"id": "semgrep-protocol",
|
|
9
|
-
"file": "managed/semgrep-protocol.md",
|
|
10
|
-
"recommendedAgent": "reviewer"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
5
|
+
"version": "0.0.5",
|
|
6
|
+
"managed": [],
|
|
13
7
|
"externalTool": {
|
|
14
8
|
"name": "semgrep",
|
|
15
9
|
"checkBinary": "semgrep",
|
|
@@ -34,5 +28,15 @@
|
|
|
34
28
|
"statusMessage": "navori/semgrep: security scan"
|
|
35
29
|
}
|
|
36
30
|
],
|
|
37
|
-
"invariants": [
|
|
31
|
+
"invariants": [
|
|
32
|
+
"run semgrep over the diff"
|
|
33
|
+
],
|
|
34
|
+
"skills": [
|
|
35
|
+
{
|
|
36
|
+
"id": "semgrep-review-extension",
|
|
37
|
+
"file": "skills/semgrep-review.md",
|
|
38
|
+
"recommendedAgent": "reviewer",
|
|
39
|
+
"injectInto": ".claude/skills/security-guidance/SKILL.md"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
38
42
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: semgrep-security-gate
|
|
3
|
+
description: Use when auditing security or closing a change that touches auth, RBAC, secrets or input validation and the repo renders the semgrep plugin — run the static scan over the diff before closing.
|
|
4
|
+
type: behavior
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Local security gate (semgrep)
|
|
8
|
+
|
|
9
|
+
Before closing a relevant change (auth, RBAC, secrets, input validation), run semgrep over the diff.
|
|
10
|
+
|
|
11
|
+
- Quick diff scan:
|
|
12
|
+
```
|
|
13
|
+
git diff --name-only {{branchBase}}...HEAD | xargs semgrep scan --config=p/default --error --metrics=off
|
|
14
|
+
```
|
|
15
|
+
- Full project scan (slower, opt-in):
|
|
16
|
+
```
|
|
17
|
+
semgrep scan --config=p/default --error --metrics=off
|
|
18
|
+
```
|
|
19
|
+
- `p/default` (not `auto`) on purpose: deterministic and telemetry-off — mirrors the plugin's check script.
|
|
20
|
+
- Custom rules: see `.semgrep.yml` at the repo root if it exists.
|
|
21
|
+
- Silent skip if `semgrep` is not installed (don't block if the dev doesn't have it).
|
|
22
|
+
|
|
23
|
+
The commit/push gate runs this for you (`PreToolUse`), so this text is the
|
|
24
|
+
reasoning and the manual command — not the mechanism.
|
|
@@ -12,6 +12,8 @@ It carries an `allow` rule, so it runs with no permission prompt in every mode a
|
|
|
12
12
|
|
|
13
13
|
That decision lives in the script rather than in this text on purpose: `SessionStart` hooks don't run for subagents, so a subagent cannot know what the machine has — but the same command is right for all of them.
|
|
14
14
|
|
|
15
|
+
**Searching is not extracting.** The index answers *which file holds X*. Once you already know the file and want its lines, `grep -n "x" that-file` or `Read` is the right call and the cheaper one — the wrapper would reindex the whole tree to read a single file. Measured on real sessions, this is a third of the shell `grep` calls, and all of them are correct.
|
|
16
|
+
|
|
15
17
|
### Routing: the graph or the wrapper
|
|
16
18
|
|
|
17
19
|
| The question | First call |
|