diff --git a/.opencode/.openwork-enterprise-creators b/.opencode/.openwork-enterprise-creators new file mode 100644 index 00000000..c19e887d --- /dev/null +++ b/.opencode/.openwork-enterprise-creators @@ -0,0 +1 @@ +seeded diff --git a/.opencode/commands/GetStarted.md b/.opencode/commands/GetStarted.md new file mode 100644 index 00000000..c1963371 --- /dev/null +++ b/.opencode/commands/GetStarted.md @@ -0,0 +1,5 @@ +--- +description: "Get started" +--- + +get started diff --git a/.opencode/commands/learn-files.md b/.opencode/commands/learn-files.md new file mode 100644 index 00000000..d588e673 --- /dev/null +++ b/.opencode/commands/learn-files.md @@ -0,0 +1,5 @@ +--- +description: "Safe, practical file workflows" +--- + +Show me how to interact with files in this workspace. Include safe examples for reading, summarizing, and editing. diff --git a/.opencode/commands/learn-plugins.md b/.opencode/commands/learn-plugins.md new file mode 100644 index 00000000..0eb81b0c --- /dev/null +++ b/.opencode/commands/learn-plugins.md @@ -0,0 +1,5 @@ +--- +description: "What plugins are and how to install them" +--- + +Explain what plugins are and how to install them in this workspace. diff --git a/.opencode/commands/learn-skills.md b/.opencode/commands/learn-skills.md new file mode 100644 index 00000000..7d4a9d15 --- /dev/null +++ b/.opencode/commands/learn-skills.md @@ -0,0 +1,5 @@ +--- +description: "How skills work and how to create your own" +--- + +Explain what skills are, how to use them, and how to create a new skill for this workspace. diff --git a/.opencode/openwork.json b/.opencode/openwork.json new file mode 100644 index 00000000..d452bc66 --- /dev/null +++ b/.opencode/openwork.json @@ -0,0 +1,11 @@ +{ + "version": 1, + "workspace": { + "name": "his", + "createdAt": 1770354192916, + "preset": "starter" + }, + "authorizedRoots": [ + "D:\\his" + ] +} \ No newline at end of file diff --git a/.opencode/skills/agent-creator/.env.example b/.opencode/skills/agent-creator/.env.example new file mode 100644 index 00000000..0575799e --- /dev/null +++ b/.opencode/skills/agent-creator/.env.example @@ -0,0 +1 @@ +# No environment variables are required for this skill. diff --git a/.opencode/skills/agent-creator/SKILL.md b/.opencode/skills/agent-creator/SKILL.md new file mode 100644 index 00000000..47f290ca --- /dev/null +++ b/.opencode/skills/agent-creator/SKILL.md @@ -0,0 +1,51 @@ +--- +name: agent-creator +description: Create new OpenCode agents with a gpt-5.2-codex default. +--- + +## Quick Usage (Already Configured) + +### Create a project agent +```bash +opencode agent create +``` + +### Agent file locations +- Project agents: `.opencode/agents/.md` +- Global agents: `~/.config/opencode/agents/.md` + +## Default model + +Use `gpt-5.2-codex` as the default model for new agents unless a workflow needs a different model. + +## Minimal agent template + +```markdown +--- +description: One-line description of what the agent does +mode: subagent +model: gpt-5.2-codex +tools: + write: false + edit: false + bash: false +--- +You are a specialized agent. Describe your task, boundaries, and expected output. +``` + +## Notes from OpenCode docs + +- Agent files are markdown with YAML frontmatter. +- The markdown filename becomes the agent name. +- Set `mode` to `primary`, `subagent`, or `all`. +- If no model is specified, subagents inherit the caller model. +- `tools` controls per-agent tool access. + +## Reference + +Follow the official OpenCode agent docs: https://opencode.ai/docs/agents/ + +## First-Time Setup (If Not Configured) + +1. Run `opencode agent create` and choose project scope. +2. Paste in the default template above and adjust tools as needed. diff --git a/.opencode/skills/agent-creator/client.ts b/.opencode/skills/agent-creator/client.ts new file mode 100644 index 00000000..a005513f --- /dev/null +++ b/.opencode/skills/agent-creator/client.ts @@ -0,0 +1,3 @@ +export type AgentCreatorClient = Record; + +export const client: AgentCreatorClient = {}; diff --git a/.opencode/skills/agent-creator/first-call.ts b/.opencode/skills/agent-creator/first-call.ts new file mode 100644 index 00000000..14fd77c7 --- /dev/null +++ b/.opencode/skills/agent-creator/first-call.ts @@ -0,0 +1,10 @@ +import { config } from "./load-env"; + +async function main() { + void config; + console.log("agent-creator: no credentials required."); +} + +main().catch((error) => { + console.error(error); +}); diff --git a/.opencode/skills/agent-creator/load-env.ts b/.opencode/skills/agent-creator/load-env.ts new file mode 100644 index 00000000..8b8968ff --- /dev/null +++ b/.opencode/skills/agent-creator/load-env.ts @@ -0,0 +1,3 @@ +export type AgentCreatorConfig = Record; + +export const config: AgentCreatorConfig = {}; diff --git a/.opencode/skills/command-creator/.env.example b/.opencode/skills/command-creator/.env.example new file mode 100644 index 00000000..0575799e --- /dev/null +++ b/.opencode/skills/command-creator/.env.example @@ -0,0 +1 @@ +# No environment variables are required for this skill. diff --git a/.opencode/skills/command-creator/.skill.config b/.opencode/skills/command-creator/.skill.config new file mode 100644 index 00000000..09c40f16 --- /dev/null +++ b/.opencode/skills/command-creator/.skill.config @@ -0,0 +1,8 @@ +# Required credentials (if any) +# - List the credential name +# - Where to obtain it +# - How to store it locally + +# Example: +# - GITHUB_TOKEN: https://github.com/settings/tokens +# - Store in .env (gitignored) diff --git a/.opencode/skills/command-creator/SKILL.md b/.opencode/skills/command-creator/SKILL.md new file mode 100644 index 00000000..0e912409 --- /dev/null +++ b/.opencode/skills/command-creator/SKILL.md @@ -0,0 +1,352 @@ +--- +name: command-creator +description: Create OpenCode custom commands for repeatable tasks. +--- + +## Quick Usage (Already Configured) + +### Create a new command file +```bash +mkdir -p .opencode/commands +``` + +Create `.opencode/commands/.md` with frontmatter and a prompt template. + +### Command file example +``` +--- +description: Run tests with coverage +agent: build +model: gpt-5.2-codex +--- + +Run the full test suite with coverage report and show any failures. +Focus on the failing tests and suggest fixes. +``` + +## Prompt config essentials + +- Use `$ARGUMENTS` for all arguments, or `$1`, `$2`, `$3` for positional args. +- Use `!\`command\`` to inject shell output into the prompt. +- Use `@path/to/file` to include file contents in the prompt. + +## Notes from OpenCode docs + +- Command files live in `.opencode/commands/` (project) or `~/.config/opencode/commands/` (global). +- The markdown filename becomes the command name (e.g., `test.md` → `/test`). +- JSON config also supports commands in `opencode.json` under `command`. +- Custom commands can override built-ins like `/init`, `/undo`, `/redo`, `/share`, `/help`. + +## Reference + +Follow the official OpenCode command docs: https://opencode.ai/docs/commands/ +Use the docs as the escape hatch when unsure. + +## Docs snapshot + +Skip to content +OpenCode + +Search +⌘ +K +Intro +Config +Providers +Network +Enterprise +Troubleshooting +Migrating to 1.0 +TUI +CLI +Web +IDE +Zen +Share +GitHub +GitLab +Tools +Rules +Agents +Models +Themes +Keybinds +Commands +Formatters +Permissions +LSP Servers +MCP servers +ACP Support +Agent Skills +Custom Tools +SDK +Server +Plugins +Ecosystem +On this page +Overview +Create command files +Configure +JSON +Markdown +Prompt config +Arguments +Shell output +File references +Options +Template +Description +Agent +Subtask +Model +Built-in +Commands +Create custom commands for repetitive tasks. + +Custom commands let you specify a prompt you want to run when that command is executed in the TUI. + +/my-command + +Custom commands are in addition to the built-in commands like /init, /undo, /redo, /share, /help. Learn more. + +Create command files +Create markdown files in the commands/ directory to define custom commands. + +Create .opencode/commands/test.md: + +.opencode/commands/test.md +--- +description: Run tests with coverage +agent: build +model: anthropic/claude-3-sonnet-20241022 +--- + +Run the full test suite with coverage report and show any failures. +Focus on the failing tests and suggest fixes. + +The frontmatter defines command properties. The content becomes the template. + +Use the command by typing / followed by the command name. + +"/test" + +Configure +You can add custom commands through the OpenCode config or by creating markdown files in the commands/ directory. + +JSON +Use the command option in your OpenCode config: + +opencode.jsonc +{ + "$schema": "https://opencode.ai/config.json", + "command": { + // This becomes the name of the command + "test": { + // This is the prompt that will be sent to the LLM + "template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.", + // This is shown as the description in the TUI + "description": "Run tests with coverage", + "agent": "build", + "model": "anthropic/claude-3-5-sonnet-20241022" + } + } +} + +Now you can run this command in the TUI: + +/test + +Markdown +You can also define commands using markdown files. Place them in: + +Global: ~/.config/opencode/commands/ +Per-project: .opencode/commands/ +~/.config/opencode/commands/test.md +--- +description: Run tests with coverage +agent: build +model: anthropic/claude-3-5-sonnet-20241022 +--- + +Run the full test suite with coverage report and show any failures. +Focus on the failing tests and suggest fixes. + +The markdown file name becomes the command name. For example, test.md lets you run: + +/test + +Prompt config +The prompts for the custom commands support several special placeholders and syntax. + +Arguments +Pass arguments to commands using the $ARGUMENTS placeholder. + +.opencode/commands/component.md +--- +description: Create a new component +--- + +Create a new React component named $ARGUMENTS with TypeScript support. +Include proper typing and basic structure. + +Run the command with arguments: + +/component Button + +And $ARGUMENTS will be replaced with Button. + +You can also access individual arguments using positional parameters: + +$1 - First argument +$2 - Second argument +$3 - Third argument +And so on… +For example: + +.opencode/commands/create-file.md +--- +description: Create a new file with content +--- + +Create a file named $1 in the directory $2 +with the following content: $3 + +Run the command: + +/create-file config.json src "{ \"key\": \"value\" }" + +This replaces: + +$1 with config.json +$2 with src +$3 with { "key": "value" } +Shell output +Use !command to inject bash command output into your prompt. + +For example, to create a custom command that analyzes test coverage: + +.opencode/commands/analyze-coverage.md +--- +description: Analyze test coverage +--- + +Here are the current test results: +!`npm test` + +Based on these results, suggest improvements to increase coverage. + +Or to review recent changes: + +.opencode/commands/review-changes.md +--- +description: Review recent changes +--- + +Recent git commits: +!`git log --oneline -10` + +Review these changes and suggest any improvements. + +Commands run in your project’s root directory and theutput becomes part of the prompt. + +File references +Include files in your command using @ followed by the filename. + +.opencode/commands/review-component.md +--- +description: Review component +--- + +Review the component in @src/components/Button.tsx. +Check for performance issues and suggest improvements. + +The file content gets included in the prompt automatically. + +Options +Let’s look at the configuration options in detail. + +Template +The template option defines the prompt that will be sent to the LLM when the command is executed. + +opencode.json +{ + "command": { + "test": { + "template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes." + } + } +} + +This is a required config option. + +Description +Use the description option to provide a brief description of what the command does. + +opencode.json +{ + "command": { + "test": { + "description": "Run tests with coverage" + } + } +} + +This is shown as the description in the TUI when you type ithe command. + +Agent +Use the agent config to optionally specify which agent should execute this command. If this is a subagent the command will trigger a subagent invocation by default. To disable this behavior, set subtask to false. + +opencode.json +{ + "command": { + "review": { + "agent": "plan" + } + } +} + +This is an optional config option. If not specified, defaults to your current agent. + +Subtask +Use the subtask boolean to force the command to trigger a subagent invocation. This is useful if you want the command to not pollute your primary context and will force the agent to act as a subagent, even if mode is set to primary on the agent configuration. + +opencode.json +{ + "command": { + "analyze": { + "subtask": true + } + } +} + +This is an optional config option. + +Model +Use the model config to override the default model for this command. + +opencode.json +{ + "command": { + "analyze": { + "model": "anthropic/claude-3-5-sonnet-20241022" + } + } +} + +This is an optional config option. + +Built-in +opencode includes several built-in commands like /init, /undo, /redo, /share, /help; learn more. + +Note + +Custom commands can override built-in commands. + +If you define a custom command with the same name, it will override the built-in command. + +Edit this page +Find a bug? Open an issue +Join our Discord community +© Anomaly + +Jan 24, 2026 diff --git a/.opencode/skills/get-started/SKILL.md b/.opencode/skills/get-started/SKILL.md new file mode 100644 index 00000000..4083564b --- /dev/null +++ b/.opencode/skills/get-started/SKILL.md @@ -0,0 +1,18 @@ +--- +name: get-started +description: Guide users through the get started setup and Chrome DevTools demo. +--- + +## When to use +- Always load this skill when the user says \"get started\". + +## What to do +- Reply with these four lines, exactly and in order: + 1) hey there welcome this is openwork + 2) we've pre-configured you with a couple tools + 3) Get Started + 4) write \"hey go on google.com\" + +## Then +- If the user writes \"go on google.com\" (or \"hey go on google.com\"), use the chrome-devtools MCP to open the site. +- After the navigation completes, reply: \"I'm on \" where is the final URL or page title they asked for. diff --git a/.opencode/skills/plugin-creator/.env.example b/.opencode/skills/plugin-creator/.env.example new file mode 100644 index 00000000..0575799e --- /dev/null +++ b/.opencode/skills/plugin-creator/.env.example @@ -0,0 +1 @@ +# No environment variables are required for this skill. diff --git a/.opencode/skills/plugin-creator/.skill.config b/.opencode/skills/plugin-creator/.skill.config new file mode 100644 index 00000000..09c40f16 --- /dev/null +++ b/.opencode/skills/plugin-creator/.skill.config @@ -0,0 +1,8 @@ +# Required credentials (if any) +# - List the credential name +# - Where to obtain it +# - How to store it locally + +# Example: +# - GITHUB_TOKEN: https://github.com/settings/tokens +# - Store in .env (gitignored) diff --git a/.opencode/skills/plugin-creator/SKILL.md b/.opencode/skills/plugin-creator/SKILL.md new file mode 100644 index 00000000..50f7ee08 --- /dev/null +++ b/.opencode/skills/plugin-creator/SKILL.md @@ -0,0 +1,41 @@ +--- +name: plugin-creator +description: Create OpenCode plugins and know where to load them. +--- + +## Quick Usage (Already Configured) + +### Where plugins live +- Project plugins: `.opencode/plugins/*.js` or `.opencode/plugins/*.ts` +- Global plugins: `~/.config/opencode/plugins/*.js` or `.ts` + +### Load from npm +Add npm plugin packages in `opencode.json`: +```json +{ + "$schema": "https://opencode.ai/config.json", + "plugin": ["opencode-helicone-session", "opencode-wakatime"] +} +``` + +## Minimal plugin template + +```ts +export const MyPlugin = async ({ project, client, $, directory, worktree }) => { + return { + // Hook implementations go here + } +} +``` + +## Notes from OpenCode docs + +- Plugins are JS/TS modules exporting one or more plugin functions. +- Local plugins are loaded directly from the plugin directory. +- NPM plugins are installed via Bun at startup and cached in `~/.cache/opencode/node_modules/`. +- Load order: global config → project config → global plugins → project plugins. + +## Reference + +Follow the official OpenCode plugin docs: https://opencode.ai/docs/plugins/ +Use the docs as the escape hatch when unsure. diff --git a/.opencode/skills/skill-creator/.env.example b/.opencode/skills/skill-creator/.env.example new file mode 100644 index 00000000..0575799e --- /dev/null +++ b/.opencode/skills/skill-creator/.env.example @@ -0,0 +1 @@ +# No environment variables are required for this skill. diff --git a/.opencode/skills/skill-creator/.skill.config b/.opencode/skills/skill-creator/.skill.config new file mode 100644 index 00000000..09c40f16 --- /dev/null +++ b/.opencode/skills/skill-creator/.skill.config @@ -0,0 +1,8 @@ +# Required credentials (if any) +# - List the credential name +# - Where to obtain it +# - How to store it locally + +# Example: +# - GITHUB_TOKEN: https://github.com/settings/tokens +# - Store in .env (gitignored) diff --git a/.opencode/skills/skill-creator/SKILL.md b/.opencode/skills/skill-creator/SKILL.md new file mode 100644 index 00000000..3a8c3fe6 --- /dev/null +++ b/.opencode/skills/skill-creator/SKILL.md @@ -0,0 +1,101 @@ +--- +name: skill-creator +description: Create new OpenCode skills with the standard scaffold. +--- + +Skill creator helps create other skills that are self-buildable. + +The best way to use it is after a user already executed a flow and says: create a skill for this. Alternatively, if the user asks for a skill to be created, suggest they do the task first and ask for skill creation at the end. + +This should trigger this scaffold: +- If the user needed to configure things, create a `.env.example` without credentials and include all required variables. +- Ask the user if they want to store credentials. If yes, write them to a `.env` file in the skill, and suggest rotating keys later. +- Always add a `.gitignore` in the skill that ignores `.env`, and verify `.env` is not tracked. +- If the user needed to interact with an API and you created scripts, add reusable scripts under `scripts/`. +- New skills should explain how to use the `scripts/` and that `.env.example` defines the minimum config. +- Skills should state that they infer what they can do from the available config. + +## Trigger phrases (critical) + +The description field is how Claude decides when to use your skill. +Include 2-3 specific phrases that should trigger it. + +Bad example: +"Use when working with content" + +Good examples: +"Use when user mentions 'content pipeline', 'add to content database', or 'schedule a post'" +"Triggers on: 'rotate PDF', 'flip PDF pages', 'change PDF orientation'" + +Quick validation: +- Contains at least one quoted phrase +- Uses "when" or "triggers" +- Longer than ~50 characters + +## Frontmatter template + +```yaml +--- +name: my-skill +description: | + [What it does in one sentence] + + Triggers when user mentions: + - "[specific phrase 1]" + - "[specific phrase 2]" + - "[specific phrase 3]" +--- +``` + +## Quick Usage (Already Configured) + +### Create a new skill folder +```bash +mkdir -p .opencode/skills/ +``` + +### Minimum scaffold files +- `SKILL.md` +- `scripts/` +- `.env` +- `.env.example` (use this to guide the minimum config) +- `.gitignore` (ignore `.env`) + +## .env (credentials + config) + +- Use `.env.example` to document required credentials or external setup. +- Do not include any real credentials in `.env.example`. + +## Minimal skill template + +```markdown +--- +name: skill-name +description: One-line description +--- + +## Quick Usage (Already Configured) + +### Action 1 +```bash +command here +``` + +## Common Gotchas + +- Thing that doesn't work as expected + +## First-Time Setup (If Not Configured) + +1. ... +``` + +## Notes from OpenCode docs + +- Skill folders live in `.opencode/skills//SKILL.md`. +- `name` must be lowercase and match the folder. +- Frontmatter requires `name` and `description`. + +## Reference + +Follow the official OpenCode skills docs: https://opencode.ai/docs/skills/ diff --git a/.opencode/skills/workspace-guide/SKILL.md b/.opencode/skills/workspace-guide/SKILL.md new file mode 100644 index 00000000..8b334575 --- /dev/null +++ b/.opencode/skills/workspace-guide/SKILL.md @@ -0,0 +1,47 @@ +--- +name: workspace-guide +description: Workspace guide to introduce OpenWork and onboard new users. +--- + +# Welcome to OpenWork + +Hi, I'm Ben and this is OpenWork. It's an open-source alternative to Claude's cowork. It helps you work on your files with AI and automate the mundane tasks so you don't have to. + +Before we start, use the question tool to ask: +"Are you more technical or non-technical? I'll tailor the explanation." + +## If the person is non-technical +OpenWork feels like a chat app, but it can safely work with the files you allow. Put files in this workspace and I can summarize them, create new ones, or help organize them. + +Try: +- "Summarize the files in this workspace." +- "Create a checklist for my week." +- "Draft a short summary from this document." + +## Skills and plugins (simple) +Skills add new capabilities. Plugins add advanced features like scheduling or browser automation. We can add them later when you're ready. + +## If the person is technical +OpenWork is a GUI for OpenCode. Everything that works in OpenCode works here. + +Most reliable setup today: +1) Install OpenCode from opencode.ai +2) Configure providers there (models and API keys) +3) Come back to OpenWork and start a session + +Skills: +- Install from the Skills tab, or add them to this workspace. +- Docs: https://opencode.ai/docs/skills + +Plugins: +- Configure in opencode.json or use the Plugins tab. +- Docs: https://opencode.ai/docs/plugins/ + +MCP servers: +- Add external tools via opencode.json. +- Docs: https://opencode.ai/docs/mcp-servers/ + +Config reference: +- Docs: https://opencode.ai/docs/config/ + +End with two friendly next actions to try in OpenWork. \ No newline at end of file diff --git a/openhis-server-new/openhis-application/src/main/resources/application-dev.yml b/openhis-server-new/openhis-application/src/main/resources/application-dev.yml index 2c1fc2fe..176f1f6c 100644 --- a/openhis-server-new/openhis-application/src/main/resources/application-dev.yml +++ b/openhis-server-new/openhis-application/src/main/resources/application-dev.yml @@ -95,10 +95,10 @@ server: # 开发环境日志配置 logging: level: - com.openhis: debug - com.baomidou.mybatisplus: debug - com.openhis.mapper: debug - com.openhis.domain: debug - org.springframework.jdbc.core: debug - com.alibaba.druid: debug - com.alibaba.druid.sql: debug \ No newline at end of file + com.openhis: info + com.baomidou.mybatisplus: info + com.openhis.mapper: info + com.openhis.domain: info + org.springframework.jdbc.core: info + com.alibaba.druid: info + com.alibaba.druid.sql: info \ No newline at end of file diff --git a/openhis-server-new/openhis-application/src/main/resources/mybatis/mybatis-config.xml b/openhis-server-new/openhis-application/src/main/resources/mybatis/mybatis-config.xml index e98ddd27..e239d24b 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mybatis/mybatis-config.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mybatis/mybatis-config.xml @@ -12,7 +12,7 @@ - +