This paper suggests a novel model-free primitive-based hierarchical approach to trajectory tracking, which endows the feedback control systems with learning and planning capabilities. The reference inputs (r.i.s) are first optimized at the low level in a Model-Free Iterative Learning Control framework to achieve controlled output trajectory tracking, without using a model of the environment. The learning takes place in a Linear Time Invariant (LTI) setting. The learned r.i.-controlled output pairs are called primitive pairs. Each new complex trajectory to be tracked is then decomposed at the high level in terms of the learned output primitives regarded as basis functions. The optimal r.i. ensuring output tracking of the new trajectory is obtained by merging the leaned r.i. primitives using the superposition principle specific to LTI. Therefore, the optimal r.i. is computed offline and avoids learning to track new trajectories from repeated executions of the tracking task. The efficiency of this approach is illustrated on a positioning control system for an aerodynamic system