Commit Graph

7 Commits

Author SHA1 Message Date
orimazar f6e2ce2134 AICE-244 | Add AI-Center commands + skill (AI v3) (#160)
Re-opens the work from #159 (that PR was closed and its branch
force-pushed to purge accidentally-committed `graphify-out/` local
files, which blocks GitHub from reopening it — so this is a fresh PR
with identical, cleaned content).

## What
`cx ai-center` — AI Center (GenAI) configuration commands over the AI v3
REST API (`/mgmt/openapi/5/ai/...`): `applications`, `evaluations`,
`custom-evaluations`, `coverage`, `model-pricing` — mirroring the
`ws-ai-mcp` AI Center tool surface — plus the `cx-ai-center` skill
(config commands + the GenAI-span DataPrime query library).

## History
- All review feedback from #159 (bot + Yoav) is already applied; see
#159 for the full discussion/resolved threads.
- Validated end-to-end against real eu2 AI Center data; unit + wiremock
+ `#[ignore]`d e2e tests; `verify-skills` green.
- Branch history was re-baselined on master to fully purge the
`graphify-out/` files (now gitignored).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Pj6ieK81Qdk1YfcJwqNraV

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 11:54:26 +03:00
Niv Hertz ec41a51600 AGE-1086 | Create base coding agents skill for cli (#145) 2026-06-18 11:12:23 +00:00
Liran Hason f35a583c30 feat: add cx dashboards replace command (#90) 2026-05-18 09:24:31 +03:00
Vjosa 7591d6d370 ci: agent skills ref CI validation (#85)
This PR adds upstream Agent Skills spec validation to the skills CI
workflow using `skills-ref` / `agentskills validate`.
The spec validator now checks each `skills/**/SKILL.md` for:
- valid `SKILL.md` YAML frontmatter
- closed YAML frontmatter
- frontmatter parses as a YAML mapping
- required `name` and `description` fields
- allowed top-level frontmatter fields only:
  - `name`
  - `description`
  - `license`
  - `allowed-tools`
  - `metadata`
  - `compatibility`
- `name` is a non-empty string
- `name` is max 64 characters
- `name` is lowercase
- `name` contains only alphanumeric characters and hyphens
- `name` does not start or end with a hyphen
- `name` does not contain consecutive hyphens
- `name` matches the parent skill directory
- `description` is a non-empty string
- `description` is max 1024 characters
- optional `compatibility` is a string
- optional `compatibility` is max 500 characters
The existing `scripts/verify-skills.sh` remains responsible for
cx-cli-specific checks such as trigger coverage, command references,
related skill links, max 400-line `SKILL.md` size, and shared-reference
sync.

## Notes
To comply with the upstream Agent Skills spec, skill versions were moved
from top-level `version:` into `metadata.version`.
## Validation
- Ran `agentskills validate` for all `skills/**/SKILL.md`
- Ran `bash scripts/verify-skills.sh`
2026-05-07 12:40:37 +03:00
Niv Hertz defdc4dae3 fix: restrict skill description length to 1024 chars for Codex (#80)
## Summary
- **Trim `cx-telemetry-querying` description** from 1,340 to 835
characters by removing redundant trigger phrases that are already
covered by more general ones (e.g., "examine spans" covers "analyze span
durations", "check error spans", etc.)
- **Add description length validation** (≤1024 chars) to
`scripts/verify-skills.sh` for Codex compatibility
- **Fix command validation regex** to only match backtick-quoted `` `cx
<cmd>` `` references, eliminating false positives from prose words like
"cx fails" and "cx automatically"

## Test plan
- [x] `bash scripts/verify-skills.sh` passes all 9 skills
- [ ] CI skills workflow passes on this PR

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-05 23:33:25 +03:00
Niv Hertz bcb3c35644 feat(skills): consolidate telemetry skills + shared references system (#59)
## Summary

- **Collapse 5 single-pillar skills** (`cx-query-logs`,
`cx-query-spans`, `cx-rum`, `cx-dataprime`, `cx-metrics-query`) into a
single `cx-telemetry-querying` gateway skill that covers all telemetry
pillars and loads pillar-specific reference files on demand
- **Introduce `skills/shared/`** as the single source of truth for
language guides and telemetry-pillar how-tos (DataPrime syntax, PromQL
guidelines, logs/spans/metrics/RUM querying)
- **Add `scripts/sync-shared-references.sh`** to distribute shared files
into each consuming skill's `references/` directory as regular file
copies (not symlinks, so `npx skills add coralogix/cx-cli` works
correctly on clients)
- **Update `cx-alerts` and `cx-create-dashboard`** to reference shared
files via local `references/` copies instead of cross-skill name
references
- **Extend `scripts/verify-skills.sh`** with a sync check (check #6)
that fails if any `references/` copy is out of sync with
`skills/shared/`
- **Add `.github/workflows/skills.yml`** CI workflow to validate skill
correctness and reference sync on every PR touching `skills/`
- **Update all developer docs** (`docs/adding-a-skill.md`,
`.claude/skills/add-skill/SKILL.md`, `skills/README.md`, `CLAUDE.md`) to
document the new 8-skill structure and shared references architecture

## Why

Skills were previously cross-referencing each other by skill name (e.g.,
"load `cx-dataprime` skill for syntax help"), which is fragile — if a
skill is renamed or removed, the reference silently breaks. The new
approach uses file-based references: each skill ships its own
`references/` directory with the content it needs, copied from the
canonical `skills/shared/` source by a sync script. CI validates the
copies stay in sync.

## Test plan

- [ ] `bash scripts/verify-skills.sh` — all 8 skills pass, 0 errors
- [ ] `bash scripts/sync-shared-references.sh` — exits 0, no errors
- [ ] No `SKILL.md` references any of the 5 deleted skill names
- [ ] `cx-telemetry-querying` triggers on all former skill trigger
phrases (logs, spans, metrics, RUM, DataPrime)
- [ ] CI workflow (`.github/workflows/skills.yml`) runs and passes on
this PR

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 09:16:45 +00:00
Liran Hason 13915ea843 Add all cx APIs to CLI with skills and docs (#51)
AIAG-696

## Summary

### Full API coverage
- Implement remaining cx CLI commands covering all Coralogix APIs
(dashboards, views, SLOs, incidents, notifications, webhooks,
enrichments, parsing-rules, TCO, quotas, usage, archive, integrations,
IAM, recording-rules, E2M, search-fields) - 27 command groups total
- Add user-facing skills for all command groups (cx-observability-setup,
cx-cost-optimization, cx-incident-management, cx-data-pipeline,
cx-platform-admin, cx-create-dashboard)
- Rename all skills to cx- prefix for consistency, update
cross-references and docs
- Add integration tests (wiremock) and E2E test scaffolding for all new
commands
- Update CLAUDE.md, README, CODEOWNERS, architecture docs, and
contributor guides
- Bug fixes: data_usage timestamp parsing, users error propagation,
team_groups unused params, dashboard skill API wire values, stale skill
paths

### CLI safety features
- Add `--read-only` global flag that blocks all write operations before
credential resolution - safe for exploration and agent use
- Add agent mode detection (`CX_AGENT_MODE`, `CLAUDECODE`, `CLAUDE_CODE`
env vars) - blocks write operations unless `--yes` is passed
- Wire `confirm_destructive()` to all write subcommands across all 27
command groups (104 call sites) - interactive confirmation for
create/update/delete/enable/disable operations
- Mark `iam` and `archive` as `(risky)` in help output
- Add `[requires --yes]` tags to all write subcommand help text (102
annotations)
- Update skills with read-only and agent mode guidance

### Testing
- 441 tests passing (88 ignored E2E)
- Add `tests/write_command_gating/` - systematic verification that every
write command is gated
- Add `tests/read_only/` - read-only mode enforcement tests
- Add `tests/agent_mode/` - agent mode detection and blocking tests
- Add integration tests (wiremock) for all new command groups
- Add E2E test scaffolding for all commands

## Test plan
- [x] `cargo fmt --check` passes
- [x] `cargo clippy` passes with no warnings
- [x] `cargo test` passes (441 unit + integration tests)
- [ ] `cargo test --test e2e -- --ignored --test-threads=1` passes
against test team (requires CX_API_KEY)
- [ ] `cx schema` outputs updated command tree with all new commands
- [ ] Skills trigger correctly in Claude Code sessions

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-03 13:34:50 +03:00