Commit graph

11 commits

Author SHA1 Message Date
845f699176 chore(claude-config): secret-read + psycopg2 hooks, tradein.md rule, tradein-mvp globs (#1975) 2026-06-27 10:03:19 +00:00
f1f49176f5 chore(claude-config): self-merge policy (Mera/Ptica) + config-audit fixes
All checks were successful
CI / changes (pull_request) Successful in 6s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
- git-pr.md: self-merge разрешён для Mera/Ptica (solo+pipeline, любой scope, зелёный CI);
  balance_platform = stage only; tripwires (secret / guard-files) остаются human-only
- CLAUDE.md: qa-tester + deep-code-reviewer добавлены в subagent-таблицу (rule #7 / merge-authority)
- frontend.md: codegen path src/types/openapi.ts -> src/lib/api-types.ts (реальный out)
- deploy.md: GHA -> Forgejo Actions; синк path-триггеров (caddy/**, data/sql/**, ops/glitchtip-auth-forwarder/**, deploy-tradein.yml)
- work-as-reviewer/analyst: cadence в body синхронизирован с frontmatter (5m->2m / 30m->15m)

Audit 2026-06-27 + решение юзера по split commit/merge-автономии.
2026-06-27 12:44:47 +03:00
lekss361
627189a3e3 fix(bots): qa-close bug (Closes→Refs) + minor-verdict creates follow-up task
Найдено живым тестом (reviewer смержил #710 → linked issue #696 закрылся ДО qa).

1. Closes→Refs: worker PR-body писал `Closes #N` → merge авто-закрывал issue →
   qa-pickup (status/qa & state=open) закрытый не видел → smoke не запускался.
   FSM: issue закрывает QA на status/done, не merge. Фикс: worker пишет `Refs #N`.
   - auto-backend.md PR-template + git-pr.md note.

2. MINOR → follow-up task (по запросу): reviewer на 🟡 MINOR теперь, кроме merge,
   заводит ОДИН consolidated follow-up issue для actionable-minor'ов
   (scope/X status/ready priority/p3 tech-debt; body = work-prompt + "Follow-up из PR #N").
   Косметику (whitespace/naming) не заводит — не флудить очередь.
   - auto-code-reviewer.md ACT+severity + work-as-reviewer.md.
   - Заведены labels priority/p3 (id63) + tech-debt.
2026-05-30 14:11:05 +03:00
lekss361
5673dd6298 chore(claude): extend self-extending tripwire + pause-bots guard for stale-claims
Two safety follow-ups к autonomous-pipeline (flagged в multiagent-аудите):

- Self-extending guard расширен: reviewer-bot NEVER merge'ит PR, меняющий
  _autonomous_pickup.md (claim/kill-switch/merge-FSM contract) или любой
  work-as-*.md (persona activation) — раньше защищались только git-pr.md
  Auto-merge policy + CLAUDE.md + auto-code-reviewer.md. Закрывает дыру, где
  bot мог изменить claim/kill-switch logic без human. Правки в git-pr.md,
  auto-code-reviewer.md, work-as-reviewer.md.
- cleanup-stale-claims.sh: pause-bots early-exit. Без него cron освобождал
  wip-claim worker'а, приостановленного mid-work (он держит claim до un-pause
  per _autonomous_pickup.md), теряя его работу.
2026-05-29 17:36:20 +03:00
07106d744a chore(mv): regression test + sql rule for weighted AVG (#295) (#626)
Some checks failed
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-worker (push) Successful in 33s
Deploy / build-backend (push) Successful in 37s
Deploy / deploy (push) Has been cancelled
2026-05-28 13:49:54 +00:00
lekss361
35bf050e63 chore(rules): add decision date to self-extending guard (review #506 fixup)
Reviewer's optional recommendation #3: добавить дату в hard
exception для audit trail. Также расширил wording: 'предотвращает
bot-loop где bot сам расширяет свои merge права' — делает intent
явным для будущих reviewers.
2026-05-24 14:10:53 +03:00
lekss361
c9737d26c9 chore(rules): drop blocked-scope list from git-pr.md — align with any-scope policy
Header line 10 + memory rule [Auto-merge any scope] (2026-05-16)
заявили APPROVE → merge любой scope. Body всё ещё содержал
устаревший blocked-list (data/sql, services, scrapers, и т.д.),
из-за которого session-side classifier'ы ошибочно блокировали
auto-merge approved PR (incident: PRs #501-504 ждали ручного merge).

Заменил Auto-merge scope section на Auto-merge policy:
- Любой scope OK при verdict=approve + SHA match
- Hard exception: secrets в diff + self-extending guard (изменение
  самих правил всегда через human)

Также убрал Scope guard и Blocked-scope cap из Polling loop section.
2026-05-24 13:58:01 +03:00
998c8a17a8 chore(claude): agents view readiness — cleanup, .worktreeinclude, workflow (#497) 2026-05-24 09:20:26 +00:00
643064ee0c chore(claude-rules): promote 3 deferred feedback rules from memory (#496) 2026-05-24 09:01:27 +00:00
73bdff41a7 chore(claude-config): align with 2026 best practices (#495) 2026-05-24 08:48:42 +00:00
lekss361
ae0fce3528
refactor(claude): split 700-line CLAUDE.md into path-scoped .claude/rules/ (#188)
Old CLAUDE.md was 700 lines — exceeded Anthropic 200-line recommendation,
adherence degraded under context pressure.

Refactor per research findings:

- CLAUDE.md 700 -> 97 lines (essential only, pointers to rules)
- .claude/rules/{backend,frontend,sql,git-pr,deploy}.md (NEW, path-scoped)
- ~/.claude/CLAUDE.md (NEW, 21 lines) — personal cross-project prefs
- memory/ — deleted 12 feedback files promoted to proper layer (CLAUDE.md
  rules table, .claude/rules/, ~/.claude/CLAUDE.md). 7 remaining = workflow
  details.
- .gitignore: !.claude/agents/, !.claude/rules/ exceptions

Total auto-loaded per session: 97 (CLAUDE.md) + 21 (~/.claude) = 118 lines
vs prior 700. Rules in .claude/rules/ load only when matching paths touched.

Resolves conflict no_self_review vs pre_push_review: now single rule in
git-pr.md Review workflow section (pre-push = local lint; post-push =
external Claude window posting as lekss361).

Code-reviewer feedback applied:
- paths: frontmatter added to git-pr.md
- Auto-merge scope blocked-list now includes .claude/rules/*.md changes
  to prevent self-extending rules without human approval.

Co-authored-by: lekss361 <claudestars@proton.me>
2026-05-15 23:06:33 +03:00