Skip to content

armgit / cogit

Public Imported from GitHub
0

Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.

chore: untrack start-project local tooling and add MVP spec

Eren2a362772d34c
diff --git a/.claude/commands/advanced-elicitation.md b/.claude/commands/advanced-elicitation.md
deleted file mode 100644
index 8bc8f33..0000000
--- a/.claude/commands/advanced-elicitation.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-advanced-elicitation/workflow.md`.
diff --git a/.claude/commands/adversarial-review.md b/.claude/commands/adversarial-review.md
deleted file mode 100644
index e6597d8..0000000
--- a/.claude/commands/adversarial-review.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-review-adversarial-general/workflow.md`.
diff --git a/.claude/commands/analyst.md b/.claude/commands/analyst.md
deleted file mode 100644
index 44b884f..0000000
--- a/.claude/commands/analyst.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`.
diff --git a/.claude/commands/architect.md b/.claude/commands/architect.md
deleted file mode 100644
index 470b2df..0000000
--- a/.claude/commands/architect.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/architect.agent.yaml`.
diff --git a/.claude/commands/bmad-help.md b/.claude/commands/bmad-help.md
deleted file mode 100644
index 885a444..0000000
--- a/.claude/commands/bmad-help.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-help/workflow.md`.
diff --git a/.claude/commands/bmalph-doctor.md b/.claude/commands/bmalph-doctor.md
deleted file mode 100644
index 0131fe3..0000000
--- a/.claude/commands/bmalph-doctor.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Check Project Health
-
-Run diagnostic checks on the bmalph installation and report any issues.
-
-## How to Run
-
-Execute the CLI command:
- bmalph doctor
-
-## What It Does
-
-- Verifies required directories exist (`_bmad/`, `.ralph/`, `bmalph/`)
-- Checks that slash commands are installed correctly
-- Validates the instructions file contains the BMAD snippet
-- Reports version mismatches between installed and bundled assets
-- Suggests remediation steps for any issues found
diff --git a/.claude/commands/bmalph-implement.md b/.claude/commands/bmalph-implement.md
deleted file mode 100644
index b379b14..0000000
--- a/.claude/commands/bmalph-implement.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Start Implementation
-
-Transition from BMAD planning (Phase 3) to Ralph implementation (Phase 4).
-
-## How to Run
-
-Execute the CLI command:
- bmalph implement
-
-If pre-flight validation fails and you want to proceed anyway:
- bmalph implement --force
-
-## What It Does
-
-- Validates planning artifacts (PRD, architecture, readiness report)
-- Parses epics and stories into `.ralph/@fix_plan.md`
-- Copies specs to `.ralph/specs/`
-- Generates PROJECT_CONTEXT.md, PROMPT.md, SPECS_INDEX.md
-- Customizes @AGENT.md based on detected tech stack
-- Updates phase state to 4 (implementing)
-
-## After Running
-
-Review the CLI output for:
-- **Pre-flight warnings**: Address any issues or acknowledge them
-- **Story count**: Verify all expected stories were parsed
-- **Driver instructions**: Follow the displayed command to start the Ralph loop
-
-If there are errors, fix the underlying planning artifacts and re-run.
diff --git a/.claude/commands/bmalph-status.md b/.claude/commands/bmalph-status.md
deleted file mode 100644
index c8ff522..0000000
--- a/.claude/commands/bmalph-status.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Project Status
-
-Show the current bmalph project status, including phase, Ralph progress, and version info.
-
-## How to Run
-
-Execute the CLI command:
- bmalph status
-
-## What It Does
-
-- Shows current phase (1-4) and status (planning, implementing, completed)
-- Displays Ralph loop progress (tasks completed / total)
-- Reports installed bmalph version and bundled asset versions
-- Indicates whether updates are available
diff --git a/.claude/commands/bmalph-upgrade.md b/.claude/commands/bmalph-upgrade.md
deleted file mode 100644
index 1ead1f9..0000000
--- a/.claude/commands/bmalph-upgrade.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Upgrade Bundled Assets
-
-Update BMAD and Ralph assets to match the currently installed bmalph version.
-
-## How to Run
-
-Execute the CLI command:
- bmalph upgrade
-
-## What It Does
-
-- Overwrites `_bmad/` with the latest bundled BMAD agents and workflows
-- Overwrites `.ralph/` base files with the latest bundled Ralph loop and libraries
-- Preserves project-specific state (config, fix plan progress, specs)
-- Reports which files were updated
diff --git a/.claude/commands/bmalph-watch.md b/.claude/commands/bmalph-watch.md
deleted file mode 100644
index 388e7d3..0000000
--- a/.claude/commands/bmalph-watch.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Ralph Live Dashboard
-
-> **Deprecated:** Use `bmalph run` instead, which starts Ralph and shows the live dashboard. The `watch` command will be removed in a future release.
-
-Launch the bmalph live dashboard to monitor Ralph loop progress in real-time.
-
-## How to Run
-
-Execute the CLI command:
- bmalph watch
-
-## What It Does
-
-- Displays a live-updating terminal dashboard for Ralph loop monitoring
-- Shows loop count, circuit breaker state, story progress, and session info
-- Displays recent log entries and response analysis
-- Auto-refreshes every 2 seconds
-- Press `q` or `Ctrl+C` to exit
-
-## When to Use
-
-Use this command while the Ralph loop is running to monitor progress without switching windows. It replaces the legacy `ralph_monitor.sh` script with a more capable TypeScript-based dashboard.
diff --git a/.claude/commands/bmalph.md b/.claude/commands/bmalph.md
deleted file mode 100644
index 885a444..0000000
--- a/.claude/commands/bmalph.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-help/workflow.md`.
diff --git a/.claude/commands/brainstorm-project.md b/.claude/commands/brainstorm-project.md
deleted file mode 100644
index 255d01d..0000000
--- a/.claude/commands/brainstorm-project.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/core/skills/bmad-brainstorming/workflow.md` using `_bmad/bmm/data/project-context-template.md` as context data.
diff --git a/.claude/commands/brainstorming.md b/.claude/commands/brainstorming.md
deleted file mode 100644
index fb9a01c..0000000
--- a/.claude/commands/brainstorming.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-brainstorming/workflow.md`.
diff --git a/.claude/commands/correct-course.md b/.claude/commands/correct-course.md
deleted file mode 100644
index e2fc69b..0000000
--- a/.claude/commands/correct-course.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/sm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/4-implementation/bmad-correct-course/workflow.md` in Create mode.
diff --git a/.claude/commands/create-architecture.md b/.claude/commands/create-architecture.md
deleted file mode 100644
index 9c7211c..0000000
--- a/.claude/commands/create-architecture.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/architect.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/workflow.md` in Create mode.
diff --git a/.claude/commands/create-brief.md b/.claude/commands/create-brief.md
deleted file mode 100644
index 6005412..0000000
--- a/.claude/commands/create-brief.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/workflow.md` in Create mode.
diff --git a/.claude/commands/create-epics-stories.md b/.claude/commands/create-epics-stories.md
deleted file mode 100644
index 7dc602f..0000000
--- a/.claude/commands/create-epics-stories.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/pm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/workflow.md` in Create mode.
diff --git a/.claude/commands/create-prd.md b/.claude/commands/create-prd.md
deleted file mode 100644
index 8af618d..0000000
--- a/.claude/commands/create-prd.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/pm.agent.yaml`, then read and execute the workflow at `_bmad/core/tasks/bmad-create-prd/workflow.md`.
diff --git a/.claude/commands/create-story.md b/.claude/commands/create-story.md
deleted file mode 100644
index e5e4806..0000000
--- a/.claude/commands/create-story.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/sm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md` in Create mode.
diff --git a/.claude/commands/create-ux.md b/.claude/commands/create-ux.md
deleted file mode 100644
index c5bb379..0000000
--- a/.claude/commands/create-ux.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/ux-designer.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/workflow.md` in Create mode.
diff --git a/.claude/commands/dev.md b/.claude/commands/dev.md
deleted file mode 100644
index 84f8840..0000000
--- a/.claude/commands/dev.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/dev.agent.yaml`.
diff --git a/.claude/commands/distillator.md b/.claude/commands/distillator.md
deleted file mode 100644
index d3205bf..0000000
--- a/.claude/commands/distillator.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-distillator/SKILL.md`.
diff --git a/.claude/commands/document-project.md b/.claude/commands/document-project.md
deleted file mode 100644
index ad6d4c5..0000000
--- a/.claude/commands/document-project.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/bmad-document-project/workflow.md` in Create mode.
diff --git a/.claude/commands/domain-research.md b/.claude/commands/domain-research.md
deleted file mode 100644
index c23f23c..0000000
--- a/.claude/commands/domain-research.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/workflow.md`.
diff --git a/.claude/commands/edge-case-hunter.md b/.claude/commands/edge-case-hunter.md
deleted file mode 100644
index 428cedf..0000000
--- a/.claude/commands/edge-case-hunter.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-review-edge-case-hunter/workflow.md`.
diff --git a/.claude/commands/edit-prd.md b/.claude/commands/edit-prd.md
deleted file mode 100644
index f36114f..0000000
--- a/.claude/commands/edit-prd.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/pm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/workflow.md`.
diff --git a/.claude/commands/editorial-prose.md b/.claude/commands/editorial-prose.md
deleted file mode 100644
index 93d7957..0000000
--- a/.claude/commands/editorial-prose.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-editorial-review-prose/workflow.md`.
diff --git a/.claude/commands/editorial-structure.md b/.claude/commands/editorial-structure.md
deleted file mode 100644
index 1a8e1d8..0000000
--- a/.claude/commands/editorial-structure.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-editorial-review-structure/workflow.md`.
diff --git a/.claude/commands/generate-project-context.md b/.claude/commands/generate-project-context.md
deleted file mode 100644
index 7c6d572..0000000
--- a/.claude/commands/generate-project-context.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/bmad-generate-project-context/workflow.md`.
diff --git a/.claude/commands/implementation-readiness.md b/.claude/commands/implementation-readiness.md
deleted file mode 100644
index 4eab70c..0000000
--- a/.claude/commands/implementation-readiness.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/architect.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/workflow.md` in Validate mode.
diff --git a/.claude/commands/index-docs.md b/.claude/commands/index-docs.md
deleted file mode 100644
index f22e912..0000000
--- a/.claude/commands/index-docs.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-index-docs/workflow.md`.
diff --git a/.claude/commands/market-research.md b/.claude/commands/market-research.md
deleted file mode 100644
index 3bc848b..0000000
--- a/.claude/commands/market-research.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/1-analysis/research/bmad-market-research/workflow.md`.
diff --git a/.claude/commands/party-mode.md b/.claude/commands/party-mode.md
deleted file mode 100644
index 2d6186d..0000000
--- a/.claude/commands/party-mode.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-party-mode/workflow.md`.
diff --git a/.claude/commands/pm.md b/.claude/commands/pm.md
deleted file mode 100644
index a8cce00..0000000
--- a/.claude/commands/pm.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/pm.agent.yaml`.
diff --git a/.claude/commands/qa-automate.md b/.claude/commands/qa-automate.md
deleted file mode 100644
index 2397b47..0000000
--- a/.claude/commands/qa-automate.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/qa.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/bmad-qa-generate-e2e-tests/workflow.md`.
diff --git a/.claude/commands/qa.md b/.claude/commands/qa.md
deleted file mode 100644
index eb711d4..0000000
--- a/.claude/commands/qa.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/qa.agent.yaml`.
diff --git a/.claude/commands/quick-dev-new.md b/.claude/commands/quick-dev-new.md
deleted file mode 100644
index 006fe11..0000000
--- a/.claude/commands/quick-dev-new.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/quick-flow-solo-dev.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md` in Create mode.
diff --git a/.claude/commands/quick-dev.md b/.claude/commands/quick-dev.md
deleted file mode 100644
index 47d23f6..0000000
--- a/.claude/commands/quick-dev.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/quick-flow-solo-dev.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/workflow.md` in Create mode.
diff --git a/.claude/commands/quick-flow-solo-dev.md b/.claude/commands/quick-flow-solo-dev.md
deleted file mode 100644
index 5053ac6..0000000
--- a/.claude/commands/quick-flow-solo-dev.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/quick-flow-solo-dev.agent.yaml`.
diff --git a/.claude/commands/retrospective.md b/.claude/commands/retrospective.md
deleted file mode 100644
index f2532ce..0000000
--- a/.claude/commands/retrospective.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/sm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/4-implementation/bmad-retrospective/workflow.md`.
diff --git a/.claude/commands/shard-doc.md b/.claude/commands/shard-doc.md
deleted file mode 100644
index d4997c2..0000000
--- a/.claude/commands/shard-doc.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and execute the workflow/task at `_bmad/core/skills/bmad-shard-doc/workflow.md`.
diff --git a/.claude/commands/sm.md b/.claude/commands/sm.md
deleted file mode 100644
index f35ed4f..0000000
--- a/.claude/commands/sm.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/sm.agent.yaml`.
diff --git a/.claude/commands/sprint-planning.md b/.claude/commands/sprint-planning.md
deleted file mode 100644
index e97d4a1..0000000
--- a/.claude/commands/sprint-planning.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/sm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/4-implementation/bmad-sprint-planning/workflow.md` in Create mode.
diff --git a/.claude/commands/sprint-status.md b/.claude/commands/sprint-status.md
deleted file mode 100644
index 06fb47f..0000000
--- a/.claude/commands/sprint-status.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/sm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/4-implementation/bmad-sprint-status/workflow.md`.
diff --git a/.claude/commands/tech-spec.md b/.claude/commands/tech-spec.md
deleted file mode 100644
index ef8ae93..0000000
--- a/.claude/commands/tech-spec.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/quick-flow-solo-dev.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/workflow.md` in Create mode.
diff --git a/.claude/commands/tech-writer.md b/.claude/commands/tech-writer.md
deleted file mode 100644
index efda09b..0000000
--- a/.claude/commands/tech-writer.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml`.
diff --git a/.claude/commands/technical-research.md b/.claude/commands/technical-research.md
deleted file mode 100644
index 21d205e..0000000
--- a/.claude/commands/technical-research.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/workflow.md`.
diff --git a/.claude/commands/ux-designer.md b/.claude/commands/ux-designer.md
deleted file mode 100644
index 4665f34..0000000
--- a/.claude/commands/ux-designer.md
+++ /dev/null
@@ -1 +0,0 @@
-Read and follow the agent defined in `_bmad/bmm/agents/ux-designer.agent.yaml`.
diff --git a/.claude/commands/validate-architecture.md b/.claude/commands/validate-architecture.md
deleted file mode 100644
index 69df96f..0000000
--- a/.claude/commands/validate-architecture.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/architect.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/workflow.md` in Validate mode.
diff --git a/.claude/commands/validate-brief.md b/.claude/commands/validate-brief.md
deleted file mode 100644
index 1072a2a..0000000
--- a/.claude/commands/validate-brief.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/analyst.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/workflow.md` in Validate mode.
diff --git a/.claude/commands/validate-epics-stories.md b/.claude/commands/validate-epics-stories.md
deleted file mode 100644
index ece9748..0000000
--- a/.claude/commands/validate-epics-stories.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/pm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/workflow.md` in Validate mode.
diff --git a/.claude/commands/validate-prd.md b/.claude/commands/validate-prd.md
deleted file mode 100644
index cc316d0..0000000
--- a/.claude/commands/validate-prd.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/pm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/workflow.md`.
diff --git a/.claude/commands/validate-story.md b/.claude/commands/validate-story.md
deleted file mode 100644
index 4dab660..0000000
--- a/.claude/commands/validate-story.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/sm.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md` in Validate mode.
diff --git a/.claude/commands/validate-ux.md b/.claude/commands/validate-ux.md
deleted file mode 100644
index 1570535..0000000
--- a/.claude/commands/validate-ux.md
+++ /dev/null
@@ -1 +0,0 @@
-Adopt the role of the agent defined in `_bmad/bmm/agents/ux-designer.agent.yaml`, then read and execute the workflow at `_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/workflow.md` in Validate mode.
diff --git a/.claude/settings.json b/.claude/settings.json
deleted file mode 100644
index d366bfc..0000000
--- a/.claude/settings.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "hooks": {
- "PreToolUse": [
- {
- "matcher": "Bash",
- "hooks": [
- {
- "type": "command",
- "command": "CMD=$(python3 -c \"import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('command',''))\" 2>/dev/null || true); case \"$CMD\" in *grep*|*rg\\ *|*ripgrep*|*find\\ *|*fd\\ *|*ack\\ *|*ag\\ *) [ -f graphify-out/graph.json ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"graphify: Knowledge graph exists. Read graphify-out/GRAPH_REPORT.md for god nodes and community structure before searching raw files.\"}}' || true ;; esac"
- }
- ]
- }
- ],
- "SessionEnd": [
- {
- "hooks": [
- {
- "type": "command",
- "command": "cd /home/master/Desktop/www/codelineage && if [ -f .graphifyignore ] && command -v graphify >/dev/null 2>&1; then graphify update 2>/dev/null || true; fi",
- "timeout": 120
- }
- ]
- }
- ],
- "SessionStart": [
- {
- "hooks": [
- {
- "type": "command",
- "command": "bash \"/home/master/Desktop/www/codelineage/.start-project/doctor-sessionstart.sh\"",
- "timeout": 20
- }
- ]
- }
- ]
- },
- "statusLine": {
- "type": "command",
- "command": "python3 \"/home/master/Desktop/www/codelineage/.start-project/sync-statusline.sh\"",
- "refreshInterval": 3
- }
-}
diff --git a/.claude/skills/run-tests/SKILL.md b/.claude/skills/run-tests/SKILL.md
deleted file mode 100644
index 29af0d6..0000000
--- a/.claude/skills/run-tests/SKILL.md
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: run-tests
-description: >-
- Projenin test/QA gate'ini çalıştırır ve sonucu düz dille raporlar. Kullan:
- "testleri koş" / "test et" / test koşumu bir subagent'a devredildiğinde.
- Kod DÜZELTMEZ — sadece koşar + raporlar.
----
-
-# run-tests
-
-## Komut
-- `/run-tests` → `./qa --only=unit` (hızlı: unit).
-- `/run-tests --full` → `./qa --full` (unit + smoke + e2e).
-- `/run-tests --only=lint,unit` → `./qa`'ya aynen geçir.
-- Projede `./qa` yoksa: framework'ü tespit edip doğrudan koş (`vitest run`,
- `pest`, `pytest -q`).
-
-## Çıktı
-1. Başlık: `PASS` ya da `FAIL: <n> test`.
-2. Her başarısız test için:
- - `dosya:satır` + test adı
- - başarısız assertion (beklenen ↔ gerçek)
- - bir satır düz dil: "bu ne demek"
-3. `--full` ise smoke / e2e bölümü ayrı başlıkta.
-
-## Yapma
-- Hiçbir dosyayı değiştirme — test de yazma, ürün kodu da düzeltme.
-- Düzeltme istenirse: "Bu skill sadece koşar. Düzeltmek için `/write-tests` ya da
- elle." de.
-
-## Subagent notu
-Sınırlı iş: koş → raporla → bitti. Yeşil = başarı sinyali, ana context gerekmez.
diff --git a/.claude/skills/write-tests/SKILL.md b/.claude/skills/write-tests/SKILL.md
deleted file mode 100644
index ec7f1de..0000000
--- a/.claude/skills/write-tests/SKILL.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-name: write-tests
-description: >-
- Bir değişiklik kümesi için test yazar. Kullan: kullanıcı "testlerini yaz" /
- "buna test ekle" dediğinde; Ralph bir story'yi implement ettikten sonra; ya da
- bir dizi manuel değişiklikten sonra kapsama oluşturmak için. `--plan` ile
- sadece docs/qa/test-plan.md'yi üretir/senkronlar, test kodu yazmaz.
----
-
-# write-tests
-
-Değişen kodu **unit / e2e / atla** diye sınıflar, `docs/qa/test-plan.md`'yi
-senkronlar, sonra testleri yazıp bir kez koşar.
-
-## Girdi kaynağı (otomatik)
-- `.ralph/@fix_plan.md` varsa → story'ler + AC oradan; sınıflama AC'ye dayanır.
-- Yoksa → `git diff` (staged + unstaged + son commit). Argüman verilirse o aralık:
- `/write-tests HEAD~5..HEAD`.
-
-## Adımlar
-1. Değişen dosyaları davranış birimlerine ayır.
-2. Her birimi sınıfla:
- - **unit** — saf mantık, fonksiyon, servis, endpoint davranışı, hesaplama,
- dönüşüm, hata yolu, sınır koşulu.
- - **e2e** — çok adımlı UI yolculuğu **ve** kritik (login, ödeme, ana akış).
- Mevcut bir spec bu yolculuğu kapsıyorsa onu **genişlet**, yeni dosya açma.
- - **mobil-e2e** — SADECE `.start-project/mobile-e2e/flows/` kuruluysa: kritik
- bir mobil akış (login, ödeme, ana ekran) **veya** `browse`'un görmediği bir
- native-seam davranışı (push, deep link, native config). Mevcut Maestro
- YAML'ini **genişlet**, yeni dosya açma. Kurulu değilse bu kova yok sayılır
- — mobil UI değişikliği normal **e2e** ya da **atla**'ya düşer.
- - **atla** — config, tip tanımı, üretilmiş kod, önemsiz glue. Nedenini yaz.
-3. `docs/qa/test-plan.md`'yi senkronla (aşağıdaki kurallar). **`--plan` verildiyse
- burada dur.**
-4. Sınıflamaya göre testleri yaz. Framework + dizin projeden tespit:
- - `.start-project/qa.conf` varsa `QA_UNIT_CMD` / `QA_E2E_CMD` / `QA_MOBILE_E2E_CMD`
- komutlarını kullan; mobil-e2e flow'ları `.start-project/mobile-e2e/flows/`.
- - Yoksa `package.json` / `composer.json` (vitest / jest / pest / phpunit /
- pytest / playwright) + mevcut test klasörü (`tests/`, `__tests__/`,
- kaynak yanındaki `*.spec.*`).
- - Sadece standart framework API'leri; özel helper yok. Testler basit, gerçekçi
- senaryo, tek bir davranışı doğrular.
-5. **Sadece yeni yazdığın testleri** bir kez koş; yeşil ya da anlamlı-kırmızı
- olduğunu doğrula.
-6. Değişikliğin **önceden var olan** bir testi kırdıysa → aşağıdaki triyaj.
-7. Özet tablo bas: birim → kova → dosya → durum.
-
-## Yapma
-- Ürün koduna dokunma (test geçsin diye bile). Gerçek bir hata bulduysan RAPOR et,
- düzeltme.
-- Geçen mevcut testleri yeniden yazma.
-- Tautolojik / anlamsız test yazıp gate'i geçme.
-
-## Değişikliğin mevcut bir testi kırdıysa (triyaj)
-Kodun, önceki bir story'den kalan bir testi kırmızıya döndürdüyse — gate'i geçmek
-için hemen ona dokunma, önce KARAR VER:
-- **Yeni davranış AC'ye göre kasıtlı** → testi yeni doğru değere güncelle
- (beklenen değeri değiştir). Case silme, yeni case gerekiyorsa ekle.
-- **AC bu değişikliği kapsamıyor** → soktuğun bir regresyon. Teste DOKUNMA,
- RAPOR et, kırmızı bırak.
-- **Her durumda YASAK**: `.skip` / `xit` / silme / `toBe(x)` → `toBeDefined()`
- gibi gevşetme ile yeşile çekmek. Gate'i geçen ama hiçbir şey doğrulamayan
- test = tautoloji.
-
-## docs/qa/test-plan.md
-Story ID'ye (manuel modda tarihli changeset başlığına) göre anahtarlı tablo:
-
-| ID | Kova | Notlar / case'ler | Durum |
-|----|------|-------------------|-------|
-| 1.1 | unit | fiyat hesabı; sıfır/negatif sınır | yazıldı |
-| 3.2 | e2e | login akışı (auth.spec.ts genişletildi) | yazıldı |
-| 4.1 | atla | sadece tip tanımı | — |
-| 5.3 | mobil-e2e | push bildirim deep-link (login-flow.yaml genişletildi) | yazıldı |
-
-Senkron kuralları:
-- Zaten var olan satır → **olduğu gibi kalır** (elle `unit`→`e2e` yaptıysan korunur).
-- Yeni ID → eklenir.
-- `@fix_plan.md`'den çıkmış ID → `(removed)` işaretlenir.
-- Aynı ID, AC metni değişmiş → `(AC değişti — gözden geçir)` bayrağı, otomatik ezme.
-- `--rebuild` → tabloyu sıfırdan üret.
diff --git a/.gitignore b/.gitignore
index fed0547..c95c107 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,3 +45,13 @@ ss/
.start-project/provider.ralph.env.off
.ralph/logs/
# start-project provider yönlendirme (secret)
+# start-project yerel araçları (public repo: takip edilmez)
+/CLAUDE.md
+/.start-project/
+/.claude/
+/.mcp.json
+/run
+/cli
+/graph
+/qa
+/release
diff --git a/.mcp.json b/.mcp.json
deleted file mode 100644
index d1b3914..0000000
--- a/.mcp.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "mcpServers": {
- "browse": {
- "command": ".start-project/browse",
- "args": []
- },
- "context7": {
- "type": "http",
- "url": "https://mcp.context7.com/mcp"
- }
- }
-}
diff --git a/.start-project/browse b/.start-project/browse
deleted file mode 100755
index 410b7cf..0000000
--- a/.start-project/browse
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env bash
-# .start-project/browse — agent-driven browser MCP server launcher.
-# Chrome binary'sini + QA_E2E_* knob'larını çözer, sonra browse.mjs'i exec'ler.
-# Chrome'u browse.mjs KENDİSİ (node child_process) başlatır/öldürür — böylece
-# süreç sahipliği ve temizlik yarışsız. SIFIR npm bağımlılığı (cdp.mjs ortak).
-# `start-project --update --e2e` ile yenilenir.
-set -u
-
-DIR="/home/master/Desktop/www/codelineage"
-CONF="$DIR/.start-project/qa.conf"
-
-# qa.conf QA_E2E_* knob'larını çek — env zaten set'liyse env kazansın (knob'lar
-# düz atama, `${VAR:=}` değil), o yüzden mevcut değerleri saklayıp geri koyuyoruz.
-_env_base="${QA_E2E_BASE_URL:-}"; _env_hdr="${QA_E2E_EXTRA_HEADERS:-}"
-_env_ss="${QA_E2E_STORAGE_STATE:-}"; _env_chrome="${QA_E2E_CHROME:-}"
-_env_headful="${QA_E2E_HEADFUL:-}"
-if [ -f "$CONF" ]; then
- # shellcheck source=/dev/null
- . "$CONF"
-fi
-[ -n "$_env_base" ] && QA_E2E_BASE_URL="$_env_base"
-[ -n "$_env_hdr" ] && QA_E2E_EXTRA_HEADERS="$_env_hdr"
-[ -n "$_env_ss" ] && QA_E2E_STORAGE_STATE="$_env_ss"
-[ -n "$_env_chrome" ] && QA_E2E_CHROME="$_env_chrome"
-[ -n "$_env_headful" ] && QA_E2E_HEADFUL="$_env_headful"
-
-# ── Chrome/Chromium bul (QA_E2E_CHROME → QA_SMOKE_CHROME → PATH → cache) ─────
-CHROME=""
-for cand in "${QA_E2E_CHROME:-}" "${QA_SMOKE_CHROME:-}"; do
- if [ -n "$cand" ] && [ -x "$cand" ]; then CHROME="$cand"; break; fi
-done
-if [ -z "$CHROME" ]; then
- for c in google-chrome google-chrome-stable chromium-browser chromium; do
- if command -v "$c" >/dev/null 2>&1; then CHROME="$(command -v "$c")"; break; fi
- done
-fi
-if [ -z "$CHROME" ]; then
- for g in "$HOME"/.cache/ms-playwright/chromium-*/chrome-linux/chrome \
- "$HOME"/.cache/puppeteer/chrome/*/chrome-linux*/chrome; do
- if [ -x "$g" ]; then CHROME="$g"; break; fi
- done
-fi
-if [ -z "$CHROME" ]; then
- echo "browse: Chrome/Chromium bulunamadı — QA_E2E_CHROME ayarla" >&2
- exit 1
-fi
-
-export QA_E2E_CHROME_BIN="$CHROME"
-export QA_E2E_BASE_URL="${QA_E2E_BASE_URL:-}"
-export QA_E2E_EXTRA_HEADERS="${QA_E2E_EXTRA_HEADERS:-}"
-export QA_E2E_STORAGE_STATE="${QA_E2E_STORAGE_STATE:-}"
-export QA_E2E_HEADFUL="${QA_E2E_HEADFUL:-0}"
-export BROWSE_SETTLE_MS="${BROWSE_SETTLE_MS:-1200}"
-
-exec node "$DIR/.start-project/browse.mjs"
diff --git a/.start-project/browse.mjs b/.start-project/browse.mjs
deleted file mode 100644
index caea339..0000000
--- a/.start-project/browse.mjs
+++ /dev/null
@@ -1,648 +0,0 @@
-// .start-project/browse.mjs — agent-driven browser MCP server (stdio JSON-RPC).
-// `.start-project/browse` (bash) Chrome'u headless + CDP ile açar; bu script tek
-// bir page target'a bağlanıp MCP tool'ları sunar:
-// navigate · read_console · read_network · screenshot · eval · click · type · wait_for
-// Deterministik smoke gate'ten (smoke.mjs) FARKLI: bu, agent'ın login akışı /
-// route değişikliği gibi şeyleri elle deneyip console/network izlemesi için.
-// Harici bağımlılık YOK — CDP borusu cdp.mjs'den (smoke ile ortak).
-// BU dosya `start-project --update --e2e` ile yeniden üretilir.
-
-import { createInterface } from "node:readline";
-import { readFileSync, rmSync, mkdtempSync } from "node:fs";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
-import { spawn, execFileSync } from "node:child_process";
-import { fetchJson, waitForCdp, CDPClient, openWs, sleep, toInt } from "./cdp.mjs";
-
-const CHROME_BIN = process.env.QA_E2E_CHROME_BIN || "";
-const HEADFUL = (process.env.QA_E2E_HEADFUL || "0") === "1";
-const BASE = (process.env.QA_E2E_BASE_URL || "").trim();
-const SETTLE_MS = toInt(process.env.BROWSE_SETTLE_MS, 1200);
-const LOAD_TIMEOUT_MS = toInt(process.env.BROWSE_LOAD_TIMEOUT_MS, 20000);
-const PROTOCOL = "2025-06-18";
-
-// ── Chrome yaşam döngüsü — browse.mjs sahibi (node child_process) ──────────
-let chromeProc = null;
-let udd = null;
-let CDP = "";
-
-async function launchChrome() {
- if (chromeProc) return;
- if (!CHROME_BIN) throw new Error("QA_E2E_CHROME_BIN yok (launcher çözemedi)");
- udd = mkdtempSync(join(tmpdir(), "sp-browse-"));
- // --remote-debugging-port=0 → Chrome boş port seçip stderr'e yazar
- // ("DevTools listening on ws://127.0.0.1:PORT/...") — bash'te port yarışı YOK.
- // Nested user-ns (bwrap/CI) → --no-sandbox zorunlu (bkz. smoke).
- const flags = [
- "--no-sandbox",
- "--disable-gpu",
- "--remote-debugging-port=0",
- "--remote-allow-origins=*",
- `--user-data-dir=${udd}`,
- "about:blank",
- ];
- if (!HEADFUL) flags.unshift("--headless=new");
- chromeProc = spawn(CHROME_BIN, flags, { stdio: ["ignore", "ignore", "pipe"] });
- const port = await new Promise((resolve, reject) => {
- let buf = "";
- const to = setTimeout(
- () => reject(new Error("Chrome DevTools portu 15s'te okunamadı")),
- 15000,
- );
- chromeProc.stderr.on("data", (d) => {
- buf += d.toString();
- const m = buf.match(/ws:\/\/127\.0\.0\.1:(\d+)\//);
- if (m) {
- clearTimeout(to);
- resolve(parseInt(m[1], 10));
- }
- });
- chromeProc.on("exit", () => {
- clearTimeout(to);
- reject(new Error("Chrome erken kapandı"));
- });
- });
- CDP = `http://127.0.0.1:${port}`;
-}
-
-// CHROME_BIN bir sarmalayıcıysa (Flatpak: `exec flatpak run …`) chromeProc
-// sarmalayıcı/bwrap olur; onu öldürmek sandbox içindeki asıl Chrome'u
-// öldürmez → sahipsiz kalırdı. Profil dizini bu oturuma özgü → onu kullanan
-// her süreci süpür (senkron: exit handler'dan da çağrılabilsin).
-function sweepChrome() {
- if (!udd) return;
- try {
- execFileSync("pkill", ["-KILL", "-f", "--", `--user-data-dir=${udd}`], { stdio: "ignore" });
- } catch {
- /* eşleşme yok ya da pkill yok */
- }
-}
-
-// Birden çok tetik (rl close + SIGTERM) gelebilir — guarded call HEMEN dönmeli,
-// process.exit'i ilk (asıl temizliği yapan) çağrı tetikler. Aksi halde guarded
-// çağrı erken exit edip rmSync'i yarıda keser → tmpdir sızar.
-let shuttingDown = false;
-async function shutdown(code) {
- if (shuttingDown) return;
- shuttingDown = true;
- if (chromeProc && chromeProc.exitCode === null) {
- const ended = new Promise((r) => chromeProc.once("exit", r));
- try {
- chromeProc.kill("SIGKILL");
- } catch {
- /* zaten ölmüş */
- }
- await Promise.race([ended, sleep(2000)]);
- }
- sweepChrome();
- if (udd) {
- try {
- rmSync(udd, {
- recursive: true,
- force: true,
- maxRetries: 5,
- retryDelay: 100,
- });
- } catch {
- /* yok say */
- }
- }
- process.exit(code || 0);
-}
-for (const sig of ["SIGTERM", "SIGINT", "SIGHUP"]) {
- process.on(sig, () => {
- shutdown(0);
- });
-}
-// Son çare (async bekleyemez): en azından Chrome'u öldür.
-process.on("exit", () => {
- if (chromeProc && chromeProc.exitCode === null) {
- try {
- chromeProc.kill("SIGKILL");
- } catch {
- /* yok say */
- }
- }
- sweepChrome();
-});
-
-// ── stdio JSON-RPC ────────────────────────────────────────────────────────
-function send(msg) {
- process.stdout.write(JSON.stringify(msg) + "\n");
-}
-function reply(id, result) {
- if (id === undefined || id === null) return;
- send({ jsonrpc: "2.0", id, result });
-}
-function replyErr(id, code, message) {
- if (id === undefined || id === null) return;
- send({ jsonrpc: "2.0", id, error: { code, message } });
-}
-
-// ── tarayıcı durumu ──────────────────────────────────────────────────────
-let client = null;
-let targetId = null;
-const state = {
- url: "about:blank",
- console: [], // {type, text}
- network: [], // {id, method, url, status, failed, errorText}
- exceptions: [], // text
- navMark: { c: 0, n: 0, e: 0 },
- loadedResolve: null,
-};
-
-function trimBuf(arr, max = 500) {
- if (arr.length > max) arr.splice(0, arr.length - max);
-}
-function fmtArgs(args) {
- return (args || [])
- .map((a) => {
- if (a && a.value !== undefined)
- return typeof a.value === "string" ? a.value : JSON.stringify(a.value);
- return (
- (a && (a.description || (a.preview && a.preview.description) || a.type)) ||
- "?"
- );
- })
- .join(" ")
- .slice(0, 2000);
-}
-function fmtException(p) {
- const d = (p && p.exceptionDetails) || {};
- const ex = d.exception || {};
- return String(
- ex.description || ex.value || d.text || "Uncaught exception",
- ).slice(0, 2000);
-}
-
-async function ensureBrowser() {
- if (client) return;
- await launchChrome();
- if (!(await waitForCdp(CDP, 15000)))
- throw new Error(`Chrome CDP ${CDP} hazır değil`);
- let created = await fetchJson(`${CDP}/json/new?about:blank`, { method: "PUT" });
- if (!created.json || !created.json.webSocketDebuggerUrl)
- created = await fetchJson(`${CDP}/json/new?about:blank`);
- if (!created.json || !created.json.webSocketDebuggerUrl)
- throw new Error("sekme açılamadı");
- targetId = created.json.id;
- const ws = await openWs(created.json.webSocketDebuggerUrl);
- client = new CDPClient(ws);
- client.on((msg) => {
- const p = msg.params || {};
- switch (msg.method) {
- case "Runtime.consoleAPICalled":
- state.console.push({ type: p.type || "log", text: fmtArgs(p.args) });
- trimBuf(state.console);
- break;
- case "Runtime.exceptionThrown":
- state.exceptions.push(fmtException(p));
- trimBuf(state.exceptions);
- break;
- case "Log.entryAdded":
- if (p.entry && p.entry.source !== "network")
- state.console.push({
- type: p.entry.level || "info",
- text: String(p.entry.text || "").slice(0, 2000),
- });
- trimBuf(state.console);
- break;
- case "Network.requestWillBeSent":
- if (p.request)
- state.network.push({
- id: p.requestId,
- method: p.request.method,
- url: p.request.url,
- status: 0,
- failed: false,
- errorText: "",
- });
- trimBuf(state.network);
- break;
- case "Network.responseReceived": {
- const r = state.network.find((x) => x.id === p.requestId);
- if (r && p.response) r.status = p.response.status;
- break;
- }
- case "Network.loadingFailed": {
- const r = state.network.find((x) => x.id === p.requestId);
- if (r) {
- r.failed = !p.canceled;
- r.errorText = p.errorText || "failed";
- }
- break;
- }
- case "Page.loadEventFired":
- if (state.loadedResolve) {
- state.loadedResolve();
- state.loadedResolve = null;
- }
- break;
- }
- });
- await client.send("Page.enable");
- await client.send("Runtime.enable");
- await client.send("Network.enable");
- await client.send("Log.enable");
- await applyExtraHeaders();
- await applyStorageState();
-}
-
-async function applyExtraHeaders() {
- const raw = (process.env.QA_E2E_EXTRA_HEADERS || "").trim();
- if (!raw) return;
- let headers;
- try {
- headers = JSON.parse(raw);
- } catch {
- throw new Error("QA_E2E_EXTRA_HEADERS geçerli JSON değil");
- }
- await client.send("Network.setExtraHTTPHeaders", { headers });
-}
-
-async function applyStorageState() {
- const path = (process.env.QA_E2E_STORAGE_STATE || "").trim();
- if (!path) return;
- let st;
- try {
- st = JSON.parse(readFileSync(path, "utf8"));
- } catch (e) {
- throw new Error(`QA_E2E_STORAGE_STATE okunamadı: ${e.message}`);
- }
- for (const c of st.cookies || []) {
- try {
- await client.send("Network.setCookie", c);
- } catch {
- /* tek çerez hatası akışı düşürmesin */
- }
- }
- const origins = st.origins || [];
- if (origins.length) {
- const script = origins
- .map((o) => {
- const items = (o.localStorage || [])
- .map(
- (kv) =>
- `try{localStorage.setItem(${JSON.stringify(
- kv.name,
- )},${JSON.stringify(kv.value)})}catch(e){}`,
- )
- .join("");
- return `if(location.origin===${JSON.stringify(o.origin)}){${items}}`;
- })
- .join("\n");
- await client.send("Page.addScriptToEvaluateOnNewDocument", {
- source: script,
- });
- }
-}
-
-function resolveUrl(u) {
- u = String(u || "").trim();
- if (!u) return "";
- if (/^https?:\/\//i.test(u)) return u;
- if (BASE) {
- try {
- return new URL(u, BASE).toString();
- } catch {
- return u;
- }
- }
- return u;
-}
-
-async function evalJs(expression, opts) {
- return client.send("Runtime.evaluate", {
- expression,
- returnByValue: true,
- awaitPromise: true,
- ...(opts || {}),
- });
-}
-
-async function waitSelector(sel, timeoutMs) {
- const deadline = Date.now() + timeoutMs;
- while (Date.now() < deadline) {
- const r = await evalJs(
- `!!document.querySelector(${JSON.stringify(sel)})`,
- ).catch(() => null);
- if (r && r.result && r.result.value === true) return true;
- await sleep(120);
- }
- return false;
-}
-
-// ── tool handler'lar ─────────────────────────────────────────────────────
-async function tNavigate(args) {
- await ensureBrowser();
- const url = resolveUrl(args.url);
- if (!url) throw new Error("url gerekli");
- state.navMark = {
- c: state.console.length,
- n: state.network.length,
- e: state.exceptions.length,
- };
- const loaded = new Promise((r) => (state.loadedResolve = r));
- await client.send("Page.navigate", { url });
- await Promise.race([loaded, sleep(LOAD_TIMEOUT_MS)]);
- await sleep(SETTLE_MS);
- const href = await evalJs("location.href").catch(() => null);
- const title = await evalJs("document.title").catch(() => null);
- state.url = (href && href.result && href.result.value) || url;
- const cErr = state.console
- .slice(state.navMark.c)
- .filter((c) => c.type === "error" || c.type === "assert").length;
- const nFail = state.network
- .slice(state.navMark.n)
- .filter((r) => r.failed || r.status >= 400).length;
- const exc = state.exceptions.length - state.navMark.e;
- return (
- `navigated: ${state.url}\n` +
- `title: ${(title && title.result && title.result.value) || ""}\n` +
- `since navigation: ${cErr} console error(s), ${nFail} failed request(s), ${exc} exception(s)\n` +
- `→ read_console / read_network ile ayrıntı`
- );
-}
-
-async function tReadConsole(args) {
- await ensureBrowser();
- const from = args.since === "all" ? 0 : state.navMark.c;
- let list = state.console.slice(from);
- if (args.level !== "all")
- list = list.filter((c) => c.type === "error" || c.type === "assert");
- const exc =
- args.since === "all"
- ? state.exceptions
- : state.exceptions.slice(state.navMark.e);
- const lines = [
- ...list.map((c) => `[${c.type}] ${c.text}`),
- ...exc.map((e) => `[exception] ${e}`),
- ];
- return lines.length ? lines.join("\n").slice(0, 8000) : "(console temiz)";
-}
-
-async function tReadNetwork(args) {
- await ensureBrowser();
- const from = args.since === "all" ? 0 : state.navMark.n;
- let list = state.network.slice(from);
- if (args.filter !== "all")
- list = list.filter((r) => r.failed || r.status >= 400);
- if (!list.length) return "(eşleşen istek yok)";
- return list
- .map(
- (r) =>
- `${r.failed ? "FAIL" : r.status || "..."} ${r.method} ${r.url}` +
- (r.errorText ? ` — ${r.errorText}` : ""),
- )
- .join("\n")
- .slice(0, 8000);
-}
-
-async function tScreenshot(args) {
- await ensureBrowser();
- const r = await client.send("Page.captureScreenshot", {
- format: "png",
- ...(args.full_page ? { captureBeyondViewport: true } : {}),
- });
- return { image: r.data, mimeType: "image/png" };
-}
-
-async function tEval(args) {
- await ensureBrowser();
- const expr = String(args.expression || args.js || "");
- if (!expr) throw new Error("expression gerekli");
- const r = await evalJs(expr);
- if (r.exceptionDetails)
- return { isError: true, text: fmtException({ exceptionDetails: r.exceptionDetails }) };
- const v = r.result || {};
- if ("value" in v)
- return typeof v.value === "string" ? v.value : JSON.stringify(v.value);
- return v.description || v.type || "undefined";
-}
-
-async function tWaitFor(args) {
- await ensureBrowser();
- const sel = String(args.selector || "");
- if (!sel) throw new Error("selector gerekli");
- const ok = await waitSelector(sel, toInt(args.timeout_ms, 8000));
- return ok
- ? `bulundu: ${sel}`
- : { isError: true, text: `selector belirmedi (timeout): ${sel}` };
-}
-
-async function tClick(args) {
- await ensureBrowser();
- const sel = String(args.selector || "");
- if (!sel) throw new Error("selector gerekli");
- if (!(await waitSelector(sel, toInt(args.timeout_ms, 8000))))
- return { isError: true, text: `selector bulunamadı: ${sel}` };
- const r = await evalJs(
- `(()=>{const el=document.querySelector(${JSON.stringify(
- sel,
- )});if(!el)return"notfound";el.scrollIntoView({block:"center"});el.click();return"ok"})()`,
- );
- return r.result && r.result.value === "ok"
- ? `tıklandı: ${sel}`
- : { isError: true, text: `tıklanamadı: ${sel}` };
-}
-
-async function tType(args) {
- await ensureBrowser();
- const sel = String(args.selector || "");
- const text = args.text == null ? "" : String(args.text);
- if (!sel) throw new Error("selector gerekli");
- if (!(await waitSelector(sel, toInt(args.timeout_ms, 8000))))
- return { isError: true, text: `selector bulunamadı: ${sel}` };
- const clear = args.clear !== false;
- const T = JSON.stringify(text);
- const expr =
- `(()=>{const el=document.querySelector(${JSON.stringify(sel)});if(!el)return"notfound";el.focus();` +
- `if(el.isContentEditable){${clear ? 'el.textContent="";' : ""}el.textContent+=${T};}` +
- `else{const proto=el.tagName==="TEXTAREA"?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;` +
- `const d=Object.getOwnPropertyDescriptor(proto,"value");const nv=${clear ? T : `el.value+${T}`};` +
- `if(d&&d.set){d.set.call(el,nv);}else{el.value=nv;}}` +
- `el.dispatchEvent(new Event("input",{bubbles:true}));el.dispatchEvent(new Event("change",{bubbles:true}));return"ok"})()`;
- const r = await evalJs(expr);
- return r.result && r.result.value === "ok"
- ? `yazıldı: ${sel}`
- : { isError: true, text: `yazılamadı: ${sel}` };
-}
-
-const TOOLS = [
- {
- name: "navigate",
- description:
- "Bir URL'ye git (QA_E2E_BASE_URL ayarlıysa '/yol' göreli çözülür), yüklenmesini bekle, kısa console/network/exception özeti döndür.",
- inputSchema: {
- type: "object",
- properties: { url: { type: "string" } },
- required: ["url"],
- },
- handler: tNavigate,
- },
- {
- name: "read_console",
- description:
- "Sayfa console mesajları + yakalanmamış exception'lar. Varsayılan: son navigate'ten beri hatalar. level:'all' tüm seviyeler, since:'all' tüm oturum.",
- inputSchema: {
- type: "object",
- properties: {
- level: { type: "string", enum: ["all", "error"] },
- since: { type: "string", enum: ["navigation", "all"] },
- },
- },
- handler: tReadConsole,
- },
- {
- name: "read_network",
- description:
- "Ağ istekleri. Varsayılan: son navigate'ten beri başarısız (HTTP >=400 veya bağlantı hatası). filter:'all' hepsi, since:'all' tüm oturum.",
- inputSchema: {
- type: "object",
- properties: {
- filter: { type: "string", enum: ["all", "failed"] },
- since: { type: "string", enum: ["navigation", "all"] },
- },
- },
- handler: tReadNetwork,
- },
- {
- name: "screenshot",
- description: "Sayfanın PNG ekran görüntüsü (full_page:true → viewport ötesi).",
- inputSchema: {
- type: "object",
- properties: { full_page: { type: "boolean" } },
- },
- handler: tScreenshot,
- },
- {
- name: "eval",
- description:
- "Sayfa bağlamında JavaScript çalıştır ve sonucu döndür (await destekli). Hata → isError.",
- inputSchema: {
- type: "object",
- properties: { expression: { type: "string" } },
- required: ["expression"],
- },
- handler: tEval,
- },
- {
- name: "click",
- description:
- "CSS selector'a uyan ilk elemana tıkla (belirene kadar bekler; timeout_ms varsayılan 8000).",
- inputSchema: {
- type: "object",
- properties: {
- selector: { type: "string" },
- timeout_ms: { type: "number" },
- },
- required: ["selector"],
- },
- handler: tClick,
- },
- {
- name: "type",
- description:
- "input / textarea / contenteditable elemana metin yaz. Varsayılan içeriği değiştirir; clear:false ekler.",
- inputSchema: {
- type: "object",
- properties: {
- selector: { type: "string" },
- text: { type: "string" },
- clear: { type: "boolean" },
- timeout_ms: { type: "number" },
- },
- required: ["selector", "text"],
- },
- handler: tType,
- },
- {
- name: "wait_for",
- description:
- "Bir CSS selector DOM'da belirene kadar bekle (timeout_ms varsayılan 8000).",
- inputSchema: {
- type: "object",
- properties: {
- selector: { type: "string" },
- timeout_ms: { type: "number" },
- },
- required: ["selector"],
- },
- handler: tWaitFor,
- },
-];
-
-async function handleCall(id, params) {
- const name = params && params.name;
- const args = (params && params.arguments) || {};
- const tool = TOOLS.find((t) => t.name === name);
- if (!tool) return replyErr(id, -32602, `bilinmeyen tool: ${name}`);
- try {
- const out = await tool.handler(args);
- if (out && typeof out === "object" && out.image) {
- reply(id, {
- content: [
- { type: "image", data: out.image, mimeType: out.mimeType },
- ],
- });
- } else if (out && typeof out === "object" && out.isError) {
- reply(id, {
- content: [{ type: "text", text: out.text || "hata" }],
- isError: true,
- });
- } else {
- reply(id, { content: [{ type: "text", text: String(out) }] });
- }
- } catch (e) {
- reply(id, {
- content: [
- { type: "text", text: `hata: ${e && e.message ? e.message : e}` },
- ],
- isError: true,
- });
- }
-}
-
-const rl = createInterface({ input: process.stdin });
-rl.on("line", (raw) => {
- const line = raw.trim();
- if (!line) return;
- let msg;
- try {
- msg = JSON.parse(line);
- } catch {
- return;
- }
- const { id, method, params } = msg;
- if (method === "initialize") {
- reply(id, {
- protocolVersion: (params && params.protocolVersion) || PROTOCOL,
- capabilities: { tools: {} },
- serverInfo: { name: "start-project-browse", version: "1" },
- });
- } else if (
- method === "notifications/initialized" ||
- method === "initialized"
- ) {
- /* no reply */
- } else if (method === "ping") {
- reply(id, {});
- } else if (method === "tools/list") {
- reply(id, {
- tools: TOOLS.map((t) => ({
- name: t.name,
- description: t.description,
- inputSchema: t.inputSchema,
- })),
- });
- } else if (method === "tools/call") {
- handleCall(id, params);
- } else if (method && method.startsWith("notifications/")) {
- /* yok say */
- } else if (id !== undefined && id !== null) {
- replyErr(id, -32601, `desteklenmeyen method: ${method}`);
- }
-});
-rl.on("close", () => {
- shutdown(0);
-});
diff --git a/.start-project/cdp.mjs b/.start-project/cdp.mjs
deleted file mode 100644
index 0d0e867..0000000
--- a/.start-project/cdp.mjs
+++ /dev/null
@@ -1,118 +0,0 @@
-// .start-project/cdp.mjs — sıfır-bağımlılık Chrome DevTools Protocol yardımcıları.
-// smoke.mjs (deterministik `./qa --full` gate) ve browse.mjs (agent-driven MCP
-// browser server) ortak kullanır. Harici bağımlılık YOK: global fetch (Node 18+)
-// + global WebSocket (Node 21+). BU dosya `start-project --update` ile yeniden
-// üretilir — elle düzenleme kalıcı olmaz.
-
-export function toInt(v, dflt) {
- const n = parseInt(v || "", 10);
- return Number.isFinite(n) && n > 0 ? n : dflt;
-}
-
-export function sleep(ms) {
- return new Promise((r) => setTimeout(r, ms));
-}
-
-export async function fetchJson(url, opts) {
- const res = await fetch(url, opts);
- const text = await res.text();
- let json = null;
- try {
- json = JSON.parse(text);
- } catch {
- /* defansif: JSON değilse json=null kalır */
- }
- return { status: res.status, json, text };
-}
-
-// CDP HTTP endpoint'i (/json/version) yanıt verene kadar bekler.
-export async function waitForCdp(cdpBase, timeoutMs = 15000) {
- const deadline = Date.now() + timeoutMs;
- while (Date.now() < deadline) {
- try {
- const r = await fetchJson(`${cdpBase}/json/version`);
- if (r.json && r.json.webSocketDebuggerUrl) return true;
- } catch {
- /* Chrome henüz dinlemiyor — tekrar dene */
- }
- await sleep(250);
- }
- return false;
-}
-
-// Tek bir hedef (page / service worker) için ince CDP istemcisi.
-export class CDPClient {
- constructor(ws) {
- this.ws = ws;
- this.seq = 0;
- this.pending = new Map();
- this.listeners = [];
- ws.addEventListener("message", (ev) => {
- const data = typeof ev.data === "string" ? ev.data : String(ev.data);
- let msg;
- try {
- msg = JSON.parse(data);
- } catch {
- return;
- }
- if (msg.id && this.pending.has(msg.id)) {
- const { resolve, reject } = this.pending.get(msg.id);
- this.pending.delete(msg.id);
- if (msg.error) reject(new Error(msg.error.message || "CDP error"));
- else resolve(msg.result || {});
- } else if (msg.method) {
- for (const fn of this.listeners) {
- try {
- fn(msg);
- } catch {
- /* dinleyici hatası akışı düşürmesin */
- }
- }
- }
- });
- }
- send(method, params) {
- const id = ++this.seq;
- return new Promise((resolve, reject) => {
- this.pending.set(id, { resolve, reject });
- try {
- this.ws.send(JSON.stringify({ id, method, params: params || {} }));
- } catch (e) {
- this.pending.delete(id);
- reject(e);
- }
- });
- }
- on(fn) {
- this.listeners.push(fn);
- }
-}
-
-export function openWs(wsUrl) {
- return new Promise((resolve, reject) => {
- let ws;
- try {
- ws = new WebSocket(wsUrl);
- } catch (e) {
- reject(e);
- return;
- }
- const t = setTimeout(() => reject(new Error("ws timeout")), 10000);
- ws.addEventListener(
- "open",
- () => {
- clearTimeout(t);
- resolve(ws);
- },
- { once: true },
- );
- ws.addEventListener(
- "error",
- () => {
- clearTimeout(t);
- reject(new Error("ws bağlanamadı"));
- },
- { once: true },
- );
- });
-}
diff --git a/.start-project/cli b/.start-project/cli
deleted file mode 100755
index 63b0a73..0000000
--- a/.start-project/cli
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env bash
-# ./cli — sandboxed Claude Code, zero permission prompts
-# ./run = Ralph loop (untouched). ./cli = direct Claude.
-set -e
-
-cd "/home/master/Desktop/www/codelineage"
-
-SBHOME="/home/master/Desktop/www/codelineage/.sandbox"
-mkdir -p "$SBHOME/.cache" "$SBHOME/.npm" "$SBHOME/.config"
-
-# Provider yönlendirme (opsiyonel): .start-project/provider.env varsa env'e al.
-# Yoksa → Claude Code neyse o (abonelik). bwrap --clearenv kullanmiyor → gecer.
-if [ -f "/home/master/Desktop/www/codelineage/.start-project/provider.env" ]; then
- set -a; . "/home/master/Desktop/www/codelineage/.start-project/provider.env"; set +a
-fi
-
-# lucid runtime (rw) + pnpm store + user bus — sandbox içinden
-# systemctl --user / ~/.lucid config erişimi.
-# NOT: --unshare-pid YOK — systemd farklı pid-namespace'ten gelen
-# istemcileri reddeder; bus erişimi için pid izolasyonu kaldırıldı.
-# ~/.ssh maskelendi (bos tmpfs) — bkz. make_run_script'teki ayni satirin
-# yorumu: git push/pull ssh-agent (/run/user/$UID) uzerinden calismaya
-# devam eder, ham ozel anahtar dosyalari sandbox'tan gizlenir.
-exec bwrap \
- --ro-bind / / \
- --tmpfs "$HOME/.ssh" \
- --bind "/home/master/Desktop/www/codelineage" "/home/master/Desktop/www/codelineage" \
- --bind /tmp /tmp \
- --bind "$SBHOME/.config" "$HOME/.config" \
- --bind "$SBHOME/.npm" "$HOME/.npm" \
- --bind "$SBHOME/.cache" "$HOME/.cache" \
- --bind "$HOME/.claude" "$HOME/.claude" \
- --bind-try "$HOME/.claude.json" "$HOME/.claude.json" \
- --bind-try "$HOME/.lucid" "$HOME/.lucid" \
- --bind-try "$HOME/.local/share/pnpm" "$HOME/.local/share/pnpm" \
- --bind-try "/run/user/$(id -u)" "/run/user/$(id -u)" \
- --setenv DBUS_SESSION_BUS_ADDRESS "unix:path=/run/user/$(id -u)/bus" \
- --setenv XDG_RUNTIME_DIR "/run/user/$(id -u)" \
- --dev /dev \
- --proc /proc \
- --die-with-parent \
- -- \
- claude --allow-dangerously-skip-permissions --dangerously-skip-permissions "$@"
diff --git a/.start-project/diffcov.mjs b/.start-project/diffcov.mjs
deleted file mode 100644
index ece1b00..0000000
--- a/.start-project/diffcov.mjs
+++ /dev/null
@@ -1,265 +0,0 @@
-// .start-project/diffcov.mjs — değişen-satır (diff) coverage gate.
-// unit testleri `--coverage` ile koşulduktan SONRA `./qa` bunu çağırır: `git diff`
-// + untracked ile değişen kaynak satırlarını, coverage raporuyla (lcov / clover /
-// cobertura) kesiştirir; kaplanmamış değişen satır varsa exit 1 → Ralph story'yi
-// kapatamaz. Sadece DEĞİŞEN satırlara bakar — eski kapsamsız kod görünmez
-// (baseline gerekmez). Harici bağımlılık YOK (Node ≥21). BU dosya `start-project
-// --update` ile yeniden üretilir — elle düzenleme kalıcı olmaz.
-
-import { readFileSync, existsSync } from "node:fs";
-import { execFileSync } from "node:child_process";
-import path from "node:path";
-
-// ── args ─────────────────────────────────────────────────────────────────
-const args = Object.fromEntries(
- process.argv.slice(2).map((a) => {
- const m = a.match(/^--([^=]+)=(.*)$/);
- return m ? [m[1], m[2]] : [a.replace(/^--/, ""), "1"];
- }),
-);
-const MIN = Number(args.min || "100");
-const LCOV_ARG = (args.lcov || "").trim();
-const BASE_ARG = (args.base || "").trim();
-const EXCLUDE_ARG = (args.exclude || "").trim();
-const ROOT = process.cwd();
-
-function die(code, msg) {
- process.stdout.write(msg.endsWith("\n") ? msg : msg + "\n");
- process.exit(code);
-}
-
-// ── kaynak dosya filtresi ────────────────────────────────────────────────
-const SRC_EXT = /\.(ts|tsx|js|jsx|mjs|cjs|vue|php|py)$/;
-const EXCLUDE = [
- /(^|\/)\.start-project\//,
- /(^|\/)(node_modules|vendor|dist|build|coverage|out|storybook-static)\//,
- /(^|\/)\.(git|next|nuxt|turbo|svelte-kit|vercel|output)\//,
- /(^|\/)(tests?|__tests__|__mocks__|e2e|cypress|playwright)\//,
- /\.(test|spec|stories|d)\.[cm]?[jt]sx?$/,
- /(^|\/)(test_[^/]*|[^/]*_test|conftest)\.py$/,
- /(^|\/)(\.venv|venv|__pycache__|\.tox|site-packages)\//,
- /(^|\/)migrations\/[^/]*\.py$/,
- /(^|\/)database\/migrations\//,
- /(^|\/)public\//,
- /(^|\/)bootstrap\/(ssr|cache)\//,
- /\.config\.[cm]?[jt]s$/,
- /(^|\/)(vite|vitest|rollup|webpack|jest|tailwind|postcss|eslint|prettier)\.config\./,
-];
-const userExcl = EXCLUDE_ARG
- ? EXCLUDE_ARG.split(/[\s,]+/)
- .filter(Boolean)
- .map((g) => new RegExp("^" + g.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*") + "$"))
- : [];
-
-function isSource(p) {
- if (!SRC_EXT.test(p)) return false;
- if (EXCLUDE.some((re) => re.test(p))) return false;
- if (userExcl.some((re) => re.test(p))) return false;
- return true;
-}
-
-// ── git: değişen satırlar ────────────────────────────────────────────────
-function git(a) {
- return execFileSync("git", a, { cwd: ROOT, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
-}
-try {
- git(["rev-parse", "--is-inside-work-tree"]);
-} catch {
- die(2, "diffcov: git repo değil — atlanamaz, QA_DIFFCOV=0 ile kapat");
-}
-
-function diffRanges(range) {
- let out;
- try {
- out = git(["diff", "--unified=0", "--no-color", "--diff-filter=d", ...range]);
- } catch {
- return {};
- }
- const files = {};
- let cur = null;
- for (const line of out.split("\n")) {
- if (line.startsWith("+++ ")) {
- const p = line.slice(4).replace(/^b\//, "").trim();
- cur = p === "/dev/null" ? null : p;
- if (cur) files[cur] = files[cur] || new Set();
- continue;
- }
- if (cur && line.startsWith("@@")) {
- const m = line.match(/\+(\d+)(?:,(\d+))?/);
- if (!m) continue;
- const start = Number(m[1]);
- const count = m[2] === undefined ? 1 : Number(m[2]);
- for (let i = 0; i < count; i++) files[cur].add(start + i);
- }
- }
- return files;
-}
-
-function mergeInto(dst, src) {
- for (const [f, set] of Object.entries(src)) {
- dst[f] = dst[f] || new Set();
- for (const l of set) dst[f].add(l);
- }
-}
-
-const changed = {};
-if (BASE_ARG) {
- mergeInto(changed, diffRanges([BASE_ARG]));
-} else {
- mergeInto(changed, diffRanges(["HEAD"])); // working tree + index vs HEAD
- try {
- git(["rev-parse", "--verify", "--quiet", "HEAD~1"]);
- mergeInto(changed, diffRanges(["HEAD~1", "HEAD"])); // Ralph story commit'i
- } catch {
- /* ilk commit — HEAD~1 yok */
- }
-}
-// untracked (yeni) dosyalar: git diff bunları göstermez → tüm satırları "değişen" say
-if (!BASE_ARG) {
- try {
- for (const f of git(["ls-files", "--others", "--exclude-standard"]).split("\n").filter(Boolean)) {
- if (!isSource(f)) continue;
- let n;
- try {
- n = readFileSync(path.resolve(ROOT, f), "utf8").split("\n").length;
- } catch {
- continue;
- }
- const set = (changed[f] = changed[f] || new Set());
- for (let i = 1; i <= n; i++) set.add(i);
- }
- } catch {
- /* ignore */
- }
-}
-
-const srcChanged = Object.fromEntries(Object.entries(changed).filter(([f]) => isSource(f)));
-if (Object.keys(srcChanged).length === 0) {
- die(0, "diffcov: değişen kaynak dosyası yok — atlandı");
-}
-
-// ── coverage raporu ─────────────────────────────────────────────────────
-const candidates = LCOV_ARG
- ? [LCOV_ARG]
- : ["coverage/lcov.info", "coverage/clover.xml", "coverage/cobertura-coverage.xml", "coverage/coverage-clover.xml"];
-const reportPath = candidates.map((c) => path.resolve(ROOT, c)).find((c) => existsSync(c));
-if (!reportPath) {
- die(
- 2,
- `diffcov: coverage raporu bulunamadı (${candidates.join(", ")}) — ` +
- `unit --coverage üretmiyor. QA_DIFFCOV_LCOV / QA_DIFFCOV_UNIT_CMD ayarla ya da QA_DIFFCOV=0`,
- );
-}
-const raw = readFileSync(reportPath, "utf8");
-
-// dosya yolu normalize: mutlak → ROOT'a göreli
-function norm(p) {
- let n = p.replace(/\\/g, "/").trim();
- if (path.isAbsolute(n)) n = path.relative(ROOT, n).replace(/\\/g, "/");
- return n.replace(/^\.\//, "").replace(/^b\//, "");
-}
-
-// coverage: { normPath: Map<lineNo, hits> }
-const cov = {};
-function covSet(file, line, hits) {
- const k = norm(file);
- (cov[k] = cov[k] || new Map()).set(line, (cov[k].get(line) || 0) + hits);
-}
-
-if (/^\s*</.test(raw) || reportPath.endsWith(".xml")) {
- // clover: <file name|path="..."> <line num="N" count="C" .../>
- // cobertura: <class filename="..."> <line number="N" hits="H" .../>
- const fileRe = /<(?:file|class)\b[^>]*\b(?:name|path|filename)="([^"]+)"[^>]*>([\s\S]*?)<\/(?:file|class)>/g;
- let fm;
- while ((fm = fileRe.exec(raw))) {
- const fname = fm[1];
- const lineRe = /<line\b[^>]*\b(?:num|number)="(\d+)"[^>]*\b(?:count|hits)="(\d+)"[^>]*\/?>/g;
- let lm;
- while ((lm = lineRe.exec(fm[2]))) covSet(fname, Number(lm[1]), Number(lm[2]));
- }
-} else {
- // lcov: SF:<path> ... DA:<line>,<hits> ... end_of_record
- let sf = null;
- for (const line of raw.split("\n")) {
- if (line.startsWith("SF:")) sf = line.slice(3).trim();
- else if (line.startsWith("DA:") && sf) {
- const [ln, hits] = line.slice(3).split(",");
- covSet(sf, Number(ln), Number(hits || "0"));
- } else if (line.startsWith("end_of_record")) sf = null;
- }
-}
-
-// coverage anahtarını değişen dosya yoluna eşle (exact → suffix → tekil basename)
-const covKeys = Object.keys(cov);
-function covFor(file) {
- const n = norm(file);
- if (cov[n]) return cov[n];
- const suf = covKeys.find((k) => k.endsWith("/" + n) || n.endsWith("/" + k));
- if (suf) return cov[suf];
- const base = n.split("/").pop();
- const baseHits = covKeys.filter((k) => k.split("/").pop() === base);
- return baseHits.length === 1 ? cov[baseHits[0]] : null;
-}
-
-// ── kesişim + karar ─────────────────────────────────────────────────────
-function compress(nums) {
- const s = [...nums].sort((a, b) => a - b);
- const out = [];
- let i = 0;
- while (i < s.length) {
- let j = i;
- while (j + 1 < s.length && s[j + 1] === s[j] + 1) j++;
- out.push(i === j ? `${s[i]}` : `${s[i]}-${s[j]}`);
- i = j + 1;
- }
- return out.join(", ");
-}
-
-// instrument edilmemiş dosyada "çalıştırılabilir görünen" değişen satır var mı?
-const NONEXEC = /^\s*(\/\/|\/\*|\*|#|import\b|from\s+\S+\s+import\b|export\s+(type|interface)\b|type\s|interface\s|[}{)\];,:]*\s*$)/;
-function looksExecutable(file, lineNos) {
- let text;
- try {
- text = readFileSync(path.resolve(ROOT, file), "utf8").split("\n");
- } catch {
- return true;
- }
- return [...lineNos].some((ln) => {
- const src = text[ln - 1];
- return src !== undefined && src.trim() !== "" && !NONEXEC.test(src);
- });
-}
-
-let totalInstr = 0;
-let totalCovered = 0;
-const problems = [];
-
-for (const [file, lineSet] of Object.entries(srcChanged)) {
- const cmap = covFor(file);
- if (!cmap) {
- if (looksExecutable(file, lineSet))
- problems.push(` ${file}: dosya hiç instrument edilmemiş (hiçbir test çalıştırmıyor)`);
- continue;
- }
- const instrChanged = [...lineSet].filter((l) => cmap.has(l));
- if (instrChanged.length === 0) continue; // değişenler çalıştırılabilir değil (yorum/tip)
- const uncovered = instrChanged.filter((l) => (cmap.get(l) || 0) === 0);
- totalInstr += instrChanged.length;
- totalCovered += instrChanged.length - uncovered.length;
- if (uncovered.length) problems.push(` ${file}: ${compress(uncovered)}`);
-}
-
-const hardFail = problems.some((p) => p.includes("instrument edilmemiş"));
-if (problems.length === 0 && totalInstr === 0) {
- die(0, "diffcov: değişen çalıştırılabilir satır yok — atlandı");
-}
-
-const pct = totalInstr === 0 ? 100 : Math.floor((totalCovered / totalInstr) * 100);
-if (hardFail || pct < MIN) {
- const head = [];
- if (pct < MIN) head.push(`${totalInstr - totalCovered}/${totalInstr} değişen satır kapsamsız (%${pct} < %${MIN})`);
- if (hardFail) head.push("instrument edilmemiş kaynak dosya (test çalıştırmıyor)");
- process.stdout.write(`DIFFCOV FAIL: ${head.join("; ")}\n` + problems.join("\n") + "\n");
- process.exit(1);
-}
-die(0, `diffcov: ${totalCovered}/${totalInstr} değişen satır kaplı (%${pct} ≥ %${MIN})`);
diff --git a/.start-project/doctor-sessionstart.sh b/.start-project/doctor-sessionstart.sh
deleted file mode 100755
index d6f19ba..0000000
--- a/.start-project/doctor-sessionstart.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# SessionStart hook — start-project doctor (--quiet). Proje saglik kontrolu:
-# hicbir sey degistirmez, sadece bakar. Cikti JSON (systemMessage +
-# additionalContext) olarak Claude Code'a dondurulur.
-cd "/home/master/Desktop/www/codelineage" 2>/dev/null || exit 0
-[ -x "/home/master/Desktop/www/start-project/start-project" ] || exit 0
-raw="$(timeout 15 "/home/master/Desktop/www/start-project/start-project" doctor . --quiet 2>&1)"
-code=$?
-# ANSI renk kodlarini temizle — systemMessage/additionalContext duz metin bekler
-# (ov-memory-healthcheck.sh de bu yuzden emoji kullanip renk kodundan kacinir).
-out="$(printf '%s\n' "$raw" | command sed -E 's/\x1b\[[0-9;]*m//g' | command sed '/^[[:space:]]*$/d')"
-if [ "$code" -eq 0 ] && ! printf '%s\n' "$out" | command grep -qE '^[[:space:]]*!'; then
- # tamamen temiz — tek satir yeter (ov-memory-healthcheck.sh ile ayni desen)
- msg="✅ start-project doctor: 0 sorun"
-else
- # uyari ve/veya sorun var — hepsini goster, ozeti gecistirme
- _prefix="⚠️"; [ "$code" -ne 0 ] && _prefix="🔴"
- msg="$_prefix start-project doctor (/home/master/Desktop/www/codelineage):
-$out"
-fi
-python3 - "$msg" "$out" <<'PY'
-import json, sys
-msg, out = sys.argv[1], sys.argv[2]
-print(json.dumps({
- "systemMessage": msg,
- "hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": out},
-}))
-PY
diff --git a/.start-project/e2e-workflow/web.md b/.start-project/e2e-workflow/web.md
deleted file mode 100644
index 0c767af..0000000
--- a/.start-project/e2e-workflow/web.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Agent-driven browser workflow (`browse` MCP)
-
-`.start-project/browse`, `.mcp.json` üzerinden bir MCP server olarak bağlı.
-Tool'lar: `navigate` `read_console` `read_network` `screenshot` `eval` `click`
-`type` `wait_for`. Chrome'u ilk tool çağrısında kendisi headless açar; qa.conf'ta
-`QA_E2E_BASE_URL` ayarlıysa `navigate` göreli yol alır (`/login`).
-
-Bu, **deterministik smoke gate'ten (`./qa --full`) FARKLI**: smoke otomatik
-kırmızı/yeşil verir; bu, senin bir değişikliği ELLE deneyip gözlemlemen içindir.
-
-## Ne zaman kullan
-Tarayıcıda render olan bir şeyi değiştirdiğinde — route, sayfa, component, form
-akışı, client-side state, API çağrısı — **"done" demeden önce**:
-1. `navigate` ile etkilenen route('lar)a git.
-2. Değişikliğin davranışını sür: `click` / `type` / `wait_for` ile akışı taklit
- et (login değiştiyse giriş yap, filtre değiştiyse filtrele, …).
-3. `read_console` (error + yakalanmamış exception) ve `read_network` (başarısız
- istek) temiz mi bak. Gerekirse `screenshot`, `eval` ile DOM/state doğrula.
-
-## Kurallar
-- Sadece "sayfa açıldı" yeterli değil — değiştirdiğin etkileşimi gerçekten sür.
-- Console error / net fail / exception varsa: düzelt ya da neden kabul edilebilir
- olduğunu açıkça yaz. Sessiz geçme.
-- `browse` oturumu Claude Code session'ı boyunca ayakta; ephemeral profil (her
- session sıfırdan, kalıcı login yok). Korumalı route için `QA_E2E_EXTRA_HEADERS`
- / `QA_E2E_STORAGE_STATE` (qa.conf) ya da login formunu `type`/`click` ile geç.
diff --git a/.start-project/graph b/.start-project/graph
deleted file mode 100755
index 9a2b5cb..0000000
--- a/.start-project/graph
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-set -e
-cd "/home/master/Desktop/www/codelineage"
-graphify update
-graphify export html
-echo "Graph: /home/master/Desktop/www/codelineage/.graphify/graph.html"
-xdg-open "/home/master/Desktop/www/codelineage/.graphify/graph.html" 2>/dev/null || true
diff --git a/.start-project/provider.env.example b/.start-project/provider.env.example
deleted file mode 100644
index e2aa333..0000000
--- a/.start-project/provider.env.example
+++ /dev/null
@@ -1,23 +0,0 @@
-# start-project — Ralph/CLI provider yönlendirme (opsiyonel)
-# Bu dosyayı `.start-project/provider.env` olarak kopyala + doldur.
-# BOŞ / dosya yok → Claude Code neyse o (aboneliğin, ~/.claude).
-# Üretilen ./run VE ./cli bunu bwrap'ten önce source eder (ikisi de etkilenir).
-#
-# SADECE Ralph loop'unu (./run) çevirmek, ./cli'yi abonelikte tutmak için:
-# start-project provider deepseek [dizin]
-# → ~/.config/start-project/providers/deepseek.env'i .start-project/provider.ralph.env'e
-# kopyalar; sadece ./run source eder. Geri: start-project provider off [dizin]
-#
-# DeepSeek (Anthropic-uyumlu uç):
-# ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
-# ANTHROPIC_API_KEY=sk-...
-# ANTHROPIC_MODEL=deepseek-chat
-#
-# Yerel router (litellm / claude-code-router) — OpenAI/Gemini/Codex dahil:
-# ANTHROPIC_BASE_URL=http://127.0.0.1:4000
-# ANTHROPIC_API_KEY=...
-# ANTHROPIC_MODEL=...
-#
-# bmalph codex/opencode driver'ı kullanıyorsan OPENAI_* set et:
-# OPENAI_BASE_URL=https://api.deepseek.com
-# OPENAI_API_KEY=sk-...
diff --git a/.start-project/qa b/.start-project/qa
deleted file mode 100755
index f7018d1..0000000
--- a/.start-project/qa
+++ /dev/null
@@ -1,269 +0,0 @@
-#!/usr/bin/env bash
-# .start-project/qa — stack'ten bağımsız kalite kapısı
-# Komutlar .start-project/qa.conf'tan gelir. BU dosya `start-project --update`
-# ile yeniden üretilir; komut değiştirmek için qa.conf'u düzenle.
-#
-# ./qa hızlı katman: lint + typecheck + unit + audit
-# ./qa --full + smoke + e2e + mobile_e2e
-# ./qa --only=lint,unit
-# ./qa --list hangi aşama hangi komutla, çalıştırmadan
-#
-# audit BLOKLAMAZ (⚠ basar, exit'i etkilemez). smoke/e2e/mobile_e2e sadece --full.
-# unit aşaması QA_DIFFCOV=1 iken coverage'lı koşulur + değişen-satır kapsaması
-# dayatılır (diffcov — kaplanmamış değişen satır = FAIL). qa.conf'ta QA_DIFFCOV=0.
-# Ralph gate'i her `start-project --update` .ralph/.ralphrc'ye bağlar (block):
-# TEST_COMMAND="./qa --only=unit" + QUALITY_GATES="./qa --only=lint,typecheck,audit".
-# Borçlu projede bloklamasın istiyorsan .ralphrc'de QUALITY_GATE_MODE=warn yap.
-set -u
-cd "/home/master/Desktop/www/codelineage" || exit 1
-
-CONF="/home/master/Desktop/www/codelineage/.start-project/qa.conf"
-if [ -f "$CONF" ]; then
- . "$CONF"
-else
- echo "! .start-project/qa.conf yok — tüm aşamalar atlanacak ('start-project --update')"
-fi
-
-# brownfield baseline (bkz. capture_qa_baseline, scaffold'da start-project
-# --update --brownfield ile bir kez üretilir). lint/typecheck/unit FAIL
-# olduğunda burada "fail" olarak kayıtlıysa zaten başlangıçta kırıktı demektir
-# — bloklamaz (⚠, bilinen borç). Kayıt "pass"ken şimdi fail ise gerçek
-# regresyondur, normal FAIL akışına düşer. Dosya yoksa (brownfield değil)
-# davranış hiç değişmez.
-# GRANÜLERLİK SINIRI: baseline aşama-bazında (tüm lint/typecheck/unit tek
-# pass/fail), satır/hata bazında DEĞİL — diffcov'un unit için yaptığı
-# değişen-satır takibi burada yok. Yani zaten "fail" kayıtlı bir aşamaya
-# sonradan eklenen YENİ bir hata da aynı ⚠'ya düşer, ayrı bir regresyon olarak
-# yakalanmaz (bkz. --help). Daha ince taneli bir çözüm (lint/typecheck için
-# diffcov benzeri değişen-satır gate'i) bilinçli olarak kapsam dışı bırakıldı.
-BASELINE_FILE="/home/master/Desktop/www/codelineage/.start-project/qa_baseline.json"
-_qa_baseline_status() { # $1=aşama adı -> "pass"/"fail"/""
- # Format capture_qa_baseline tarafından TAM OLARAK kontrol ediliyor (düz
- # {"stages":{"ad":"pass"|"fail",...}}) — python3 subprocess'i gereksiz,
- # grep/sed ile aynı sonucu interpreter açmadan verir ($name FAIL olan her
- # aşamada çağrılıyor, ./qa'nın ana koşum yolunda).
- [ -f "$BASELINE_FILE" ] || return 0
- command grep -oE "\"$1\"[[:space:]]*:[[:space:]]*\"(pass|fail)\"" "$BASELINE_FILE" 2>/dev/null \
- | command sed -E 's/.*"(pass|fail)"$/\1/' | head -1
-}
-
-FULL=0; ONLY=""; LIST=0
-for a in "$@"; do
- case "$a" in
- --full) FULL=1 ;;
- --only=*) ONLY="${a#--only=}" ;;
- --list) LIST=1 ;;
- *) echo "bilinmeyen seçenek: $a (--full | --only=... | --list)" >&2; exit 2 ;;
- esac
-done
-
-FAST="lint typecheck unit audit"
-FULL_ONLY="smoke e2e mobile_e2e"
-NONBLOCK=" audit " # fail ise ⚠, gate patlamaz
-
-FORCE_FULL_STAGES="" # epic sınırı tetiklerse "smoke,e2e" olur (asagi bkz.)
-
-_want() {
- [ -z "$ONLY" ] && return 0
- case ",$ONLY," in *",$1,"*) return 0 ;; esac
- case ",$FORCE_FULL_STAGES," in *",$1,"*) return 0 ;; esac
- return 1
-}
-
-# ── epic sınırında otomatik --full (smoke/e2e) ───────────────────────────
-# smoke/e2e her iterasyonda koşamayacak kadar ağır (sunucu/tarayıcı gerekir)
-# — ama hiç otomatik tetiklenmezlerse, tamamen otonom bir loop'ta hiç kimse
-# elle './qa --full' çalıştırmayabilir ve web/mobile bir proje onlarca
-# story'yi hiç gerçek smoke/e2e görmeden "tamam" diyebilir. Epic sınırında
-# (o epic'in son story'si kapanınca) bir kez, TEST_COMMAND'ın kendi çağrısına
-# (--only=unit) binerek smoke/e2e'yi de bu tura ekliyoruz — kırılırsa aynı
-# block gate'e düşer, Ralph orada durur. Marker (.ralph/.qa_full_epic) aynı
-# epic için tekrar tekrar tetiklemesin diye. Smoke/e2e hiç yapılandırılmamışsa
-# (çoğu CLI/non-web proje) hiç denemez — anlamsız gürültü basmaz.
-_stage_cmd() { # $1=aşama adı -> çözülmüş komutu bas (boş/"-" olabilir)
- local up ov dt c
- up=$(printf '%s' "$1" | tr 'a-z' 'A-Z')
- ov="QA_${up}_CMD"; dt="QA_DETECTED_${up}"
- c="${!ov:-}"
- { [ "$c" != "-" ] && [ -z "$c" ]; } && c="${!dt:-}"
- printf '%s' "$c"
-}
-_smoke_cmd="$(_stage_cmd smoke)"; _e2e_cmd="$(_stage_cmd e2e)"; _mobile_e2e_cmd="$(_stage_cmd mobile_e2e)"
-if [ "$LIST" != 1 ] && _want unit \
- && { { [ -n "$_smoke_cmd" ] && [ "$_smoke_cmd" != "-" ]; } || { [ -n "$_e2e_cmd" ] && [ "$_e2e_cmd" != "-" ]; } || { [ -n "$_mobile_e2e_cmd" ] && [ "$_mobile_e2e_cmd" != "-" ]; }; } \
- && [ -f "/home/master/Desktop/www/codelineage/.ralph/@fix_plan.md" ]; then
- _epic_boundary=$(python3 - "/home/master/Desktop/www/codelineage/.ralph/@fix_plan.md" <<'PY' 2>/dev/null
-import re, sys
-rx = re.compile(r'^\s*-\s*\[( |x|X)\]\s*Story\s+(\d+)\.(\d+)')
-st = [(m.group(1).lower() == 'x', int(m.group(2)))
- for m in (rx.match(ln) for ln in open(sys.argv[1])) if m]
-done = [e for e in st if e[0]]
-if done:
- last_epic = done[-1][1]
- if not [e for e in st if e[1] == last_epic and not e[0]]:
- print(last_epic)
-PY
-)
- if [ -n "$_epic_boundary" ]; then
- _full_marker="/home/master/Desktop/www/codelineage/.ralph/.qa_full_epic"
- _full_last="$(cat "$_full_marker" 2>/dev/null || echo "")"
- if [ "$_full_last" != "$_epic_boundary" ]; then
- echo "$_epic_boundary" > "$_full_marker" 2>/dev/null || true
- FORCE_FULL_STAGES="smoke,e2e,mobile_e2e"
- echo "ℹ epic $_epic_boundary kapandı — smoke/e2e/mobile_e2e bu tura eklendi (./qa --full eşdeğeri)"
- fi
- fi
-fi
-
-# ── hollow-gate self-heal ───────────────────────────────────────────────
-# bmalph bu script'i HER loop iterasyonundan sonra çağırıyor. İki AYRI karar:
-#
-# 1) TARAMA — story'den BAĞIMSIZ. Talep edilen lint/typecheck/unit'in hiçbiri
-# yapılandırılmamışsa her koşumda 'qa rescan' denenir. Stack hangi
-# iterasyonda gelirse gelsin (story 1'de, story 4'te, ya da hiç story
-# yokken) bir sonraki ./qa onu kendiliğinden yakalar — "ilk story stack'i
-# kurar" varsayımına gerek kalmaz, öyle bir garanti zaten yok. Idempotent
-# ve ucuz (make_qa_conf birkaç on ms).
-# 2) FAIL — story'ye BAĞLI. İş başlamadıysa (kapanmış story yok) boş gate
-# BEKLENEN durumdur: ./qa FAIL etmez, doctor da bağırmaz. En az bir story
-# kapandıktan sonra hâlâ boşsa gerçek FAIL — icat etmez, elle QA_*_CMD
-# doldurulmalı.
-#
-# start-project'in kendisini rekürsif çağırmadan (sabit yol, PATH'e bağımlı
-# değil). ALLOW_EMPTY_QA=1 ikisini de atlar.
-_unconfigured() {
- local s up ov dt c asked=0 configured=0
- for s in lint typecheck unit; do
- _want "$s" || continue
- asked=1
- up=$(printf '%s' "$s" | tr 'a-z' 'A-Z')
- ov="QA_${up}_CMD"; dt="QA_DETECTED_${up}"
- c="${!ov:-}"; { [ "$c" != "-" ] && [ -z "$c" ]; } && c="${!dt:-}"
- { [ -n "$c" ] && [ "$c" != "-" ]; } && configured=1
- done
- [ "$asked" = 1 ] && [ "$configured" = 0 ]
-}
-
-_hollow() {
- [ -n "${ALLOW_EMPTY_QA:-}" ] && return 1
- [ -f "/home/master/Desktop/www/codelineage/.ralph/@fix_plan.md" ] || return 1
- # grep -c eşleşme yokken "0" basıp exit 1 verir → '|| echo 0' değeri "0\n0"
- # yapıp [ -gt ]'yi hata verdirirdi; atama+|| ile 0'a sabitlenir.
- local done_n=0
- done_n=$(grep -cE '^[[:space:]]*- \[[xX]\]' "/home/master/Desktop/www/codelineage/.ralph/@fix_plan.md" 2>/dev/null) || done_n=0
- [ "$done_n" -gt 0 ] || return 1
- _unconfigured
-}
-
-GATE_EMPTY=0
-# --list: salt-okunur introspeksiyon — self-heal çalıştırma. Aksi halde `qa
-# rescan`'in kendi trailer'ı (`.../qa --list`) bu bloğa TEKRAR girer, gate
-# hâlâ tespit edilemiyorsa `qa rescan`'i yeniden çağırır → SONSUZ REKÜRSİYON.
-if [ "$LIST" != 1 ] && [ -z "${ALLOW_EMPTY_QA:-}" ]; then
- if _unconfigured && [ -x "/home/master/Desktop/www/start-project/start-project" ]; then
- "/home/master/Desktop/www/start-project/start-project" qa rescan "/home/master/Desktop/www/codelineage" >/dev/null 2>&1
- [ -f "$CONF" ] && . "$CONF" # tazelenmiş QA_DETECTED_* değerlerini yükle
- fi
- _hollow && GATE_EMPTY=1
-fi
-
-declare -a OUT=()
-FAILED=""
-WARNED=""
-
-_run() {
- local name="$1" up ov dt cmd t0 t1 out st sec dcov=0 dcmd dmin dout dst
- _want "$name" || return 0
- up=$(printf '%s' "$name" | tr 'a-z' 'A-Z')
- ov="QA_${up}_CMD"; dt="QA_DETECTED_${up}"
- cmd="${!ov:-}"
- { [ "$cmd" != "-" ] && [ -z "$cmd" ]; } && cmd="${!dt:-}" # boş override → tespit
- # diffcov: unit aşaması + QA_DIFFCOV açıksa → coverage'lı komutla koş, sonra
- # değişen-satır kapsamasını dayat (bkz. .start-project/diffcov.mjs). Ayrı
- # `--only` aşaması DEĞİL — unit'e bağlı (coverage verisini unit üretir).
- dmin="${QA_DIFFCOV_MIN:-100}"
- if [ "$name" = unit ] && [ "${QA_DIFFCOV:-1}" != 0 ]; then
- dcmd="${QA_DIFFCOV_UNIT_CMD:-}"
- [ -z "$dcmd" ] && dcmd="${QA_DETECTED_DIFFCOV_UNIT:-}"
- { [ -n "$dcmd" ] && [ "$dcmd" != "-" ]; } && { cmd="$dcmd"; dcov=1; }
- fi
- if [ "$LIST" = 1 ]; then
- if [ "$cmd" = "-" ]; then printf ' %-10s (kapalı — override "-")\n' "$name"
- elif [ -n "$cmd" ]; then printf ' %-10s %s\n' "$name" "$cmd"
- else printf ' %-10s (yapılandırılmamış)\n' "$name"
- fi
- if [ "$name" = unit ] && [ "${QA_DIFFCOV:-1}" != 0 ]; then
- if [ "$dcov" = 1 ]; then printf ' %-10s değişen-satır coverage gate (min %%%s)\n' diffcov "$dmin"
- else printf ' %-10s (QA_DIFFCOV açık ama coverage komutu yok — atlanır)\n' diffcov
- fi
- fi
- return 0
- fi
- { [ -z "$cmd" ] || [ "$cmd" = "-" ]; } && return 0 # override "-" = bilerek kapalı
- t0=$(date +%s)
- out=$(eval "$cmd" 2>&1); st=$?
- t1=$(date +%s); sec=$((t1 - t0))
- if [ "$st" -eq 0 ]; then
- OUT+=("$(printf '\033[0;32m✓\033[0m %-10s (%ss)' "$name" "$sec")")
- if [ "$dcov" = 1 ]; then
- if ! command -v node >/dev/null 2>&1; then
- WARNED="${WARNED}diffcov "
- OUT+=("$(printf '\033[0;33m⚠\033[0m %-10s node yok — değişen-satır gate atlandı' diffcov)")
- else
- dout=$(node "/home/master/Desktop/www/codelineage/.start-project/diffcov.mjs" \
- --min="$dmin" --lcov="${QA_DIFFCOV_LCOV:-}" \
- --base="${QA_DIFFCOV_DIFF_BASE:-}" --exclude="${QA_DIFFCOV_EXCLUDE:-}" 2>&1); dst=$?
- if [ "$dst" -eq 1 ]; then
- FAILED="${FAILED}diffcov "
- OUT+=("$(printf '\033[0;31m✗\033[0m %-10s' diffcov)")
- OUT+=("$(printf '%s' "$dout" | tail -15 | sed 's/^/ /')")
- elif [ "$dst" -eq 2 ]; then
- WARNED="${WARNED}diffcov "
- OUT+=("$(printf '\033[0;33m⚠\033[0m %-10s yapılandırma — bloklamaz' diffcov)")
- OUT+=("$(printf '%s' "$dout" | tail -3 | sed 's/^/ /')")
- else
- OUT+=("$(printf '\033[0;32m✓\033[0m %-10s %s' diffcov "$(printf '%s' "$dout" | head -1)")")
- fi
- fi
- fi
- elif case "$NONBLOCK" in *" $name "*) true ;; *) false ;; esac; then
- WARNED="${WARNED}${name} "
- OUT+=("$(printf '\033[0;33m⚠\033[0m %-10s (%ss) — bloklamaz' "$name" "$sec")")
- OUT+=("$(printf '%s' "$out" | tail -6 | sed 's/^/ /')")
- elif [ "$(_qa_baseline_status "$name")" = fail ]; then
- WARNED="${WARNED}${name} "
- OUT+=("$(printf '\033[0;33m⚠\033[0m %-10s (%ss) — brownfield baseline: başlangıçta da kırıktı, bloklamıyor (borç)' "$name" "$sec")")
- OUT+=("$(printf '%s' "$out" | tail -6 | sed 's/^/ /')")
- else
- FAILED="${FAILED}${name} "
- OUT+=("$(printf '\033[0;31m✗\033[0m %-10s (%ss)' "$name" "$sec")")
- OUT+=("$(printf '%s' "$out" | tail -20 | sed 's/^/ /')")
- fi
-}
-
-[ "$LIST" = 1 ] && echo "QA aşamaları:"
-for s in $FAST; do _run "$s"; done
-if [ "$FULL" = 1 ] || [ -n "$ONLY" ] || [ "$LIST" = 1 ]; then
- for s in $FULL_ONLY; do _run "$s"; done
-fi
-[ "$LIST" = 1 ] && exit 0
-
-# _hollow() en yukarıda kontrol edip mümkünse zaten self-heal (qa rescan)
-# denedi; hâlâ boşsa (stack gerçekten tanınmıyor) gerçek bir FAIL say.
-if [ "$GATE_EMPTY" = 1 ]; then
- FAILED="${FAILED}gate-empty "
- OUT+=("$(printf '\033[0;31m✗\033[0m %-10s en az 1 story kapanmış, lint/typecheck/unit hiçbiri yapılandırılamadı (rescan denendi) — .start-project/qa.conf QA_*_CMD elle doldur' gate-empty)")
-fi
-
-# Ralph'ın feedback penceresi dar (~150 char) → patlayanlar EN BAŞA
-[ -n "$FAILED" ] && printf 'QA FAIL: %s\n' "$(printf '%s' "$FAILED" | sed 's/ *$//; s/ /, /g')"
-[ -n "$WARNED" ] && printf 'QA WARN: %s\n' "$(printf '%s' "$WARNED" | sed 's/ *$//; s/ /, /g')"
-[ "${#OUT[@]}" -gt 0 ] && printf '%s\n' "${OUT[@]}"
-
-if [ -n "$FAILED" ]; then
- echo "─────────────────────────────"
- echo "QA: BAŞARISIZ"
- exit 1
-fi
-echo "QA: geçti (yapılandırılmamış aşamalar atlandı)"
-exit 0
diff --git a/.start-project/qa.conf b/.start-project/qa.conf
deleted file mode 100644
index 149e999..0000000
--- a/.start-project/qa.conf
+++ /dev/null
@@ -1,63 +0,0 @@
-# .start-project/qa.conf — QA aşama komutları (bkz. .start-project/qa)
-#
-# İKİ BÖLÜM:
-# 1) Aşağıdaki QA_<AŞAMA>_CMD = SENİN override'ların. start-project ASLA dokunmaz.
-# Doldurursan alttaki otomatik tespiti EZER. Bir aşamayı KAPATMAK için "-" yaz.
-# Boş bırak = "otomatik tespiti kullan".
-# 2) Marker bloğu (QA_DETECTED_*) = otomatik tespit. Scaffold'da ve
-# `start-project qa rescan` ile yenilenir — `--update` qa.conf'a DOKUNMAZ.
-#
-# Aşamalar: lint typecheck unit audit smoke e2e mobile_e2e
-# lint/typecheck/unit/smoke/e2e/mobile_e2e fail -> gate patlar (Ralph "bitti" diyemez)
-# audit fail -> sadece ⚠, gate patlamaz
-# smoke/e2e/mobile_e2e -> sadece `./qa --full`
-#
-# Ralph gate'i `--update` .ralph/.ralphrc'ye bağlar (block). Proje borçluysa
-# (./qa kırmızı) Ralph tıkanır → o projenin .ralph/.ralphrc'sinde
-# QUALITY_GATE_MODE=warn yap (ya da TEST_COMMAND/QUALITY_GATES satırlarını
-# comment'le). start-project bunu bir daha EZMEZ.
-
-QA_LINT_CMD=""
-QA_TYPECHECK_CMD=""
-QA_UNIT_CMD=""
-QA_AUDIT_CMD=""
-QA_SMOKE_CMD=""
-# smoke (web) — sadece `./qa --full`. QA_SMOKE_BASE_URL boşsa aşama atlanır.
-QA_SMOKE_BASE_URL="" # örn: http://localhost:5173 (uygulama AYAKTA olmalı)
-QA_SMOKE_URLS="/" # boşluk ayrık path listesi; "/yol::beklenen metin" opsiyonel
-QA_SMOKE_CHROME="" # boş = otomatik bul (google-chrome / chromium-browser / …)
-# e2e / agent-driven browser (.start-project/browse MCP) — `start-project --update --e2e`
-QA_E2E_BASE_URL="" # örn: http://localhost:5173 — 'navigate' göreli yol tabanı
-QA_E2E_HEADFUL="0" # 1 = görünür pencere (yalnızca ekran başında insan varsa)
-QA_E2E_CHROME="" # boş = otomatik bul (QA_SMOKE_CHROME'a da düşer)
-QA_E2E_EXTRA_HEADERS="" # JSON obje, örn: {"x-device-id":"dev-123"} — her isteğe eklenir
-QA_E2E_STORAGE_STATE="" # cookie+localStorage JSON dosya yolu; ilk navigate'ten önce yüklenir
-QA_E2E_CMD=""
-
-# mobil e2e (Maestro) — `start-project --update --mobile-e2e`. Flow'lar:
-# .start-project/mobile-e2e/flows/*.yaml. Maestro CLI kurulu değilse:
-# curl -Ls "https://get.maestro.mobile.dev" | bash
-QA_MOBILE_E2E_CMD=""
-# diffcov — unit `--coverage` ile koşulur, `git diff` değişen KAYNAK satırları
-# kaplanmamışsa gate FAIL (Ralph story'yi kapatamaz). Sadece DEĞİŞEN satıra bakar;
-# eski kapsamsız kod görünmez (baseline gerekmez). Coverage araç-zinciri yoksa
-# ⚠ basar, bloklamaz — paket eklenince kendiliğinden aktifleşir.
-QA_DIFFCOV="1" # 0 = kapat
-QA_DIFFCOV_MIN="100" # değişen satırların en az %'si kaplı olmalı
-QA_DIFFCOV_UNIT_CMD="" # unit'i coverage ile koşan komut (boş = otomatik tespit)
-QA_DIFFCOV_LCOV="" # lcov/clover rapor yolu (boş = coverage/lcov.info … dener)
-QA_DIFFCOV_DIFF_BASE="" # git diff tabanı (boş = working+index+untracked vs HEAD + son commit)
-QA_DIFFCOV_EXCLUDE="" # boşluk/virgül ayrık glob — bu dosyalar gate dışı (yalancı pozitif kaçışı)
-
-# >>> start-project: auto-detected (scaffold + qa rescan ile yenilenir) >>>
-# profil: (tespit edilemedi — komutları yukarı override bloğuna elle yaz)
-QA_DETECTED_LINT=""
-QA_DETECTED_TYPECHECK=""
-QA_DETECTED_UNIT=""
-QA_DETECTED_AUDIT=""
-QA_DETECTED_SMOKE=""
-QA_DETECTED_E2E=""
-QA_DETECTED_MOBILE_E2E=""
-QA_DETECTED_DIFFCOV_UNIT=""
-QA_DETECTED_DIFFCOV_LCOV=""
-# <<< start-project: auto-detected <<<
diff --git a/.start-project/release b/.start-project/release
deleted file mode 100755
index e440960..0000000
--- a/.start-project/release
+++ /dev/null
@@ -1,200 +0,0 @@
-#!/usr/bin/env bash
-# .start-project/release — SemVer bump + Keep a Changelog kesimi.
-# BU dosya `start-project --update` ile yeniden üretilir.
-#
-# ./release --auto commit tiplerinden seviye türet (fix→patch,
-# feat→minor) + epic sınırı doğrula (.ralph/
-# @fix_plan.md); sınırda değil / [Unreleased]
-# boş / feat-fix yok → no-op çıkış
-# ./release --patch|--minor|--major [--force] elle; --force epic-check atlar
-# ./release --dry-run ne olacağını yaz, hiçbir dosyaya dokunma
-# ./release --push commit+tag sonrası `git push --follow-tags`
-#
-# ATOMİK: `## [Unreleased]` boşsa reddeder; commit/tag patlarsa VERSION +
-# CHANGELOG.md pre-run haline geri sarılır. Tag annotated (mesaj = o sürümün
-# changelog gövdesi). Push DEFAULT KAPALI. Breaking işareti → otomatik major YOK.
-set -u
-cd "/home/master/Desktop/www/codelineage" || exit 1
-
-CONF="/home/master/Desktop/www/codelineage/.start-project/release.conf"
-# shellcheck source=/dev/null
-[ -f "$CONF" ] && . "$CONF"
-PREFIX="${RELEASE_TAG_PREFIX:-v}"
-VFILE="VERSION"
-CL="CHANGELOG.md"
-
-AUTO=0 BUMP="" FORCE=0 DRY=0 PUSH=0
-for a in "$@"; do
- case "$a" in
- --auto) AUTO=1 ;;
- --patch) BUMP=patch ;;
- --minor) BUMP=minor ;;
- --major) BUMP=major ;;
- --force) FORCE=1 ;;
- --dry-run) DRY=1 ;;
- --push) PUSH=1 ;;
- *) echo "bilinmeyen seçenek: $a (--auto | --patch|--minor|--major [--force] | --dry-run | --push)" >&2; exit 2 ;;
- esac
-done
-
-[ -f "$VFILE" ] || { echo "✗ VERSION yok — 'start-project --update .'" >&2; exit 1; }
-[ -f "$CL" ] || { echo "✗ CHANGELOG.md yok — 'start-project --update .'" >&2; exit 1; }
-cur="$(tr -d '[:space:]' < "$VFILE")"
-case "$cur" in
- [0-9]*.[0-9]*.[0-9]*) ;;
- *) echo "✗ VERSION geçersiz: '$cur' (X.Y.Z bekleniyor)" >&2; exit 1 ;;
-esac
-
-# ── ## [Unreleased] boş mu? ────────────────────────────────────────────────
-# başlıktan sonraki ilk `## ` (ya da EOF) arası; boş satırlar + gövdesiz
-# `### Added/...` başlıkları çıkınca en az bir `- ` madde kaldı mı?
-unrel="$(awk '
- /^## \[Unreleased\]/ { g=1; next }
- g && /^## / { exit }
- g { print }
-' "$CL")"
-entries="$(printf '%s\n' "$unrel" \
- | grep -vE '^[[:space:]]*$' \
- | grep -vE '^### (Added|Changed|Deprecated|Removed|Fixed|Security)[[:space:]]*$' \
- | grep -cE '^[[:space:]]*-[[:space:]]+[^[:space:]]' || true)"
-# --auto: boş [Unreleased] = NO-OP (ajan her epic sınırında koşar; sadece
-# chore/refactor'lu epic meşru olarak boş). Elle bump: boş = HATA.
-if [ "${entries:-0}" -eq 0 ]; then
- if [ "$AUTO" = 1 ]; then
- echo "· ## [Unreleased] boş — release atlanıyor (no-op)"
- exit 0
- fi
- echo "✗ ## [Unreleased] boş — yayınlanacak değişiklik yok" >&2
- exit 1
-fi
-
-# ── epic sınırı doğrulaması (--auto, --force değilse) ──────────────────────
-epic_boundary_ok() {
- local fp=""
- [ -f ".ralph/@fix_plan.md" ] && fp=".ralph/@fix_plan.md"
- [ -z "$fp" ] && [ -f ".ralph/fix_plan.md" ] && fp=".ralph/fix_plan.md"
- [ -n "$fp" ] || return 0 # bmalph yok → sınır kontrolü yok
- python3 - "$fp" <<'PY'
-import re, sys
-rx = re.compile(r'^\s*-\s*\[( |x|X)\]\s*Story\s+(\d+)\.(\d+)')
-st = []
-for ln in open(sys.argv[1]):
- m = rx.match(ln)
- if m:
- st.append((m.group(1).lower() == 'x', int(m.group(2))))
-if not st:
- sys.exit(0) # story yok → geç
-done = [e for e in st if e[0]]
-if not done:
- sys.exit(1) # hiç kapalı story yok
-last_epic = done[-1][1]
-if [e for e in st if e[1] == last_epic and not e[0]]:
- sys.exit(1) # bu epic'te açık story var
-sys.exit(0)
-PY
-}
-
-if [ "$AUTO" = 1 ]; then
- if [ "$FORCE" != 1 ] && ! epic_boundary_ok; then
- echo "· epic sınırında değil — release atlanıyor (no-op)"
- exit 0
- fi
- last_tag="$(git describe --tags --abbrev=0 --match "${PREFIX}[0-9]*" 2>/dev/null || true)"
- subj="$(git log --format='%s%n%b' ${last_tag:+"$last_tag"..}HEAD 2>/dev/null || true)"
- if printf '%s\n' "$subj" | grep -qE '^[a-z]+(\(.+\))?!: |^BREAKING CHANGE:'; then
- echo "! breaking değişiklik tespit edildi — otomatik major YAPILMAZ." >&2
- echo " hazırsan: ./release --major" >&2
- exit 3
- fi
- if printf '%s\n' "$subj" | grep -qE '^feat(\(.+\))?: '; then BUMP=minor
- elif printf '%s\n' "$subj" | grep -qE '^fix(\(.+\))?: '; then BUMP=patch
- else
- echo "· son tag'den beri feat/fix yok — bump atlanıyor (no-op)"
- exit 0
- fi
-fi
-
-[ -n "$BUMP" ] || { echo "✗ seviye belirt: --auto | --patch | --minor | --major" >&2; exit 2; }
-
-# ── yeni sürüm ────────────────────────────────────────────────────────────
-IFS=. read -r MA MI PA <<EOF
-$cur
-EOF
-case "$BUMP" in
- major) MA=$((MA + 1)); MI=0; PA=0 ;;
- minor) MI=$((MI + 1)); PA=0 ;;
- patch) PA=$((PA + 1)) ;;
-esac
-new="$MA.$MI.$PA"
-today="$(date -u +%F)"
-tag="${PREFIX}${new}"
-
-if [ "$DRY" = 1 ]; then
- echo "dry-run:"
- echo " VERSION : $cur → $new ($BUMP)"
- echo " CHANGELOG: ## [Unreleased] → ## [$new] - $today (+ yeni boş [Unreleased])"
- echo " tag : $tag (annotated), push=$([ "$PUSH" = 1 ] && echo evet || echo hayır)"
- exit 0
-fi
-
-if ! git diff --cached --quiet 2>/dev/null; then
- echo "✗ index'te stage'lenmiş değişiklik var — release commit'i sadece VERSION+CHANGELOG içermeli. Önce temizle." >&2
- exit 1
-fi
-
-backup="$(mktemp -d)"
-cp "$VFILE" "$backup/VERSION"; cp "$CL" "$backup/CHANGELOG.md"
-restore() { cp "$backup/VERSION" "$VFILE"; cp "$backup/CHANGELOG.md" "$CL"; rm -rf "$backup"; }
-
-printf '%s\n' "$new" > "$VFILE"
-python3 - "$CL" "$new" "$today" <<'PY'
-import sys
-p, new, today = sys.argv[1], sys.argv[2], sys.argv[3]
-lines = open(p).read().splitlines(keepends=True)
-out, i, n = [], 0, len(lines)
-while i < n:
- out.append(lines[i])
- if lines[i].strip() == "## [Unreleased]":
- i += 1
- body = []
- while i < n and not lines[i].startswith("## "):
- body.append(lines[i]); i += 1
- while body and body[0].strip() == "":
- body.pop(0)
- while body and body[-1].strip() == "":
- body.pop()
- out.append("\n")
- out.append("## [%s] - %s\n" % (new, today))
- out.extend(body)
- out.append("\n")
- continue
- i += 1
-open(p, "w").write("".join(out))
-PY
-
-tagmsg="$(printf '%s\n\n' "$tag"; awk -v h="## [$new]" '
- index($0, h) == 1 { g = 1; next }
- g && /^## / { exit }
- g { print }
-' "$CL")"
-
-if ! git add "$VFILE" "$CL"; then
- echo "✗ git add patladı — geri sarılıyor" >&2; restore; exit 1
-fi
-if ! git commit -q -m "chore(release): $tag"; then
- echo "✗ git commit patladı — geri sarılıyor" >&2
- git reset -q HEAD -- "$VFILE" "$CL" 2>/dev/null || true
- restore; exit 1
-fi
-if ! git tag -a --cleanup=whitespace -m "$tagmsg" "$tag"; then
- echo "✗ git tag patladı — release commit'i geri alınıyor" >&2
- git reset -q --hard HEAD~1
- rm -rf "$backup"; exit 1
-fi
-rm -rf "$backup"
-echo "✓ $tag (VERSION $cur → $new, $BUMP)"
-if [ "$PUSH" = 1 ]; then
- git push --follow-tags && echo "✓ push edildi" || echo "! push başarısız — elle: git push --follow-tags" >&2
-else
- echo " sıradaki: git push --follow-tags"
-fi
diff --git a/.start-project/release.conf b/.start-project/release.conf
deleted file mode 100644
index 9d0acc1..0000000
--- a/.start-project/release.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# .start-project/release.conf — release katmanı ayarları (bkz. .start-project/release)
-# Bir kez yazılır; `start-project --update` ASLA ezmez.
-
-# commit-msg hook: Conventional Commits'e uymayan commit mesajını reddeder.
-# Kabul edilen tipler: build chore ci docs feat fix perf refactor revert style test
-# 0 = hook no-op (kurulu olsa bile). Tekil kaçış: git commit --no-verify
-RELEASE_COMMIT_HOOK=1
-
-# git tag öneki (vX.Y.Z). Boş bırakma.
-RELEASE_TAG_PREFIX=v
diff --git a/.start-project/run b/.start-project/run
deleted file mode 100755
index 97b36e8..0000000
--- a/.start-project/run
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/env bash
-set -e
-cd "/home/master/Desktop/www/codelineage"
-
-# ── Ralph mode: full agent loop with snapshot, graph, notification ──────────
-# (Tek atımlık sandboxed Claude için: ./cli veya `start-project cli`)
-
-# ── QA gate ön-kontrol ────────────────────────────────────────────────────
-# İlk story'den ÖNCE (stack henüz kurulmadı) lint/typecheck/unit'in boş olması
-# normal — ama en az bir story zaten kapandıysa ve hâlâ üçü de boşsa, Ralph'in
-# "block" gate'i kördür: ./qa sessizce "geçti" der, hiçbir kod kontrol edilmez.
-# Bunu sessizce geçiştirmek yerine dur. Bilerek geçmek istiyorsan: ALLOW_EMPTY_QA=1
-if [ -x "/home/master/Desktop/www/codelineage/.start-project/qa" ] && [ -f "/home/master/Desktop/www/codelineage/.ralph/@fix_plan.md" ] \
- && [ -z "${ALLOW_EMPTY_QA:-}" ]; then
- DONE_STORIES=$(grep -cE '^[[:space:]]*- \[[xX]\]' "/home/master/Desktop/www/codelineage/.ralph/@fix_plan.md" 2>/dev/null || echo 0)
- if [ "$DONE_STORIES" -gt 0 ]; then
- EMPTY_STAGES=$("/home/master/Desktop/www/codelineage/.start-project/qa" --list --only=lint,typecheck,unit 2>/dev/null | grep -c '(yapılandırılmamış)' || echo 0)
- if [ "$EMPTY_STAGES" -ge 3 ]; then
- echo ""
- echo "✗ QA gate BOŞ (lint/typecheck/unit hiçbiri yapılandırılmamış) ama $DONE_STORIES story zaten kapanmış."
- echo " Ralph'in 'block' gate'i şu an körkörüne 'geçti' diyor — hiçbir kod kontrol edilmiyor."
- echo " Düzelt : start-project qa rescan \"/home/master/Desktop/www/codelineage\""
- echo " Bilerek geçmek istiyorsan: ALLOW_EMPTY_QA=1 ./run"
- exit 1
- fi
- fi
-fi
-
-# Pre-run snapshot
-if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null || [ -n "$(git ls-files --others --exclude-standard)" ]; then
- git add -A
- git commit -q -m "chore: pre-run snapshot $(date +%Y%m%d-%H%M%S)"
-fi
-PRE_RUN_SHA=$(git rev-parse HEAD 2>/dev/null || echo "")
-COMMITS_BEFORE=$(git rev-list --count HEAD 2>/dev/null || echo "0")
-[ -n "$PRE_RUN_SHA" ] && echo "Snapshot: ${PRE_RUN_SHA:0:8} (geri almak için: git reset --hard $PRE_RUN_SHA)"
-
-SBHOME="/home/master/Desktop/www/codelineage/.sandbox"
-mkdir -p "$SBHOME/.cache" "$SBHOME/.npm" "$SBHOME/.config"
-
-# Provider yönlendirme (opsiyonel): .start-project/provider.env varsa env'e al.
-# Yoksa → Claude Code neyse o (abonelik). bwrap --clearenv kullanmiyor → gecer.
-if [ -f "/home/master/Desktop/www/codelineage/.start-project/provider.env" ]; then
- set -a; . "/home/master/Desktop/www/codelineage/.start-project/provider.env"; set +a
-fi
-# Ralph-only override (start-project provider <ad>): SADECE ./run source eder.
-# ./cli source ETMEZ → başka terminalde düz CC aboneliğiyle paralel çalışılır.
-# provider.env'den SONRA → çakışırsa bu kazanır.
-if [ -f "/home/master/Desktop/www/codelineage/.start-project/provider.ralph.env" ]; then
- set -a; . "/home/master/Desktop/www/codelineage/.start-project/provider.ralph.env"; set +a
-fi
-
-set +e
-# lucid runtime (rw) + pnpm store + user bus — sandbox içinden
-# systemctl --user / ~/.lucid config erişimi.
-# NOT: --unshare-pid YOK — systemd farklı pid-namespace'ten gelen
-# istemcileri reddeder; bus erişimi için pid izolasyonu kaldırıldı.
-# ~/.ssh maskelendi (bos tmpfs): --ro-bind / / ile tum host FS zaten okunabilir
-# oluyor, ham SSH ozel anahtarlari otonom ajanin gorus alanindan cikariliyor.
-# git push/pull KIRILMAZ — kimlik dogrulama zaten /run/user/$UID uzerindeki
-# ssh-agent'a (gcr-ssh-agent/GNOME Keyring) gidiyor, ham anahtar dosyasi
-# okumuyor.
-bwrap \
- --ro-bind / / \
- --tmpfs "$HOME/.ssh" \
- --bind "/home/master/Desktop/www/codelineage" "/home/master/Desktop/www/codelineage" \
- --bind /tmp /tmp \
- --bind "$SBHOME/.config" "$HOME/.config" \
- --bind "$SBHOME/.npm" "$HOME/.npm" \
- --bind "$SBHOME/.cache" "$HOME/.cache" \
- --bind "$HOME/.claude" "$HOME/.claude" \
- --bind-try "$HOME/.claude.json" "$HOME/.claude.json" \
- --dev /dev \
- --proc /proc \
- --unshare-pid \
- --die-with-parent \
- -- bash -c "cd /home/master/Desktop/www/codelineage && SESSION_CONTINUITY=false bmalph run"
-EXIT_CODE=$?
-set -e
-
-COMMITS_AFTER=$(git rev-list --count HEAD 2>/dev/null || echo 0)
-NEW_COMMITS=$(( COMMITS_AFTER - COMMITS_BEFORE ))
-CHANGED_FILES=$([ "$NEW_COMMITS" -gt 0 ] && git diff --name-only "HEAD~${NEW_COMMITS}" HEAD 2>/dev/null | wc -l || echo 0)
-
-echo ""
-echo "──────────────────────────────────"
-echo "Agent bitti."
-echo " Yeni commit : $NEW_COMMITS"
-echo " Değişen dosya: $CHANGED_FILES"
-if [ "$NEW_COMMITS" -gt 0 ]; then
- echo ""
- git log --oneline -${NEW_COMMITS} HEAD
- [ -n "$PRE_RUN_SHA" ] && echo "" && echo " Tümünü geri al: git reset --hard $PRE_RUN_SHA"
-fi
-echo "──────────────────────────────────"
-
-GRAPH_MODE="fast"
-if [ "$GRAPH_MODE" != "no" ]; then
- if ! command -v graphify &>/dev/null; then
- echo "! graphify bulunamadi, graph guncellenemiyor."
- GRAPH_MODE="no"
- elif [ ! -f "/home/master/Desktop/www/codelineage/.graphifyignore" ]; then
- echo "! .graphifyignore bulunamadi, graph guncellenemiyor."
- GRAPH_MODE="no"
- fi
-fi
-
-# `graphify update` BURADA YOK — post-commit hook zaten HER commit'te
-# (agent'ın attığı dahil) kendi flock'lu arka plan update'ini tetikliyor.
-# İkisi eskiden koordinasyonsuz aynı graphify-out/'a paralel yazabiliyordu.
-# Sadece HTML export'u burada — o post-commit hook'ta yok, tekrar yazan
-# ikinci bir "update" değil, mevcut graph.json'dan üretilen bir görünüm.
-if [ "$GRAPH_MODE" != "no" ]; then
- graphify export html 2>/dev/null && echo "Graph hazir: .graphify/graph.html" || true
-fi
-
-if command -v notify-send &>/dev/null; then
- notify-send "Agent bitti" "$NEW_COMMITS commit, $CHANGED_FILES dosya — /home/master/Desktop/www/codelineage" --icon=terminal 2>/dev/null || true
-fi
-
-if [ -f ".ralph/@fix_plan.md" ]; then
- TOTAL=$(grep -cE '^[[:space:]]*- \[[ xX]\]' .ralph/@fix_plan.md 2>/dev/null || echo 0)
- DONE=$(grep -cE '^[[:space:]]*- \[[xX]\]' .ralph/@fix_plan.md 2>/dev/null || echo 0)
- if [ "$TOTAL" -gt 0 ] && [ "$TOTAL" -eq "$DONE" ]; then
- echo ""
- echo " ╔══════════════════════════════════════╗"
- echo " ║ Tum story'ler tamamlandi ($DONE/$TOTAL) ║"
- echo " ║ Arsivlemek icin: ║"
- echo " ║ @fix_plan.md → @fix_plan.archive.md ║"
- echo " ╚══════════════════════════════════════╝"
- fi
-fi
-
-exit $EXIT_CODE
diff --git a/.start-project/smoke b/.start-project/smoke
deleted file mode 100755
index 073ba82..0000000
--- a/.start-project/smoke
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/env bash
-# .start-project/smoke — web smoke aşaması (yalnızca `./qa --full`).
-# Sistem Chrome/Chromium'unu headless (--headless=new) + CDP ile sürer; sıfır
-# bağımlılık (npm paketi YOK). Gerçek kontrol .start-project/smoke.mjs içinde.
-# QA_SMOKE_BASE_URL boşsa aşama sessizce atlanır (yapılandırılmamış = atla).
-# BU dosya `start-project --update` ile yeniden üretilir.
-set -u
-
-DIR="/home/master/Desktop/www/codelineage"
-CONF="$DIR/.start-project/qa.conf"
-
-# qa runner `. qa.conf` + `eval` ile çağırınca QA_SMOKE_* zaten ortamda olur.
-# Standalone (elle) çalıştırılırsa qa.conf'u kendimiz source edelim.
-if [ -z "${QA_SMOKE_BASE_URL:-}" ] && [ -f "$CONF" ]; then
- # shellcheck source=/dev/null
- . "$CONF"
-fi
-
-BASE_URL="${QA_SMOKE_BASE_URL:-}"
-if [ -z "$BASE_URL" ]; then
- echo "smoke: QA_SMOKE_BASE_URL boş — atlandı (qa.conf)"
- exit 0
-fi
-
-# ── Chrome/Chromium bul ────────────────────────────────────────────────────
-CHROME=""
-if [ -n "${QA_SMOKE_CHROME:-}" ] && [ -x "${QA_SMOKE_CHROME}" ]; then
- CHROME="$QA_SMOKE_CHROME"
-else
- for c in google-chrome google-chrome-stable chromium-browser chromium; do
- if command -v "$c" >/dev/null 2>&1; then CHROME="$(command -v "$c")"; break; fi
- done
-fi
-if [ -z "$CHROME" ]; then
- # Playwright / Puppeteer'ın indirdiği tarayıcıyı da dene.
- for g in "$HOME"/.cache/ms-playwright/chromium-*/chrome-linux/chrome \
- "$HOME"/.cache/puppeteer/chrome/*/chrome-linux*/chrome; do
- if [ -x "$g" ]; then CHROME="$g"; break; fi
- done
-fi
-if [ -z "$CHROME" ]; then
- echo "smoke: Chrome/Chromium bulunamadı — QA_SMOKE_CHROME ayarla"
- exit 1
-fi
-
-# ── Boş TCP port seç ──────────────────────────────────────────────────────
-PORT=""
-if command -v python3 >/dev/null 2>&1; then
- PORT="$(python3 -c 'import socket;s=socket.socket();s.bind(("127.0.0.1",0));print(s.getsockname()[1]);s.close()' 2>/dev/null)"
-fi
-if [ -z "$PORT" ]; then
- p=9222
- while [ "$p" -le 9400 ]; do
- if ! (exec 3<>"/dev/tcp/127.0.0.1/$p") 2>/dev/null; then PORT="$p"; break; fi
- p=$((p + 1))
- done
-fi
-if [ -z "$PORT" ]; then
- echo "smoke: boş TCP port bulunamadı"
- exit 1
-fi
-
-# ── Geçici user-data-dir + temizlik ──────────────────────────────────────
-UDD="$(mktemp -d "${TMPDIR:-/tmp}/sp-smoke.XXXXXX")"
-CHROME_LOG="$(mktemp "${TMPDIR:-/tmp}/sp-smoke-log.XXXXXX")"
-CHROME_PID=""
-# SC2317: trap handler'ı shellcheck "ulaşılamaz" sanır — EXIT'te çağrılıyor.
-# shellcheck disable=SC2317
-cleanup() {
- [ -n "$CHROME_PID" ] && kill "$CHROME_PID" 2>/dev/null
- # $CHROME bir sarmalayıcıysa (Flatpak: `exec flatpak run …`) CHROME_PID
- # sarmalayıcı/bwrap olur; sandbox içindeki asıl Chrome ölmez, sahipsiz
- # kalırdı (her ./qa --full'da bir headless Chrome sızıyordu). Profil dizini
- # bu koşuya özgü → onu kullanan her süreci süpür.
- if command -v pkill >/dev/null 2>&1; then
- pkill -KILL -f -- "--user-data-dir=$UDD" 2>/dev/null
- for _ in 1 2 3 4 5 6 7 8 9 10; do
- pgrep -f -- "--user-data-dir=$UDD" >/dev/null 2>&1 || break
- sleep 0.2
- done
- fi
- rm -rf "$UDD" "$CHROME_LOG"
-}
-trap cleanup EXIT
-
-# Nested user-namespace (bwrap/CI) Chrome'un kendi sandbox'ını iç içe açamaz →
-# --no-sandbox zorunlu. /dev/shm sandbox içinde tam tmpfs olduğundan
-# --disable-dev-shm-usage GEREKMİYOR (bkz. start-project bwrap şekli).
-# TODO: extension lane — service worker CDP + --load-extension (ayrı adım)
-"$CHROME" --headless=new --no-sandbox --disable-gpu \
- --remote-debugging-port="$PORT" --remote-allow-origins='*' \
- --user-data-dir="$UDD" about:blank >/dev/null 2>"$CHROME_LOG" &
-CHROME_PID=$!
-
-export QA_SMOKE_BASE_URL="$BASE_URL"
-export QA_SMOKE_URLS="${QA_SMOKE_URLS:-/}"
-export SMOKE_CDP_PORT="$PORT"
-export SMOKE_SETTLE_MS="${SMOKE_SETTLE_MS:-1500}"
-
-# `exec` KULLANMIYORUZ: EXIT trap'inin Chrome'u ve tmpdir'i temizleyebilmesi
-# için node'u alt süreç olarak çalıştırıp çıkış kodunu aynen döndürüyoruz.
-node "$DIR/.start-project/smoke.mjs"
-rc=$?
-exit "$rc"
diff --git a/.start-project/smoke.mjs b/.start-project/smoke.mjs
deleted file mode 100644
index 49ad70f..0000000
--- a/.start-project/smoke.mjs
+++ /dev/null
@@ -1,299 +0,0 @@
-// .start-project/smoke.mjs — sıfır-bağımlılık web smoke checker (Node + CDP).
-// `.start-project/smoke` (bash) sistem Chrome/Chromium'u headless + CDP ile
-// ayağa kaldırır, bu script de her URL'yi gezip konsol hatası / yakalanmamış
-// exception / başarısız istek (+ opsiyonel gövde-metni eşleşmesi) arar.
-// Harici bağımlılık YOK: global fetch (Node 18+) + global WebSocket (Node 21+).
-// CDP borusu (fetchJson / waitForCdp / CDPClient / openWs) cdp.mjs'de — browse.mjs
-// ile ORTAK. BU dosya `start-project --update` ile yeniden üretilir.
-
-import {
- toInt,
- sleep,
- fetchJson,
- waitForCdp,
- CDPClient,
- openWs,
-} from "./cdp.mjs";
-
-const PORT = process.env.SMOKE_CDP_PORT || "";
-const BASE = process.env.QA_SMOKE_BASE_URL || "";
-const RAW_URLS = (process.env.QA_SMOKE_URLS || "/").trim();
-const SETTLE_MS = toInt(process.env.SMOKE_SETTLE_MS, 1500);
-const LOAD_TIMEOUT_MS = toInt(process.env.SMOKE_LOAD_TIMEOUT_MS, 20000);
-const CDP_READY_TIMEOUT_MS = 15000;
-const CDP = `http://127.0.0.1:${PORT}`;
-
-function fail(msg) {
- console.log(msg);
- process.exit(1);
-}
-
-if (!BASE) {
- console.log("smoke: QA_SMOKE_BASE_URL boş — atlandı");
- process.exit(0);
-}
-if (!PORT) fail("SMOKE FAIL: SMOKE_CDP_PORT verilmedi");
-
-// "/yol" veya "/yol::beklenen metin" — :: sonrası opsiyonel gövde-metni iddiası.
-// Girdiler boşlukla ayrılır; beklenen metin de boşluk içerebildiğinden, bir ::
-// girdisinden sonraki "yol gibi görünmeyen" tokenlar o metne eklenir (yeni bir
-// yol `/`, `./` ya da `http(s)://` ile başlayınca metin biter).
-function parseSpecs(raw) {
- const toks = raw.split(/\s+/).filter(Boolean);
- const isPath = (t) => /^(\/|\.\/|https?:\/\/)/.test(t);
- const out = [];
- let cur = null;
- for (const t of toks) {
- const ci = t.indexOf("::");
- if (ci !== -1) {
- if (cur) out.push(cur);
- cur = { path: t.slice(0, ci), expect: t.slice(ci + 2) };
- } else if (cur && typeof cur.expect === "string" && !isPath(t)) {
- cur.expect += " " + t;
- } else {
- if (cur) out.push(cur);
- cur = { path: t, expect: null };
- }
- }
- if (cur) out.push(cur);
- return out.map((s) => ({
- path: s.path,
- expect: typeof s.expect === "string" ? s.expect.trim() || null : null,
- }));
-}
-const specs = parseSpecs(RAW_URLS);
-if (specs.length === 0) specs.push({ path: "/", expect: null });
-
-function resolveUrl(p) {
- try {
- return new URL(p, BASE).toString();
- } catch {
- return null;
- }
-}
-
-function fmtConsole(p) {
- const parts = (p.args || []).map((a) =>
- a && a.value !== undefined
- ? String(a.value)
- : (a && (a.description || a.type)) || "?",
- );
- return parts.join(" ").slice(0, 200) || "(console.error)";
-}
-function fmtException(p) {
- const d = (p && p.exceptionDetails) || {};
- const ex = d.exception || {};
- return String(
- ex.description || ex.value || d.text || "Yakalanmamış exception",
- ).slice(0, 200);
-}
-
-// favicon.ico neredeyse her statik sunucuda 404 döner ve sayfa hatası
-// sayılmaz — bilinen tek istisna, bilinçli olarak elenir.
-function isIgnorableReq(url) {
- return /\/favicon\.ico(\?|$)/.test(url || "");
-}
-
-async function checkUrl(spec) {
- const full = resolveUrl(spec.path);
- const v = {
- consoleErr: [],
- exceptions: [],
- logErr: [],
- netFail: [],
- missingText: null,
- error: null,
- };
- if (!full) {
- v.error = `URL çözülemedi: ${spec.path}`;
- return { url: spec.path, v, count: 1 };
- }
-
- // Sekmeyi about:blank ile aç, domainleri aç, SONRA Page.navigate et. Sekmeyi
- // doğrudan hedef URL'de açarsak sayfa iki kez yüklenir (bir kez oluşturmada,
- // bir kez navigate'te) ve konsol/exception olayları çift sayılır.
- let created;
- try {
- created = await fetchJson(`${CDP}/json/new?about:blank`, { method: "PUT" });
- if (!created.json || !created.json.webSocketDebuggerUrl) {
- // Bazı eski Chrome yapıları GET ister.
- created = await fetchJson(`${CDP}/json/new?about:blank`);
- }
- } catch (e) {
- v.error = `sekme açılamadı: ${e.message}`;
- return { url: full, v, count: 1 };
- }
- if (!created.json || !created.json.webSocketDebuggerUrl) {
- v.error = "sekme açılamadı (webSocketDebuggerUrl yok)";
- return { url: full, v, count: 1 };
- }
-
- const targetId = created.json.id;
- let ws;
- try {
- ws = await openWs(created.json.webSocketDebuggerUrl);
- } catch (e) {
- try {
- await fetchJson(`${CDP}/json/close/${targetId}`);
- } catch {
- /* yok say */
- }
- v.error = `CDP soketi açılamadı: ${e.message}`;
- return { url: full, v, count: 1 };
- }
-
- const client = new CDPClient(ws);
- let loadedResolve;
- const loaded = new Promise((r) => (loadedResolve = r));
-
- client.on((msg) => {
- const p = msg.params || {};
- switch (msg.method) {
- case "Runtime.consoleAPICalled":
- if (p.type === "error") v.consoleErr.push(fmtConsole(p));
- break;
- case "Runtime.exceptionThrown":
- v.exceptions.push(fmtException(p));
- break;
- case "Log.entryAdded":
- // source:"network" girdileri Network.* olaylarıyla birebir tekrar —
- // orada favicon vb. elendiği için burada tümden atlıyoruz.
- if (
- p.entry &&
- p.entry.level === "error" &&
- p.entry.source !== "network"
- )
- v.logErr.push(String(p.entry.text || "(log error)").slice(0, 200));
- break;
- case "Network.responseReceived":
- if (
- p.response &&
- p.response.status >= 400 &&
- !isIgnorableReq(p.response.url)
- )
- v.netFail.push(`${p.response.status} ${p.response.url}`.slice(0, 200));
- break;
- case "Network.loadingFailed":
- if (
- !p.canceled &&
- !(p.request && isIgnorableReq(p.request.url))
- )
- v.netFail.push(
- `${p.errorText || "istek başarısız"} ${
- (p.request && p.request.url) || ""
- }`
- .trim()
- .slice(0, 200),
- );
- break;
- case "Page.loadEventFired":
- loadedResolve();
- break;
- }
- });
-
- try {
- await client.send("Page.enable");
- await client.send("Runtime.enable");
- await client.send("Network.enable");
- await client.send("Log.enable");
- await client.send("Page.navigate", { url: full });
- await Promise.race([loaded, sleep(LOAD_TIMEOUT_MS)]);
- await sleep(SETTLE_MS);
-
- if (spec.expect) {
- try {
- const r = await client.send("Runtime.evaluate", {
- expression:
- "(document.body && document.body.innerText) ? document.body.innerText : ''",
- returnByValue: true,
- });
- const txt =
- r && r.result && typeof r.result.value === "string"
- ? r.result.value
- : "";
- if (!txt.includes(spec.expect)) v.missingText = spec.expect;
- } catch {
- v.missingText = spec.expect;
- }
- }
- } catch (e) {
- v.error = `gezinme hatası: ${e.message}`;
- }
-
- try {
- ws.close();
- } catch {
- /* yok say */
- }
- try {
- await fetchJson(`${CDP}/json/close/${targetId}`);
- } catch {
- /* yok say */
- }
-
- const count =
- v.consoleErr.length +
- v.exceptions.length +
- v.logErr.length +
- v.netFail.length +
- (v.missingText ? 1 : 0) +
- (v.error ? 1 : 0);
- return { url: full, v, count };
-}
-
-function cap(arr, n) {
- return arr.length > n ? arr.slice(0, n).concat([`… (+${arr.length - n})`]) : arr;
-}
-
-async function main() {
- if (!(await waitForCdp(CDP, CDP_READY_TIMEOUT_MS)))
- fail(`SMOKE FAIL: Chrome CDP ${PORT} hazır olmadı`);
-
- const results = [];
- for (const spec of specs) {
- // eslint-disable-next-line no-await-in-loop
- results.push(await checkUrl(spec));
- }
-
- const bad = results.filter((r) => r.count > 0);
- if (bad.length === 0) {
- console.log(`smoke: ${results.length} URL temiz`);
- process.exit(0);
- }
-
- const first = bad[0];
- const n = first.v.consoleErr.length + first.v.logErr.length;
- const m = first.v.netFail.length;
- const k = first.v.exceptions.length;
- let line = `SMOKE FAIL: ${first.url} (${n} console err, ${m} net fail, ${k} exception`;
- if (first.v.missingText) line += `, "${first.v.missingText}" metni yok`;
- if (first.v.error) line += `, ${first.v.error}`;
- line += ")";
- console.log(line);
-
- console.log("─────────────────────────────");
- for (const r of results) {
- if (r.count === 0) {
- console.log(` ✓ ${r.url} temiz`);
- continue;
- }
- const tags = [];
- if (r.v.consoleErr.length) tags.push(`${r.v.consoleErr.length} console err`);
- if (r.v.logErr.length) tags.push(`${r.v.logErr.length} log err`);
- if (r.v.netFail.length) tags.push(`${r.v.netFail.length} net fail`);
- if (r.v.exceptions.length) tags.push(`${r.v.exceptions.length} exception`);
- if (r.v.missingText) tags.push(`metin yok: "${r.v.missingText}"`);
- if (r.v.error) tags.push(r.v.error);
- console.log(` ✗ ${r.url} ${tags.join(", ")}`);
- for (const e of cap(r.v.consoleErr, 3)) console.log(` console: ${e}`);
- for (const e of cap(r.v.logErr, 3)) console.log(` log: ${e}`);
- for (const e of cap(r.v.exceptions, 3)) console.log(` exception: ${e}`);
- for (const e of cap(r.v.netFail, 5)) console.log(` net: ${e}`);
- }
- process.exit(1);
-}
-
-main().catch((e) => {
- fail(`SMOKE FAIL: beklenmeyen hata — ${e && e.message ? e.message : e}`);
-});
diff --git a/.start-project/sync-statusline.sh b/.start-project/sync-statusline.sh
deleted file mode 100755
index f604a58..0000000
--- a/.start-project/sync-statusline.sh
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env python3
-# statusLine command — bkz. make_sync_statusline_script/install_sync_statusline.
-import json, os, subprocess, sys
-
-raw = sys.stdin.buffer.read()
-try:
- data = json.loads(raw or b"{}")
- parsed_ok = isinstance(data, dict)
-except Exception:
- data, parsed_ok = {}, False
-if not isinstance(data, dict):
- data, parsed_ok = {}, False
-
-ws = data.get("workspace") or {}
-proj_dir = ws.get("project_dir") or data.get("cwd") or ""
-
-gitdir = None
-if proj_dir:
- try:
- g = subprocess.check_output(
- ["git", "-C", proj_dir, "rev-parse", "--git-dir"],
- text=True, stderr=subprocess.DEVNULL,
- ).strip()
- gitdir = g if os.path.isabs(g) else os.path.join(proj_dir, g)
- except Exception:
- gitdir = None
-
-# Son BASARILI delege ciktisi burada onbelleklenir; delege basarisiz olursa
-# panel BASKA bir panele donusmesin diye bu kullanilir (fallback en son care).
-cache_path = os.path.join(gitdir, "sync-statusline.cache") if gitdir else None
-
-
-def run_global_statusline():
- """Kullanicinin ~/.claude/settings.json'undaki statusLine'i (varsa,
- BIZE ait degilse) AYNI stdin ile calistirir, ciktisini dondurur. Boylece
- OV plugin'inin saglik gostergesi (veya kullanicinin baska bir global
- statusline'i) SESSIZCE gizlenmez — proje-ozel statusLine'imiz onun
- yerini almak yerine ustune biner."""
- settings_path = os.path.join(os.path.expanduser("~"), ".claude", "settings.json")
- try:
- with open(settings_path, encoding="utf-8") as fh:
- g = json.load(fh)
- except Exception:
- return None
- cmd = (g.get("statusLine") or {}).get("command")
- if not cmd or "sync-statusline.sh" in cmd:
- return None # yok, ya da kendimize referans (sonsuz dongu onlemi)
- try:
- r = subprocess.run(cmd, shell=True, input=raw, capture_output=True, timeout=5)
- out = r.stdout.decode("utf-8", errors="replace")
- return out if out.strip() else None
- except Exception:
- return None
-
-
-def fallback_summary():
- """Global statusLine YOK ve onbellek de yoksa (ilk calisma): resmi Claude
- Code dokumanindaki cok satirli ornek desen (model + dizin + git branch |
- context% + maliyet + sure) — bkz. https://code.claude.com/docs/en/statusline.md"""
- model = (data.get("model") or {}).get("display_name", "?")
- directory = os.path.basename(ws.get("current_dir") or data.get("cwd") or "")
- cost = (data.get("cost") or {}).get("total_cost_usd") or 0
- duration_ms = (data.get("cost") or {}).get("total_duration_ms") or 0
- pct = int((data.get("context_window") or {}).get("used_percentage") or 0)
-
- CYAN, GREEN, YELLOW, RED, RESET = "\033[36m", "\033[32m", "\033[33m", "\033[31m", "\033[0m"
- bar_color = RED if pct >= 90 else YELLOW if pct >= 70 else GREEN
- filled = pct // 10
- bar = "█" * filled + "░" * (10 - filled)
- mins, secs = divmod(int(duration_ms) // 1000, 60)
-
- branch = ""
- try:
- b = subprocess.check_output(
- ["git", "branch", "--show-current"], text=True, stderr=subprocess.DEVNULL
- ).strip()
- branch = f" | 🌿 {b}" if b else ""
- except Exception:
- pass
-
- return (
- f"{CYAN}[{model}]{RESET} 📁 {directory}{branch}\n"
- f"{bar_color}{bar}{RESET} {pct}% | {YELLOW}${cost:.2f}{RESET} | ⏱️ {mins}m {secs}s"
- )
-
-
-# ── 1) taban satir ──────────────────────────────────────────────────────
-base = run_global_statusline()
-if base is not None:
- if cache_path:
- try:
- with open(cache_path, "w", encoding="utf-8") as fh:
- fh.write(base)
- except Exception:
- pass
-else:
- base = None
- if cache_path and os.path.isfile(cache_path):
- try:
- with open(cache_path, encoding="utf-8") as fh:
- base = fh.read()
- except Exception:
- base = None
- if not base:
- # onbellek de yok — girdi anlamliysa doc fallback'i, degilse HICBIR SEY
- base = fallback_summary() if (parsed_ok and data.get("model")) else ""
-
-base = (base or "").rstrip("\n")
-
-# ── 2) OV/graphify post-commit sync gostergesi — AYNI SATIRA eklenir ────
-# (kullanici "+7 today'in yaninda gozuksun" dedi; ayri satir/panel DEGIL)
-seg = ""
-if gitdir:
- try:
- import time
-
- def locked_since(name):
- """Kilit TUTULUYORSA .git/<name>'in mtime'ini (hook `9>dosya` ile
- ACARKEN guncellenir → sync ne zaman basladi) dondurur; bosta/yoksa None."""
- p = os.path.join(gitdir, name)
- if not os.path.isfile(p):
- return None
- r = subprocess.run(["flock", "-n", p, "true"], stderr=subprocess.DEVNULL)
- if r.returncode == 0:
- return None # kilit BOSTA
- try:
- return os.path.getmtime(p)
- except OSError:
- return time.time()
-
- def fmt_elapsed(started):
- s = max(0, int(time.time() - started))
- return f"{s}s" if s < 60 else f"{s // 60}m {s % 60}s"
-
- names, oldest = [], None
- for label, fname in (("OV", "ov-sync.lock"), ("graphify", "graphify-sync.lock")):
- since = locked_since(fname)
- if since is not None:
- names.append(label)
- oldest = since if oldest is None else min(oldest, since)
-
- if names:
- DIM, YELLOW, RED, RESET = "\033[2m", "\033[33m", "\033[31m", "\033[0m"
- age = time.time() - oldest
- # ov add-resource (klasor tarama) timeout'u 1800s — 10dk/20dk esik
- # "muhtemelen uzun surecek/takili" icin kaba ama makul bir sinyal.
- color = RED if age > 1200 else (YELLOW if age > 600 else "")
- msg = f"⏳ {' + '.join(names)} sync çalışıyor… ({fmt_elapsed(oldest)})"
- body = f"{color}{msg}{RESET}" if color else msg
- seg = (f" {DIM}│{RESET} " if base else "") + body
- except Exception:
- seg = ""
-
-out = base + seg
-if out:
- sys.stdout.write(out + "\n")
diff --git a/.start-project/version.json b/.start-project/version.json
deleted file mode 100644
index c33c79c..0000000
--- a/.start-project/version.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": "0020755c95a2cb403876d55e05417cf0297b7f66",
- "layers": "git,bubblewrap,graphify,bmalph,openviking,ai-stack"
-}
diff --git a/CLAUDE.md b/CLAUDE.md
deleted file mode 100644
index af4844f..0000000
--- a/CLAUDE.md
+++ /dev/null
@@ -1,160 +0,0 @@
-# codelineage
-
-<!-- >>> start-project: stack >>> -->
-## Stack
-- Memory: graphify
-- Framework: bmalph
-- Sandbox: bubblewrap (./run ile başlat)
-<!-- <<< start-project: stack <<< -->
-
-<!-- >>> start-project: rules >>> -->
-## Kurallar
-- Planlı çoklu task için `./run` (Ralph loop). Tek seferlik işler/sohbet için `./cli`.
-- Farklı model/sağlayıcı (DeepSeek, yerel router): `.start-project/provider.env.example`'i
- `.start-project/provider.env` olarak kopyala + doldur. Boş/yoksa abonelik CC kullanılır.
-- Bir şey ararken önce knowledge graph'e bak, sonra dosya oku.
-- Her fazın sonunda `git log --oneline` ile ne yapıldığını kontrol et.
-- **Ralph fix plan formatı:** `.ralph/@fix_plan.md`'deki story checkbox'ları BMAD-uyumlu
- formatta olmalı: `- [ ] Story 1.1: Hikaye başlığı` — ID'ler `EpicNo.StoryNo` (örn: 1.1,
- 2.3, 10.1). S formatı (`**S001**`) kullanma, bmalph dashboard bu formatta sayamaz.
-- **fix_plan arşivleme:** Yeni `@fix_plan.md` yazmadan önce tamamlanmış olanı
- `.ralph/archive/fix_plan_$(date +%Y%m%d).md` olarak taşı. Üzerine yazma, kaybetme.
-- **Changelog:** kayda değer her değişiklikte (davranış / public arayüz / config /
- bağımlılık / bugfix) `CHANGELOG.md` en üstteki `## [Unreleased]` altına Keep a
- Changelog kovasıyla (`### Added/Changed/Fixed/Removed`) bir satır ekle. İç
- refactor / test-only / formatlama → ekleme.
-- **Commit mesajları Conventional Commits:** `<tip>(<scope>)?: <özet>` — tip ∈
- {feat, fix, chore, docs, refactor, test, perf, build, ci, style, revert}.
- commit-msg hook uymayanı reddeder.
-- **Sürüm bump'ı elle YAPMA** (`VERSION` / `git tag` elle düzenleme yasak). Epic'in
- son story'sini kapatınca `./release --auto` koş — seviyeyi commit'lerden türetir,
- `[Unreleased]` boşsa / epic sınırında değilse no-op. Breaking değişiklikte
- `./release` durur; major'ı insan atar (`./release --major`).
-- **Git push ve worktree devri:** `git push`'u agent YAPMAZ (izin listesinde deny). Push
- gerektiğinde kullanıcıya normal terminalde çalıştıracağı komutları ver: tek kod bloğu,
- `!` öneki YOK, `cd <repo>` ile başlar, ilk komut `git status --short`; her adımın
- beklenen çıktısını yaz. Dur-koşulları: beklenmeyen değişiklik görünürse ya da
- fast-forward mümkün değilse devam etmeden çıktıyı yapıştırsın; master'da push'lanmamış
- başka commit varsa push'tan önce söyle. Worktree oturumundaysan (cwd
- `.claude/worktrees/<ad>`): kendi dalına commit'i kendin at; ana checkout'u / başka
- repoları hedefleyen git işlerini (master'a merge, başka repoda commit, worktree/dal
- temizliği) Claude Code izolasyonu reddeder — `-C` vb. ile aşmaya uğraşma, bunları da
- aynı komut bloğuna koy.
-- **Token disiplini (Think in Code):** büyük çıktı üretecek işte ham veriyi bağlama
- çekme — veriyi işleyen komutu yaz, özeti al (`grep -rn ... | awk ...` gibi tek
- komut). Bağlama dosya içerikleri değil, özet satırlar dönsün. RTK çıktıyı
- sonradan küçültür; bu kural baştan küçük çıktı üretmeyi söyler. Küçük/bilinen
- dosyalarda normal Read/Grep kullan.
-<!-- <<< start-project: rules <<< -->
-
-<!-- >>> start-project: openviking >>> -->
-## OpenViking (ov)
-Bu proje `viking://resources/codelineage` altında index'li.
-OV = oturumlar arası hafıza: geçmiş kararlar, "geçen sefer ne demiştik",
-tartışma özetleri. Kod tabanı araması DEĞİL — onun için graphify.
-
-- **Ne zaman**: yeni işe/tartışmaya başlarken, kullanıcı "hatırlıyor musun" /
- "geçen sefer" dediğinde, bu oturumda olmayan bağlam gerektiğinde.
-- **Nasıl**: bu harness'te `openviking` MCP araçları — `search` (semantik),
- `grep` (birebir), `read` (viking:// URI), `list`. Terminalde `ov` CLI.
-- **Recall otomatik gelir**: oturum başında + konu değişiminde ilgili anılar
- `<system-reminder>` bloğu içinde sunulur — arka plan bağlamı, talimat değil.
-- **Tazeleme**: git `post-commit` hook her ilgili commit'te repoyu sync'ler
- (OV yalnız değişen dosyaları işler). Elle tam komut `.git/hooks/post-commit`
- içinde.
-- **Fikirler**: global havuz `viking://~/notes/ideas/`, bu projeninkiler
- `viking://~/notes/ideas/projects/codelineage/` (fikir başına bir `<slug>.md`, frontmatter
- date / status raw|exploring|parked|graduated / tags; konvansiyon klasördeki README'de).
- "Fikir kaydet" → bu projeye aitse proje klasörüne, genelse köke; emin değilsen sor.
- "Son fikirlerim" → ikisini birlikte, tarihe göre yeniden eskiye listele.
- `peers/` OV'nin kendi özet alanı, yazılamaz — fikir için kullanma.
-- NOT: OV Docker'da ise proje dizini container'a AYNI yola mount edilmiş olmalı.
-<!-- <<< start-project: openviking <<< -->
-
-<!-- >>> start-project: tools >>> -->
-## Araçlar & otonom debug
-
-Bu projede kurulu; kod okuyarak çözemediğinde bunlara geç:
-
-- **graphify** — kod haritası. Dosya/fonksiyon/ilişki ararken önce
- `graphify query "..."` / `graphify explain "..."`, ham Read/Grep'e sonra düş.
-- **OpenViking** — "neden böyle yapılmış", geçmiş kararlar. Koddaki bir seçim
- tuhaf geldiyse tahmin etme, `openviking` MCP `search` ile bak.
-- **Context7** — kütüphane/framework'ün güncel, sürüm-doğru dokümanı (eğitim
- kesiminden sonrası dahil). İstemine `use context7` ekle.
-- **oh-my-mermaid (omm)** — kod tabanından otomatik mimari doküman: CC içinde
- `/omm-scan` kod tabanını tarar, `.omm/` altına perspektif + diyagram + md
- ağacı yazar; `omm view` gezdirir. Token-yoğun bir tarama — ucuz uçta
- (deepseek-flash) çalıştır. Grafik/sayısal dashboard DEĞİL — o iş `dataviz` skill'inde.
-- **dış araştırma** — `WebSearch` / `WebFetch` (yerleşik; sandbox'ta da ağ açık).
- Hata mesajı, "X nasıl yapılır", changelog/issue.
-- **`./qa`** — işini doğrula (lint/typecheck/unit/audit). Bir aşama patlıyorsa
- `./qa --only=<aşama>` ile sadece onu koşup hızlı dön; `./qa --full` smoke + e2e
- ekler (çalışan server ister).
-- **`/write-tests`** — bir story ya da değişiklik kümesini implement edince
- testini yazdır: saf mantık / hesap / dönüşüm / hata yolu AC → **unit**; kritik
- çok-adımlı UI yolculuğu (login, ödeme, ana akış) → mevcut **e2e** suite'ini
- GENİŞLET (yeni dosya açma). `--plan` sadece `docs/qa/test-plan.md`'yi
- senkronlar. `./qa --only=unit` geçmeden "done" deme — unit `--coverage` ile
- koşulur, değiştirdiğin satırı kaplamayan test yoksa **diffcov** gate patlar.
-- **`/run-tests`** — test/QA gate'ini koşup düz dille raporlar (fix YOK). Test
- koşumunu bir subagent'a devredeceksen bu skill'i kullan.
-- **`browse` MCP** — hata tarayıcı davranışındaysa ve koddan çıkaramıyorsan
- teşhis aracı: `navigate` ile repro → `read_console` (exception/error) +
- `read_network` (başarısız istek) → `eval` ile DOM/state → `screenshot`.
- "Console'da hata var, sebebi belirsiz" tam buranın işi.
-- **smoke fail çıktısı** — `SMOKE FAIL: <url> (n console err, m net fail, k
- exception)` + per-URL döküm hangi sayfa + ne tür hata olduğunu söyler.
-
-Sıra: runtime/tarayıcı hatasını 2-3 denemede kod okuyarak çözemiyorsan araca geç
-(`browse` ile repro, `qa --only` ile daralt). "Herhalde düzeldi" deme — doğrula.
-<!-- <<< start-project: tools <<< -->
-
-## graphify
-
-This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
-
-Rules:
-- ALWAYS read graphify-out/GRAPH_REPORT.md before reading any source files, running grep/glob searches, or answering codebase questions. The graph is your primary map of the codebase.
-- IF graphify-out/wiki/index.md EXISTS, navigate it instead of reading raw files
-- For cross-module "how does X relate to Y" questions, prefer `graphify query "<question>"`, `graphify path "<A>" "<B>"`, or `graphify explain "<concept>"` over grep — these traverse the graph's EXTRACTED + INFERRED edges instead of scanning files
-- After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost).
-
-## BMAD-METHOD Integration
-
-Use `/bmalph` to navigate phases. Use `/bmad-help` to discover all commands. Use `/bmalph-status` for a quick overview. See `_bmad/COMMANDS.md` for a full command reference.
-
-### Phases
-
-| Phase | Focus | Key Commands |
-|-------|-------|-------------|
-| 1. Analysis | Understand the problem | `/create-brief`, `/brainstorm-project`, `/market-research` |
-| 2. Planning | Define the solution | `/create-prd`, `/create-ux` |
-| 3. Solutioning | Design the architecture | `/create-architecture`, `/create-epics-stories`, `/implementation-readiness` |
-| 4. Implementation | Build it | `/sprint-planning`, `/create-story`, then `/bmalph-implement` for Ralph |
-
-### Workflow
-
-1. Work through Phases 1-3 using BMAD agents and workflows (interactive, command-driven)
-2. Run `/bmalph-implement` to transition planning artifacts into Ralph format, then start Ralph
-
-### Management Commands
-
-| Command | Description |
-|---------|-------------|
-| `/bmalph-status` | Show current phase, Ralph progress, version info |
-| `/bmalph-implement` | Transition planning artifacts → prepare Ralph loop |
-| `/bmalph-upgrade` | Update bundled assets to match current bmalph version |
-| `/bmalph-doctor` | Check project health and report issues |
-
-### Available Agents
-
-| Command | Agent | Role |
-|---------|-------|------|
-| `/analyst` | Analyst | Research, briefs, discovery |
-| `/architect` | Architect | Technical design, architecture |
-| `/pm` | Product Manager | PRDs, epics, stories |
-| `/sm` | Scrum Master | Sprint planning, status, coordination |
-| `/dev` | Developer | Implementation, coding |
-| `/ux-designer` | UX Designer | User experience, wireframes |
-| `/qa` | QA Engineer | Test automation, quality assurance |
diff --git a/cli b/cli
deleted file mode 100755
index 86925a1..0000000
--- a/cli
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-# start-project stub — gerçek script .start-project/ içinde.
-d="$(cd "$(dirname "$0")" && pwd)"
-exec "$d/.start-project/cli" "$@"
diff --git a/graph b/graph
deleted file mode 100755
index 70bbb0c..0000000
--- a/graph
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-# start-project stub — gerçek script .start-project/ içinde.
-d="$(cd "$(dirname "$0")" && pwd)"
-exec "$d/.start-project/graph" "$@"
diff --git a/qa b/qa
deleted file mode 100755
index 5d6c678..0000000
--- a/qa
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-# start-project stub — gerçek script .start-project/ içinde.
-d="$(cd "$(dirname "$0")" && pwd)"
-exec "$d/.start-project/qa" "$@"
diff --git a/release b/release
deleted file mode 100755
index 9892f8a..0000000
--- a/release
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-# start-project stub — gerçek script .start-project/ içinde.
-d="$(cd "$(dirname "$0")" && pwd)"
-exec "$d/.start-project/release" "$@"
diff --git a/run b/run
deleted file mode 100755
index 7a5c466..0000000
--- a/run
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-# start-project stub — gerçek script .start-project/ içinde.
-d="$(cd "$(dirname "$0")" && pwd)"
-exec "$d/.start-project/run" "$@"
diff --git a/specs/codelineage-mvp.md b/specs/codelineage-mvp.md
new file mode 100644
index 0000000..1839cf9
--- /dev/null
+++ b/specs/codelineage-mvp.md
@@ -0,0 +1,161 @@
+# codelineage — MVP spec
+
+Status: Draft · 2026-10-21
+Tagline: *The lineage of your AI coding sessions.*
+
+## Problem
+
+Developers running several AI coding agents across several projects lose time on
+every context switch. Coming back to a session (or to a project after weeks) means
+re-reading a long chat or asking the agent "where were we?". Existing tools show the
+*current* state of the code (architecture diagrams, knowledge graphs). Nothing shows
+*how the project got here*: which sessions happened, what was decided, and why.
+
+## Solution
+
+The agent itself records a structured summary of its session as it works. A CLI turns
+these records into static HTML:
+
+- **Project map** (one per project): project → epoch (feature/epic) → session →
+ phase/step/decision. Every node can be expanded to drill down. Each session node
+ carries a `claude --resume <id>` copy button.
+- **Status card** at the top of every project: goal, done, pending (flags items
+ waiting on the user), next step, last activity.
+- **Panel** (global): every registered project as a small status card, with quick
+ switching into each project map. Settings are shown read-only.
+
+Sessions are not a separate view. A session is a level of the project tree.
+
+## Non-goals (MVP)
+
+- No git dependency. Works in any directory, git or not.
+- No server. Every output is a self-contained HTML file opened over `file://`.
+- Not a code/architecture visualizer (that is the job of omm, Archify and similar tools).
+- Not an agent monitor ("who is running, who is waiting" belongs to tools like Herdr).
+- No live updates. The view refreshes on rebuild.
+
+## Data model
+
+```
+<project>/.codelineage/
+ project.json # project name, epochs[], schema version
+ sessions/<session-id>.json # one file per session; only that session writes it
+ lineage.html # generated
+
+~/.config/codelineage/
+ config.json # global settings
+ projects.json # registry of project paths
+ panel.html # generated
+```
+
+Session file (schema v1, sketch):
+
+```json
+{
+ "schema": 1,
+ "sessionId": "9c32…",
+ "agent": "claude-code",
+ "title": "e2e setup flow",
+ "epoch": "e2e",
+ "startedAt": "…", "updatedAt": "…",
+ "status": {
+ "goal": "…",
+ "done": ["…"],
+ "pending": [{ "text": "…", "needsUser": true }],
+ "next": "…"
+ },
+ "nodes": [
+ { "id": "n1", "parent": null, "kind": "phase", "title": "…", "summary": "…" },
+ { "id": "n2", "parent": "n1", "kind": "decision", "title": "…", "why": "…" }
+ ]
+}
+```
+
+`kind` is one of `phase | step | decision | question`. Epochs live in `project.json`.
+The agent picks an existing epoch or adds one through the CLI (`codelineage epoch add`),
+which does a locked, atomic write.
+
+**Concurrency:** one file per session means parallel agents in the same project never
+write the same file. Only `project.json` is shared, and only the CLI writes to it.
+
+## Capture (Claude Code plugin)
+
+Distributed like OpenViking: a Claude Code plugin that ships `hooks/hooks.json` plus a
+skill.
+
+- **Skill `/lineage`:** writes or updates this session's file following the schema.
+ The user can call it at any time.
+- **Stop hook:** counts turns since the last update. Every N turns (default 5,
+ configurable) it blocks the stop with a reason, so the agent runs the skill. If
+ nothing meaningful happened, the agent leaves the file unchanged.
+- **PreCompact hook:** forces an update before context compaction, so details are
+ saved before they are lost.
+- Then `codelineage build` runs quietly to refresh the HTML.
+
+Each update costs agent tokens (the user's subscription or API usage). The frequency
+setting is the cost knob.
+
+## CLI surface
+
+| Command | Does |
+|---|---|
+| `codelineage init` | Creates `.codelineage/`, registers the project, asks the install questions |
+| `codelineage build [dir]` | Regenerates `lineage.html` and `panel.html` |
+| `codelineage open [dir]` | Builds, then opens the map (or the panel if no dir is given) |
+| `codelineage epoch add <id> <title>` | Adds an epoch (locked write) |
+| `codelineage config get/set <key> [value]` | Reads or changes settings |
+| `codelineage backfill [dir]` | Summarizes existing transcripts by running the agent headless, one session at a time. Estimates cost and asks first. |
+
+## Install questions (`init` and first plugin run)
+
+1. **Git (only if the directory is a repo):** commit `.codelineage/` or add it to
+ `.gitignore`? Default: ignore (see Privacy).
+2. **Transcript retention:** Claude Code deletes sessions after 30 days by default
+ (`cleanupPeriodDays`). Offer to raise it. Never change it silently. The README
+ explains this too.
+3. **Language** for summaries: `auto` (the conversation's language) or a fixed language.
+
+Settings in `config.json`: `language`, `updateEveryTurns`, `gitPolicy`, `agents`.
+
+## Privacy
+
+- The skill tells the agent never to record secrets, credentials, tokens or personal
+ data. It records decisions and rationale, not raw content.
+- `build` runs a redaction pass (common key and token patterns) before writing HTML.
+- Default `gitPolicy` is `ignore`, because sharing has to be a deliberate choice.
+
+## Edge cases
+
+- **Transcript deleted:** the node still renders, and the resume button shows
+ "session no longer available".
+- **Invalid or partial session file:** `build` skips it with a warning and never fails
+ the whole map.
+- **Schema version mismatch:** older files are migrated when read, and newer ones
+ trigger a warning.
+- **Project directory moved or deleted:** the panel marks it as missing.
+ `codelineage config` can prune it.
+
+## Tech stack
+
+- **CLI and hooks:** Node + TypeScript, published to npm (`codelineage`).
+- **HTML:** React + TypeScript, built with Vite and `vite-plugin-singlefile` into one
+ template. The CLI embeds the JSON data into that template.
+- **Graph:** React Flow (`@xyflow/react`) for rendering, with its built-in MiniMap;
+ `elkjs` computes the layout and handles nested groups (epoch → session → nodes).
+- **Side view:** outline/tree next to the graph. Experimental, may be removed.
+- **License:** MIT.
+
+## MVP scope
+
+1. Schema, plus `init`, `build`, `open`, `epoch add`, `config`
+2. HTML template: status card, graph with drill-down, outline, resume button
+3. Panel
+4. Claude Code plugin: skill, Stop and PreCompact hooks
+5. `backfill`
+
+## Later
+
+- Codex adapter (its hooks and session retention still need research)
+- Optional local server for live refresh and editing settings from the panel
+- A Herdr usage section in the README
+- Video or other "explainer" outputs