Skip to content

Commit 55f4995

Browse files
Jeremias Santosclaude
authored andcommitted
docs(PAV-93): adiciona guia de uso do Linear e integração com GitHub
- Cria GUIA-LINEAR-GITHUB.md com conceitos do Linear, passo a passo do fluxo de tasks, vínculo de card com branch/PR/commit e mapa das automações de estado (branch → In Progress, PR → In Review, merge → Done) - Adiciona link do guia no README (Links oficiais) - Reforça no skill abrir-pr-jobs-scraper que o identificador PAV-XX no título e o link do Linear no corpo são obrigatórios para a automação mover o card - Adiciona skill tlc-spec-driven e arquivos de suporte (.agents, lockfile) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4c4b6cf commit 55f4995

21 files changed

Lines changed: 3216 additions & 59 deletions

.agents/.skill-lock.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": 2,
3+
"skills": {
4+
"tlc-spec-driven": {
5+
"name": "tlc-spec-driven",
6+
"source": "local",
7+
"contentHash": "e3d5c4dec38bff044207b31229fb28114d5fdb79f2c7200f3ec49a13a70024e1",
8+
"installedAt": "2026-07-24T13:23:56.326Z",
9+
"updatedAt": "2026-07-24T13:23:56.360Z",
10+
"agents": [
11+
"cursor",
12+
"claude-code",
13+
"windsurf"
14+
],
15+
"method": "copy",
16+
"global": false
17+
}
18+
}
19+
}

.agents/.skill-lock.json.backup

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": 2,
3+
"skills": {
4+
"tlc-spec-driven": {
5+
"name": "tlc-spec-driven",
6+
"source": "local",
7+
"contentHash": "e3d5c4dec38bff044207b31229fb28114d5fdb79f2c7200f3ec49a13a70024e1",
8+
"installedAt": "2026-07-24T13:23:56.326Z",
9+
"updatedAt": "2026-07-24T13:23:56.346Z",
10+
"agents": [
11+
"cursor",
12+
"claude-code"
13+
],
14+
"method": "copy",
15+
"global": false
16+
}
17+
}
18+
}

.claude/skills/abrir-pr-jobs-scraper/skill.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ Rode os comandos de verificacao da tabela acima. Se algum falhar, informe e pare
100100

101101
### Passo 6: Montar e mostrar preview
102102

103+
> **Por que o formato importa:** o identificador `PAV-XX` no titulo e o link do Linear no corpo sao o que a integracao Linear ↔ GitHub usa para vincular o PR ao card e move-lo automaticamente (para **In Review** ao abrir o PR e para **Done** ao mergear). Nao remova o `PAV-XX` do titulo nem o link do Linear do corpo — sem eles, o card nao se move sozinho.
104+
103105
Montar o PR completo e mostrar ao usuario:
104106

