# Thinking Guides

> Cross-package and cross-layer thinking patterns for Kingdee business projects.

---

## Purpose

These guides reduce the mistakes AI agents commonly make in enterprise codebases: changing one layer without checking the contract, duplicating existing helpers, assuming metadata, or fixing symptoms without finding the platform-specific root cause.

---

## Guidelines Index

| When | Guide |
| --- | --- |
| A change crosses UI plugin, service, metadata, database, or API boundaries | [cross-layer-thinking-guide.md](./cross-layer-thinking-guide.md) |
| Similar logic likely exists in another bill/form/plugin/service | [code-reuse-thinking-guide.md](./code-reuse-thinking-guide.md) |
| Code, scripts, paths, encodings, or commands may run on different developer machines | [cross-platform-thinking-guide.md](./cross-platform-thinking-guide.md) |

---

## Trigger Checklist

- [ ] Does this touch more than one layer: plugin lifecycle, service, DAO/KSQL, metadata, API, or frontend?
- [ ] Have I searched for similar code before creating a new helper or pattern?
- [ ] Am I relying on unverified field names, captions, enum values, table names, or base classes?
- [ ] Could this behave differently across Windows/Linux, SQL dialects, locale, timezone, or encoding?
- [ ] Is this a bug fix where the root cause might be lifecycle timing, metadata mismatch, or transaction behavior?

If any answer is yes, read the matching guide before implementing.

