Recently I came across the following construction:

Fix a dimension $k$. Let $C$ denote the space whose points are disjoint rectilinear embeddings $c\colon I^k\to \mathbb R^k$ of the (closed) $k$-dimensional cube into $\mathbb R^k$; let us call the points $c\in C$ cubes in $\mathbb R ^k$ (or just cubes) Given a cube $c$ and disjoint subcubes $c_1,\dots ,c_n\subset c$ this determines uniquely an $n$-ary operation $f\in O(n)$ in the little k-cubes operad (which we shall denote by $O$ here), given by the unique rectilinear factorization $\coprod_{i=1}^nc_i\colon \coprod^n I^k\xrightarrow{f} I^k \xrightarrow{c} \mathbb R$. Note that different such inclusions might give rise to the same operation in $O(n)$.

Now let us assume that some of these inclusions $\coprod c_i \subset c$ are *marked* and consider the functor $F$ which associates to an algebra $A$ (in spaces) over the little $k$-cubes operad the following space $FA$:
Points in $FA$ are maps $g\colon C\to A$ such that for each marked inclusion $\coprod c_i\subset c$ and corresponding operation $f\in O(n)$ we have $f(g(c_1),\dots,g(c_n))= f(c)$.

Here are some issues

I am a bit worried about the equality constraint in the definition of $FA$. Maybe it might be more appropriate using a more homotopical construction which keeps track of (coherent) paths between $f(g(c_1),\dots,g(c_n))$ and $f(c)$.

I would expect that if we mark all inclusions $c\subset c'$ of a single cube into another (and only those), then $FA$ should recover the space $A$ itself; at least up to homotopy. Is there a way to write the construction such that this becomes obvious?

More generally it seems to me that this construction should be an instance of a very general procedure which I am only able to describe heuristically: We make the space $C$ into a topological colored operad which has $C$ as it's space of colors and which has operations $(c_1,\dots,c_n)\to c$ given by disjoint inclusions. Then $C$ comes equipped with a canonical map $C\to O$. Moreover, some of the operations in $C$ are marked. Now it seems that $FA$ should be some sort of space of "maps of marked topological (or infinity-) operads" from $C$ to $A^\otimes$ where $A^\otimes\to O$ is some sort of operadic cocartesian fibration which describes the $O$-algebra $A$.

So here are (some of) my questions: What is the relation between the colored operad $C$ describes above and the little cubes operad? Is there a different description of this construction? How exactly should I define $A^\otimes$? What is the best way to make this construction precise, preferably in the language of infinity-categories? Is there a good theory of operadic cocartesian fibrations analogous to the one for infinity-categories?