Commit de9a5b9
authored
Add B2C Commerce agent skills and docs commands (#34)
* Add B2C Commerce agent skills with XSD-validated XML examples
Add 9 agent skills for B2C Commerce development guidance:
**Developer Skills (plugins/b2c/skills/):**
- b2c-custom-job-steps: Task and chunk-oriented job step creation
- b2c-controllers: SFRA and classic controller patterns
- b2c-isml: ISML template tags and expressions
- b2c-forms: Form XML definitions and SFRA handling
- b2c-localization: Resource bundles and locale support
- b2c-business-manager-extensions: BM menu items and extensions
- b2c-page-designer: Page and component development
- b2c-metadata: System object extensions and custom objects
**CLI Skills (plugins/b2c-cli/skills/):**
- b2c-site-import-export: Site archive import/export with CLI
**Validation against official sources:**
- Validated against official B2C Commerce documentation
- XML examples validated against XSD schemas from dwre-tools
- Key fixes applied:
- steptypes.json location (cartridge root, not inside cartridge/)
- preferences.xml structure (custom-preferences/preference)
- Value definitions use <display> not <display-value>
- Custom object data uses <object-attribute> not <custom-attribute>
- ISML tag location constraints documented
- Parameter validation attributes for job steps
* Add b2c-webservices skill for web service integrations
Comprehensive skill covering:
- Service Framework overview and components
- LocalServiceRegistry.createService() pattern
- Service callbacks (createRequest, parseResponse, execute, etc.)
- Result object handling and error states
- Log filtering for sensitive data
Reference documentation includes:
- HTTP-SERVICES.md: REST API patterns, authentication (Basic, OAuth, API keys),
multipart uploads, file downloads, response caching, mTLS
- FTP-SERVICES.md: SFTP operations (list, get, put, delete), multi-operation
patterns, file processing workflows
- SOAP-SERVICES.md: WSDL stubs, WS-Security, WSUtil, custom headers,
complex types, MTOM attachments
- SERVICES-XML.md: XML import/export format for service configurations,
credentials, profiles, and services
* Add b2c-logging skill for script logging
Comprehensive skill covering:
- Logger class (static methods for quick logging)
- Log class (instance methods with categories)
- Log levels: debug, info, warn, error, fatal
- Custom named log files with file prefix
- LogNDC for nested diagnostic context
- Message formatting with Java MessageFormat syntax
- Best practices for logging
Reference documentation includes:
- LOG-FILES.md: Log file types (custom and system), WebDAV locations,
retention periods, storage limits, quota logs, security logs,
import/export logs, and log entry formats
* Update b2c-webdav skill with comprehensive log file reference
Added detailed log file documentation:
- Log file naming patterns (<type>-<hostname>-appserver-<date>.log)
- Custom log file types (customdebug, custominfo, customwarn, customerror, customfatal)
- Custom named log files (custom-<prefix>-<hostname>-appserver-<date>.log)
- System log file types (error, warn, jobs, quota, deprecation, etc.)
- Log retention and archive locations (log_archive/ for compressed logs)
- Security logs and import/export logs
- Common log query examples using grep
* Add skill-authoring skill for creating user-facing skills
Meta-skill documenting how to create and maintain agent skills:
- Skill structure (SKILL.md + optional directories)
- Frontmatter metadata requirements
- Progressive disclosure principles (metadata → instructions → references)
- Token budgets and context efficiency
- Optional directories (scripts/, references/, assets/)
- File reference patterns
- Skill categories (developer vs user-facing)
- Writing effective skills checklist
Reference documentation includes:
- PATTERNS.md: Patterns learned from B2C skills including content
organization, effective tables, code examples, XML validation,
progressive complexity, common skill templates, and anti-patterns
Canonical reference: https://agentskills.io/home
* Update agent-skills documentation to be more maintainable
- Describe plugins generally instead of listing every individual skill
- Remove skill tables that would need constant updates as skills are added
- Link to GitHub directories for browsing available skills
- Add Cursor docs link for skills configuration
- Add VS Code Agent Skills documentation link
- Update usage examples to include logging and web services
* Add b2c-custom-caches skill for custom cache usage
Covers:
- When to use custom caches (expensive calculations, external responses, config)
- Defining caches in caches.json with package.json reference
- CacheMgr and Cache Script API classes
- get(key, loader) pattern for automatic population
- Scoped cache keys for site/catalog/locale separation
- Limitations (20MB memory, 128KB entry size, no cross-server sync)
- Common patterns for external APIs, calculations, and configuration
- Troubleshooting guide
Content validated against official documentation and Script API reference.
* Add b2c-hooks skill for hook registration and customization
Covers:
- Hook registration via package.json and hooks.json
- HookMgr API for calling and checking hooks
- Status object for controlling hook flow
- OCAPI/SCAPI hooks (before/after/modifyResponse patterns)
- System hooks (calculate, payment, order)
- Custom extension points
- Passing data between hooks via request.custom
- Remote includes in modifyResponse hooks
- Custom properties (c_ prefix) in API responses
- Error handling and circuit breaker
- SCAPI vs OCAPI detection with request.isSCAPI()
Reference files:
- OCAPI-SCAPI-HOOKS.md: API hook patterns by resource
- SYSTEM-HOOKS.md: Calculate, payment, order hooks
Content validated against official documentation and Script API reference.
* Add docs command topic for Script API documentation and XSD schemas
New CLI commands:
- `b2c docs search <query>` - Fuzzy search bundled Script API documentation
- `b2c docs read <query>` - Read documentation with terminal markdown rendering
- `b2c docs schema <query>` - Read XSD schema files with fuzzy matching
- `b2c docs download <output>` - Download docs from B2C instance
SDK changes:
- Add operations/docs module with search, read, and download functions
- Bundle 519 Script API markdown files and 54 XSD schemas in data/
- Use createRequire for robust path resolution to bundled data
- Export docs operations from main SDK entry point
Also adds b2c-docs skill for agent usage examples.
* Fix eslint import/namespace error for marked-terminal
Use createRequire to load the marked-terminal CJS module, avoiding
eslint-plugin-import parser issues that caused inconsistent behavior
between local and CI environments.
* Fix eslint CI error for marked-terminal import
- Use standard ESM named import for marked-terminal
- Disable import/namespace rule for that line (parser issue with CJS)
- Set reportUnusedDisableDirectives to warn to handle environment
differences where import/namespace may or may not fire
* skill clarity after manual testing for e2e scenario
* clarity1 parent 8a1a9ef commit de9a5b9
643 files changed
Lines changed: 164239 additions & 81 deletions
File tree
- .claude/skills/skill-authoring
- references
- docs/guide
- packages
- b2c-cli
- src
- commands/docs
- i18n/locales
- types
- b2c-tooling-sdk
- data
- script-api
- xsd
- scripts
- src
- operations/docs
- plugins
- b2c-cli/skills
- b2c-code
- b2c-docs
- b2c-job
- b2c-mrt
- b2c-ods
- b2c-scapi-custom
- b2c-site-import-export
- references
- b2c-sites
- b2c-slas
- b2c-webdav
- b2c/skills
- b2c-business-manager-extensions
- references
- b2c-controllers
- references
- b2c-custom-caches
- b2c-custom-job-steps
- references
- b2c-forms
- references
- b2c-hooks
- references
- b2c-isml
- references
- b2c-localization
- references
- b2c-logging
- references
- b2c-metadata
- references
- b2c-page-designer
- references
- b2c-webservices
- references
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
0 commit comments