[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CTCGNRC8JJ5WM55H9X0SNF":3,"skill-same:01M6CTCGNRC8JJ5WM55H9X0SNF":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M6CTCGNRC8JJ5WM55H9X0SNF","background-jobs",null,"Designs background job processing: retries, idempotency (safe repeats) and queue management. Use when designing or reviewing async task infrastructure.","vibbs\u002Fcompany-os","vibbs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7379149?v=4","01M6CT6M03CAS1H7RA89F3965B","Vibbs Dod","01M6CT6M4MY60C9FFQ3AAR2RSK",6,"MIT","https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Fos\u002Fskills\u002Fbackground-jobs\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27],"jobs","background jobs","safe","infrastructure","management","use","queue","async","task","2026-11-10 10:12:30",false,"---\nname: background-jobs\ndescription: \"Designs background job processing: retries, idempotency (safe repeats) and queue management. Use when designing or reviewing async task infrastructure.\"\nruntimes:\n  claude:\n    user-invocable: false\n---\n\n# Background Jobs\n\n## Reference\n- **ID**: S-ENG-03\n- **Category**: Engineering\n- **Inputs**: job requirements, retry semantics, throughput targets, failure modes\n- **Outputs**: background job design document → artifacts\u002Fengineering\u002F\n- **Used by**: Engineering Agent\n- **Tool scripts**: .\u002Ftools\u002Fartifact\u002Fvalidate.sh\n\n## Purpose\nProvides design patterns and conventions for building reliable background job systems with proper retry logic, idempotency guarantees, and queue management to prevent data corruption and ensure at-least-once processing.\n\n## Procedure\n\n### Step 0: Tech Stack Detection\n\nRead `tech_stack.queue` from `company.config.yaml` to determine the job processing framework.\n\n**Framework-specific patterns:**\n\n| Framework | Language | Job Structure | Retry Config | Dead-Letter |\n|-----------|----------|---------------|--------------|-------------|\n| BullMQ | TypeScript | `Queue` + `Worker` classes, job data as typed interface | `attempts` + `backoff` in job options | Failed jobs move to `__failed__` queue |\n| Celery | Python | `@app.task` decorator, `bind=True` for self-reference | `max_retries` + `default_retry_delay` on task | `task_reject_on_worker_lost=True` |\n| Sidekiq | Ruby | `include Sidekiq::Worker`, `perform` method | `sidekiq_options retry: N` | Dead set after max retries |\n\nIf `tech_stack.queue` is not configured, present recommendations based on `tech_stack.language`.\n\n**Cross-references:** See deployment-strategy for queue infrastructure, observability-baseline for job metrics.\n\n1. Identify the jobs to be processed asynchronously and their triggers.\n2. Classify each job by priority, expected duration, and failure tolerance.\n3. Design the queue topology: which queues, routing rules, concurrency limits.\n4. Define retry strategy for each job type: max retries, backoff algorithm (exponential, linear), dead-letter handling.\n5. Ensure idempotency: define idempotency keys and deduplication windows.\n6. Design failure handling: what happens on permanent failure, alerting, manual retry paths.\n7. Define observability: job start\u002Fend logging, duration metrics, failure rate dashboards.\n8. Document rate limiting and backpressure mechanisms.\n9. Save the design document to `artifacts\u002Fengineering\u002F`.\n10. Validate the artifact using `.\u002Ftools\u002Fartifact\u002Fvalidate.sh`.\n\n## Quality Checklist\n- [ ] Every job type has a defined retry strategy\n- [ ] Idempotency keys are specified for all state-mutating jobs\n- [ ] Dead-letter queue handling is defined\n- [ ] Concurrency limits prevent resource exhaustion\n- [ ] Failure alerting thresholds are specified\n- [ ] Backpressure mechanism is documented\n- [ ] Observability hooks (logs, metrics, traces) are included\n- [ ] Artifact passes validation\n","# Background Jobs\n\n## Reference\n- **ID**: S-ENG-03\n- **Category**: Engineering\n- **Inputs**: job requirements, retry semantics, throughput targets, failure modes\n- **Outputs**: background job design document → artifacts\u002Fengineering\u002F\n- **Used by**: Engineering Agent\n- **Tool scripts**: .\u002Ftools\u002Fartifact\u002Fvalidate.sh\n\n## Purpose\nProvides design patterns and conventions for building reliable background job systems with proper retry logic, idempotency guarantees, and queue management to prevent data corruption and ensure at-least-once processing.\n\n## Procedure\n\n### Step 0: Tech Stack Detection\n\nRead `tech_stack.queue` from `company.config.yaml` to determine the job processing framework.\n\n**Framework-specific patterns:**\n\n| Framework | Language | Job Structure | Retry Config | Dead-Letter |\n|-----------|----------|---------------|--------------|-------------|\n| BullMQ | TypeScript | `Queue` + `Worker` classes, job data as typed interface | `attempts` + `backoff` in job options | Failed jobs move to `__failed__` queue |\n| Celery | Python | `@app.task` decorator, `bind=True` for self-reference | `max_retries` + `default_retry_delay` on task | `task_reject_on_worker_lost=True` |\n| Sidekiq | Ruby | `include Sidekiq::Worker`, `perform` method | `sidekiq_options retry: N` | Dead set after max retries |\n\nIf `tech_stack.queue` is not configured, present recommendations based on `tech_stack.language`.\n\n**Cross-references:** See deployment-strategy for queue infrastructure, observability-baseline for job metrics.\n\n1. Identify the jobs to be processed asynchronously and their triggers.\n2. Classify each job by priority, expected duration, and failure tolerance.\n3. Design the queue topology: which queues, routing rules, concurrency limits.\n4. Define retry strategy for each job type: max retries, backoff algorithm (exponential, linear), dead-letter handling.\n5. Ensure idempotency: define idempotency keys and deduplication windows.\n6. Design failure handling: what happens on permanent failure, alerting, manual retry paths.\n7. Define observability: job start\u002Fend logging, duration metrics, failure rate dashboards.\n8. Document rate limiting and backpressure mechanisms.\n9. Save the design document to `artifacts\u002Fengineering\u002F`.\n10. Validate the artifact using `.\u002Ftools\u002Fartifact\u002Fvalidate.sh`.\n\n## Quality Checklist\n- [ ] Every job type has a defined retry strategy\n- [ ] Idempotency keys are specified for all state-mutating jobs\n- [ ] Dead-letter queue handling is defined\n- [ ] Concurrency limits prevent resource exhaustion\n- [ ] Failure alerting thresholds are specified\n- [ ] Backpressure mechanism is documented\n- [ ] Observability hooks (logs, metrics, traces) are included\n- [ ] Artifact passes validation\n",{"name":5,"runtimes":33,"description":7},{"claude":34},{"user-invocable":29},"main","e842fb6d0e04360c47db78bc2e2e2987314d64d4","os\u002Fskills\u002Fbackground-jobs",2,"https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os","https:\u002F\u002Fgithub.com\u002Fvibbs","Principal Engineer · Applied AI · building ArcAI @ GrowthArc","2026-10-21 02:08:08",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add vibbs\u002Fcompany-os --skill background-jobs",{"tool":49,"command":50},"bunx","bunx skills add vibbs\u002Fcompany-os --skill background-jobs",{"tool":52,"command":53},"pnpm","pnpm dlx skills add vibbs\u002Fcompany-os --skill background-jobs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Fos\u002Fskills\u002Fbackground-jobs\u002FSKILL.md",true,[57,63,67],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fbond-field-definitions.md","REFERENCE","参考文档",1889,"https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fbond-verification\u002Freferences\u002Fbond-field-definitions.md",{"path":64,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fcircular-570-verification.md",2184,"https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fbond-verification\u002Freferences\u002Fcircular-570-verification.md",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"scripts\u002Fvalidate_bond_verification.py","SCRIPT","脚本",1593,"https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fbond-verification\u002Fscripts\u002Fvalidate_bond_verification.py",[74,83,91,101,117,130],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":28},"01M6CTHBW1E64ECYGD105N4S5E","typo-field","Fixture skill with a misspelled top-level field.","https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftypo-field\u002FSKILL.md",[],[81,82],"typo field","fixture skill",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":28},"01M6CTHABTV8FKVDHFMMKPAV51","spaced-comments","Fixture skill with comments and spaces after block keys.","https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fspaced-comments\u002FSKILL.md",[],[90,82],"spaced comments",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":28},"01M6CTH8MHC14KB65ZDHYBJW1N","crlf-comments","Fixture skill with Windows line endings.","https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fcrlf-comments\u002FSKILL.md",[],[98,99,100,82],"crlf comments","CRLF","windows",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":28},"01M6CTH6TBKTDP9G8QB1Z2K0TY","claude-fields","Fixture skill using top-level fields Claude Code documents.","https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fclaude-fields\u002FSKILL.md",[],[108,109,110,111,112,113,82,114,115,116],"claude fields","explore","documents","src","grep","read","Bash","code","testing",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":28},"01M6CTH46BGKXH80RWS876Y2CW","workflow-router","Maps an objective to the artifacts, stages and agents it needs. Use when deciding what happens next or which agents to involve.","https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Fos\u002Fskills\u002Fworkflow-router\u002FSKILL.md",[],[124,125,126,127,128,24,129],"workflow","router","workflow router","next","maps","artifacts",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":28},"01M6CTH27653SRVP2FMEQN3J5B","weekly-review","Summarizes your week: what shipped, AI spend, support themes, security health and next priorities. Use at the end of each week.","https:\u002F\u002Fgithub.com\u002Fvibbs\u002Fcompany-os\u002Fblob\u002Fmain\u002Fos\u002Fskills\u002Fweekly-review\u002FSKILL.md",[],[137,138,139,127,24,140,141,142,143],"weekly review","review","priorities","health","save","support","security"]