Agents of S.H.I.E.L.D.'s Phil Coulson is already a pretty secretive guy. (It's hard to be forthcoming when even you don't know how you managed to come back from being killed by Loki in The Avengers.) But it turns out the man behind the badge has a secret identity of his own: hip indie filmmaker.

Sometime after going after Mjolnir in Thor, Clark Gregg wrote Trust Me, a movie about a child star and her do-right agent. Then he got cast in The Avengers. Then Agent Coulson got killed off. Then he filmed his script with himself as the lead. Then Coulson got brought back to life with his very own show, Agents of S.H.I.E.L.D. Now, his "little, unusual" movie is finally seeing the light of day, hitting select theaters Friday.

"The world of independent cinema is really strange right now, and for a movie like this to work it really needs the support of the filmmaker and, in this case, one of the leads," Gregg says. "That couldn't happen until I dealt with the fact that after The Avengers they brought me back to life."

But his side hustle as a movie director is only one of the secrets Gregg, aka the most charming man in the Marvel Cinematic Universe (sorry, RDJ), has been keeping. WIRED talked to the writer/director/actor about what else he's been hiding—from his hopes for Coulson in all of Marvel's spin-off shows to how he enlisted Joss Whedon for help with his script.

(Spoiler alert: Minor spoilers for the first season of Agents of S.H.I.E.L.D. follow.)

He Knows Marvel's 'Master Plan.' Sorta.

Agents of S.H.I.E.L.D. had a rough season, and not just because of Hydra. (Hail Hydra.) The ABC program that ties Marvel's big blockbuster movies to TV took a while to get traction with fans, but after a mid-season break and a huge boost from Captain America: The Winter Soldier, it ended strong. "The attempt to bring the Marvel universe that I've loved since I was a kid to network TV, it's been a shocking, weird transition," Gregg says. "Then to find out that the people I've been working with had a master plan and really responded to things that were working and things that weren't and delivered something I've never seen before, which is a story that moved from our show into a hugely successful movie and back onto our show. As someone who loves this stuff, I found that really exciting." So does he know where Coulson is going in Season 2? Hell, no. And he doesn't want to. "Even though it drives me crazy, I try not to know anything more than Agent Coulson knows. I don't like that," he says, adding that finding out S.H.I.E.L.D. agents were part of Hydra really threw off his game. "I had like five seconds where I knew who the traitor was in our midst before Agent Coulson did and I hated it. It made it harder to act those scenes."

Even He Can't Tell the Difference Between Himself and His S.H.I.E.L.D. Alter Ego Sometimes

Phil Coulson has defined the last few years of Gregg's acting career, so much so that even he gets caught up in Coulson's drama. "The membrane between me and Phil Coulson is so thin at the moment," he says. "I get really upset when people do bad stuff to him; I realize I'm cranky all day because someone is lying to Phil Coulson, then I realize I've lost my mind."

Agents of S.H.I.E.L.D. Was Originally Code-Named 'Ragtag'

True story. At the end of Season 1 on S.H.I.E.L.D., Nick Fury (Samuel L. Jackson) essentially gives Coulson the keys to the organization, and a weird little box. The whole thing was a full-circle moment reminiscent of the team that he assembled in the pilot, and it reminded Gregg of when he was shooting it on the DL. "Now I've got this little box, and god knows what's in there, and a very much ragtag team," he says. "From the beginning on the call sheet our secret name for our show was 'Ragtag' and that's very much where it ended up." So what does that mean for Season 2? "The vibe I get is that things are about to get old-school and it's going to be rebuilding S.H.I.E.L.D. in a way that won't be filled with traitors again and that's going to require making some very kind of hardcore decisions," he says. "It's going to be more kind of brass knuckles and cloak-and-dagger."

He Has a Wish for Which Marvel World Coulson Visits Next

"You know, I had comics and one of [my favorites] was Iron Fist," he says. "If I ever saw myself across from Daniel Rand, I don't know what to do. I would be thrilled if I got to welcome any of those characters into the television universe and S.H.I.E.L.D., but it has to serve the mission."

Joss Whedon Is His Secret Weapon

Trust Me is the second film Gregg has directed (the first was a adaptation of Chuck Palahniuk's book Choke). But after he wrote the script, he was a little nervous about whether or not he could actually get it made. Then, he says, "in the middle when I was trying to put it together I went to Joss' house for 11 days and made Much Ado About Nothing and I thought, 'Oh, I can do this.' It was hugely inspiring." He even asked the writer/director for tips on his script. Whedon ended up giving him notes that helped his film all fall into place. "The things that people were most scared about, some of the tonal shifts that happen in the movie, were Joss' favorite parts about it. That kind of was empowering to me," Gregg says. "[It's really helpful] when someone can look at jigsaw puzzle you've been staring at for a year and half and go, 'OK, that's great, but that's not the chimney' you kind of go, "[gasp] you're right! That's the rhino's leg!'"

He Knows the Next Shakespeare Play He Wants to Do With Whedon

Whedon famously squeezed the filming of William Shakespeare's Much Ado About Nothing into the break between shooting and editing The Avengers. Would Gregg star in Whedon's next Willy Shakes marathon if he decides to do one after The Avengers: Age of Ultron? "As his friend, I really hope he rests a little more this time," he says. "But if he does say to me, 'Oh, by the way, we're doing Twelfth Night in Griffith Park' I'll be psyched."