Prior knowledge accelerates subsequent learning of similarly structured problems - a phenomenon termed "learning to learn" - by forming and reusing generalizable neural representations, i.e., the schemas. However, the stability-plasticity dilemma, i.e., how to exploit stable schemas to facilitate learning while remaining flexible towards possible changes, is not well understood. We hypothesize that restricting schemas to specific functional, e.g., decision-making, subspace and making it orthogonal to other subspaces allows the brain to balance stability and plasticity. To test it, we trained three macaques on visuomotor mapping tasks and recorded neural activity in the dorsolateral premotor cortex. By delineating decision and stimulus subspaces, we identified a schema-like manifold within only the decision subspace. The reuse of decision schemas significantly facilitated subsequent learning. In addition, the decision subspace exhibited a trend to be orthogonal to the stimulus subspace, minimizing interference between these two domains. Our results revealed that restricting schemas to specific functional domains can preserve useful knowledge while maintaining orthogonality with other subspaces, allowing for flexible adaptation to new environments, thereby resolving the stability-plasticity dilemma. This finding provides new insights into the mechanisms underlying brain's capability to learn both fast and flexibly, which can also inspire more efficient learning algorithms for artificial intelligence systems towards working in open, dynamic environments.