@jetrabbits/agentic 0.0.3 → 0.0.5
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/AGENTS.md +15 -0
- package/Makefile +40 -0
- package/README.md +1 -0
- package/UPGRADE.md +61 -0
- package/agentic +948 -10
- package/areas/devops/ci-cd/prompts/release-pipeline.md +69 -79
- package/areas/devops/ci-cd/rules/supply-chain-security.md +39 -19
- package/areas/devops/ci-cd/skills/github-actions-patterns/SKILL.md +6 -1
- package/areas/devops/ci-cd/skills/pipeline-security/SKILL.md +54 -119
- package/areas/devops/ci-cd/workflows/release-pipeline.md +72 -62
- package/areas/devops/kubernetes/skills/pod-troubleshooting/SKILL.md +1 -1
- package/areas/devops/observability/rules/alerting-standards.md +37 -31
- package/areas/devops/observability/rules/golden-signals.md +29 -20
- package/areas/devops/observability/skills/distributed-tracing/SKILL.md +10 -1
- package/areas/software/backend/rules/security.md +32 -12
- package/areas/software/frontend/skills/component-design/SKILL.md +13 -1
- package/areas/software/full-stack/AGENTS.md +1 -4
- package/areas/software/full-stack/rules/security-guide.md +48 -12
- package/areas/software/full-stack/workflows/debug-issue.md +2 -2
- package/areas/software/security/prompts/security-scan.md +47 -55
- package/areas/software/security/rules/dependency-policy.md +43 -8
- package/areas/software/security/skills/dependency-audit/SKILL.md +46 -25
- package/areas/software/security/skills/threat-modeling/SKILL.md +26 -0
- package/docs/agentic-lifecycle.md +103 -0
- package/docs/agentic-token-minimization/README.md +79 -0
- package/docs/agentic-usage.md +145 -0
- package/docs/catalog.schema.json +203 -0
- package/docs/guidance-updates/2026-04-10-software-devops-best-practices.md +26 -0
- package/docs/opencode_prepare_agents.md +40 -0
- package/docs/opencode_setup.md +45 -0
- package/docs/prompt-format.md +80 -0
- package/docs/site/README.md +44 -0
- package/docs/site/app.js +127 -0
- package/docs/site/catalog.json +5002 -0
- package/docs/site/index.html +52 -0
- package/docs/site/styles.css +177 -0
- package/extensions/codex/agents/developer.toml +1 -1
- package/extensions/codex/agents/devops-engineer.toml +1 -1
- package/extensions/codex/agents/product-owner.toml +1 -1
- package/extensions/codex/agents/team-lead.toml +1 -1
- package/extensions/opencode/plugins/model-checker.json +2 -3
- package/extensions/opencode/plugins/model-checker.ts +23 -0
- package/extensions/opencode/plugins/telegram-notification.ts +33 -5
- package/package.json +6 -2
- package/scripts/assess_area_quality.py +216 -0
- package/scripts/build_docs_catalog.py +283 -0
- package/scripts/lint_prompts.py +113 -0
- package/areas/software/full-stack/skills/bash-pro/SKILL.md +0 -310
- package/areas/software/full-stack/skills/python-pro/SKILL.md +0 -158
- package/areas/software/full-stack/skills/skill-creator/LICENSE.txt +0 -202
- package/areas/software/full-stack/skills/skill-creator/SKILL.md +0 -356
- package/areas/software/full-stack/skills/skill-creator/references/output-patterns.md +0 -82
- package/areas/software/full-stack/skills/skill-creator/references/workflows.md +0 -28
- package/areas/software/full-stack/skills/skill-creator/scripts/init_skill.py +0 -303
- package/areas/software/full-stack/skills/skill-creator/scripts/package_skill.py +0 -110
- package/areas/software/full-stack/skills/skill-creator/scripts/quick_validate.py +0 -95
- package/extensions/codex/skills/babysit-pr/SKILL.md +0 -187
- package/extensions/codex/skills/babysit-pr/agents/openai.yaml +0 -4
- package/extensions/codex/skills/babysit-pr/references/github-api-notes.md +0 -72
- package/extensions/codex/skills/babysit-pr/references/heuristics.md +0 -58
- package/extensions/codex/skills/babysit-pr/scripts/gh_pr_watch.py +0 -806
- package/extensions/codex/skills/babysit-pr/scripts/test_gh_pr_watch.py +0 -155
- package/extensions/opencode/skills/code_review_expert/SKILL.md +0 -144
- package/extensions/opencode/skills/design_expert/SKILL.md +0 -42
- package/extensions/opencode/skills/qa_expert/SKILL.md +0 -116
|
@@ -4,88 +4,80 @@ workflow: security-scan
|
|
|
4
4
|
|
|
5
5
|
# Prompt: `/security-scan`
|
|
6
6
|
|
|
7
|
-
Use when: running a
|
|
7
|
+
Use when: running a security scan that must produce actionable release decisions (`exploitable-now`, `not-reachable`, `accepted-risk`) rather than only raw scanner output.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## Example 1 —
|
|
11
|
+
## Example 1 — Release gate with reachability triage and VEX output
|
|
12
12
|
|
|
13
13
|
**EN:**
|
|
14
14
|
```
|
|
15
15
|
/security-scan
|
|
16
16
|
|
|
17
|
-
Trigger: release candidate
|
|
18
|
-
Scope:
|
|
19
|
-
Stack: Python 3.12
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
Trigger: release candidate v4.2.0
|
|
18
|
+
Scope: SAST + dependency + secrets + IaC
|
|
19
|
+
Stack: Node.js 22, Python 3.12, Terraform
|
|
20
|
+
Policy:
|
|
21
|
+
- Block release for any Critical finding classified as exploitable-now
|
|
22
|
+
- High findings require remediation plan <= 72h or time-bound exception
|
|
23
|
+
Required output sections:
|
|
24
|
+
1) Findings summary by severity
|
|
25
|
+
2) Reachability analysis for each High/Critical dependency CVE
|
|
26
|
+
3) Classification table: exploitable-now / not-reachable / accepted-risk
|
|
27
|
+
4) VEX-style statements for not-reachable items with evidence
|
|
28
|
+
5) Exception register (owner, expiry, compensating controls)
|
|
24
29
|
```
|
|
25
30
|
|
|
26
31
|
**RU:**
|
|
27
32
|
```
|
|
28
33
|
/security-scan
|
|
29
34
|
|
|
30
|
-
Триггер: release candidate
|
|
31
|
-
Скоуп:
|
|
32
|
-
Стек: Python 3.12
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
Триггер: release candidate v4.2.0
|
|
36
|
+
Скоуп: SAST + зависимости + секреты + IaC
|
|
37
|
+
Стек: Node.js 22, Python 3.12, Terraform
|
|
38
|
+
Политика:
|
|
39
|
+
- Блокировать релиз при любом Critical, классифицированном как exploitable-now
|
|
40
|
+
- Для High нужен план устранения <= 72ч или ограниченное по времени исключение
|
|
41
|
+
Обязательные разделы результата:
|
|
42
|
+
1) Сводка находок по серьёзности
|
|
43
|
+
2) Reachability-анализ для каждого High/Critical dependency CVE
|
|
44
|
+
3) Таблица классификации: exploitable-now / not-reachable / accepted-risk
|
|
45
|
+
4) VEX-подобные записи для not-reachable с доказательствами
|
|
46
|
+
5) Реестр исключений (owner, expiry, compensating controls)
|
|
37
47
|
```
|
|
38
48
|
|
|
39
49
|
---
|
|
40
50
|
|
|
41
|
-
## Example 2 —
|
|
51
|
+
## Example 2 — Fast incident-mode scan focused on exploitability
|
|
42
52
|
|
|
43
53
|
**EN:**
|
|
44
54
|
```
|
|
45
55
|
/security-scan
|
|
46
56
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
Context: actively exploited CVE announced in a transitive dependency
|
|
58
|
+
Timebox: 90 minutes
|
|
59
|
+
Scope:
|
|
60
|
+
- Dependency path tracing to affected services
|
|
61
|
+
- Runtime reachability confirmation
|
|
62
|
+
- Exposure check for internet-facing routes
|
|
63
|
+
Output:
|
|
64
|
+
- List of impacted services sorted by exploitability risk
|
|
65
|
+
- Immediate mitigations (feature flags, traffic isolation, WAF rules)
|
|
66
|
+
- Patch and rollback plan
|
|
53
67
|
```
|
|
54
68
|
|
|
55
69
|
**RU:**
|
|
56
70
|
```
|
|
57
71
|
/security-scan
|
|
58
72
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## Example 3 — Dependency-only quick scan
|
|
70
|
-
|
|
71
|
-
**EN:**
|
|
72
|
-
```
|
|
73
|
-
/security-scan
|
|
74
|
-
|
|
75
|
-
Scope: dependency CVE audit only
|
|
76
|
-
Stack: Node.js 20 / Express, npm lockfile
|
|
77
|
-
Command: npm audit --audit-level=high
|
|
78
|
-
Auto-fix: apply non-breaking patches automatically (npm audit fix)
|
|
79
|
-
Report: list packages with unresolved High/Critical CVEs that need manual review
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**RU:**
|
|
83
|
-
```
|
|
84
|
-
/security-scan
|
|
85
|
-
|
|
86
|
-
Скоуп: только аудит CVE зависимостей
|
|
87
|
-
Стек: Node.js 20 / Express, npm lockfile
|
|
88
|
-
Команда: npm audit --audit-level=high
|
|
89
|
-
Авто-исправление: применить неломающие патчи автоматически (npm audit fix)
|
|
90
|
-
Отчёт: список пакетов с неустранёнными High/Critical CVE которые требуют ручного ревью
|
|
73
|
+
Контекст: опубликован активно эксплуатируемый CVE в транзитивной зависимости
|
|
74
|
+
Таймбокс: 90 минут
|
|
75
|
+
Скоуп:
|
|
76
|
+
- Трассировка dependency path до затронутых сервисов
|
|
77
|
+
- Подтверждение runtime reachability
|
|
78
|
+
- Проверка экспозиции интернет-facing маршрутов
|
|
79
|
+
Результат:
|
|
80
|
+
- Список затронутых сервисов, отсортированный по риску exploitability
|
|
81
|
+
- Немедленные mitigation-шаги (feature flags, изоляция трафика, WAF rules)
|
|
82
|
+
- План патча и отката
|
|
91
83
|
```
|
|
@@ -1,12 +1,47 @@
|
|
|
1
1
|
# Rule: Dependency Security Policy
|
|
2
2
|
|
|
3
|
-
**Priority**: P1 — Critical
|
|
3
|
+
**Priority**: P1 — Critical exploitable dependency risk blocks release; all accepted risks require owner + expiry.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Policy Model: Risk-Based, Not CVSS-Only
|
|
6
6
|
|
|
7
|
-
1.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
1. Triage by **exploitability context**:
|
|
8
|
+
- severity (CVSS),
|
|
9
|
+
- reachability from runtime code path,
|
|
10
|
+
- exposure boundary (internet-facing vs internal),
|
|
11
|
+
- presence of compensating controls.
|
|
12
|
+
2. A Critical CVE with confirmed reachable path is a deployment blocker.
|
|
13
|
+
3. High CVEs require remediation plan within 72h or formal exception.
|
|
14
|
+
|
|
15
|
+
## Mandatory CI Controls
|
|
16
|
+
|
|
17
|
+
4. Run dependency scanning on every PR and main build.
|
|
18
|
+
5. Enforce lockfiles and deterministic install modes.
|
|
19
|
+
6. Verify checksums/signatures when ecosystem tooling supports it.
|
|
20
|
+
7. Fail on prohibited licenses or policy-violating dependency sources.
|
|
21
|
+
|
|
22
|
+
## Provenance and Registry Trust
|
|
23
|
+
|
|
24
|
+
8. Prefer trusted publishers / verified maintainers where available.
|
|
25
|
+
9. Restrict package sources to approved registries/proxies.
|
|
26
|
+
10. Alert on maintainer transfer, suspicious install scripts, typosquatting indicators.
|
|
27
|
+
|
|
28
|
+
## Reachability and VEX
|
|
29
|
+
|
|
30
|
+
11. For each High/Critical finding, classify as:
|
|
31
|
+
- `exploitable-now`,
|
|
32
|
+
- `not-reachable`,
|
|
33
|
+
- `accepted-risk` (temporary).
|
|
34
|
+
12. Use VEX-compatible status where possible to document non-exploitable findings.
|
|
35
|
+
13. “Not reachable” claims require evidence (call graph, dependency path, runtime boundary).
|
|
36
|
+
|
|
37
|
+
## Exception Handling
|
|
38
|
+
|
|
39
|
+
14. Exceptions require: owner, justification, compensating controls, expiry date (max 30 days).
|
|
40
|
+
15. Expired exceptions automatically re-block deployments.
|
|
41
|
+
16. All exceptions reviewed in weekly security triage.
|
|
42
|
+
|
|
43
|
+
## Language/Stack Constraints
|
|
44
|
+
|
|
45
|
+
17. JavaScript/TypeScript: lockfile mandatory; block lifecycle scripts unless explicitly approved.
|
|
46
|
+
18. Python: hashes for production requirements (`--require-hashes`) when feasible.
|
|
47
|
+
19. Containers: base images pinned by digest; no floating tags in production images.
|
|
@@ -2,28 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
## When to load
|
|
4
4
|
|
|
5
|
-
When adding
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
5
|
+
When adding/updating dependencies, handling security findings, preparing releases, or reviewing supply-chain risk in PRs.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Produce a dependency risk decision based on exploitability and business impact, not scanner output alone.
|
|
10
|
+
|
|
11
|
+
## Audit Workflow
|
|
12
|
+
|
|
13
|
+
1. **Inventory**
|
|
14
|
+
- Identify direct and transitive dependencies changed in PR/release.
|
|
15
|
+
- Record package source (registry), maintainer trust indicators, and version deltas.
|
|
16
|
+
|
|
17
|
+
2. **Scan**
|
|
18
|
+
- Run ecosystem-native audit tools + repository policy checks.
|
|
19
|
+
- Capture High/Critical findings with package path and affected components.
|
|
20
|
+
|
|
21
|
+
3. **Exploitability Triage**
|
|
22
|
+
- Determine runtime reachability (is vulnerable code path invoked?).
|
|
23
|
+
- Evaluate exposure (public endpoint, privileged process, internal-only).
|
|
24
|
+
- Assess mitigations (WAF, sandbox, feature flags, auth boundaries).
|
|
25
|
+
|
|
26
|
+
4. **Classify each finding**
|
|
27
|
+
- `exploitable-now` → block release, fix immediately.
|
|
28
|
+
- `not-reachable` → document evidence and add VEX status.
|
|
29
|
+
- `accepted-risk` → temporary exception with owner + expiry.
|
|
30
|
+
|
|
31
|
+
5. **Remediation Plan**
|
|
32
|
+
- Prefer upgrade to patched version.
|
|
33
|
+
- If upgrade is breaking: isolate vulnerability, add compensating controls, schedule upgrade milestone.
|
|
34
|
+
|
|
35
|
+
## Supply-Chain Red Flags
|
|
36
|
+
|
|
37
|
+
- Maintainer transfer shortly before suspicious release.
|
|
38
|
+
- Sudden dependency graph expansion unrelated to package purpose.
|
|
39
|
+
- install/postinstall scripts performing unexpected network activity.
|
|
40
|
+
- Obfuscated source in runtime package.
|
|
41
|
+
- Package source not in approved registries.
|
|
42
|
+
|
|
43
|
+
## Output Template (required)
|
|
44
|
+
|
|
45
|
+
- Dependency name and version delta
|
|
46
|
+
- Severity and advisory source
|
|
47
|
+
- Reachability evidence
|
|
48
|
+
- Classification (`exploitable-now` / `not-reachable` / `accepted-risk`)
|
|
49
|
+
- Decision and next action
|
|
50
|
+
- Owner and deadline
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: threat-modeling
|
|
3
|
+
type: skill
|
|
4
|
+
description: "Apply STRIDE threat modeling to system designs, identify IDOR and authorization vulnerabilities, and build threat matrices for security reviews. Use when the user designs a new system, reviews an architecture, prepares for a security audit, or asks about common API vulnerabilities like IDOR or broken access control."
|
|
5
|
+
related-rules:
|
|
6
|
+
- security-baseline.md
|
|
7
|
+
allowed-tools: Read, Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
1
10
|
# Skill: Threat Modeling
|
|
2
11
|
|
|
12
|
+
> **Expertise:** STRIDE framework, IDOR prevention, authorization boundary analysis, threat matrices for API and system security reviews.
|
|
13
|
+
|
|
3
14
|
## When to load
|
|
4
15
|
|
|
5
16
|
When designing a new system, adding an integration, reviewing an architecture, or preparing for a security review.
|
|
@@ -15,6 +26,14 @@ When designing a new system, adding an integration, reviewing an architecture, o
|
|
|
15
26
|
| **D**enial of Service | Can the service be made unavailable? | No rate limiting on public endpoints |
|
|
16
27
|
| **E**levation of Privilege | Can a low-privilege user gain higher access? | IDOR, broken object-level authorization |
|
|
17
28
|
|
|
29
|
+
## Threat Modeling Workflow
|
|
30
|
+
|
|
31
|
+
1. **Identify assets** — list sensitive data, APIs, and trust boundaries in the system
|
|
32
|
+
2. **Apply STRIDE** — walk through each threat category against every asset and boundary
|
|
33
|
+
3. **Score risks** — rank by likelihood × impact (Critical / High / Medium / Low)
|
|
34
|
+
4. **Prioritize mitigations** — address Critical/High first; document accepted risks for Medium/Low
|
|
35
|
+
5. **Validate** — verify mitigations with code review, SAST/DAST scans, or penetration testing
|
|
36
|
+
|
|
18
37
|
## IDOR — Most Common API Vulnerability
|
|
19
38
|
|
|
20
39
|
```python
|
|
@@ -34,3 +53,10 @@ def get_invoice(invoice_id: int, current_user: User = Depends(get_current_user))
|
|
|
34
53
|
raise HTTPException(status_code=404) # 404, not 403
|
|
35
54
|
return invoice
|
|
36
55
|
```
|
|
56
|
+
|
|
57
|
+
## Common Mistakes
|
|
58
|
+
|
|
59
|
+
- **Returning 403 instead of 404** — reveals that the resource exists, enabling enumeration
|
|
60
|
+
- **Client-side authorization only** — always enforce ownership and role checks server-side
|
|
61
|
+
- **Missing audit logs for sensitive actions** — makes repudiation threats undetectable
|
|
62
|
+
- **Trusting internal service-to-service calls** — apply zero-trust; validate JWTs at every boundary
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Installed CLI lifecycle
|
|
2
|
+
|
|
3
|
+
This guide describes how an installed `agentic` binary resolves and updates its knowledge base checkout.
|
|
4
|
+
|
|
5
|
+
## Paths
|
|
6
|
+
|
|
7
|
+
`agentic` uses XDG-compatible defaults:
|
|
8
|
+
|
|
9
|
+
- Config home: `${XDG_CONFIG_HOME:-$HOME/.config}`
|
|
10
|
+
- Data home: `${XDG_DATA_HOME:-$HOME/.local/share}`
|
|
11
|
+
- Config directory: `~/.config/agentic`
|
|
12
|
+
- Config file: `~/.config/agentic/config`
|
|
13
|
+
- OpenCode plugin config: `~/.config/agentic/opencode-plugins.json`
|
|
14
|
+
- Knowledge base data directory: `~/.local/share/agentic`
|
|
15
|
+
- Knowledge base checkout: `~/.local/share/agentic/repo`
|
|
16
|
+
|
|
17
|
+
The config file currently stores the selected theme:
|
|
18
|
+
|
|
19
|
+
```ini
|
|
20
|
+
theme=auto
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Supported values are `auto`, `dark`, and `light`.
|
|
24
|
+
|
|
25
|
+
Target projects receive `.agentic.json`. It stores selected install settings, managed file paths, source paths, hashes, generated marker type, and skipped files from the latest rerun.
|
|
26
|
+
|
|
27
|
+
## Repository modes
|
|
28
|
+
|
|
29
|
+
`agentic` supports two repository source modes:
|
|
30
|
+
|
|
31
|
+
1. Dev mode: when `agentic` runs from a real `agent-guides` checkout and can find sibling `areas/`, `extensions/`, and `AGENTS.md`, it uses the local repository directly.
|
|
32
|
+
2. Installed mode: when the binary is installed to a standalone path such as `~/.local/bin/agentic`, it uses `~/.local/share/agentic/repo` as knowledge base checkout.
|
|
33
|
+
|
|
34
|
+
## Bootstrap
|
|
35
|
+
|
|
36
|
+
In installed mode, commands that need repository data clone the checkout on first use:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
git clone https://github.com/sawrus/agent-guides.git ~/.local/share/agentic/repo
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
After cloning, `agentic` validates that the checkout contains:
|
|
43
|
+
|
|
44
|
+
- `areas/`
|
|
45
|
+
- `extensions/`
|
|
46
|
+
- `AGENTS.md`
|
|
47
|
+
|
|
48
|
+
Commands that auto-bootstrap when needed:
|
|
49
|
+
|
|
50
|
+
- `agentic list ...`
|
|
51
|
+
- `agentic install ...`
|
|
52
|
+
- `agentic tui`
|
|
53
|
+
- `agentic upgrade`
|
|
54
|
+
|
|
55
|
+
## Upgrade flow
|
|
56
|
+
|
|
57
|
+
Refresh the knowledge base checkout with:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
agentic upgrade
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Behavior:
|
|
64
|
+
|
|
65
|
+
- If `~/.local/share/agentic/repo` does not exist, `agentic upgrade` performs initial clone.
|
|
66
|
+
- If checkout already exists, `agentic` runs:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
git -C ~/.local/share/agentic/repo pull --ff-only
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
In dev mode, `upgrade` targets the active local checkout instead of `~/.local/share/agentic/repo`.
|
|
73
|
+
|
|
74
|
+
In installed mode, after the checkout is updated, `agentic upgrade` copies `~/.local/share/agentic/repo/agentic` over the running installed binary when the contents differ. This keeps future `agentic upgrade` runs able to update both the knowledge base and the local executable.
|
|
75
|
+
|
|
76
|
+
If a user already has an older installed binary that cannot self-update, do not ask them to run `agentic self-install --force` from `$PATH`: that invokes the old binary. Use one of these recovery paths:
|
|
77
|
+
|
|
78
|
+
From a fresh `agent-guides` checkout, run from the repository root:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
./agentic self-install --force
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or refresh through the bootstrap installer, which downloads a fresh script before installing:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl -fsSL https://raw.githubusercontent.com/sawrus/agent-guides/main/install | bash -s -- --force
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
After the knowledge base is updated, `agentic upgrade` checks the current working directory for `.agentic.json`. If present, it treats the directory as an already managed project, reloads the recorded `agent_os`, `areas`, and `specializations`, and reruns the install sync against the upgraded knowledge base.
|
|
91
|
+
|
|
92
|
+
The project sync follows the same manifest protection as `agentic install`: user-modified managed files are skipped, existing unmanaged files are not overwritten, and new generated files from the upgraded knowledge base are added when their target path does not already exist.
|
|
93
|
+
|
|
94
|
+
## Managed reruns
|
|
95
|
+
|
|
96
|
+
When `.agentic.json` exists in the target project, `agentic install` treats the project as already managed:
|
|
97
|
+
|
|
98
|
+
- only files listed in `.agentic.json` are eligible for update;
|
|
99
|
+
- files whose current hash differs from the stored hash are skipped as user-modified;
|
|
100
|
+
- new hashes are written for successfully updated managed files;
|
|
101
|
+
- skipped paths are recorded in `.agentic.json`.
|
|
102
|
+
|
|
103
|
+
Every copied or generated file carries an internal marker. Markdown uses YAML front matter, comment-capable formats use comments, and JSON uses an `_agentic` object.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Agentic Token-Minimization Upgrade
|
|
2
|
+
|
|
3
|
+
This feature reduces the amount of guidance copied into target projects while making future `agentic` reruns safer.
|
|
4
|
+
|
|
5
|
+
## Managed Files
|
|
6
|
+
|
|
7
|
+
After installation, `agentic` writes `.agentic.json` in the target project root. The file records:
|
|
8
|
+
|
|
9
|
+
- selected agent OS targets, areas, and specializations;
|
|
10
|
+
- source repository and checkout path;
|
|
11
|
+
- every file managed by `agentic`;
|
|
12
|
+
- each managed file's source path and SHA-256 hash;
|
|
13
|
+
- skipped files from the latest rerun.
|
|
14
|
+
|
|
15
|
+
When `agentic` runs again in a project with `.agentic.json`, it updates only files listed in that manifest. If a managed file hash no longer matches the last `agentic` write, the file is treated as user-modified and is skipped.
|
|
16
|
+
|
|
17
|
+
## Generated Markers
|
|
18
|
+
|
|
19
|
+
Every copied or generated file is marked internally:
|
|
20
|
+
|
|
21
|
+
- Markdown files receive `agentic` metadata in YAML front matter.
|
|
22
|
+
- TypeScript, shell, TOML, Python, YAML, CSS, and similar text formats receive a valid comment.
|
|
23
|
+
- JSON files receive an `_agentic` metadata object because JSON does not allow comments.
|
|
24
|
+
|
|
25
|
+
The marker includes `generated_by: agentic`, the source path, and `https://github.com/sawrus/agent-guides`.
|
|
26
|
+
|
|
27
|
+
## OpenCode Optional Plugins
|
|
28
|
+
|
|
29
|
+
When installing for OpenCode, `agentic` writes optional plugin state to:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
~/.config/agentic/opencode-plugins.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Interactive installs ask whether to enable Telegram notifications and model checking. Non-interactive installs default optional plugins to disabled when no config exists.
|
|
36
|
+
|
|
37
|
+
The OpenCode plugins read this config at startup and return no hooks when disabled. Telegram credentials can also be supplied through:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
OPENCODE_TELEGRAM_BOT_TOKEN
|
|
41
|
+
OPENCODE_TELEGRAM_CHAT_ID
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Context7
|
|
45
|
+
|
|
46
|
+
`agentic` adds Context7 MCP configuration for known project-level formats:
|
|
47
|
+
|
|
48
|
+
- `opencode.json`
|
|
49
|
+
- `.opencode/opencode.json` for backward compatibility with existing generated OpenCode extension config
|
|
50
|
+
- `.codex/config.toml`
|
|
51
|
+
- `.mcp.json` for Claude Code project-scoped MCP servers
|
|
52
|
+
- `.cursor/mcp.json`
|
|
53
|
+
- `.gemini/settings.json`
|
|
54
|
+
|
|
55
|
+
Interactive installs ask whether to enable Context7. If enabled, the Context7 API key is optional. Empty keys keep the install usable with default Context7 limits or rule-only fallback behavior. Non-interactive installs enable Context7 only when `CONTEXT7_API_KEY` is already set. Generated guidance requires agents to use Context7 for framework, SDK, library, and API documentation before relying on model memory when the project config is present.
|
|
56
|
+
|
|
57
|
+
Directory copies are processed in batches so large specialization installs avoid spawning a separate marker/manifest process for every copied file. Manifest protection still applies: existing unmanaged files are skipped on rerun, user-modified managed files are skipped, and new generated files can be added by newer `agentic` versions.
|
|
58
|
+
|
|
59
|
+
## Full-Stack Skill Budget
|
|
60
|
+
|
|
61
|
+
`areas/software/full-stack/skills` is capped at six core skills:
|
|
62
|
+
|
|
63
|
+
- `api-design-principles`
|
|
64
|
+
- `api-patterns`
|
|
65
|
+
- `app-builder`
|
|
66
|
+
- `backend-developer`
|
|
67
|
+
- `blackbox-test`
|
|
68
|
+
- `prompt-project-planner`
|
|
69
|
+
|
|
70
|
+
This keeps task-specific context smaller while preserving workflow coverage.
|
|
71
|
+
|
|
72
|
+
## Quality Audit
|
|
73
|
+
|
|
74
|
+
`scripts/assess_area_quality.py` scores every specialization by environment. It writes:
|
|
75
|
+
|
|
76
|
+
- `reports/area-quality.json`
|
|
77
|
+
- `reports/area-quality.md`
|
|
78
|
+
|
|
79
|
+
The audit is warn-first by default. A strict threshold can be enabled through its CLI flags, but project verification should invoke it through Makefile targets.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# agentic CLI usage
|
|
2
|
+
|
|
3
|
+
This guide covers day-to-day use of the `agentic` CLI.
|
|
4
|
+
|
|
5
|
+
For lifecycle and repository resolution details, see [Installed CLI lifecycle](agentic-lifecycle.md).
|
|
6
|
+
|
|
7
|
+
## Run modes
|
|
8
|
+
|
|
9
|
+
Run from a local checkout:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
./agentic
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run directly with NPX (no prior install):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx @jetrabbits/agentic@latest
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Run the installed binary:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
agentic
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Default behavior:
|
|
28
|
+
|
|
29
|
+
- In an interactive terminal: starts TUI mode
|
|
30
|
+
- In non-interactive mode (CI/pipe): prints usage and exits with code `1`
|
|
31
|
+
- For CI one-off execution, prefer `npx @jetrabbits/agentic@latest <command>`
|
|
32
|
+
|
|
33
|
+
Install the standalone binary:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
./agentic self-install
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For users with an old installed `agentic`, do not run `agentic self-install --force` from `$PATH`: that invokes the old binary and may try to copy itself over itself. From a fresh `agent-guides` checkout, run from the repository root instead:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
./agentic self-install --force
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Recover or update an already installed binary without relying on the old local copy:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
curl -fsSL https://raw.githubusercontent.com/sawrus/agent-guides/main/install | bash -s -- --force
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Common options:
|
|
52
|
+
|
|
53
|
+
- `--bin-dir <dir>`: install into a custom binary directory
|
|
54
|
+
- `--force`: overwrite an existing target binary
|
|
55
|
+
- `--install-fzf`: optionally try auto-installing `fzf` during self-install
|
|
56
|
+
- `--dry-run`: show actions without writing files
|
|
57
|
+
|
|
58
|
+
## Core commands
|
|
59
|
+
|
|
60
|
+
Start TUI:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
agentic tui
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Install guidance into a project:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
agentic install \
|
|
70
|
+
--project-dir /path/to/your-project \
|
|
71
|
+
--agent-os opencode,codex \
|
|
72
|
+
--areas software \
|
|
73
|
+
--specializations software.general,software.backend
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
After install, `agentic` writes `.agentic.json` in the target project. It records copied/generated files and their hashes. A later install rerun updates only manifest-managed files and skips files changed by the user.
|
|
77
|
+
|
|
78
|
+
List available options:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
agentic list agentos
|
|
82
|
+
agentic list areas
|
|
83
|
+
agentic list specs --area software
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Refresh the local knowledge base checkout:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
agentic upgrade
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
In installed mode, `agentic upgrade` also refreshes the installed `agentic` binary from the updated knowledge base checkout. If an older binary cannot self-update, use the `curl ... | bash -s -- --force` bootstrap command above once.
|
|
93
|
+
|
|
94
|
+
## TUI and `fzf`
|
|
95
|
+
|
|
96
|
+
TUI uses `fzf` for interactive selection. If `fzf` is missing, `agentic` can:
|
|
97
|
+
|
|
98
|
+
1. ask permission to auto-install it
|
|
99
|
+
2. fall back to index-based menus if install is declined or fails
|
|
100
|
+
|
|
101
|
+
`--install-fzf` only affects `self-install`. If auto-install fails, self-install still completes.
|
|
102
|
+
|
|
103
|
+
Manual install examples:
|
|
104
|
+
|
|
105
|
+
Linux:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
sudo apt-get install -y fzf
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
macOS:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
brew install fzf
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Windows (run from Git Bash):
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
winget install --id junegunn.fzf -e
|
|
121
|
+
# or
|
|
122
|
+
choco install fzf -y
|
|
123
|
+
# or
|
|
124
|
+
scoop install fzf
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## OpenCode optional plugins
|
|
128
|
+
|
|
129
|
+
When `opencode` is selected, interactive installs ask whether to enable Telegram notifications and the model checker. The answer is stored globally in:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
~/.config/agentic/opencode-plugins.json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Non-interactive installs create a disabled config when no config exists. Telegram can also read `OPENCODE_TELEGRAM_BOT_TOKEN` and `OPENCODE_TELEGRAM_CHAT_ID`.
|
|
136
|
+
|
|
137
|
+
## Context7
|
|
138
|
+
|
|
139
|
+
For `opencode` and `codex`, interactive installs ask whether to add project-level Context7 MCP configuration. If enabled, the Context7 API key prompt is optional; leave it empty to configure Context7 without a key.
|
|
140
|
+
|
|
141
|
+
Non-interactive installs skip Context7 unless `CONTEXT7_API_KEY` is set in the environment. Agents are instructed to use Context7 for framework, library, SDK, API, and setup documentation when the project config is present.
|
|
142
|
+
|
|
143
|
+
## Deprecated wrapper
|
|
144
|
+
|
|
145
|
+
`agentos-install.sh` remains for backward compatibility and forwards to `agentic`. Prefer `agentic` in new usage and documentation.
|