Commit Graph

832 Commits

Author SHA1 Message Date
Affaan Mustafa
cc9b11d163 Merge pull request #392 from hahmee/docs/add-korean-translation
Docs/add korean translation
2026-03-13 00:23:44 -07:00
Affaan Mustafa
bfc802204e Merge pull request #403 from swarnika-cmd/main
fix: background observer fails closed on confirmation/permission prompts (#400)
2026-03-13 00:17:56 -07:00
Affaan Mustafa
fb7b73a962 docs: address Korean translation review feedback 2026-03-13 00:17:54 -07:00
Affaan Mustafa
4de5da2f8f Merge pull request #309 from cookiee339/feat/kotlin-ecosystem
feat(kotlin): add Kotlin/Ktor/Exposed ecosystem
2026-03-13 00:01:06 -07:00
Affaan Mustafa
1c1a9ef73e Merge branch 'main' into main 2026-03-13 00:00:34 -07:00
Affaan Mustafa
e043a2824a fix: harden observer prompt guard handling 2026-03-12 23:59:01 -07:00
Affaan Mustafa
3010f75297 Merge pull request #409 from pangerlkr/main
fix: refresh markdown docs and Windows hook test handling
2026-03-12 23:55:59 -07:00
Affaan Mustafa
99d443b16e fix: align kotlin diagnostics and heading hierarchy 2026-03-12 23:53:23 -07:00
avesh-h
bc21e7adba feat: add /aside command (#407)
* Introduces /aside — a mid-task side conversation command inspired by
  Claude Code's native /btw feature. Allows users to ask a question while
  Claude is actively working without losing task context or touching any files.

  Key behaviors:
  - Freezes current task state before answering (read-only during aside)
  - Delivers answers in a consistent ASIDE / Back to task format
  - Auto-resumes the active task after answering
  - Handles edge cases: no question given, answer reveals a blocker,
    question implies a task redirect, chained asides, ambiguous questions,
    and answers that suggest code changes without making them

* Two documentation inconsistencies fixed:

* Fixed 4 pre-existing lint errors in skills/videodb/ that were causing  CI to fail across all PR checks:  - api-reference.md: add blockquote continuation line to fix MD028  - capture-reference.md: wrap bare URL to fix MD034  - SKILL.md: wrap bare URL to fix MD034
2026-03-12 23:52:46 -07:00
Affaan Mustafa
240d553443 Merge branch 'main' into main 2026-03-12 23:52:10 -07:00
Affaan Mustafa
e692a2886c fix: address kotlin doc review feedback 2026-03-12 23:47:17 -07:00
ispaydeu
a6f380fde0 feat: active hours + idle detection gates for session-guardian (#413)
* feat: add project cooldown log to prevent rapid observer re-spawn

Adds session-guardian.sh, called by observer-loop.sh before each Haiku
spawn. It reads ~/.claude/observer-last-run.log and blocks the cycle if
the same project was observed within OBSERVER_INTERVAL_SECONDS (default
300s).

Prevents self-referential loops where a spawned session triggers
observe.sh, which signals the observer before the cooldown has elapsed.

Uses a mkdir-based lock for safe concurrent access across multiple
simultaneously-observed projects. Log entries use tab-delimited format
to handle paths containing spaces. Fails open on lock contention.

Config:
  OBSERVER_INTERVAL_SECONDS   default: 300
  OBSERVER_LAST_RUN_LOG       default: ~/.claude/observer-last-run.log

No external dependencies. Works on macOS, Linux, Windows (Git Bash/MSYS2).

* feat: extend session-guardian with time window and idle detection gates

Adds Gate 1 (active hours check) and Gate 3 (system idle detection) to
session-guardian.sh, building on the per-project cooldown log from PR 1.

Gate 1 — Time Window:
- OBSERVER_ACTIVE_HOURS_START/END (default 800–2300 local time)
- Uses date +%k%M with 10# prefix to avoid octal crash at midnight
- Toolless on all platforms; set both vars to 0 to disable

Gate 3 — Idle Detection:
- macOS: ioreg + awk (built-in, no deps)
- Linux: xprintidle if available, else fail open
- Windows (Git Bash/MSYS2): PowerShell GetLastInputInfo via Add-Type
- Unknown/headless: always returns 0 (fail open)
- OBSERVER_MAX_IDLE_SECONDS=0 disables gate

Fixes in this commit:
- 10# base-10 prefix prevents octal arithmetic crash on midnight minutes
  containing digits 8 or 9 (e.g. 00:08 = "008" is invalid octal)
- PowerShell output piped through tr -d '\r' to strip Windows CRLF;
  also uses [long] cast to avoid TickCount 32-bit overflow after 24 days
- mktemp now uses log file directory instead of TMPDIR to ensure
  same-filesystem mv on Linux (atomic rename instead of copy+unlink)
- mkdir -p failure exits 0 (fail open) rather than crashing under set -e
- Numeric validation on last_spawn prevents arithmetic error on corrupt log

Gate execution order: 1 (time, ~0ms) → 2 (cooldown, ~1ms) → 3 (idle, ~50ms)

* fix: harden session guardian gates

---------

Co-authored-by: Affaan Mustafa <affaan@dcube.ai>
2026-03-12 23:44:34 -07:00
ispaydeu
c52a28ace9 fix(observe): 5-layer automated session guard to prevent self-loop observations (#399)
* fix(observe): add 5-layer automated session guard to prevent self-loop observations

observe.sh currently fires for ALL hook events including automated/programmatic
sessions: the ECC observer's own Haiku analysis runs, claude-mem observer
sessions, CI pipelines, and any other tool that spawns `claude --print`.

This causes an infinite feedback loop where automated sessions generate
observations that trigger more automated analysis, burning Haiku tokens with
no human activity.

Add a 5-layer guard block after the `disabled` check:

Layer 1: agent_id payload field — only present in subagent hooks; skip any
         subagent-scoped session (always automated by definition).

Layer 2: CLAUDE_CODE_ENTRYPOINT env var — Claude Code sets this to sdk-ts,
         sdk-py, sdk-cli, mcp, or remote for programmatic/SDK invocations.
         Skip if any non-cli entrypoint is detected. This is universal: catches
         any tool using the Anthropic SDK without requiring tool cooperation.

Layer 3: ECC_HOOK_PROFILE=minimal — existing ECC mechanism; respect it here
         to suppress non-essential hooks in observer contexts.

Layer 4: ECC_SKIP_OBSERVE=1 — cooperative env var any external tool can set
         before spawning automated sessions (explicit opt-out contract).

Layer 5: CWD path exclusions — skip sessions whose working directory matches
         known observer-session path patterns. Configurable via
         ECC_OBSERVE_SKIP_PATHS (comma-separated substrings, default:
         "observer-sessions,.claude-mem").

Also fix observer-loop.sh to set ECC_SKIP_OBSERVE=1 and ECC_HOOK_PROFILE=minimal
before spawning the Haiku analysis subprocess, making the observer loop
self-aware and closing the ECC→ECC self-observation loop without needing
external coordination.

Fixes: observe.sh fires unconditionally on automated sessions (#398)

* fix(observe): address review feedback — reorder guards cheapest-first, fix empty pattern bug

Two issues flagged by Copilot and CodeRabbit in PR #399:

1. Layer ordering: the agent_id check spawns a Python subprocess but ran
   before the cheap env-var checks (CLAUDE_CODE_ENTRYPOINT, ECC_HOOK_PROFILE,
   ECC_SKIP_OBSERVE). Reorder to put all env-var checks first (Layers 1-3),
   then the subprocess-requiring agent_id check (Layer 4). Automated sessions
   that set env vars — the common case — now exit without spawning Python.

2. Empty pattern bug in Layer 5: if ECC_OBSERVE_SKIP_PATHS contains a trailing
   comma or spaces after commas (e.g. "path1, path2" or "path1,"), _pattern
   becomes empty or whitespace-only, and the glob *""* matches every CWD,
   silently disabling all observations. Fix: trim leading/trailing whitespace
   from each pattern and skip empty patterns with `continue`.

* fix: fail closed for non-cli entrypoints

---------

Co-authored-by: Affaan Mustafa <affaan@dcube.ai>
2026-03-12 23:40:03 -07:00
Jinyi_Yang
83f6d5679c feat(skills): add prompt-optimizer skill and /prompt-optimize command (#418)
* feat(skills): add prompt-optimizer skill and /prompt-optimize command

Adds a prompt-optimizer skill that analyzes draft prompts, matches them
to ECC components (skills/commands/agents), and outputs a ready-to-paste
optimized prompt. Advisory role only — never executes the task.

Features:
- 6-phase analysis pipeline (project detection, intent, scope, component
  matching, missing context, workflow + model recommendation)
- Auto-detects project tech stack from package.json, go.mod, etc.
- Maps intents to ECC commands, skills, and agents by type and tech stack
- Recommends correct model tier (Sonnet vs Opus) based on task complexity
- Outputs Full + Quick versions of the optimized prompt
- Hard gate: never executes the task, only produces advisory output
- AskUserQuestion trigger when 3+ critical context items are missing
- Multi-prompt splitting guidance for HIGH/EPIC scope tasks
- Feedback footer for iterative refinement

Also adds /prompt-optimize command as an explicit invocation entry point.

* fix: keep prompt optimizer advisory-only

* fix: refine prompt optimizer guidance

---------

Co-authored-by: Affaan Mustafa <affaan@dcube.ai>
2026-03-12 23:40:02 -07:00
Frank
c5acb5ac32 fix: accept shorter mixed-case session IDs (#408) 2026-03-12 23:29:50 -07:00
Affaan Mustafa
8ed2fb21b2 Merge pull request #417 from affaan-m/codex/orchestration-harness-skills
feat: add orchestration workflows and harness skills
2026-03-12 15:49:51 -07:00
Affaan Mustafa
d994e0503b test: fix cross-platform orchestration regressions 2026-03-12 15:46:50 -07:00
Affaan Mustafa
2d43541f0e fix: preserve orchestration launcher compatibility 2026-03-12 15:40:25 -07:00
Affaan Mustafa
c5b8a0783e fix: resolve lint regression in plan parsing 2026-03-12 15:35:12 -07:00
Affaan Mustafa
af318b8f04 fix: address remaining orchestration review comments 2026-03-12 15:34:05 -07:00
Affaan Mustafa
0d96876505 chore: resolve audit findings in lint tooling 2026-03-12 15:11:57 -07:00
Affaan Mustafa
52daf17cb5 fix: harden orchestration status and skill docs 2026-03-12 15:07:57 -07:00
Affaan Mustafa
ca33419c52 Merge pull request #419 from affaan-m/codex/fix-main-windows-root-identity
fix: compare hook roots by file identity
2026-03-12 14:55:34 -07:00
Affaan Mustafa
ddab6f1190 fix: compare hook roots by file identity 2026-03-12 14:55:29 -07:00
Affaan Mustafa
fe9f8772ad fix: compare hook roots by file identity 2026-03-12 14:52:08 -07:00
Affaan Mustafa
9359e46951 fix: resolve exa skill markdown lint 2026-03-12 14:49:05 -07:00
Affaan Mustafa
ad4ef58a8e fix: resolve orchestration lint errors 2026-03-12 14:49:05 -07:00
Affaan Mustafa
4d4ba25d11 feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
Affaan Mustafa
d3f4fd5061 fix: restore mainline CI on Windows and markdown lint (#415)
* fix: restore ci compatibility on windows

* fix: normalize hook path assertions on windows

* fix: relax repo root assertion on windows

* fix: keep hook root assertion strict on windows
2026-03-12 14:48:21 -07:00
Affaan Mustafa
424f3b3729 fix: resolve exa skill markdown lint 2026-03-12 10:20:42 -07:00
Affaan Mustafa
bdf4befb3e fix: resolve orchestration lint errors 2026-03-12 09:35:03 -07:00
Affaan Mustafa
2349e21731 feat: add orchestration workflows and harness skills 2026-03-12 09:26:36 -07:00
Affaan Mustafa
bfc73866c9 Revert "feat: add orchestration workflows and harness skills"
This reverts commit cb43402d7d.
2026-03-12 09:26:12 -07:00
Affaan Mustafa
cb43402d7d feat: add orchestration workflows and harness skills 2026-03-12 08:53:52 -07:00
Affaan Mustafa
51eec12764 fix: stop pinning o4-mini in codex config 2026-03-12 07:59:50 -07:00
Pangerkumzuk Longkumer
c1bff00d1f Merge pull request #16 from pangerlkr/copilot/fix-failing-checks
Fix Windows CI: skip bash-path-incompatible test on win32
2026-03-12 14:39:13 +05:30
copilot-swe-agent[bot]
27b537d568 fix: skip detect-project bash test on Windows (path backslash incompatibility)
Co-authored-by: pangerlkr <73515951+pangerlkr@users.noreply.github.com>
2026-03-12 09:08:08 +00:00
copilot-swe-agent[bot]
2c726244ca Initial plan 2026-03-12 08:45:44 +00:00
Pangerkumzuk Longkumer
2856b79591 Merge pull request #15 from pangerlkr/copilot/fix-link-not-working
Fix markdownlint errors introduced by merge of affaan-m:main
2026-03-12 14:15:20 +05:30
copilot-swe-agent[bot]
b0bc3dc0c9 Fix markdownlint errors from merge of affaan-m:main into main
Co-authored-by: pangerlkr <73515951+pangerlkr@users.noreply.github.com>
2026-03-12 08:21:41 +00:00
copilot-swe-agent[bot]
db89e7bcd0 Initial plan 2026-03-12 08:14:36 +00:00
Pangerkumzuk Longkumer
8627cd07e7 Merge branch 'affaan-m:main' into main 2026-03-12 11:40:41 +05:30
swarnika-cmd
96708e5d45 fix: add confirmation-prompt guard to start-observer.sh (issue #400)
- Redirect observer output to temp log before appending to main log
- Check temp log for confirmation/permission language immediately after start
- Fail closed with exit 2 if detected, preventing retry loops
2026-03-12 06:52:54 +05:30
swarnika-cmd
8079d354d1 fix: observer fails closed on confirmation/permission prompts (issue #400) 2026-03-12 06:46:42 +05:30
Affaan Mustafa
da4db99c94 fix: repair opencode config and project metadata 2026-03-11 01:52:10 -07:00
Affaan Mustafa
dba4c462c4 Merge pull request #301 from 0xrohitgarg/add-videodb-skills
Add VideoDB Skills to Individual Skills
2026-03-10 21:27:02 -07:00
Affaan Mustafa
135eb4c98d feat: add kotlin commands and skill pack 2026-03-10 21:25:52 -07:00
Affaan Mustafa
192d2b63f2 docs: align videodb event directory handling 2026-03-10 21:23:25 -07:00
Affaan Mustafa
70449a1cd7 docs: tighten videodb listener guidance 2026-03-10 21:22:35 -07:00
Affaan Mustafa
82f9f58d28 Merge pull request #290 from nocodemf/add-evos-operational-skills
feat(skills): Add 8 operational domain skills (logistics, manufacturing, retail, energy)
2026-03-10 21:19:01 -07:00