You can quickly write a small fiddle script using ACS tools without adding this code your source repohttps://adobe-consulting-services.github.io/acs-aem-tools/features/aem-fiddle/index.html
Did you followed these two documentations for package inclusion:-https://adobe-consulting-services.github.io/acs-aem-commons/pages/maven.html https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components#include-core-components-as-subpackage-into-your-own-project-maven-build
Can you enable Content Fragment Model from configuration browser and again apply that config to your path This link will help you to do ithttps://helpx.adobe.com/experience-manager/kt/sites/using/content-services-tutorial-use/part2.html
Your first URL goes towards selector implementation in AEM, Look at the complete guide here https://helpx.adobe.com/experience-manager/6-2/managing/using/seo-and-url-management.html
The one you are referring is the summit lab session given by folks on 6.3.https://helpx.adobe.com/experience-manager/6-2/sites/deploying/using/best-practices-for-queries-and-indexing.html