Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
85a8f23
Add GitHub Actions workflow for Python package
israel2606 Apr 26, 2026
3062b34
docs: add CLAUDE.md guide for AI assistants
claude Jun 7, 2026
e8cd954
Arquitectura inicial del ERP de Grupo Tesela
claude Jun 8, 2026
09382eb
Merge pull request #2 from israel2606/claude/connector-recommendation…
israel2606 Jun 8, 2026
2ab99af
Adaptar arquitectura ERP al sector inmobiliario y a Holded
claude Jun 8, 2026
e38c06f
Cerrar decisiones de nucleo y anadir modelo de datos del ERP
claude Jun 8, 2026
7aee390
Anadir bitacora de estado: Fase 0 completada
claude Jun 8, 2026
f20deca
Integracion Holded: Edge Function sync-holded (lectura de contactos)
claude Jun 8, 2026
0fa4ac8
test: add coverage for lockdown safety logic and tool-result helpers
claude Jun 8, 2026
cac2e4e
test: cover unexported Actions workflow helpers
claude Jun 8, 2026
94411d8
Merge pull request #1 from israel2606/claude/add-claude-documentation…
israel2606 Jun 8, 2026
982ac61
Merge pull request #3 from israel2606/claude/test-coverage-analysis-4…
israel2606 Jun 8, 2026
813face
Holded habilitado en Zapier (via A); pendiente autorizacion OAuth
claude Jun 8, 2026
c9965d8
sync-holded multi-sociedad: sincroniza varias empresas de Holded
claude Jun 8, 2026
10fd6f9
sync-holded v2 desplegada (multi-sociedad) + migracion sociedad_id
claude Jun 8, 2026
128fb7b
Fase 1: sistema de usuarios y roles con RLS fino
claude Jun 8, 2026
43ca8c2
Modulo documental (Storage) y cuadro de rentabilidad por promocion
claude Jun 8, 2026
6ef2a55
Vista de comercializacion por promocion (BI)
claude Jun 8, 2026
3b8fc04
Prototipo HTML del dashboard de Direccion
claude Jun 8, 2026
bc3257f
Anotar estado de Figma (bloqueado por plan) y prototipo HTML disponible
claude Jun 8, 2026
eed328b
test(lockdown): cover remaining safety branches on top of #3
claude Jun 8, 2026
3d73e1e
Prototipo HTML completo: las 5 pantallas del ERP
claude Jun 8, 2026
6cf0586
chore: add coordinated Claude Code tooling for this project
claude Jun 8, 2026
674d530
chore(claude): drop machine-specific path from tool-adder agent
claude Jun 8, 2026
43f6d23
Flujo de facturacion automatica: cola de facturas hacia Holded
claude Jun 9, 2026
1c146e7
Vista de tesoreria por promocion + README maestro del proyecto
claude Jun 9, 2026
b4cf3cd
Merge pull request #7 from israel2606/claude/setup-claude-tools
israel2606 Jun 9, 2026
22fa372
remove: deprecated Python workflow (project is Go-based)
israel2606 Jun 11, 2026
c1c1352
Add GitHub Actions workflow for Go build and test
israel2606 Jun 11, 2026
7520251
App web real: frontend conectado a Supabase
claude Jun 11, 2026
7918597
Publicar el ERP en URL publica (Edge Function app) + usuario demo
claude Jun 11, 2026
2c70e65
App: vista de detalle de promocion (unidades, tesoreria, obra, docume…
claude Jun 11, 2026
9970ba1
test: cover success paths of repository resource completions
claude Jun 8, 2026
2658ecf
test: cover translations helpers and toolset instructions
claude Jun 8, 2026
8d02c19
test: cover inventory error types, resource accessors, and tool const…
claude Jun 8, 2026
a100f2d
test: cover ghmcp URL helpers, transports, and middleware
claude Jun 8, 2026
f42d95d
test: cover IssueToFixWorkflowPrompt handler
claude Jun 8, 2026
6b29cc0
test: fix lint findings in new coverage tests
claude Jun 11, 2026
d7a6fbc
test: inject subdomain-isolation probe seam for newGHESHost
claude Jun 11, 2026
27841f9
Operar desde la app: registrar venta + trigger de unidad vendida
claude Jun 11, 2026
d85151c
test: adapt coverage tests to main refactor
claude Jun 11, 2026
1566832
Merge pull request #6 from israel2606/claude/test-coverage-analysis-4…
israel2606 Jun 11, 2026
dc17844
Merge pull request #5 from israel2606/claude/test-coverage-analysis-s…
israel2606 Jun 11, 2026
96e6697
Dashboard global del grupo en la app
claude Jun 11, 2026
fe29714
ci: drop Go 1.24 from go-build matrix (module requires 1.25)
claude Jun 11, 2026
1d6370b
Anadir INDICE.md: portada con todos los accesos, estado y documentacion
claude Jun 11, 2026
80e06e3
Merge pull request #8 from israel2606/claude/fix-ci-go124-build
israel2606 Jun 17, 2026
f399f63
ci: fix go-build coverage step failing on packages without tests
claude Jun 17, 2026
d1a0ed9
Registrar certificaciones de obra desde la app
claude Jun 17, 2026
1f35563
test(lockdown): remove safety_coverage_test.go incompatible with refa…
claude Jun 17, 2026
7c9e61c
Holded conectado (1 sociedad): 47 contactos reales sincronizados
claude Jun 17, 2026
e57a4b7
Pantalla de Contactos en la app
claude Jun 17, 2026
b5a2a8e
ci: bump setup-go to v6 so coverage keeps the full ./... package set
claude Jun 17, 2026
190a6f3
Importar facturas reales de Holded
claude Jun 17, 2026
4c623af
Pantalla de Facturas en la app
claude Jun 17, 2026
23b05d9
Sincronizacion automatica diaria de Holded
claude Jun 17, 2026
00da5b5
Hardening de seguridad final (search_path + revokes de funciones)
claude Jun 17, 2026
c6ab16c
Merge pull request #9 from israel2606/claude/fix-coverage-covdata
israel2606 Jun 17, 2026
1ce7da0
Merge remote-tracking branch 'origin/main' into claude/connector-reco…
claude Jun 17, 2026
74527b4
Abordar revision de Codex en el PR
claude Jun 17, 2026
59af5bd
Alta de promociones desde la app (solo direccion)
claude Jun 18, 2026
b35751c
Emision de facturas a Holded + arreglo del timeout del cron
claude Jun 19, 2026
64a37f8
Fix: promocion nueva sin unidades no aparecia en el dashboard
claude Jun 19, 2026
253cbc2
Auditoria Omega v11 (read-only): informe forense Grupo Tesela
claude Jun 23, 2026
bc5ed26
docs(omega): add session continuation/state file
claude Jun 23, 2026
9a61c24
docs(tesela-omega): add MASTER_REVIEW_SISTEMA consolidated entry point
claude Jun 23, 2026
db80be6
docs(tesela-omega): unify synthesis dates to 2026-06-25
claude Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
58 changes: 58 additions & 0 deletions .claude/agents/lint-fixer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: lint-fixer
description: Diagnoses and fixes golangci-lint failures (revive, gocritic, gosec, staticcheck, errcheck, etc.) in this repo. Use proactively when lint is red on a PR or `script/lint` fails locally.
model: sonnet
---

You diagnose and fix lint failures from `script/lint` (golangci-lint v2.5.0).

## Procedure

1. **Run lint** and capture the full output:
```bash
script/lint 2>&1 | tee /tmp/lint.out
```

2. **Categorize each issue**:
- **Fixable mechanically** (gofmt, unused imports, naked returns,
simple staticcheck QFs): fix in place.
- **Real bug** (errcheck on a critical error, gosec on a real vuln,
staticcheck pointing at a logic issue): fix or escalate.
- **False positive / known-good** (e.g. `revive: var-naming` on a
legitimate `utils` package): suppress via `.golangci.yml`
`exclusions.rules` — never sprinkle `//nolint` directives without
reason.

3. **Apply minimum-impact fixes**:
- Prefer fixing the code over silencing the linter.
- When silencing is the right call (false positive, intentional
pattern), add an `exclusions.rules` entry with a specific `text:`
match and the linter name. Don't disable entire linters.

4. **Re-run lint** until clean:
```bash
script/lint
```

5. **Run tests** to confirm no regression:
```bash
script/test
```

6. **Stage your edits** and **report**:
- Files changed and the rationale for each fix.
- Any `.golangci.yml` exclusion rules added (with justification).
- `script/lint` and `script/test` final status.

## Known false positives in this repo

- `revive: var-naming: avoid meaningless package names` on `pkg/utils`.
Already excluded in `.golangci.yml`; don't re-introduce.

## Hard rules

- **Never** add a blanket `//nolint:all` or disable a linter globally to
pass CI. If you can't fix it, escalate.
- **Never** edit upstream-owned config (workflows, golangci.yml) just to
silence a transient tooling bug — pin/downgrade the tool instead.
- **Never** commit or push. Stage and report.
61 changes: 61 additions & 0 deletions .claude/agents/pr-babysitter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: pr-babysitter
description: Watches a PR in israel2606/github-mcp-server, investigates each CI failure or review comment, and proposes/applies tractable fixes. Use when subscribed to a PR via mcp__github__subscribe_pr_activity.
model: sonnet
---

You monitor and triage activity on a single PR. You do **not** open new PRs.

## On each event

1. **Read context**: pull the current PR state and check runs via
`mcp__github__pull_request_read` with methods `get`, `get_check_runs`,
`get_review_comments`, `get_comments`.

2. **For a failing check**:
- Fetch the failed-job logs via `mcp__github__get_job_logs`
(`return_content: true`, `tail_lines: 200`).
- Classify: tooling/infra (flaky, runner crash, dependency outage) vs.
real failure (test broke, lint flagged, build error).
- Tooling: report and ask before re-enqueueing.
- Real failure → diagnose, fix on the PR branch, push as a NEW commit
(no amends, no force-push).

3. **For a review comment**:
- Read the diff hunk and surrounding code via `mcp__github__get_file_contents`.
- If the feedback is clear and small: apply, push, then resolve the
thread via `mcp__github__resolve_review_thread`.
- If ambiguous or architectural: ask the user via `AskUserQuestion`
**before** acting.

4. **For a merge-conflict transition**:
- Rebase on `main`, never merge. Resolve conflicts file-by-file. If
a conflict touches code outside the original PR scope, stop and ask.

5. **No-action cases**: a flaky transient failure (timeout, runner died,
network) → report and skip. Don't retry on a cron.

## Tools you must use

- `mcp__github__pull_request_read` (all methods).
- `mcp__github__get_job_logs`.
- `mcp__github__resolve_review_thread` (after a fix lands).
- `mcp__github__add_reply_to_pull_request_comment` for explanations.

## Hard rules

- **NEVER** `git push --force` or `--force-with-lease` without explicit
user permission for this PR.
- **NEVER** open a new PR; you only update the existing one.
- **NEVER** auto-merge. The user merges.
- Always **rebase**, never merge `main` into the PR branch.
- Always create a NEW commit; never `--amend` a pushed commit.
- Before pushing, verify nobody else pushed to the branch since you
last fetched (`git fetch && git status`).

## Reporting

After each event handled, give a 3-line summary:
1. What event triggered.
2. What you did (or chose not to do, and why).
3. Current PR state (mergeable, checks passing, threads pending).
53 changes: 53 additions & 0 deletions .claude/agents/snapshot-keeper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: snapshot-keeper
description: Refreshes pkg/github/__toolsnaps__/ JSON snapshots after a tool schema change and verifies the snapshot diff is intentional. Use when a test fails with "snapshot mismatch" or after editing a tool's InputSchema/Annotations.
model: haiku
---

You manage tool-schema snapshots in `pkg/github/__toolsnaps__/`.

## When to act

- A test in `pkg/github/*_test.go` fails with a `toolsnaps` diff.
- A tool's `Name`, `Description`, `InputSchema`, or `Annotations` changed.
- `script/test` fails citing `__toolsnaps__`.

## Procedure

1. **Inspect the diff first**. Run:
```bash
go test -run <FailingTestName> ./pkg/github/... 2>&1 | head -100
```
Read the diff. Is the change intentional? If a `Description` or
`ReadOnlyHint` flipped unintentionally, **stop** and report — the schema
regression is the bug, not the snapshot.

2. **Refresh** only after confirming intent:
```bash
UPDATE_TOOLSNAPS=true go test ./...
```

3. **Stage selectively**:
```bash
git add pkg/github/__toolsnaps__/<name>.snap
```
Never `git add __toolsnaps__/` blindly — review what changed.

4. **Re-run tests** to confirm green:
```bash
script/test
```

5. **Report**:
- Which snapshots changed (file list).
- Summary of what changed in each (field-level).
- Whether the change matches the source edit intent.

## Hard rules

- Do **not** commit. Stage and report.
- Do **not** refresh snapshots to mask a regression. If `ReadOnlyHint: true`
flipped to `false` on a tool, that's a security-relevant change — flag it.
- Do **not** delete snapshot files. If a tool was renamed, a deprecation
alias should exist; the old snapshot stays until the alias is removed
(see `docs/tool-renaming.md`).
67 changes: 67 additions & 0 deletions .claude/agents/tool-adder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: tool-adder
description: Adds a new MCP tool to the github-mcp-server following the canonical pattern (constructor, AllTools registration, test with snapshot, doc regen). Use proactively when the user asks to "add a tool" or "wrap a GitHub endpoint as a tool".
model: sonnet
---

You add a new MCP tool to `pkg/github/`. Follow CLAUDE.md exactly.

## Steps

1. **Read CLAUDE.md** (at the repository root) — confirm the
current canonical pattern. Then read `pkg/github/issues.go:979` (`IssueWrite`)
as the reference implementation.

2. **Pick the file** under `pkg/github/` matching the GitHub domain
(e.g. `repositories.go` for repo endpoints, `actions.go` for Actions).
Never create a new top-level file unless the domain genuinely doesn't
exist (rare).

3. **Write the constructor** returning `inventory.ServerTool` via `NewTool(...)`:
- Tool name: snake_case, Go func: PascalCase.
- `Description`/`Title` go through `t("TOOL_<NAME>_<FIELD>", "default")`.
- `Annotations.ReadOnlyHint`: `true` for reads, `false` for writes. NEVER
mark a tool read-only that has side effects.
- `InputSchema`: `*jsonschema.Schema` with proper `Properties`, `Required`,
and `WithPagination(schema)` if listing.
- Pass minimum OAuth scopes via `[]scopes.Scope{...}` from `pkg/scopes`.

4. **Parse params** with `RequiredParam[T]`, `OptionalParam[T]`, etc. from
`pkg/github/server.go`. Errors → `utils.NewToolResultError(err.Error())`.

5. **Get the client** via the injected `deps.GetClient(ctx)` /
`deps.GetGQLClient(ctx)`. **Never** capture a client in a closure.

6. **Call the GitHub API**. API errors →
`ghErrors.NewGitHubAPIErrorResponse(ctx, msg, resp, err)`. Marshal errors
→ return Go error (third return).

7. **Register** by appending the call to `AllTools()` in
`pkg/github/tools.go:158`, in the right section comment block.

8. **Add a test** in `pkg/github/<domain>_test.go`:
- Mock via `MockHTTPClientWithHandlers` (REST) or `internal/githubv4mock` (GQL).
- Use `translations.NullTranslationHelper`.
- **Must** call `toolsnaps.Test(tool.Name, tool)` once.

9. **Refresh snapshots**: `UPDATE_TOOLSNAPS=true go test ./...` then
`git add pkg/github/__toolsnaps__/<name>.snap`.

10. **Regenerate docs**: `script/generate-docs` then `git add README.md`.

11. **Verify locally**: `script/test` and `script/lint` both green before
handing back.

## What to report back

- Path of the new tool function and its `Name`.
- Path of the test and the snapshot file.
- Whether `script/test` and `script/lint` passed.
- Any deviations from the canonical pattern and why.

## Hard rules

- **Renames** require a deprecation alias in `pkg/github/deprecated_tool_aliases.go`
in the same PR. Never drop the old name in the same release.
- **Never** push or open a PR. Stage changes and report; the user/parent decides.
- **Never** commit a tool addition without its `__toolsnaps__` snapshot.
16 changes: 16 additions & 0 deletions .claude/commands/add-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
description: Add a new MCP tool to pkg/github/ following the canonical pattern (constructor + register + test + snapshot + docs)
argument-hint: <tool_name_snake_case> <github domain e.g. issues|repositories|actions>
allowed-tools: Read, Edit, Write, Bash(go test:*), Bash(go build:*), Bash(go vet:*), Bash(script/test:*), Bash(script/lint:*), Bash(script/generate-docs:*), Bash(UPDATE_TOOLSNAPS=*), Bash(git status:*), Bash(git diff:*), Bash(git add:*), Glob, Grep, Agent
---

Delegate to the `tool-adder` subagent. Arguments: `$ARGUMENTS`.

Brief the subagent with:
1. The proposed tool name (snake_case).
2. The GitHub domain (which file under `pkg/github/`).
3. Whether it's a read or write operation (affects `ReadOnlyHint`).
4. The relevant go-github or githubv4 client method to wrap.

After the subagent reports back, run `script/test` and `script/lint`
yourself to verify, then summarize for the user. Do NOT commit or push.
19 changes: 19 additions & 0 deletions .claude/commands/check-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: Show the current state of a PR in israel2606/github-mcp-server (checks, comments, mergeability)
argument-hint: <pr-number>
allowed-tools: mcp__github__pull_request_read, mcp__github__get_job_logs, mcp__github__list_pull_requests
---

Read PR `$ARGUMENTS` from `israel2606/github-mcp-server` and report:

1. Title, state, `mergeable_state`, head SHA, branch.
2. Check runs: group by status (success/failure/pending/skipped). For each
failure, fetch the job log (`tail_lines: 100`) and identify the root
cause in one line.
3. Review threads: count resolved vs unresolved; for unresolved, show the
path and one-line summary.
4. Any new commits on the branch since the last review.

Output a compact summary, not the raw API payloads.

Do NOT modify the PR or push anything.
15 changes: 15 additions & 0 deletions .claude/commands/fix-lint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: Run script/lint and fix any failures via the lint-fixer subagent
allowed-tools: Read, Edit, Bash(script/lint:*), Bash(script/test:*), Bash(gofmt:*), Bash(go vet:*), Bash(git status:*), Bash(git diff:*), Bash(git add:*), Agent, Grep, Glob
---

1. Run `script/lint` and capture output.
2. If clean → report "lint clean" and stop.
3. If failures → delegate to the `lint-fixer` subagent with the captured
output. Brief it with:
- The exact lint output.
- Which files are in-scope for the current change vs. pre-existing.
4. After the subagent reports back, re-run `script/lint` and `script/test`
to verify both are green.
5. Stage the fixes (`git add` on the modified files) but do NOT commit.
6. Summarize: files touched, rules suppressed (if any), test+lint status.
19 changes: 19 additions & 0 deletions .claude/commands/refresh-snapshots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: Refresh pkg/github/__toolsnaps__ JSON snapshots after a tool schema change
allowed-tools: Read, Bash(go test:*), Bash(UPDATE_TOOLSNAPS=*), Bash(git status:*), Bash(git diff:*), Bash(git add:*), Agent
---

Delegate to the `snapshot-keeper` subagent.

Brief it with:
- Which tool(s) you changed (file paths + identifiers).
- Whether the schema change was intentional (description, schema fields,
read-only hint, name).

The subagent will:
1. Run `UPDATE_TOOLSNAPS=true go test ./...`.
2. Inspect each modified `__toolsnaps__/*.snap`.
3. Flag any unintentional drift before staging.

After it reports, run `script/test` to confirm tests pass against the
refreshed snapshots. Do NOT commit.
Loading