@alexandrealvaro/agentic 0.3.0-beta.2 → 0.4.0-beta.1
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/README.md +3 -0
- package/WORKFLOW.md +4 -0
- package/package.json +1 -1
- package/src/commands/init.js +2 -0
- package/src/lib/rootdoc.js +2 -0
- package/src/skills/claude-code/agentic-ground/SKILL.md +100 -0
- package/src/skills/codex/agentic-ground/SKILL.md +82 -0
- package/src/skills/codex/agentic-ground/agents/openai.yaml +5 -0
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Two categories ([ADR-0007](doc/adr/0007-workflow-operational-skills.md)) and two
|
|
|
35
35
|
| `agentic-audit` | spec-driven | universal | Read-only drift report (AGENTS.md / ARCHITECTURE.md / ADRs) | `/agentic-audit` |
|
|
36
36
|
| `agentic-philosophy` | workflow-operational | universal | Universal agent guardrails — auto-loads on non-trivial work | implicit |
|
|
37
37
|
| `agentic-review` | workflow-operational | universal | Fresh-context code review per WORKFLOW §10; structured findings, no "approve" | `/agentic-review <range>` |
|
|
38
|
+
| `agentic-ground` | workflow-operational | universal | Four-source pre-implementation research (docs / OSS / in-repo / git history) + happy-path synthesis + deviation gate per WORKFLOW §4 + §5 | `/agentic-ground` |
|
|
38
39
|
| `agentic-design` | spec-driven | auto if frontend detected | Bootstrap `DESIGN.md` from existing tokens (Figma, tailwind.config, tokens.json, CSS custom props) | `/agentic-design` |
|
|
39
40
|
| `agentic-subagent` | spec-driven | auto if installing for Claude Code | Drafts `.claude/agents/<name>.md` (Claude Code only — Codex has no subagent primitive) | `/agentic-subagent` |
|
|
40
41
|
| `agentic-skill` | spec-driven | opt-in only | Drafts a new Claude Code or Codex skill at the appropriate path | `/agentic-skill` |
|
|
@@ -119,6 +120,8 @@ Prompts reference templates by relative path. Two ways to give your agent access
|
|
|
119
120
|
|
|
120
121
|
**Reviewing your own diff.** Run `/agentic-review <range>` (e.g. `/agentic-review main..HEAD` or `/agentic-review PR#42`). The skill assembles the diff, the relevant spec slice (`AGENTS.md`, applicable ADRs, the task's Acceptance Criteria), and delegates to a fresh-context reviewer subagent — no inherited bias from the session that wrote the code (WORKFLOW §10). Returns structured findings grouped Blocker / Concern / Note. Codex variant uses `/clear` + paste handoff since Codex has no subagent primitive.
|
|
121
122
|
|
|
123
|
+
**Researching before implementation.** Run `/agentic-ground` (or let it auto-trigger on non-trivial work). The skill runs a four-source levantamento — official docs, validated open-source examples, in-repo patterns, and git history — synthesizes a happy path with citations from each source, and gates any deviation behind an irrefutable justification before code is written (WORKFLOW §4 + §5). Output is the input to whatever produces the implementation plan; the skill does not write code.
|
|
124
|
+
|
|
122
125
|
**Project already built with agents.** Treat missing artifacts as brownfield (run the relevant skill) and existing artifacts as audit (`/agentic-audit`).
|
|
123
126
|
|
|
124
127
|
## What ends up in your target project
|
package/WORKFLOW.md
CHANGED
|
@@ -89,6 +89,8 @@ Then check continuously, especially mid-implementation:
|
|
|
89
89
|
|
|
90
90
|
Sometimes you can't follow the happy path — that's fine. But always know where it is and why you left it.
|
|
91
91
|
|
|
92
|
+
The kit ships `agentic-ground` (workflow-operational skill) as the bound implementation of §4 + §5: it runs a four-source research pass (official docs, validated open-source examples, in-repo patterns, git history), synthesizes the happy path with citations, and gates any deviation behind an irrefutable justification before code is written.
|
|
93
|
+
|
|
92
94
|
## 5. Ground in Real Patterns
|
|
93
95
|
|
|
94
96
|
Don't dump the codebase into context. Anchor the model in a specific, project-relevant example.
|
|
@@ -97,6 +99,8 @@ Don't dump the codebase into context. Anchor the model in a specific, project-re
|
|
|
97
99
|
|
|
98
100
|
Cite specific files, not "the codebase." Use just-in-time retrieval: pass paths or IDs and let the agent fetch via tools when it needs to read them.
|
|
99
101
|
|
|
102
|
+
`agentic-ground` (see §4) is the workflow-operational skill that combines this with the other three research sources — official docs, validated OSS, and git history — into one indivisible pre-implementation pass.
|
|
103
|
+
|
|
100
104
|
## 6. Explore → Plan → Implement → Commit
|
|
101
105
|
|
|
102
106
|
For non-trivial changes, four phases:
|
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -51,6 +51,7 @@ export const REQUIRED_SKILLS = [
|
|
|
51
51
|
'agentic-task',
|
|
52
52
|
'agentic-audit',
|
|
53
53
|
'agentic-review',
|
|
54
|
+
'agentic-ground',
|
|
54
55
|
];
|
|
55
56
|
|
|
56
57
|
/**
|
|
@@ -266,6 +267,7 @@ export async function initCommand(opts) {
|
|
|
266
267
|
'/agentic-task',
|
|
267
268
|
'/agentic-audit',
|
|
268
269
|
'/agentic-review (WORKFLOW §10)',
|
|
270
|
+
'/agentic-ground (WORKFLOW §4 + §5)',
|
|
269
271
|
...(optedSkills.includes('agentic-design') ? ['/agentic-design (DESIGN.md)'] : []),
|
|
270
272
|
...(optedSkills.includes('agentic-subagent') && agents.includes('claude-code')
|
|
271
273
|
? ['/agentic-subagent']
|
package/src/lib/rootdoc.js
CHANGED
|
@@ -22,6 +22,8 @@ export const SKILL_DESCRIPTIONS = {
|
|
|
22
22
|
'Read-only drift report comparing AGENTS.md / ARCHITECTURE.md / ADRs against the code.',
|
|
23
23
|
'agentic-review':
|
|
24
24
|
'Fresh-context code review per WORKFLOW §10 — assemble handoff, return structured findings.',
|
|
25
|
+
'agentic-ground':
|
|
26
|
+
'Four-source pre-implementation research (docs / OSS / in-repo / git history) + happy-path synthesis + deviation gate. WORKFLOW §4 + §5.',
|
|
25
27
|
'agentic-design': 'Bootstrap `DESIGN.md` from existing tokens (frontend projects).',
|
|
26
28
|
'agentic-subagent': 'Draft a new Claude Code subagent at `.claude/agents/<name>.md`.',
|
|
27
29
|
'agentic-skill': 'Draft a new Claude Code or Codex skill at the appropriate path.',
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-ground
|
|
3
|
+
description: Four-source pre-implementation research — official docs, validated open-source examples, in-repo patterns, and git history — then synthesize a happy path and gate any deviation with an irrefutable justification before code is written. Auto-invokes on non-trivial work, refactors, library or pattern selection, "research before coding", "before implementing", "which library", "which pattern", "how to approach", "ground before coding". Workflow-operational counterpart to WORKFLOW.md §4 (Find the Happy Path) and §5 (Ground in Real Patterns); pairs with agentic-philosophy (posture) and agentic-review (post-implementation §10 review).
|
|
4
|
+
allowed-tools: Read, Glob, Grep, Bash, WebFetch, WebSearch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /agentic-ground
|
|
8
|
+
|
|
9
|
+
Implements WORKFLOW §4 + §5 end-to-end as a single research pass. The four sources are joined by **AND**, not OR — every non-trivial change runs the full levantamento, then synthesizes a happy path, then justifies any deviation. Output is the input to whatever skill or freeform turn produces the implementation plan; this skill does not write code.
|
|
10
|
+
|
|
11
|
+
## Step 0 — Scope the recortte
|
|
12
|
+
|
|
13
|
+
Confirm what is being researched. The recortte is the smallest verifiable surface that captures the change: a function to add, a library to pick, a pattern to apply. State it in one sentence before research starts. If the surface is broader than one sentence captures, ask the user to narrow it; broad recorttes produce diluted research.
|
|
14
|
+
|
|
15
|
+
If the change is genuinely trivial (rename, typo, one-line refactor on a tested path), skip this skill.
|
|
16
|
+
|
|
17
|
+
## Step 1 — Four-source levantamento (all four required)
|
|
18
|
+
|
|
19
|
+
### Source A — official documentation
|
|
20
|
+
|
|
21
|
+
For each language and library in scope, cite the canonical doc URL and version. Use `WebFetch` to confirm the page exists and read the relevant section; use `WebSearch` to locate it if the URL is unknown. If neither produces a confident hit, ask the user for a known-good link rather than fabricating one. Output: bulleted citations, one per language/library, each with URL plus a one-line summary of the relevant guidance.
|
|
22
|
+
|
|
23
|
+
### Source B — validated open-source examples
|
|
24
|
+
|
|
25
|
+
Find ≥1 (prefer 2–3) public repository solving the same *technical* recortte with similar techniques. The match is technical, not domain — a CRUD-app-with-auth and a CLI-with-auth both hit "auth flow", and either is valid for the auth recortte. Use `WebSearch` (e.g. `site:github.com <recortte> language:<lang>`) and follow up with `WebFetch` of the specific file. Cite `<repo>:<path>:<line-range>` and quote the relevant block — never paraphrase code from training memory. If search is inconclusive, ask the user for a known reference.
|
|
26
|
+
|
|
27
|
+
### Source C — in-repo examples
|
|
28
|
+
|
|
29
|
+
Grep / glob the current repo for analogous patterns. Cite `<file>:<line>` plus a one-line description of how the existing example handles the same shape. If the codebase has no analog, state that explicitly (real signal, not a gap).
|
|
30
|
+
|
|
31
|
+
### Source D — git history
|
|
32
|
+
|
|
33
|
+
Run `git log --all --oneline -- <relevant-paths>`, `git log --all --grep=<keyword>`, and a sweep of sibling active branches (`git branch -a`, then `git log <branch> -- <paths>` on those that look related). Surface any prior attempt or sibling solution — including abandoned ones — with `<commit-sha>` plus the touching file path and a one-line description. If the search is genuinely empty, state "no prior attempt found" — that is the valid Source D outcome when there isn't one. Narrow with `--grep` or `-S` on multi-thousand-commit repos.
|
|
34
|
+
|
|
35
|
+
## Step 2 — Happy path synthesis
|
|
36
|
+
|
|
37
|
+
In one paragraph, name the most-grounded approach for the recortte and cite at least one source per Source A / B / C. Source D is included when it produced a hit; otherwise mark "no prior attempt found." The paragraph is the canonical answer the engineer would give if asked "what is the canonical, idiomatic way to solve this here?" — the question WORKFLOW.md §4 frames.
|
|
38
|
+
|
|
39
|
+
## Step 3 — Deviation gate
|
|
40
|
+
|
|
41
|
+
If the implementation the user (or you) is about to write deviates from the synthesized happy path, write the justification before any code lands. The justification must name the specific constraint, evidence, or trade-off forcing the deviation — generic "we want it differently" is insufficient. If the justification cannot be written confidently, loop back to Step 1 and look harder; do not deviate without it.
|
|
42
|
+
|
|
43
|
+
The gate is prescriptive, not descriptive: WORKFLOW §4 asks "was the deviation deliberate?"; this gate asks "is the deviation defensible against the four sources?" Write the answer down.
|
|
44
|
+
|
|
45
|
+
## Step 4 — Confidence checkpoint
|
|
46
|
+
|
|
47
|
+
Before handing off to implementation, report a soft verdict against four checks:
|
|
48
|
+
|
|
49
|
+
- A consulted (≥1 official-doc citation per language/library)
|
|
50
|
+
- B consulted (≥1 OSS citation, with cite-and-fetched code)
|
|
51
|
+
- C consulted (in-repo analog cited or "no analog found" stated)
|
|
52
|
+
- D checked (commits / branches surveyed; hit cited or "no prior attempt found")
|
|
53
|
+
- Happy path declared (Step 2)
|
|
54
|
+
- Deviation, if any, justified (Step 3)
|
|
55
|
+
|
|
56
|
+
If any check fails, surface the gap to the user and ask before proceeding rather than blocking. The user retains the authority to skip; the discipline is in surfacing, not in enforcement.
|
|
57
|
+
|
|
58
|
+
## Output contract
|
|
59
|
+
|
|
60
|
+
A single message structured as:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
## Recortte
|
|
64
|
+
<one sentence>
|
|
65
|
+
|
|
66
|
+
## Source A — official documentation
|
|
67
|
+
- <lang/lib>: <URL@version> — <one-line summary>
|
|
68
|
+
|
|
69
|
+
## Source B — validated open-source examples
|
|
70
|
+
- <repo>:<path>:<line-range> — <one-line summary>
|
|
71
|
+
```
|
|
72
|
+
<quoted code block>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Source C — in-repo examples
|
|
76
|
+
- <file>:<line> — <one-line summary>
|
|
77
|
+
- (or: "no analog found in the codebase")
|
|
78
|
+
|
|
79
|
+
## Source D — git history
|
|
80
|
+
- <commit-sha> <touching-path> — <one-line summary>
|
|
81
|
+
- (or: "no prior attempt found")
|
|
82
|
+
|
|
83
|
+
## Happy path
|
|
84
|
+
<one paragraph synthesizing A + B + C + D, with citations>
|
|
85
|
+
|
|
86
|
+
## Proposed implementation vs happy path
|
|
87
|
+
- aligned: <what stays canonical>
|
|
88
|
+
- deviates: <list of deviations>
|
|
89
|
+
- <deviation>: <irrefutable justification>
|
|
90
|
+
|
|
91
|
+
## Confidence checkpoint
|
|
92
|
+
- A consulted: yes / no — <gap if no>
|
|
93
|
+
- B consulted: yes / no — <gap if no>
|
|
94
|
+
- C consulted: yes / no — <gap if no>
|
|
95
|
+
- D checked: yes / no — <gap if no>
|
|
96
|
+
- happy path declared: yes
|
|
97
|
+
- deviations justified: yes / no / n.a.
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
No code is written by this skill. The output feeds the next turn (or `/agentic-task`, `/agentic-philosophy`'s Goal-Driven Execution, or freeform implementation).
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-ground
|
|
3
|
+
description: Four-source pre-implementation research — official docs, validated open-source examples, in-repo patterns, and git history — then synthesize a happy path and gate any deviation with an irrefutable justification before code is written. Auto-invokes on non-trivial work, refactors, library or pattern selection, "research before coding", "before implementing", "which library", "which pattern", "how to approach", "ground before coding". Workflow-operational counterpart to WORKFLOW.md §4 (Find the Happy Path) and §5 (Ground in Real Patterns).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<background_information>
|
|
7
|
+
Implements WORKFLOW §4 + §5 end-to-end as one research pass. The four sources are joined by AND, not OR — every non-trivial change runs the full levantamento, then synthesizes a happy path, then justifies any deviation. Output is the input to whatever skill or freeform turn produces the implementation plan; this skill does not write code.
|
|
8
|
+
|
|
9
|
+
Codex auto-trigger on description keywords is less mature than Claude Code's. If auto-invocation does not fire on a non-trivial change, invoke this skill manually before implementing.
|
|
10
|
+
</background_information>
|
|
11
|
+
|
|
12
|
+
<instructions>
|
|
13
|
+
Step 0 — scope the recortte. Confirm what is being researched in one sentence. The recortte is the smallest verifiable surface that captures the change: a function to add, a library to pick, a pattern to apply. If broader than one sentence, ask the user to narrow. Skip the skill on genuinely trivial diffs (rename, typo, one-line refactor on a tested path).
|
|
14
|
+
|
|
15
|
+
Step 1 — four-source levantamento, all four required:
|
|
16
|
+
|
|
17
|
+
Source A — official documentation. For each language and library in scope, cite the canonical doc URL and version. Read the relevant section. Ask the user for a known-good link rather than fabricating one. Output: bulleted citations, one per language/library, each with URL plus a one-line summary.
|
|
18
|
+
|
|
19
|
+
Source B — validated open-source examples. ≥1 (prefer 2–3) public repository solving the same technical recortte with similar techniques. Match is technical, not domain. Cite `<repo>:<path>:<line-range>` and quote the relevant block — never paraphrase from training memory. If search is inconclusive, ask the user for a known reference.
|
|
20
|
+
|
|
21
|
+
Source C — in-repo examples. Grep / glob for analogous patterns. Cite `<file>:<line>` plus a one-line description of how the existing example handles the same shape. If the codebase has no analog, state that explicitly.
|
|
22
|
+
|
|
23
|
+
Source D — git history. Run `git log --all --oneline -- <relevant-paths>`, `git log --all --grep=<keyword>`, sweep sibling active branches. Cite `<commit-sha>` plus touching file path and a one-line description. If empty, state "no prior attempt found." Narrow with `--grep` or `-S` on multi-thousand-commit repos.
|
|
24
|
+
|
|
25
|
+
Step 2 — happy path synthesis. In one paragraph, name the most-grounded approach for the recortte and cite at least one source per Source A / B / C. Source D included when it produced a hit; otherwise mark "no prior attempt found." The paragraph is the canonical answer to "what is the canonical, idiomatic way to solve this here?"
|
|
26
|
+
|
|
27
|
+
Step 3 — deviation gate. If the implementation about to be written deviates from the happy path, write the justification first. Must name the specific constraint, evidence, or trade-off forcing the deviation — generic "we want it differently" is insufficient. If the justification cannot be written confidently, loop back to Step 1 and look harder; do not deviate without it. Prescriptive gate, not descriptive — write the answer down.
|
|
28
|
+
|
|
29
|
+
Step 4 — confidence checkpoint. Soft verdict on:
|
|
30
|
+
- A consulted (≥1 official-doc citation per language/library)
|
|
31
|
+
- B consulted (≥1 OSS citation, with cite-and-fetched code)
|
|
32
|
+
- C consulted (in-repo analog cited or "no analog found" stated)
|
|
33
|
+
- D checked (commits / branches surveyed; hit cited or "no prior attempt found")
|
|
34
|
+
- Happy path declared (Step 2)
|
|
35
|
+
- Deviation, if any, justified (Step 3)
|
|
36
|
+
|
|
37
|
+
If any check fails, surface the gap to the user and ask before proceeding. Do not block. The user retains authority to skip; the discipline is in surfacing.
|
|
38
|
+
</instructions>
|
|
39
|
+
|
|
40
|
+
<output_contract>
|
|
41
|
+
A single message structured as:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
## Recortte
|
|
45
|
+
<one sentence>
|
|
46
|
+
|
|
47
|
+
## Source A — official documentation
|
|
48
|
+
- <lang/lib>: <URL@version> — <one-line summary>
|
|
49
|
+
|
|
50
|
+
## Source B — validated open-source examples
|
|
51
|
+
- <repo>:<path>:<line-range> — <one-line summary>
|
|
52
|
+
```
|
|
53
|
+
<quoted code block>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Source C — in-repo examples
|
|
57
|
+
- <file>:<line> — <one-line summary>
|
|
58
|
+
- (or: "no analog found in the codebase")
|
|
59
|
+
|
|
60
|
+
## Source D — git history
|
|
61
|
+
- <commit-sha> <touching-path> — <one-line summary>
|
|
62
|
+
- (or: "no prior attempt found")
|
|
63
|
+
|
|
64
|
+
## Happy path
|
|
65
|
+
<one paragraph synthesizing A + B + C + D, with citations>
|
|
66
|
+
|
|
67
|
+
## Proposed implementation vs happy path
|
|
68
|
+
- aligned: <what stays canonical>
|
|
69
|
+
- deviates: <list of deviations>
|
|
70
|
+
- <deviation>: <irrefutable justification>
|
|
71
|
+
|
|
72
|
+
## Confidence checkpoint
|
|
73
|
+
- A consulted: yes / no — <gap if no>
|
|
74
|
+
- B consulted: yes / no — <gap if no>
|
|
75
|
+
- C consulted: yes / no — <gap if no>
|
|
76
|
+
- D checked: yes / no — <gap if no>
|
|
77
|
+
- happy path declared: yes
|
|
78
|
+
- deviations justified: yes / no / n.a.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
No code is written by this skill. The output feeds the next turn or another skill.
|
|
82
|
+
</output_contract>
|