Create a new collector bot package with automatic implementation and validation. Use when user wants to create a new collector from scratch.
Create a new collector bot package with automatic implementation and validation.
/create-collector <vendor> <suite?> <product>
Arguments:
vendor (required) - Vendor name (e.g., amazon, microsoft, google)suite (optional) - Suite name if vendor has suites (e.g., aws, 365)product (required) - Product name (e.g., iam, s3, entra)Examples:
/create-collector amazon aws s3
/create-collector microsoft entra
/create-collector google workspace sheets
/create-collector adp workforcenowng
End-to-end collector creation with automatic validation:
Step 1.1: Parse vendor/suite/product
const args = args.trim().split(/\s+/);
// Examples:
// "amazon aws s3" ā vendor=amazon, suite=aws, product=s3
// "microsoft entra" ā vendor=microsoft, suite=null, product=entra
// "adp workforcenowng" ā vendor=adp, suite=null, product=workforcenowng
Step 1.2: Verify dependencies exist
# Check module exists (prefer zerobias-org, fallback auditlogic)
npm view @zerobias-org/module-<vendor>-<suite?>-<product>
npm view @auditlogic/module-<vendor>-<suite?>-<product>
# Or check bundles
npm view @zerobias-org/module-bundle --json | jq '.dependencies'
npm view @auditlogic/module-bundle --json | jq '.dependencies'
# Check schema exists (always auditlogic)
npm view @auditlogic/schema-<vendor>-<suite?>-<product>
# Or check bundle
npm view @auditlogic/schema-bundle --json | jq '.dependencies'
# Check product exists (always zerobias-org)
npm view @zerobias-org/product-<vendor>-<suite?>-<product>
# Or check bundle
npm view @zerobias-org/product-bundle --json | jq '.dependencies'
If missing: STOP and inform user that module/schema/product must be created first.
Step 2.1: Create directory
mkdir -p package/<vendor>/<suite?>/<product>
cd package/<vendor>/<suite?>/<product>
Step 2.2: Create symlinks
# Based on depth (3 or 4 levels)
ln -s ../../../../.npmrc .npmrc # or ../../../
ln -s ../../../../.nvmrc .nvmrc # or ../../../
Step 2.3: Copy templates
# Copy from reference collector (adp/workforcenowng for simple)
cp ../../../adp/workforcenowng/.eslintrc .
cp ../../../adp/workforcenowng/.mocharc.json .
cp ../../../adp/workforcenowng/tsconfig.json .
Step 2.4: Create .gitignore
node_modules/
dist/
generated/
Step 3.1: Create package.json (use template from DEVELOPMENT_WORKFLOW.md)
Step 3.2: Get UUIDs and create hub.yml
npm install # Temporary to get module installed
cat node_modules/@auditlogic/module-*/package.json | grep module-id
cat node_modules/@auditlogic/product-*/index.yml | grep "^id:"
Create hub.yml with UUIDs (operations section omitted).
Step 3.3: Ask user about parameters "What parameters should this collector accept (if any)?"
Step 3.4: Explore schema and create collector.yml
cat node_modules/@auditlogic/schema-*/dist/index.d.ts
cat node_modules/@auditlogic/module-*/module-*.yml
Match operations to classes and include ALL classes with module data.
Step 3.5: Generate code
npm install
npm run generate
Verify generated/BaseClient.ts and get module connector name.
CRITICAL: Spawn BOTH agents in a SINGLE message with 2 Task calls.
Agent 1: Implementation Agent
.claude/agents/create-implementation.mdAgent 2: Mapping Agent
.claude/agents/create-mappings.mdWait for both to complete.
Step 5.1: Create README.md
Step 5.2: Create USERGUIDE.md (if has parameters)
Step 5.3: Create test/integration/Collector*IT.ts
npm run build
npm run lint
If errors: attempt to fix common issues, otherwise report to user.
CRITICAL: Automatically run the validation system.
/review-collector .
This spawns all 8 validation agents.
If compliance < 90%:
If compliance >= 90%:
Step 8.1: Run npm shrinkwrap
npm shrinkwrap
Step 8.2: Report to user
Display summary:
ā
Collector created: @zerobias-org/collectorbot-<vendor>-<suite?>-<product>
š¦ Package: package/<vendor>/<suite?>/<product>
š Validation Results:
ā
Configuration: PASS
ā
Schema: PASS
ā
Mapping: PASS
ā
Pagination: PASS
ā
GroupId: PASS
ā
Security: PASS
ā
Performance: PASS
ā
Dependencies: PASS
š Compliance: 100%
š Collector is ready for commit!
š Next steps:
1. Review the implementation in src/
2. Test with: npm run test:integration
3. Commit with: git commit -m "feat(s3): initial S3 collector"
If issues found:
ā ļø Collector created with issues (Compliance: 75%)
Issues found:
ā Mapping: 2 errors
ā ļø Performance: 1 warning
Run /review-collector to see details.
Would you like me to fix these issues automatically?