105107
**Titulo:**
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"contentHash": "e3d5c4dec38bff044207b31229fb28114d5fdb79f2c7200f3ec49a13a70024e1",
3+
"downloadedAt": 1784654807392
4+
}
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
name: tlc-spec-driven
3+
description: Feature planning and implementation with 4 adaptive phases — Specify, Design, Tasks, Execute. Auto-sizes depth by complexity. Creates atomic tasks with verification criteria, atomic git commits, and requirement traceability. Features an independent Verifier (author != verifier, evidence-or-zero), persistent decision log (STATE.md), and test-coverage-matrix-driven tests, plus a self-improving lessons layer that turns verification failures into reusable project-local guidance. Stack-agnostic. Use when (1) Planning features (requirements, design, task breakdown), (2) Implementing with verification and atomic commits, (3) Validating or verifying an implementation against a spec. Triggers on "specify feature", "discuss feature", "design", "tasks", "implement", "validate", "verify work", "UAT", "record decision", "pause work", "resume work". Do NOT use for architecture decomposition analysis (use architecture skills) or technical design docs (use create-technical-design-doc).
4+
license: CC-BY-4.0
5+
metadata:
6+
author: Felipe Rodrigues - github.com/felipfr
7+
version: 3.2.0
8+
---
9+
10+
# Tech Lead's Club - Spec-Driven Development
11+
12+
Plan and implement features with precision. Granular tasks. Clear dependencies. Right tools. Zero ceremony.
13+
14+
```
15+
┌──────────┐ ┌──────────┐ ┌─────────┐ ┌─────────┐
16+
│ SPECIFY │ → │ DESIGN │ → │ TASKS │ → │ EXECUTE │
17+
└──────────┘ └──────────┘ └─────────┘ └─────────┘
18+
required optional* optional* required
19+
20+
* Agent auto-skips when scope doesn't need it
21+
```
22+
23+
## Critical Rules (read before acting)
24+
25+
**Loading this skill's files.** Reference files live under `references/` in this skill's own directory (where this `SKILL.md` resides). Resolve them relative to the skill directory — never the workspace root — and load them through the active skill by name; never assume a fixed install path. When a step tells you to read a reference, **read it completely (to EOF)** before acting — never act on a partial/truncated read.
26+
27+
**Execution contract — every task, non-negotiable (holds even if you do not open the reference files):**
28+
29+
1. Tests derive from the spec's acceptance criteria and assert spec-defined outcomes — they never mirror the implementation.
30+
2. The gate must pass (tests pass) before a task is done — the test runner decides, not self-assessment.
31+
3. One atomic commit per task. Never batch tasks; never weaken, skip, or delete tests to make them pass.
32+
4. After the LAST task, a fresh **Verifier always runs automatically** (author ≠ verifier) — spec-anchored outcome check + discrimination sensor. It is never optional and never prompted. See Sub-Agent Delegation.
33+
34+
**Before Execute:** read [implement.md](references/implement.md) completely; if a formal `tasks.md` packs into more than one task-budgeted batch (> ~8 tasks), present the sub-agent offer first (see Sub-Agent Delegation).
35+
36+
## Auto-Sizing: The Core Principle
37+
38+
**The complexity determines the depth, not a fixed pipeline.** Before starting any feature, assess its scope and apply only what's needed:
39+
40+
| Scope | What | Specify | Design | Tasks | Execute |
41+
| ----------- | ------------------------ | ------------------------------------------------------- | ----------------------------------------------- | ----------------------------- | ----------------------------------------------------- |
42+
| **Small** | ≤3 files, one sentence | One-liner spec (inline) | Skip | Skip | Implement + verify inline |
43+
| **Medium** | Clear feature, <10 tasks | Spec (brief) | Skip — design inline | Skip — tasks implicit | Implement + verify |
44+
| **Large** | Multi-component feature | Full spec + requirement IDs | Architecture + components | Full breakdown + dependencies | Implement + verify per task |
45+
| **Complex** | Ambiguity, new domain | Full spec + [discuss gray areas](references/discuss.md) | [Research](references/design.md) + architecture | Breakdown + phase plan | Implement + [interactive UAT](references/validate.md) |
46+
47+
**Rules:**
48+
49+
- **Specify and Execute are always required** — you always need to know WHAT and DO it
50+
- **Design is skipped** when the change is straightforward (no architectural decisions, no new patterns)
51+
- **Tasks is skipped** when there are ≤3 obvious steps (they become implicit in Execute)
52+
- **Discuss is triggered within Specify** when the agent detects ambiguous gray areas that need user input, or when the feature has any implicit-requirement dimension present (persistence/state, external calls, auth, payments, concurrency, state transitions)
53+
- **Interactive UAT is triggered within Execute** only for user-facing features with complex behavior
54+
55+
**Safety valve:** Even when Tasks is skipped, Execute ALWAYS starts by listing atomic steps inline (see [implement.md](references/implement.md)). If that listing reveals >5 steps or complex dependencies, STOP and create a formal `tasks.md` — the Tasks phase was wrongly skipped.
56+
57+
## .specs Structure
58+
59+
```
60+
.specs/
61+
├── STATE.md # Project memory: Decisions log (AD-NNN) + Handoff snapshot
62+
├── LESSONS.md # Self-improving lessons playbook (rendered by scripts/lessons.py — do not hand-edit)
63+
├── lessons.json # Canonical lessons state (machine-owned)
64+
└── features/ # Feature specifications
65+
└── [feature]/
66+
├── spec.md # Requirements with traceable IDs
67+
├── context.md # User decisions for gray areas (only when discuss is triggered)
68+
├── design.md # Architecture & components (only for Large/Complex)
69+
├── tasks.md # Atomic tasks with verification (only for Large/Complex)
70+
└── validation.md # Verifier report: PASS/FAIL, per-AC evidence, sensor result, diff range
71+
```
72+
73+
## Workflow
74+
75+
**New feature:**
76+
77+
1. Specify → (Design) → (Tasks) → Execute (depth auto-sized)
78+
79+
**Resume work:**
80+
81+
Read `.specs/STATE.md` — Handoff section for in-flight state, Decisions section to re-confirm active constraints — then propose the next step.
82+
83+
## Context Loading Strategy
84+
85+
**On-demand load (only what the current task needs):**
86+
87+
- `.specs/STATE.md` — Decisions section (read at Design, re-read on resume); Handoff section (read on resume only)
88+
- confirmed lessons — load at Specify and Design via `python3 scripts/lessons.py list --status confirmed` ([lessons.md](references/lessons.md)); confirmed only, never candidates
89+
- spec.md (when working on a specific feature)
90+
- context.md (when designing or implementing from user decisions)
91+
- design.md (when implementing from design)
92+
- tasks.md (when executing tasks)
93+
94+
**Never load simultaneously:**
95+
96+
- Multiple feature specs
97+
- Multiple architecture docs
98+
99+
**Target:** <40k tokens total context
100+
**Reserve:** 160k+ tokens for work, reasoning, outputs
101+
**Monitoring:** Display status when >40k (see [context-limits.md](references/context-limits.md))
102+
103+
## Sub-Agent Delegation
104+
105+
**Trigger:** count total tasks. If the feature packs into more than one task-budgeted batch (> ~8 tasks) → offer sub-agents; if it fits a single batch (≤ ~8 tasks) → execute inline.
106+
107+
**Offer-then-confirm** — never auto-spawn. The user must accept before any sub-agent is dispatched.
108+
109+
**One worker per task-budgeted batch (~7 tasks, whole phases):** Phases stay the semantic/dependency unit; a **batch** is the execution unit — one or more *consecutive whole phases* packed to ~7 tasks. Walk phases in order, accumulate whole phases into the current batch until it reaches the budget, then start the next — **never split a phase** across workers. ~20 tasks → ~3 workers; scales linearly (40 → ~6). Each worker executes all its tasks in order (implement → gate → atomic commit), then reports a compact summary (tasks done, commit hashes, test counts, deviations). Batches run sequentially — a batch never starts until the previous one reports all tasks complete. Workers never spawn further sub-agents.
110+
111+
**Verifier (always-on, never prompted):** After the final task is committed, the orchestrator dispatches a fresh Verifier sub-agent automatically — regardless of phase count. Validation never requires a user prompt; it is the closing step of Execute. **Author ≠ verifier**: the Verifier re-derives coverage independently using evidence-or-zero; it does not inherit the author's mental model. The Verifier: (1) performs a **spec-anchored outcome check** — confirms each test's asserted value matches the spec-defined expected outcome, flags spec-precision gaps; (2) runs a **discrimination sensor** — injects behavior-level faults in scratch state, confirms tests kill them, discards mutations, surviving mutants become fix tasks; (3) writes `.specs/features/[feature]/validation.md` (PASS/FAIL, per-AC evidence, sensor result, diff range); (4) returns a compact verdict + ranked gap list to the orchestrator in chat. Gaps become fix tasks; the fix→re-verify loop is bounded to 3 iterations before escalating. (5) **distills lessons** — turns each grounded failure (surviving mutant, spec-precision gap, failed AC, SPEC_DEVIATION) into a reusable project-local lesson via `scripts/lessons.py`; a clean PASS records nothing (see [lessons.md](references/lessons.md)).
112+
113+
**Standalone fallback:** Without sub-agents, run `validate.md` as an independent fresh-eyes pass after the final commit — including the spec-anchored check and discrimination sensor.
114+
115+
Full mechanics (worker payload, compact summary format, failure handling, context sizing, Verifier report format): [sub-agents.md](references/sub-agents.md).
116+
117+
## Commands
118+
119+
**Feature-level (auto-sized):**
120+
| Trigger Pattern | Reference |
121+
|----------------|-----------|
122+
| Specify feature, define requirements | [specify.md](references/specify.md) |
123+
| Discuss feature, capture context, how should this work | [discuss.md](references/discuss.md) |
124+
| Design feature, architecture | [design.md](references/design.md) |
125+
| Break into tasks, create tasks | [tasks.md](references/tasks.md) |
126+
| Implement task, build, execute | [implement.md](references/implement.md) |
127+
| Validate, verify, test, UAT, walk me through it | [validate.md](references/validate.md) |
128+
129+
**Memory:**
130+
| Trigger Pattern | Reference |
131+
|----------------|-----------|
132+
| Record decision, this is a project-level decision | [memory.md](references/memory.md) |
133+
| Pause work, end session, I need to stop | [memory.md](references/memory.md) |
134+
| Resume work, continue, pick up where we left off | [memory.md](references/memory.md) |
135+
| Load lessons, what have we learned, apply past lessons | [lessons.md](references/lessons.md) |
136+
| Record lesson, distill lessons (auto-runs after validation) | [lessons.md](references/lessons.md) |
137+
138+
## Knowledge Verification Chain
139+
140+
When researching, designing, or making any technical decision, follow this chain in strict order. Never skip steps.
141+
142+
```
143+
Step 1: Codebase → check existing code, conventions, and patterns already in use
144+
Step 2: Project docs → README, docs/, inline comments, `.specs/STATE.md` (Decisions)
145+
Step 3: Context7 MCP → resolve library ID, then query for current API/patterns
146+
Step 4: Web search → official docs, reputable sources, community patterns
147+
Step 5: Flag as uncertain → "I'm not certain about X — here's my reasoning, but verify"
148+
```
149+
150+
**Rules:**
151+
152+
- Never skip to Step 5 if Steps 1-4 are available
153+
- Step 5 is ALWAYS flagged as uncertain — never presented as fact
154+
- **NEVER assume or fabricate.** If you cannot find an answer, say "I don't know" or "I couldn't find documentation for this". Inventing APIs, patterns, or behaviors causes cascading failures across design → tasks → implementation. Uncertainty is always preferable to fabrication.
155+
156+
## Output Behavior
157+
158+
**Model guidance:** After completing lightweight tasks (validation, feature-level checks), naturally mention once per session that such tasks work well with faster/cheaper models. For heavy tasks (complex design, large features), briefly note the reasoning requirements before starting.
159+
160+
Be conversational, not robotic. Don't interrupt workflow—add as a natural closing note. Skip if user seems experienced or has already acknowledged the tip.
161+
162+
## Code Analysis
163+
164+
Use available tools with graceful degradation. See [code-analysis.md](references/code-analysis.md).
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Code Analysis Tools
2+
3+
Use graceful degradation for code search and structural analysis.
4+
5+
## Tool Priority
6+
7+
1. **ast-grep** (`sg`) - Structural pattern-based search
8+
2. **ripgrep** (`rg`) - Fast context-aware text search
9+
3. **grep** - Standard text search (always available)
10+
11+
## Detection
12+
13+
Check tool availability before use:
14+
15+
```bash
16+
# Check for ast-grep
17+
if command -v sg >/dev/null 2>&1; then
18+
# Use ast-grep for structural search
19+
elif command -v rg >/dev/null 2>&1; then
20+
# Fall back to ripgrep
21+
else
22+
# Use standard grep as final fallback
23+
fi
24+
```
25+
26+
## Usage Examples
27+
28+
**Finding function definitions:**
29+
30+
```bash
31+
# ast-grep (best - structural)
32+
sg -p 'function $NAME($$$) { $$$ }'
33+
34+
# ripgrep (fallback - fast text)
35+
rg '^function\s+\w+\(' --type-add 'source:*.[extension]' -t source
36+
37+
# grep (last resort - basic)
38+
grep -r '^function ' --include="*.[extension]"
39+
```
40+
41+
**Finding imports/requires:**
42+
43+
```bash
44+
# ast-grep
45+
sg -p 'import { $$$ } from "$MODULE"'
46+
47+
# ripgrep
48+
rg '^import .* from' --type-add 'source:*.[extension]' -t source
49+
50+
# grep
51+
grep -r '^import ' --include="*.[extension]"
52+
```
53+
54+
**Finding class/component definitions:**
55+
56+
```bash
57+
# ast-grep
58+
sg -p 'class $NAME { $$$ }'
59+
60+
# ripgrep
61+
rg '^(class|export class)\s+\w+' --type-add 'source:*.[extension]' -t source
62+
63+
# grep
64+
grep -r '^class ' --include="*.[extension]"
65+
```
66+
67+
## Search Scope
68+
69+
**Best practices:**
70+
71+
- Limit to source file extensions relevant to project
72+
- Exclude directories: `node_modules`, `vendor`, `dist`, `build`, `.git`
73+
- Focus on source directories: `src`, `lib`, `app`
74+
- Use file type filters when available
75+
76+
**Performance tips:**
77+
78+
- Use specific patterns over broad searches
79+
- Limit directory depth with `--max-depth` (ripgrep/grep)
80+
- Cache results for repeated queries
81+
82+
## Fallback Notice
83+
84+
If ast-grep unavailable, display once per session:
85+
86+
```
87+
⚠️ ast-grep not detected. Install for more precise structural code analysis.
88+
https://ast-grep.github.io/guide/quick-start.html
89+
```
90+
91+
## When to Use
92+
93+
- Finding usage patterns across codebase
94+
- Identifying code structure and organization
95+
- Locating function/class/component definitions
96+
- Analyzing import/dependency patterns
97+
- Refactoring impact analysis
98+
- Code navigation in unfamiliar codebases
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Coding Principles
2+
3+
Behavioral bias, not checklist. Read before every implementation.
4+
5+
---
6+
7+
## Before Coding
8+
9+
- State assumptions explicitly. If uncertain, ask.
10+
- Multiple interpretations exist? Present all—don't pick silently.
11+
- Simpler approach exists? Say so. Push back when warranted.
12+
- Something unclear? Stop. Name what's confusing. Ask.
13+
- User's approach seems wrong? Disagree honestly. Don't be sycophantic.
14+
15+
---
16+
17+
## During Implementation
18+
19+
### Simplicity
20+
21+
- No features beyond what was asked
22+
- No abstractions for single-use code
23+
- No "flexibility" or "configurability" not requested
24+
- No error handling for impossible scenarios
25+
- 200 lines that could be 50? Rewrite it.
26+
27+
### Surgical Changes
28+
29+
- Don't "improve" adjacent code, comments, or formatting
30+
- Don't refactor things that aren't broken
31+
- Match existing style, even if you'd do differently
32+
- Unrelated dead code noticed? Mention it—don't delete it
33+
- Remove ONLY imports/variables/functions YOUR changes orphaned
34+
- Don't remove pre-existing dead code unless asked
35+
36+
### Test Integrity
37+
38+
- NEVER weaken an existing test assertion to make it pass
39+
- NEVER delete a test to reduce failure count
40+
- NEVER use the test framework's skip/disable/pending mechanism to bypass a failing test
41+
- NEVER modify a task's tests afterward to make the implementation pass
42+
- If a test is genuinely wrong, STOP and confirm with the user before changing it
43+
- Tests are the spec — implementation conforms to tests, not the other way around
44+
45+
### Goal-Driven
46+
47+
- Transform vague tasks into verifiable goals
48+
- Multi-step work? State brief plan with verify checkpoints
49+
- Every changed line must trace directly to user's request
50+
51+
---
52+
53+
## After Each Change
54+
55+
Ask: "Would senior engineer call this overcomplicated?"
56+
If yes → simplify before proceeding.

0 commit comments

Comments
 (0)