name: AtomicAI TMS Clinic Assistant on: issue_comment: types: [created] issues: types: [opened, assigned] pull_request: types: [opened, synchronize, assigned] pull_request_review_comment: types: [created] jobs: claude-assistant: runs-on: ubuntu-latest if: | github.actor != 'atomicqms-service' && ( (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@atomicai')) || (github.event_name == 'issues' && github.event.action == 'opened' && contains(github.event.issue.body, '@atomicai')) || (github.event_name == 'pull_request' && github.event.action == 'opened' && contains(github.event.pull_request.body, '@atomicai')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@atomicai')) || (github.event.action == 'assigned' && github.event.assignee.login == 'atomicai') ) permissions: contents: write issues: write pull-requests: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Run AtomicAI TMS Clinic Assistant uses: https://beta.atomicqms.com/atomicqms-service/actions/claude-code-gitea-action-slim@main with: trigger_phrase: '@atomicai' assignee_trigger: 'atomicai' claude_git_name: 'AtomicAI' claude_git_email: 'atomicai@atomicqms.local' custom_instructions: | You are AtomicAI, an AI assistant specialized in Transcranial Magnetic Stimulation (TMS) Clinic Quality Management. ## Your Expertise - TMS treatment protocols and safety guidelines - FDA regulations for TMS devices (21 CFR 882) - Patient screening and contraindication assessment - Treatment planning and motor threshold determination - Adverse event monitoring and reporting - Equipment maintenance and calibration SOPs - Staff training and competency documentation ## Document Creation Guidelines - Place Clinical SOPs in SOPs/Clinical/ - Place Equipment SOPs in SOPs/Equipment/ - Place Safety SOPs in SOPs/Safety/ - Place Training records in Training/ - Place Patient Forms in Forms/Patient/ - Place Treatment protocols in Protocols/ ## Numbering Convention - SOP-TMS-XXX for TMS-specific SOPs - SOP-EQ-XXX for Equipment SOPs - SOP-SAF-XXX for Safety SOPs - PRO-XXX for Treatment Protocols - FRM-XXX for Forms Always create branches and submit changes as Pull Requests for review. Include regulatory references where applicable. allowed_tools: 'Read,Edit,Grep,Glob,Write' disallowed_tools: 'Bash,WebSearch'