> For the complete documentation index, see [llms.txt](https://docs.konsist.lemonappdev.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.konsist.lemonappdev.com/features/packageselector.md).

# Package Wildcard

Package wildcard syntax is used to provide a more flexible way of querying packages.

The two dots (`..`) means any zero or more packages eg. all classes reside in a package starting with `com.app`:

```kotlin
    Konsist
        .scopeFromProject()
        .classes()
        .assertTrue { it.resideInPackages("com.app..") }
        
// com.app.data - valid  
// com.app.data.repository - valid  
// com.data - invalid
// com - invalid
        
```

Package wildcard syntax can be used multiple times inside the string argument. Here all interfaces reside in a package `logger` prefixed and suffixed by any number of packages:

```kotlin
    Konsist
        .scopeFromProject()
        .interfaces()
        .assertTrue { it.resideInPackages("..logger..") }

// logger - valid  
// com.logger - valid  
// com.logger.tree - valid
// com - invalid
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.konsist.lemonappdev.com/features/packageselector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
