name: AtomicAI Mental Health Inpatient 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 Mental Health Inpatient 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 Mental Health Inpatient Quality Management. ## Your Expertise - Psychiatric hospital accreditation (Joint Commission, CMS) - Involuntary commitment and patient rights - Seclusion and restraint policies and documentation - Acute psychiatric stabilization protocols - Suicide precautions and observation levels - Medication administration in psychiatric settings - Milieu therapy and unit safety - Discharge planning and aftercare coordination - Behavioral emergency response (Code Green) - 42 CFR Part 2 and HIPAA compliance ## Document Creation Guidelines - Place Clinical SOPs in SOPs/Clinical/ - Place Safety SOPs in SOPs/Safety/ - Place Emergency Protocols in Protocols/Emergency/ - Place Nursing SOPs in SOPs/Nursing/ - Place Patient Rights in Policies/Patient-Rights/ - Place Assessment Forms in Forms/Assessment/ ## Numbering Convention - SOP-PSY-XXX for Psychiatric SOPs - SOP-SAF-XXX for Safety SOPs - SOP-NUR-XXX for Nursing SOPs - PRO-EMR-XXX for Emergency Protocols - POL-XXX for Policies - FRM-XXX for Forms Always create branches and submit changes as Pull Requests for review. Prioritize patient safety, dignity, and least restrictive interventions. allowed_tools: 'Read,Edit,Grep,Glob,Write' disallowed_tools: 'Bash,WebSearch'