mirror of
https://github.com/adobe/skills.git
synced 2026-09-19 08:06:09 +08:00
0800b5bda6
aem-agentkit bootstraps an AEM as a Cloud Service repository for agentic workflows across Claude Code, Cursor, GitHub Copilot, Codex, Continue.dev, Cline, Windsurf, Augment Code, and every AGENTS.md-spec-compliant agent — without modifying any customer source code. It complements (does not replace) ensure-agents-md, which owns the root AGENTS.md + CLAUDE.md. The skill ships: Universal layer (always written when missing): - Per-module AGENTS.md, recursive for nested AEM monorepos so multi-brand customers get focused context at each archetype leaf. - .aem/context/ codified context: components.json, osgi-services.json, conventions.md, avoid.md, glossary.md, test-patterns.md, aem-api-namespaces.md, README.md, a run manifest (.agentkit-manifest.json), and a workspace advisory lock (.agentkit.lock). Scoped per nested sub-project for monorepos. Tool-specific layer (opt-in via interactive selection; CI runs honor an .aem/agentkit-overrides.yml ide-targets entry): - Claude Code: .claude/agents/aem-*.md + .claude/commands/<owned>.md + .mcp.json placeholder. - Cursor: .cursor/rules/aem-*.mdc + .cursor/mcp.json placeholder. - GitHub Copilot: .github/instructions/aem-*.instructions.md. - Continue.dev: .continue/rules/aem-*.md. - Cline / Windsurf / Augment: single concatenated rule file with .aem-roles-extra.md sidecar for deferred roles. Deterministic helper (bin/aem-agentkit-helper): - ~500 lines of Python 3.10+, no third-party deps; POSIX only (Linux + macOS). JSON-line protocol on stdin/stdout. The skill refuses to run when the helper is absent or version-mismatched. - Closes the byte-exact contracts the LLM cannot uphold: O_NOFOLLOW open with TOCTOU re-check (F_GETPATH on macOS, /proc/self/fd readlink on Linux); SHA-256 over canonical body bytes (Markdown skips marker line; JSON re-emits with sorted keys after stripping the six marker fields); atomic .tmp + rename(2) with parent-dir fsync; Unicode NFC + strip-list drop + length cap; bounded workspace walk with maxFiles / maxDepth / maxFilesPerSubtree and segment-by-segment deny-list pruning at every layer; advisory file lock with stale-lock recovery via PID-liveness; ASCII-lowercase casefold pinned to avoid Turkish-I / German-ß cross-platform divergence. Test suite (tests/test_helper.py): - 27 unit tests covering golden SHA-256 across canonical-body shapes, every strip-list code-point category, workspace-escape rejection, case-insensitive deny matching, node_modules/.git/.env pruning, atomic write with no orphan .tmp, absolute-path and dotdot rejection, stale-lock PID recovery. - npm run test:aem-agentkit-helper hooks the suite into CI. Hard guarantees: - Customer source files are never modified. Allow-list of writes documented in SKILL.md § "Hard guarantee". - Marker-based idempotency: a file lacking the skill marker is treated as human-curated and never overwritten. Marker authentication via SHA-256 over the canonical body; marker spoofing is detected and rejected. - Re-runs are byte-identical (deterministic discovery + four-level tiebreaker; generatedAt excluded from the marker checksum). - Privacy deny-list covers AEM SDK state, IDE secret stores, cloud SDK credentials, package-registry build secrets, Adobe IO configs, SSH keys, PGP, JetBrains/VS Code secrets, vim/emacs swap and backup files. Applied per path segment so a directory name match prunes the entire subtree. - Symlink hardening: workspace root realpath cached at startup; /proc, /sys, /dev, Windows UNC/device paths rejected even when the workspace lives under them; visited-set loop guard. - Six classes of opt-out / override: _disable_agentkit at workspace root, _disable_agentkit at any nested AEM sub-project root, --silent flag, AEM_AGENTKIT_SILENT env var, .aem/agentkit-overrides.yml ide-targets entry, per-decision heuristic overrides. Interactive IDE selection (replaces the original silent multi-projection): - Tightened detection signals (empty .claude/ no longer fires; .github/*.yml is no longer a Copilot signal; .cursor/rules content required for Cursor; .continue/rules content required for Continue). - Prompts the customer: all / single / multi-select / none. - Answer persists to .aem/agentkit-overrides.yml under decision: ide-targets so subsequent runs and CI invocations honor it without prompting. - Headless mode preserved through --silent / env var / pre-existing override entry. Updates after the customer changes code: - /new-component and /new-sling-model slash commands scaffold the artifact and call /regen-context to refresh the index. - /regen-context re-runs only the .aem/context/* generation steps; per-module AGENTS.md and per-tool projections are not touched. - /agents-md-check is a read-only drift report driven by the run manifest; CI gates can call it and block merge on non-zero exit. - Pre-commit hook and CI integration recipes documented in the PR description and README. Sub-project resolution in role bodies: - Role bodies walk up from the file under edit to the closest enclosing pom.xml that matches the nested-AEM-project detection rule, then resolve <project> and the path prefix from that root. - In multi-brand monorepos the agent writes into the correct sub-project tree (brand-a/ui.apps/...) rather than guessing from a hard-coded path. Schema versioning: - _skillVersion + schemaVersion on every JSON marker. - Static-reference files (.aem/context/aem-api-namespaces.md, .aem/context/README.md) carry _static: true and are overwritten in place on a version bump rather than producing .agentkit-new sidecars for every customer. - Worked v1 -> v2 migration example in upgrade-and-migration.md; the migration code path is exercised by golden-output fixtures in the test suite. Helper version pin: - Skill metadata.version (1.0.0-beta) must match helper --version before the helper is used for any byte-exact op. Mismatch aborts the run with a single diagnostic. References (12 reference files): - per-module-agents-md.md, codified-context.md, per-tool-artifacts.md, mcp-wiring.md, guardrails.md, module-catalog.md, collision-rules.md, upgrade-and-migration.md, privacy-and-sanitization.md, output-format.md, helpers.md, manifest.md. Beta markers per plugins/aem/cloud-service/CLAUDE.md convention: frontmatter status: beta, [BETA] description prefix, body blockquote with the standard caveat. Closes the multi-agent PR review findings (Critical 1-13 + Important 14-25) and the tessl-review conciseness threshold. 27/27 helper unit tests pass; npx skills-ref validate clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
27 lines
869 B
JSON
27 lines
869 B
JSON
{
|
|
"name": "@anthropic-ai/skills",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Adobe skills for AI coding agents",
|
|
"scripts": {
|
|
"validate": "find plugins -name SKILL.md -exec dirname {} \\; | xargs -I {} skills-ref validate {}",
|
|
"test:aem-agentkit-helper": "bash plugins/aem/cloud-service/skills/aem-agentkit/tests/run-tests.sh"
|
|
},
|
|
"devDependencies": {
|
|
"@semantic-release/changelog": "^6.0.3",
|
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
"@semantic-release/exec": "^7.0.3",
|
|
"@semantic-release/git": "^10.0.1",
|
|
"@semantic-release/github": "^12.0.0",
|
|
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
"semantic-release": "^25.0.0",
|
|
"skills-ref": "^0.1.5"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/adobe/skills.git"
|
|
},
|
|
"license": "Apache-2.0"
|
|
}
|